@@ -231,30 +231,30 @@ rule metaspades:
231
231
r1 = join (workpath ,"{name}" ,"trim" ,"{name}.R1.trim.host_removed.fastq.gz" ),
232
232
r2 = join (workpath ,"{name}" ,"trim" ,"{name}.R2.trim.host_removed.fastq.gz" ),
233
233
output :
234
- contigs = join (workpath ,"output" , " {name}" ,"{name}.metaspades.contigs.fa" ),
235
- report = join (workpath ,"info" ,"{name}.metaspades.contigs_kraken2_report.txt" ),
236
- k2txt = join (workpath ,"kraken2" ,"{name}.metaspades.contigs.kraken2" ),
237
- krona = join (workpath ,"kraken2" ,"{name}.metaspades.contigs.kraken2.krona" ),
238
- tmp1 = join (workpath ,"temp" , " {name}" ,"{name}.metaspades_kraken2.txt" ),
239
- cat_class = join (workpath ,"CAT" , " {name}" ,"{name}.metaspades.contig2classification.txt" ),
240
- cat_names = join (workpath ,"CAT" , " {name}" ,"{name}.metaspades.official_names.txt" ),
241
- cat_summary = join (workpath ,"CAT" , " {name}" ,"{name}.metaspades.summary.txt" ),
242
- taxids = join (workpath ,"CAT" , " {name}" ,"{name}.metaspades.contig_taxids.txt" ),
243
- tmp2 = join (workpath ,"temp" , " {name}" ,"{name}.metaspades_CAT.txt" ),
244
- tmp3 = join (workpath ,"temp" , " {name}" ,"{name}.metaspades.kraken2.viral.names.txt" ),
245
- kraken_contigs = join (workpath ,"output" , " {name}" ,"{name}.metaspades.kraken2_viral.contigs.fa" ),
246
- tmp4 = join (workpath ,"temp" , " {name}" ,"{name}.metaspades.CAT.viral.names.txt" ),
247
- cat_contigs = join (workpath ,"output" , " {name}" ,"{name}.metaspades.cat_viral.contigs.fa" ),
248
- sam = temp (join (workpath ,"temp" ,"{name}.metaspades.sam" )),
249
- bam = temp (join (workpath ,"temp" ,"{name}.metaspades.bam" )),
250
- final = join (workpath ,"output" , " {name}" ,"{name}.metaspades.bam" ),
234
+ contigs = join (workpath ,"{name}" , "output " ,"{name}.metaspades.contigs.fa" ),
235
+ report = join (workpath ,"{name}" , " info" ,"{name}.metaspades.contigs_kraken2_report.txt" ),
236
+ k2txt = join (workpath ,"{name}" , " kraken2" ,"{name}.metaspades.contigs.kraken2" ),
237
+ krona = join (workpath ,"{name}" , " kraken2" ,"{name}.metaspades.contigs.kraken2.krona" ),
238
+ tmp1 = join (workpath ,"{name}" , "temp " ,"{name}.metaspades_kraken2.txt" ),
239
+ cat_class = join (workpath ,"{name}" , "CAT " ,"{name}.metaspades.contig2classification.txt" ),
240
+ cat_names = join (workpath ,"{name}" , "CAT " ,"{name}.metaspades.official_names.txt" ),
241
+ cat_summary = join (workpath ,"{name}" , "CAT " ,"{name}.metaspades.summary.txt" ),
242
+ taxids = join (workpath ,"{name}" , "CAT " ,"{name}.metaspades.contig_taxids.txt" ),
243
+ tmp2 = join (workpath ,"{name}" , "temp " ,"{name}.metaspades_CAT.txt" ),
244
+ tmp3 = join (workpath ,"{name}" , "temp " ,"{name}.metaspades.kraken2.viral.names.txt" ),
245
+ kraken_contigs = join (workpath ,"{name}" , "output " ,"{name}.metaspades.kraken2_viral.contigs.fa" ),
246
+ tmp4 = join (workpath ,"{name}" , "temp " ,"{name}.metaspades.CAT.viral.names.txt" ),
247
+ cat_contigs = join (workpath ,"{name}" , "output " ,"{name}.metaspades.cat_viral.contigs.fa" ),
248
+ sam = temp (join (workpath ,"{name}" , " temp" ,"{name}.metaspades.sam" )),
249
+ bam = temp (join (workpath ,"{name}" , " temp" ,"{name}.metaspades.bam" )),
250
+ final = join (workpath ,"{name}" , "output " ,"{name}.metaspades.bam" ),
251
251
params :
252
252
rname = 'metaspades' ,
253
253
viral_db = config ['references' ]['kraken2_viral_db' ],
254
254
cat_db = config ['references' ]['CAT_db' ],
255
255
cat_tax = config ['references' ]['CAT_taxonomy' ],
256
256
cat_dep = config ['references' ]['CAT_diamond' ],
257
- cat_dir = join (workpath ,"CAT" ),
257
+ cat_dir = join (workpath ,"{name}" , " CAT" ),
258
258
threads : int (allocated ("threads" , "metaspades" , cluster ))
259
259
conda : config ['conda' ]['CAT' ]
260
260
envmodules :
@@ -277,7 +277,7 @@ rule metaspades:
277
277
-1 {input.r1} \\
278
278
-2 {input.r2} \\
279
279
-o {wildcards.name}/metaspades
280
- mkdir -p output/ {wildcards.name}
280
+ mkdir -p {wildcards.name}/output
281
281
mv {wildcards.name}/metaspades/contigs.fasta {output.contigs}
282
282
283
283
kraken2 --threads {threads} \\
@@ -288,13 +288,13 @@ rule metaspades:
288
288
{output.k2txt} > {output.krona}
289
289
cp {output.krona} {output.tmp1}
290
290
291
- mkdir -p {params.cat_dir}/{wildcards.name}/
291
+ mkdir -p {params.cat_dir}
292
292
CAT contigs -n {threads} \\
293
293
--force \\
294
294
-c {output.contigs} \\
295
295
-d {params.cat_db} \\
296
296
-t {params.cat_tax} \\
297
- --out_prefix {params.cat_dir}/{wildcards.name}/{wildcards.name} .metaspades \\
297
+ --out_prefix {params.cat_dir}/{wildcards.name}.metaspades \\
298
298
--path_to_diamond {params.cat_dep}
299
299
CAT add_names -i {output.cat_class} \\
300
300
-o {output.cat_names} \\
@@ -328,9 +328,9 @@ rule metaspades:
328
328
329
329
bowtie2-build --threads {threads} \\
330
330
{output.contigs} \\
331
- temp/ {wildcards.name}/{wildcards.name}_metaspades
331
+ {wildcards.name}/temp /{wildcards.name}_metaspades
332
332
bowtie2 -p {threads} \\
333
- -x temp/ {wildcards.name}/{wildcards.name}_metaspades \\
333
+ -x {wildcards.name}/temp /{wildcards.name}_metaspades \\
334
334
-1 {input.r1} \\
335
335
-2 {input.r2} \\
336
336
-S {output.sam}
@@ -488,8 +488,8 @@ rule krona:
488
488
Interactive Krona report for a sample.
489
489
"""
490
490
input :
491
- f1 = join (workpath ,"temp" , " {name}" ,"{name}.metaspades_CAT.txt" ),
492
- f2 = join (workpath ,"temp" , " {name}" ,"{name}.metaspades_kraken2.txt" ),
491
+ f1 = join (workpath ,"{name}" , "temp " ,"{name}.metaspades_CAT.txt" ),
492
+ f2 = join (workpath ,"{name}" , "temp " ,"{name}.metaspades_kraken2.txt" ),
493
493
f3 = join (workpath ,"temp" ,"{name}" ,"{name}.megahit_CAT.txt" ),
494
494
f4 = join (workpath ,"temp" ,"{name}" ,"{name}.megahit_kraken2.txt" ),
495
495
output :
@@ -568,7 +568,7 @@ rule metaquast:
568
568
Quality-control report of the assembly.
569
569
"""
570
570
input :
571
- metaspades = join (workpath ,"output" , " {name}" ,"{name}.metaspades.contigs.fa" ),
571
+ metaspades = join (workpath ,"{name}" , "output " ,"{name}.metaspades.contigs.fa" ),
572
572
megahit = join (workpath ,"output" ,"{name}" ,"{name}.megahit.contigs.fa" ),
573
573
output :
574
574
report = join (workpath ,"output" ,"{name}" ,"{name}_metaquast" ,"report.html" )
0 commit comments