diff --git a/Snakefile b/Snakefile index 297db7d57f371af0c209fc80169ceeeab3380393..6da138c204392d1a2fd14871ddc692234eb684e2 100755 --- a/Snakefile +++ b/Snakefile @@ -511,7 +511,7 @@ if config["bamCoverage"]["do"]: #---------------------------------- # Estimate Library Complexity #---------------------------------- -lib_complexity_input = os.path.join(analysis_dir, "02-Mapping/{SAMPLE}_{REF}_sort.bam") +lib_complexity_input = "{}/{{SAMPLE}}_{{REF}}_sort_dedup{}.bam".format(biasedRegions_dir, biasedRegions) lib_complexity_metrics = os.path.join(analysis_dir, "05-QC/Complexity/{SAMPLE}_{REF}_metrics.txt") lib_complexity_log_std = os.path.join(analysis_dir, "05-QC/Complexity/logs/{SAMPLE}_{REF}_complexity.out") lib_complexity_log_err = os.path.join(analysis_dir, "05-QC/Complexity/logs/{SAMPLE}_{REF}_complexity.err") @@ -522,7 +522,7 @@ include: os.path.join(RULES, "EstimateLibraryComplexity.rules") # plot Fingerprint #---------------------------------- def IPandINPUT(wildcards): - return [os.path.join(analysis_dir,"02-Mapping/{{IP}}_{}_sort.bam".format(ref)), str(os.path.join(analysis_dir,"02-Mapping/") + IP_INPUT[IP_INPUT.IP == wildcards.IP].iloc[0]['INPUT'] + "_{}_sort.bam".format(ref))] + return [os.path.join(analysis_dir,"{}/{{IP}}_{}_sort_dedup{}.bam".format(biasedRegions_dir, ref, biasedRegions)), str(os.path.join(analysis_dir, biasedRegions_dir +"/") + IP_INPUT[IP_INPUT.IP == wildcards.IP].iloc[0]['INPUT'] + "_{}_sort_dedup{}.bam".format(ref, biasedRegions))] plotFingerprint_input = IPandINPUT @@ -693,7 +693,7 @@ if config["seacr"]["do"]: seacr_output = os.path.join(analysis_dir, "06-PeakCalling/seacr/{{SAMPLE}}.{}.bed".format(config["seacr"]["threshold"])) seacr_logs_std = os.path.join(analysis_dir, "06-PeakCalling/seacr/logs/{SAMPLE}_seacr_calling.out") seacr_logs_err = os.path.join(analysis_dir, "06-PeakCalling/seacr/logs/{SAMPLE}_seacr_calling.err") - final_output.extend(expand(seacr_output, SAMPLE=(IP_ALL+ IP_PPR + PPR_POOL))) + final_output.extend(expand(seacr_output, SAMPLE=IP_ALL)) include: os.path.join(RULES, "seacr.rules") @@ -763,16 +763,8 @@ def IA_input(wildcards): elif wildcards.CALLER == "seacr": return expand(os.path.join(analysis_dir, "06-PeakCalling/{{CALLER}}/{{IP_IDR}}_{CASE}.{{MOD}}.bed"), CASE=rep) -def IA_pool(wildcards): - if wildcards.CALLER == "macs2": - return os.path.join(analysis_dir, "06-PeakCalling/{{CALLER}}/{}/{{IP_IDR}}_PPRPool_peaks.{{MOD}}Peak".format(model_dir)) - elif wildcards.CALLER == "seacr": - return os.path.join(analysis_dir, "06-PeakCalling/{CALLER}/{IP_IDR}_PPRPool.{MOD}.bed") - - if model in ["broad"] or config["compute_idr"]["intersectionApproach"] or config["seacr"]["do"] : intersectionApproach_input_rep = IA_input - intersectionApproach_input_pool = IA_pool intersectionApproach_logs = os.path.join(analysis_dir, "08-ReproduciblePeaks/{CALLER}/logs/{IP_IDR}_IA_{MOD}peaks.o") intersectionApproach_output = os.path.join(analysis_dir, "08-ReproduciblePeaks/{CALLER}/{IP_IDR}_IA.{MOD}Peak") if model in ["broad"] :