Update input in kaiju_kaiju module (#1522)

This commit is contained in:
Sofia Stamouli 2022-04-13 14:53:08 +02:00 committed by GitHub
parent 4f5274c3de
commit 8856f127c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 14 deletions

View file

@ -9,11 +9,11 @@ process KAIJU_KAIJU {
input:
tuple val(meta), path(reads)
tuple path(db), path(dbnodes)
path(db)
output:
tuple val(meta), path('*.tsv'), emit: results
path "versions.yml" , emit: versions
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@ -23,11 +23,13 @@ process KAIJU_KAIJU {
def prefix = task.ext.prefix ?: "${meta.id}"
def input = meta.single_end ? "-i ${reads}" : "-i ${reads[0]} -j ${reads[1]}"
"""
dbnodes=`find -L ${db} -name "*nodes.dmp"`
dbname=`find -L ${db} -name "*.fmi" -not -name "._*"`
kaiju \\
$args \\
-z $task.cpus \\
-t ${dbnodes} \\
-f ${db} \\
-t \$dbnodes \\
-f \$dbname \\
-o ${prefix}.tsv \\
$input

View file

@ -50,3 +50,4 @@ output:
authors:
- "@talnor"
- "@sofstam"
- "@jfy133"

View file

@ -2,6 +2,7 @@
nextflow.enable.dsl = 2
include { UNTAR } from '../../../../modules/untar/main.nf'
include { KAIJU_KAIJU } from '../../../../modules/kaiju/kaiju/main.nf'
workflow test_kaiju_kaiju_single_end {
@ -10,12 +11,10 @@ workflow test_kaiju_kaiju_single_end {
[ 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']['kaiju_fmi'], checkIfExists: true), // database
file(params.test_data['sarscov2']['genome']['kaiju_nodes'], checkIfExists: true) // taxon nodes
]
db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ]
KAIJU_KAIJU ( input, db )
UNTAR ( db )
KAIJU_KAIJU ( input, UNTAR.out.untar.map{ it[1] } )
}
workflow test_kaiju_kaiju_paired_end {
@ -25,10 +24,9 @@ workflow test_kaiju_kaiju_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']['kaiju_fmi'], checkIfExists: true), // database
file(params.test_data['sarscov2']['genome']['kaiju_nodes'], checkIfExists: true) // taxon nodes
]
db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ]
UNTAR ( db )
KAIJU_KAIJU ( input, UNTAR.out.untar.map{ it[1] } )
KAIJU_KAIJU ( input, db )
}