Add kraken2 pigz multi-tool container for compressing output fastq files (#434)

* Add kraken2 pigz multi-tool container for compressing output fastq files

* Add untar to pytest config

* Add untar process to kraken2 tests

* Remove unneeded tags
This commit is contained in:
Harshil Patel 2021-04-12 17:47:34 +01:00 committed by GitHub
parent df8910de4e
commit c99ab09f8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 11 deletions

View file

@ -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
"""
}

View file

@ -307,6 +307,7 @@ kallistobustools/ref:
kraken2/run:
- software/kraken2/run/**
- software/untar/**
- tests/software/kraken2/run/**
mash/sketch:

View file

@ -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 )
}

View file

@ -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