Skip to content

Commit 28435a6

Browse files
committed
removed f-strings
1 parent f9be5d6 commit 28435a6

File tree

6 files changed

+49
-35
lines changed

6 files changed

+49
-35
lines changed

workflow/rules/damid.smk

+9-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if config["plasmid_fasta"] == "none":
2323
log:
2424
"logs/bowtie2_align/{dir}/{sample}.log"
2525
wrapper:
26-
f"{wrapper_version}/bio/bowtie2/align"
26+
"v3.13.8/bio/bowtie2/align"
2727

2828

2929
rule sort_bowtie2_bam:
@@ -37,7 +37,7 @@ if config["plasmid_fasta"] == "none":
3737
log:
3838
"logs/samtools/sort/{dir}/{sample}.log"
3939
wrapper:
40-
f"{wrapper_version}/bio/samtools/sort"
40+
"v3.13.8/bio/samtools/sort"
4141

4242

4343
rule index_bowtie2_bam:
@@ -51,7 +51,7 @@ if config["plasmid_fasta"] == "none":
5151
log:
5252
"logs/samtools/index/{dir}/{sample}.log"
5353
wrapper:
54-
f"{wrapper_version}/bio/samtools/index"
54+
"v3.13.8/bio/samtools/index"
5555

5656

5757
rule damidseq_pipeline: # Ignore dir wildcard in expand statement (double braces)
@@ -101,7 +101,7 @@ if config["plasmid_fasta"] == "none":
101101
log:
102102
"logs/bowtie2_align/{dir}/{sample}.log"
103103
wrapper:
104-
f"{wrapper_version}/bio/bowtie2/align"
104+
"v3.13.8/bio/bowtie2/align"
105105

106106

107107
rule sort_bowtie2_bam:
@@ -115,7 +115,7 @@ if config["plasmid_fasta"] == "none":
115115
log:
116116
"logs/samtools/index/{dir}/{sample}.log"
117117
wrapper:
118-
f"{wrapper_version}/bio/samtools/sort"
118+
"v3.13.8/bio/samtools/sort"
119119

120120

121121
rule index_bowtie2_bam:
@@ -129,7 +129,7 @@ if config["plasmid_fasta"] == "none":
129129
log:
130130
"logs/samtools/index/{dir}/{sample}.log"
131131
wrapper:
132-
f"{wrapper_version}/bio/samtools/index"
132+
"v3.13.8/bio/samtools/index"
133133

134134

135135
# Single-end fragments are extended to n bp
@@ -167,7 +167,7 @@ if config["plasmid_fasta"] == "none":
167167
log:
168168
"logs/samtools/sort/{dir}/{sample}.log"
169169
wrapper:
170-
f"{wrapper_version}/bio/samtools/sort"
170+
"v3.13.8/bio/samtools/sort"
171171
'''
172172

173173
rule index_bam:
@@ -181,7 +181,7 @@ if config["plasmid_fasta"] == "none":
181181
log:
182182
"logs/samtools/index/{dir}/{sample}.log"
183183
wrapper:
184-
f"{wrapper_version}/bio/samtools/index"
184+
"v3.13.8/bio/samtools/index"
185185

186186

187187
# dir wildcard is escaped so that multiple dirs can be run in parallel
@@ -304,7 +304,7 @@ else:
304304
log:
305305
"logs/bowtie2_align/{dir}/{sample}.log"
306306
wrapper:
307-
f"{wrapper_version}/bio/bowtie2/align"
307+
"v3.13.8/bio/bowtie2/align"
308308
'''
309309
rule damidseq_pipeline: # ignore dir wildcard in expand statement (double braces)
310310
input:

workflow/rules/fastqc.smk

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if paired_end:
1414
runtime=config["resources"]["fastqc"]["time"],
1515
mem_mb = 2048,
1616
wrapper:
17-
f"{wrapper_version}/bio/fastqc"
17+
"v3.13.8/bio/fastqc"
1818

1919

2020
rule pre_trim_fastqc:
@@ -32,7 +32,7 @@ if paired_end:
3232
runtime=config["resources"]["fastqc"]["time"],
3333
mem_mb = 2048,
3434
wrapper:
35-
f"{wrapper_version}/bio/fastqc"
35+
"v3.13.8/bio/fastqc"
3636

3737

3838
rule multiqc:
@@ -49,7 +49,7 @@ if paired_end:
4949
log:
5050
"logs/multiqc/multiqc.log"
5151
wrapper:
52-
f"{wrapper_version}/bio/multiqc"
52+
"v3.13.8/bio/multiqc"
5353
else:
5454
rule post_trim_fastqc:
5555
input:
@@ -66,7 +66,7 @@ else:
6666
runtime=config["resources"]["fastqc"]["time"],
6767
mem_mb = 2048,
6868
wrapper:
69-
f"{wrapper_version}/bio/fastqc"
69+
"v3.13.8/bio/fastqc"
7070

7171

7272
rule pre_trim_fastqc:
@@ -84,7 +84,7 @@ else:
8484
runtime=config["resources"]["fastqc"]["time"],
8585
mem_mb = 2048,
8686
wrapper:
87-
f"{wrapper_version}/bio/fastqc"
87+
"v3.13.8/bio/fastqc"
8888

8989

9090
rule multiqc:
@@ -101,4 +101,4 @@ else:
101101
log:
102102
"logs/multiqc/multiqc.log"
103103
wrapper:
104-
f"{wrapper_version}/bio/multiqc"
104+
"v3.13.8/bio/multiqc"

workflow/rules/macs2.smk

+28-14
Original file line numberDiff line numberDiff line change
@@ -230,32 +230,29 @@ if config["peak_calling_macs2"]["run"]:
230230

231231
rule peak_calling_MACS2_broad:
232232
input:
233-
bam=f"results/bam/{{dir}}/{{bg_sample}}{extension}.bam",
233+
treatment=f"results/bam/{{dir}}/{{bg_sample}}{extension}.bam",
234+
control=f"results/bam/{{dir}}/Dam{extension}.bam",
234235
output:
235236
multiext("results/macs2_broad/fdr{fdr}/{dir}/{bg_sample}",
236237
"_peaks.xls",
237238
"_peaks.broadPeak",
238239
"_peaks.gappedPeak"
239240
)
240241
params:
241-
outdir=lambda w, output: os.path.dirname(output[0]),
242-
paired_end=paired_end,
243-
mode="broad",
244-
fdr=fdr,
245-
genome=resources.genome,
246-
data_dir=lambda w, input: os.path.dirname(input[0]),
247-
extra=config["peak_calling_macs2"]["extra"]
242+
macs2_params()
248243
threads: config["resources"]["deeptools"]["cpu"]
249244
resources:
250245
runtime=config["resources"]["deeptools"]["time"]
251246
log:
252247
"logs/macs2_broad/fdr{fdr}/{dir}/{bg_sample}.log"
253-
conda:
254-
"../envs/peak_calling.yaml"
255-
script:
256-
"../scripts/macs2.py"
257-
248+
#conda:
249+
# "../envs/peak_calling.yaml"
250+
#script:
251+
# "../scripts/macs2.py"
252+
wrapper:
253+
"v3.13.8/bio/macs2/callpeak"
258254

255+
259256
rule consensus_peaks_macs2_broad:
260257
input:
261258
peaks=expand("results/macs2_broad/fdr{fdr}/{dir}/{{bg_sample}}_peaks.broadPeak", dir=DIRS, fdr=fdr),
@@ -280,7 +277,7 @@ if config["peak_calling_macs2"]["run"]:
280277
peaks=expand("results/macs2_broad/fdr{fdr}/{dir}/{{bg_sample}}_peaks.broadPeak", dir=DIRS, fdr=fdr),
281278
cs=f"resources/{resources.genome}_chrom.sizes",
282279
output:
283-
ext_bed="results/macs2_broad/fdr{fdr}/consensus_peaks/{bg_sample}.overlap.filtered.bed",
280+
ext_bed=temp("results/macs2_broad/fdr{fdr}/consensus_peaks/{bg_sample}.overlap.tmp.bed"),
284281
params:
285282
k=config["consensus_peaks"]["keep"],
286283
max_size=config["consensus_peaks"]["max_size"],
@@ -294,7 +291,24 @@ if config["peak_calling_macs2"]["run"]:
294291
"../envs/peak_calling.yaml"
295292
script:
296293
"../scripts/filter_consensus_peaks.py"
294+
297295

296+
rule remove_duplicate_peaks:
297+
input:
298+
"results/macs2_broad/fdr{fdr}/consensus_peaks/{bg_sample}.overlap.tmp.bed",
299+
output:
300+
"results/macs2_broad/fdr{fdr}/consensus_peaks/{bg_sample}.overlap.filtered.bed",
301+
threads: 1
302+
resources:
303+
runtime=5
304+
log:
305+
"logs/remove_duplicate_peaks/macs2_broad/fdr{fdr}/{bg_sample}.log"
306+
conda:
307+
"../envs/peak_calling.yaml"
308+
shell:
309+
# Remove duplicates based on the first 3 columns
310+
"sort -k 1,1 -k2,2 -k3,3n -u {input} > {output}"
311+
298312

299313
rule peak_annotation_plots_macs2_broad:
300314
input:

workflow/rules/peak_calling_perl.smk

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ if config["peak_calling_perl"]["run"]:
6060
conda:
6161
"../envs/peak_calling.yaml"
6262
wrapper:
63-
f"{wrapper_version}/bio/bedtools/sort"
63+
"v3.13.8/bio/bedtools/sort"
6464

6565

6666
# Create bed file of consensus peaks between replicate conditions

workflow/rules/resources.smk

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ rule index_fasta:
103103
resources:
104104
runtime=config["resources"]["plotting"]["time"]
105105
wrapper:
106-
f"{wrapper_version}/bio/samtools/faidx"
106+
"v3.13.8/bio/samtools/faidx"
107107

108108

109109
rule chrom_sizes:
@@ -181,7 +181,7 @@ rule bowtie2_build_index:
181181
resources:
182182
runtime=config["resources"]["index"]["time"],
183183
wrapper:
184-
f"{wrapper_version}/bio/bowtie2/build"
184+
"v3.13.8/bio/bowtie2/build"
185185

186186

187187
if config["plasmid_fasta"] != "none":
@@ -206,4 +206,4 @@ if config["plasmid_fasta"] != "none":
206206
resources:
207207
runtime=config["resources"]["index"]["time"],
208208
wrapper:
209-
f"{wrapper_version}/bio/bowtie2/build"
209+
"v3.13.8/bio/bowtie2/build"

workflow/rules/trimming.smk

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if paired_end:
1616
log:
1717
"logs/trim_galore/{dir}/{sample}.log",
1818
wrapper:
19-
f"{wrapper_version}/bio/trim_galore/pe"
19+
"v3.13.8/bio/trim_galore/pe"
2020
else:
2121
rule trim_galore_se:
2222
input:
@@ -32,5 +32,5 @@ else:
3232
log:
3333
"logs/trim_galore/{dir}/{sample}.log",
3434
wrapper:
35-
f"{wrapper_version}/bio/trim_galore/se"
35+
"v3.13.8/bio/trim_galore/se"
3636

0 commit comments

Comments
 (0)