Skip to content

Commit

Permalink
Update Snakefile
Browse files Browse the repository at this point in the history
fix shifts
  • Loading branch information
Phlya authored Mar 16, 2021
1 parent f8c42f5 commit 713f272
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ rule make_pileups_shifts:
cooler=lambda wildcards: coolfiles_dict[wildcards.sample],
bedfile=lambda wildcards: bedfiles_dict[wildcards.bedfile],
output:
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{shifts}-shifts.np.txt",
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{{shifts}}-shifts.np.txt",
params:
outname=lambda wildcards, output: output[0].split("/")[-1],
outdir=lambda wildcards, output: f"{pileups_folder}/{wildcards.folder}",
Expand All @@ -555,15 +555,15 @@ rule make_pileups_shifts:
mem_mb=lambda wildcards, threads: threads * 16 * 1024,
runtime=24 * 60,
shell:
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype {{params.format}} --n_proc {{threads}} --nshifts {shifts} --outdir {{params.outdir}} --outname {{params.outname}}"
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype {{params.format}} --n_proc {{threads}} --nshifts {{wildcards.shifts}} --outdir {{params.outdir}} --outname {{params.outname}}"


rule make_pileups_shifts_local:
input:
cooler=lambda wildcards: coolfiles_dict[wildcards.sample],
bedfile=lambda wildcards: bedfiles_dict[wildcards.bedfile],
output:
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{shifts}-shifts_local.np.txt",
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{{shifts}}-shifts_local.np.txt",
params:
outname=lambda wildcards, output: output[0].split("/")[-1],
outdir=lambda wildcards, output: f"{pileups_folder}/{wildcards.folder}",
Expand All @@ -572,15 +572,15 @@ rule make_pileups_shifts_local:
mem_mb=lambda wildcards, threads: threads * 16 * 1024,
runtime=24 * 60,
shell:
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype bed --local --n_proc {{threads}} --nshifts {shifts} --outdir {{params.outdir}} --outname {{params.outname}}"
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype bed --local --n_proc {{threads}} --nshifts {{wildcards.shifts}} --outdir {{params.outdir}} --outname {{params.outname}}"


rule make_pileups_shifts_local_rescaled:
input:
cooler=lambda wildcards: coolfiles_dict[wildcards.sample],
bedfile=lambda wildcards: bedfiles_dict[wildcards.bedfile],
output:
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{shifts}-shifts_local_rescaled.np.txt",
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{{shifts}}-shifts_local_rescaled.np.txt",
params:
outname=lambda wildcards, output: output[0].split("/")[-1],
outdir=lambda wildcards, output: f"{pileups_folder}/{wildcards.folder}",
Expand All @@ -589,15 +589,15 @@ rule make_pileups_shifts_local_rescaled:
mem_mb=lambda wildcards, threads: threads * 16 * 1024,
runtime=24 * 60,
shell:
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype bed --local --rescale --rescale_pad {config['pileups']['rescale_pad']} --n_proc {{threads}} --nshifts {shifts} --outdir {{params.outdir}} --outname {{params.outname}}"
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype bed --local --rescale --rescale_pad {config['pileups']['rescale_pad']} --n_proc {{threads}} --nshifts {{wildcards.shifts}} --outdir {{params.outdir}} --outname {{params.outname}}"


rule make_pileups_shifts_distance:
input:
cooler=lambda wildcards: coolfiles_dict[wildcards.sample],
bedfile=lambda wildcards: bedfiles_dict[wildcards.bedfile],
output:
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{shifts}-shifts_dist_{{mindist,[0-9]+}}-{{maxdist,[0-9]+}}.np.txt",
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over_{{bedfile}}_{{shifts}}-shifts_dist_{{mindist,[0-9]+}}-{{maxdist,[0-9]+}}.np.txt",
params:
outname=lambda wildcards, output: output[0].split("/")[-1],
outdir=lambda wildcards, output: f"{pileups_folder}/{wildcards.folder}",
Expand All @@ -607,7 +607,7 @@ rule make_pileups_shifts_distance:
mem_mb=lambda wildcards, threads: threads * 16 * 1024,
runtime=24 * 60,
shell:
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype {{params.format}} --n_proc {{threads}} --nshifts {shifts} --mindist {{wildcards.mindist}} --maxdist {{wildcards.maxdist}} --outdir {{params.outdir}} --outname {{params.outname}}"
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bedfile}} --basetype {{params.format}} --n_proc {{threads}} --nshifts {{wildcards.shifts}} --mindist {{wildcards.mindist}} --maxdist {{wildcards.maxdist}} --outdir {{params.outdir}} --outname {{params.outname}}"


rule make_pileups_bed2:
Expand Down Expand Up @@ -668,7 +668,7 @@ rule make_pileups_bed2_shifts:
bedpairs_folder, bedpairs[wildcards.pairname][1]
),
output:
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over-paired_{{pairname}}_{shifts}-shifts.np.txt",
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over-paired_{{pairname}}_{{shifts}}-shifts.np.txt",
params:
outname=lambda wildcards, output: output[0].split("/")[-1],
outdir=lambda wildcards, output: f"{pileups_folder}/{wildcards.folder}",
Expand All @@ -678,7 +678,7 @@ rule make_pileups_bed2_shifts:
mem_mb=lambda wildcards, threads: threads * 16 * 1024,
runtime=24 * 60,
shell:
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bed1}} --basetype bed --bed2 {{input.bed2}} --n_proc {{threads}} --nshifts {shifts} --outdir {{params.outdir}} --outname {{params.outname}} {{params.args}}"
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bed1}} --basetype bed --bed2 {{input.bed2}} --n_proc {{threads}} --nshifts {{wildcards.shifts}} --outdir {{params.outdir}} --outname {{params.outname}} {{params.args}}"


rule make_pileups_bed2_shifts_distance:
Expand All @@ -691,7 +691,7 @@ rule make_pileups_bed2_shifts_distance:
bedpairs_folder, bedpairs[wildcards.pairname][1]
),
output:
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over-paired_{{pairname}}_{shifts}-shifts_dist_{{mindist,[0-9]+}}-{{maxdist,[0-9]+}}.np.txt",
f"{pileups_folder}/{{folder}}/{{sample}}-{{resolution,[0-9]+}}_over-paired_{{pairname}}_{{shifts}}-shifts_dist_{{mindist,[0-9]+}}-{{maxdist,[0-9]+}}.np.txt",
params:
outname=lambda wildcards, output: output[0].split("/")[-1],
outdir=lambda wildcards, output: f"{pileups_folder}/{wildcards.folder}",
Expand All @@ -701,7 +701,7 @@ rule make_pileups_bed2_shifts_distance:
mem_mb=lambda wildcards, threads: threads * 16 * 1024,
runtime=24 * 60,
shell:
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bed1}} --basetype bed --bed2 {{input.bed2}} --n_proc {{threads}} --nshifts {shifts} --mindist {{wildcards.mindist}} --maxdist {{wildcards.maxdist}} --outdir {{params.outdir}} --outname {{params.outname}} {{params.args}}"
f"coolpup.py {{input.cooler}}::resolutions/{{wildcards.resolution}} {{input.bed1}} --basetype bed --bed2 {{input.bed2}} --n_proc {{threads}} --nshifts {{wildcards.shifts}} --mindist {{wildcards.mindist}} --maxdist {{wildcards.maxdist}} --outdir {{params.outdir}} --outname {{params.outname}} {{params.args}}"


rule call_loops_chromosight:
Expand Down

0 comments on commit 713f272

Please sign in to comment.