mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Improves kraken2 output glob (#1987)
* Improves kraken2 output glob * Further strictness * Further improvements
This commit is contained in:
parent
9d489648a7
commit
409a308ba4
1 changed files with 11 additions and 11 deletions
|
@ -14,11 +14,11 @@ process KRAKEN2_KRAKEN2 {
|
|||
val save_reads_assignment
|
||||
|
||||
output:
|
||||
tuple val(meta), path('*classified*') , optional:true, emit: classified_reads_fastq
|
||||
tuple val(meta), path('*unclassified*') , optional:true, emit: unclassified_reads_fastq
|
||||
tuple val(meta), path('*classifiedreads*'), optional:true, emit: classified_reads_assignment
|
||||
tuple val(meta), path('*report.txt') , emit: report
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path('*.classified{.,_}*') , optional:true, emit: classified_reads_fastq
|
||||
tuple val(meta), path('*.unclassified{.,_}*') , optional:true, emit: unclassified_reads_fastq
|
||||
tuple val(meta), path('*classifiedreads.txt') , optional:true, emit: classified_reads_assignment
|
||||
tuple val(meta), path('*report.txt') , emit: report
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
@ -29,9 +29,9 @@ process KRAKEN2_KRAKEN2 {
|
|||
def paired = meta.single_end ? "" : "--paired"
|
||||
def classified = meta.single_end ? "${prefix}.classified.fastq" : "${prefix}.classified#.fastq"
|
||||
def unclassified = meta.single_end ? "${prefix}.unclassified.fastq" : "${prefix}.unclassified#.fastq"
|
||||
def classified_command = save_output_fastqs ? "--classified-out ${classified}" : ""
|
||||
def unclassified_command = save_output_fastqs ? "--unclassified-out ${unclassified}" : ""
|
||||
def readclassification_command = save_reads_assignment ? "--output ${prefix}.kraken2.classifiedreads.txt" : ""
|
||||
def classified_option = save_output_fastqs ? "--classified-out ${classified}" : ""
|
||||
def unclassified_option = save_output_fastqs ? "--unclassified-out ${unclassified}" : ""
|
||||
def readclassification_option = save_reads_assignment ? "--output ${prefix}.kraken2.classifiedreads.txt" : ""
|
||||
def compress_reads_command = save_output_fastqs ? "pigz -p $task.cpus *.fastq" : ""
|
||||
|
||||
"""
|
||||
|
@ -40,9 +40,9 @@ process KRAKEN2_KRAKEN2 {
|
|||
--threads $task.cpus \\
|
||||
--report ${prefix}.kraken2.report.txt \\
|
||||
--gzip-compressed \\
|
||||
$unclassified_command \\
|
||||
$classified_command \\
|
||||
$readclassification_command \\
|
||||
$unclassified_option \\
|
||||
$classified_option \\
|
||||
$readclassification_option \\
|
||||
$paired \\
|
||||
$args \\
|
||||
$reads
|
||||
|
|
Loading…
Reference in a new issue