diff --git a/software/kraken2/run/main.nf b/software/kraken2/run/main.nf index af2e1aec..455883b5 100644 --- a/software/kraken2/run/main.nf +++ b/software/kraken2/run/main.nf @@ -11,11 +11,11 @@ process KRAKEN2_RUN { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? 'bioconda::kraken2=2.1.1' : null) + conda (params.enable_conda ? 'bioconda::kraken2=2.1.1 conda-forge::pigz=2.6' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/kraken2:2.1.1--pl526hc9558a2_0' + container 'https://depot.galaxyproject.org/singularity/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:941789bd7fe00db16531c26de8bf3c5c985242a5-0' } else { - container 'quay.io/biocontainers/kraken2:2.1.1--pl526hc9558a2_0' + container 'quay.io/biocontainers/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:941789bd7fe00db16531c26de8bf3c5c985242a5-0' } input: @@ -46,7 +46,8 @@ process KRAKEN2_RUN { $options.args \\ $reads - gzip *.fastq + pigz -p $task.cpus *.fastq + echo \$(kraken2 --version 2>&1) | sed 's/^.*Kraken version //; s/ .*\$//' > ${software}.version.txt """ } diff --git a/tests/config/pytest_software.yml b/tests/config/pytest_software.yml index 1fd0ee1f..a40611c2 100644 --- a/tests/config/pytest_software.yml +++ b/tests/config/pytest_software.yml @@ -307,6 +307,7 @@ kallistobustools/ref: kraken2/run: - software/kraken2/run/** + - software/untar/** - tests/software/kraken2/run/** mash/sketch: diff --git a/tests/software/kraken2/run/main.nf b/tests/software/kraken2/run/main.nf index 1896f670..751ca1a9 100644 --- a/tests/software/kraken2/run/main.nf +++ b/tests/software/kraken2/run/main.nf @@ -2,15 +2,17 @@ nextflow.enable.dsl = 2 +include { UNTAR } from '../../../../software/untar/main.nf' addParams( options: [:] ) include { KRAKEN2_RUN } from '../../../../software/kraken2/run/main.nf' addParams( options: [:] ) workflow test_kraken2_run_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'], checkIfExists: true) + db = file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) - KRAKEN2_RUN ( input, db ) + UNTAR ( db ) + KRAKEN2_RUN ( input, UNTAR.out.untar ) } workflow test_kraken2_run_paired_end { @@ -18,7 +20,8 @@ workflow test_kraken2_run_paired_end { [ 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'], checkIfExists: true) - - KRAKEN2_RUN ( input, db ) + db = file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) + + UNTAR ( db ) + KRAKEN2_RUN ( input, UNTAR.out.untar ) } diff --git a/tests/software/kraken2/run/test.yml b/tests/software/kraken2/run/test.yml index 708ab51b..e0886c93 100644 --- a/tests/software/kraken2/run/test.yml +++ b/tests/software/kraken2/run/test.yml @@ -3,7 +3,6 @@ tags: - kraken2 - kraken2/run - - kraken2_run_single_end files: - path: output/kraken2/test.classified.fastq.gz should_exist: true @@ -17,7 +16,6 @@ tags: - kraken2 - kraken2/run - - kraken2_run_paired_end files: - path: output/kraken2/test.classified_1.fastq.gz should_exist: true