Skip to content
Snippets Groups Projects
Commit b322e38b authored by Rachel  LEGENDRE's avatar Rachel LEGENDRE
Browse files

Dedup bam as input to QC rules - remove pool for Seacr and from IA input

parent 108cdca9
No related branches found
No related tags found
No related merge requests found
...@@ -511,7 +511,7 @@ if config["bamCoverage"]["do"]: ...@@ -511,7 +511,7 @@ if config["bamCoverage"]["do"]:
#---------------------------------- #----------------------------------
# Estimate Library Complexity # 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_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_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") 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") ...@@ -522,7 +522,7 @@ include: os.path.join(RULES, "EstimateLibraryComplexity.rules")
# plot Fingerprint # plot Fingerprint
#---------------------------------- #----------------------------------
def IPandINPUT(wildcards): 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 plotFingerprint_input = IPandINPUT
...@@ -693,7 +693,7 @@ if config["seacr"]["do"]: ...@@ -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_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_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") 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") include: os.path.join(RULES, "seacr.rules")
...@@ -763,16 +763,8 @@ def IA_input(wildcards): ...@@ -763,16 +763,8 @@ def IA_input(wildcards):
elif wildcards.CALLER == "seacr": elif wildcards.CALLER == "seacr":
return expand(os.path.join(analysis_dir, "06-PeakCalling/{{CALLER}}/{{IP_IDR}}_{CASE}.{{MOD}}.bed"), CASE=rep) 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"] : if model in ["broad"] or config["compute_idr"]["intersectionApproach"] or config["seacr"]["do"] :
intersectionApproach_input_rep = IA_input 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_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") intersectionApproach_output = os.path.join(analysis_dir, "08-ReproduciblePeaks/{CALLER}/{IP_IDR}_IA.{MOD}Peak")
if model in ["broad"] : if model in ["broad"] :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment