mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Update input in kaiju_kaiju module (#1522)
This commit is contained in:
parent
4f5274c3de
commit
8856f127c5
3 changed files with 15 additions and 14 deletions
|
@ -9,7 +9,7 @@ process KAIJU_KAIJU {
|
|||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
tuple path(db), path(dbnodes)
|
||||
path(db)
|
||||
|
||||
output:
|
||||
tuple val(meta), path('*.tsv'), emit: results
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -50,3 +50,4 @@ output:
|
|||
authors:
|
||||
- "@talnor"
|
||||
- "@sofstam"
|
||||
- "@jfy133"
|
||||
|
|
|
@ -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 )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue