nf-core_modules/tests/modules/kraken2/kraken2/main.nf
Francesco L abe025677c
update to kraken2: breaking change - output channels renamed (#1525)
* updated kraken2 module to include optional classification of each input reads, and make fastq outputs optional
NB: this is a breaking change, because the output channels have been renamed as a consequence of changes

* updated yml

* pigz command made optional, in order to be executed only if fastq of classified/unclassified reads are saved

* updated test yaml file for kraken2

* fixed TODOs and renamed variables and outputs

* untar in conda cannot keep same md5sum of version, and therefore md5sum check removed

* improved description of the options

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
2022-04-21 14:33:59 +02:00

37 lines
1.5 KiB
Text

#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { UNTAR } from '../../../../modules/untar/main.nf'
include { KRAKEN2_KRAKEN2 } from '../../../../modules/kraken2/kraken2/main.nf'
workflow test_kraken2_kraken2_single_end {
input = [ [ id:'test', single_end:true ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
]
db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ]
UNTAR ( db )
KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false )
}
workflow test_kraken2_kraken2_paired_end {
input = [ [ id:'test', single_end:false ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
]
db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ]
UNTAR ( db )
KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false )
}
workflow test_kraken2_kraken2_classifyreads {
input = [ [ id:'test', single_end:true ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
]
db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ]
UNTAR ( db )
KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, false, true )
}