Skip to content

Commit

Permalink
Merge pull request #784 from maxplanck-ie/bugfix_777
Browse files Browse the repository at this point in the history
fixed macs2 bug , if spike in but not cutnx
  • Loading branch information
LeilyR committed Sep 10, 2021
2 parents 8a5ee77 + d4e816b commit 6e1e4c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion snakePipes/shared/rules/ChIP_peak_calling.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if pairedEnd:
else "",
genome_size = str(genome_size),
ext_size =
lambda wildcards: " --nomodel --extsize "+get_pe_frag_length(wildcards.chip_sample,
lambda wildcards: " --nomodel --extsize "+get_pe_frag_length("filtered_bam/"+wildcards.chip_sample+".filtered.bam",
"deepTools_qc/bamPEFragmentSize/fragmentSize.metric.tsv") \
if not cutntag else " ",
peakCaller_options = lambda wildcards: str(peakCallerOptions or '') if not cutntag else " -p 1e-5 ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if pairedEnd:
lambda wildcards: "-c split_bam/"+get_control(wildcards.chip_sample)+"_host.bam" if get_control(wildcards.chip_sample)
else "",
ext_size =
lambda wildcards: " --nomodel --extsize "+get_pe_frag_length(wildcards.chip_sample,
lambda wildcards: " --nomodel --extsize "+get_pe_frag_length("split_bam/"+wildcards.chip_sample+"_host.bam",
"split_deepTools_qc/bamPEFragmentSize/host.fragmentSize.metric.tsv") \
if not cutntag else " ",
peakCaller_options = lambda wildcards: str(peakCallerOptions or '') if not cutntag else " -p 1e-5 ",
Expand Down
2 changes: 1 addition & 1 deletion snakePipes/workflows/ChIP-seq/internals.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def is_allelic(workingdir):
def get_pe_frag_length(sample, frag_len_file):
try:
df = pd.read_csv(frag_len_file, header = None, skiprows = 1, sep = "\t")
df = df.loc[df[0] == "filtered_bam/"+sample+".filtered.bam"]
df = df.loc[df[0] == sample]
frag_len = int(df[5].values[0])
return str(frag_len)
except:
Expand Down

0 comments on commit 6e1e4c6

Please sign in to comment.