Skip to content

Commit

Permalink
fix: fix hooks, split diff bind and uropa into multiple rule hierarch…
Browse files Browse the repository at this point in the history
…ical rules
  • Loading branch information
rroutsong committed Aug 19, 2024
1 parent 368a33a commit 08ad2fa
Show file tree
Hide file tree
Showing 3 changed files with 262 additions and 149 deletions.
13 changes: 12 additions & 1 deletion workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ samples = config['samples']
bin_path = config['project']['binpath']
workpath = config['project']['workpath']
assay = config['options']['assay']
blocks = config['project']['blocks']
blocking = False if set(blocks.values()) in ({None}, {''}) else True
paired_end = False if config['project']['nends'] == 1 else True
chips = config['project']['peaks']['chips']
contrast = config['project']['contrast']
Expand Down Expand Up @@ -99,7 +101,11 @@ if assay == "cfchip":
join(diffbind_dir, "{group1}_vs_{group2}-{PeakTool}", "{group1}_vs_{group2}-{PeakTool}_Diffbind.html"),
group1=zipGroup1, group2=zipGroup2, PeakTool=zipToolC
))

if blocking:
rule_all_ins.extend(expand(
join(diffbind_dir, "{group1}_vs_{group2}-{PeakTool}", "{group1}_vs_{group2}-{PeakTool}_Diffbind_blocking.html"),
group1=zipGroup1, group2=zipGroup2, PeakTool=zipToolC
))
if contrast:
rule_all_ins.extend(expand(
join(uropa_diffbind_dir, "{name}_{PeakTool}_uropa_{_type}_allhits.txt"),
Expand Down Expand Up @@ -161,6 +167,11 @@ elif assay in ["atac", "chip"]:
join(diffbind_dir, "{group1}_vs_{group2}-{PeakTool}", "{group1}_vs_{group2}-{PeakTool}_Diffbind.html"),
group1=zipGroup1, group2=zipGroup2, PeakTool=zipToolC
))
if blocking:
rule_all_ins.extend(expand(
join(diffbind_dir, "{group1}_vs_{group2}-{PeakTool}", "{group1}_vs_{group2}-{PeakTool}_Diffbind_blocking.html"),
group1=zipGroup1, group2=zipGroup2, PeakTool=zipToolC
))
if contrast:
rule_all_ins.extend(expand(
join(uropa_diffbind_dir, "{name}_{PeakTool}_uropa_{_type}_allhits.txt"),
Expand Down
Loading

0 comments on commit 08ad2fa

Please sign in to comment.