Mercurial > repos > kkonganti > cfsan_centriflaken
comparison 0.2.1/modules/kraken2/classify/main.nf @ 47:30191f39a957
"planemo upload"
author | kkonganti |
---|---|
date | Mon, 11 Jul 2022 12:19:48 -0400 |
parents | 77494b0fa3c7 |
children |
comparison
equal
deleted
inserted
replaced
46:0dd0ebe5cddf | 47:30191f39a957 |
---|---|
26 def db = meta.kraken2_db ?: '' | 26 def db = meta.kraken2_db ?: '' |
27 def prefix = task.ext.prefix ?: "${meta.id}" | 27 def prefix = task.ext.prefix ?: "${meta.id}" |
28 def readList = reads.collect{ it.toString() } | 28 def readList = reads.collect{ it.toString() } |
29 def is_single_end = (meta.single_end || meta.is_assembly) ? true : false | 29 def is_single_end = (meta.single_end || meta.is_assembly) ? true : false |
30 def paired = is_single_end ? "" : "--paired" | 30 def paired = is_single_end ? "" : "--paired" |
31 def classified = is_single_end ? "${prefix}.classified.fastq" : "${prefix}.classified#.fastq" | 31 def classified = is_single_end ? "--classified-out ${prefix}.classified.fastq" : "--classified-out ${prefix}.classified#.fastq" |
32 def unclassified = is_single_end ? "${prefix}.unclassified.fastq" : "${prefix}.unclassified#.fastq" | 32 def unclassified = is_single_end ? "--unclassified-out ${prefix}.unclassified.fastq" : "--unclassified-out ${prefix}.unclassified#.fastq" |
33 args += (reads.getName().endsWith(".gz") ? ' --gzip-compressed ' : '') | 33 args += (reads.getName().endsWith(".gz") ? ' --gzip-compressed ' : '') |
34 """ | 34 """ |
35 kraken2 \\ | 35 kraken2 \\ |
36 --db $db \\ | 36 --db $db \\ |
37 --threads $task.cpus \\ | 37 --threads $task.cpus \\ |
38 --unclassified-out $unclassified \\ | 38 $unclassified \\ |
39 --classified-out $classified \\ | 39 $classified \\ |
40 --report ${prefix}.kraken2.report.txt \\ | 40 --report ${prefix}.kraken2.report.txt \\ |
41 --output ${prefix}.kraken2.output.txt \\ | 41 --output ${prefix}.kraken2.output.txt \\ |
42 $paired \\ | 42 $paired \\ |
43 $args \\ | 43 $args \\ |
44 $reads | 44 $reads |