Skip to content

Commit

Permalink
fix: add conditional when no inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
rroutsong committed Dec 11, 2024
1 parent 8ea4e6c commit ef4a33c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions workflow/rules/single/peakcall.smk
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ tmpdir = config['options']['tmp_dir']

rule MACS2_broad:
input:
chip = join(bam_dir, "{name}.Q5DD_tagAlign.gz"),
txt = join(ppqt_dir, "{name}.Q5DD_tagAlign.ppqt.txt"),
c_option = lambda w: join(bam_dir, f"{chip2input[w.name]}.Q5DD_tagAlign.gz")
if chip2input[w.name] else [],
chip = join(bam_dir, "{name}.Q5DD_tagAlign.gz"),
txt = join(ppqt_dir, "{name}.Q5DD_tagAlign.ppqt.txt"),
c_option = lambda w: join(bam_dir, f"{chip2input[w.name]}.Q5DD_tagAlign.gz")
if w.name and chip2input[w.name] else [],
output:
join(macsB_dir, "{name}", "{name}_peaks.broadPeak"),
params:
Expand Down Expand Up @@ -115,7 +115,8 @@ rule MACS2_narrow:
input:
chip = join(bam_dir, "{name}.Q5DD.bam"),
txt = join(ppqt_dir, "{name}.Q5DD.ppqt.txt"),
c_option = lambda w: join(bam_dir, f"{chip2input[w.name]}.Q5DD_tagAlign.gz"),
c_option = lambda w: join(bam_dir, f"{chip2input[w.name]}.Q5DD_tagAlign.gz")
if w.name and chip2input[w.name] else [],
output:
join(macsN_dir, "{name}", "{name}_peaks.narrowPeak"),
params:
Expand Down

0 comments on commit ef4a33c

Please sign in to comment.