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,11 +9,11 @@ process KAIJU_KAIJU {
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(reads)
|
||||||
tuple path(db), path(dbnodes)
|
path(db)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path('*.tsv'), emit: results
|
tuple val(meta), path('*.tsv'), emit: results
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
when:
|
when:
|
||||||
task.ext.when == null || task.ext.when
|
task.ext.when == null || task.ext.when
|
||||||
|
@ -23,11 +23,13 @@ process KAIJU_KAIJU {
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
def input = meta.single_end ? "-i ${reads}" : "-i ${reads[0]} -j ${reads[1]}"
|
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 \\
|
kaiju \\
|
||||||
$args \\
|
$args \\
|
||||||
-z $task.cpus \\
|
-z $task.cpus \\
|
||||||
-t ${dbnodes} \\
|
-t \$dbnodes \\
|
||||||
-f ${db} \\
|
-f \$dbname \\
|
||||||
-o ${prefix}.tsv \\
|
-o ${prefix}.tsv \\
|
||||||
$input
|
$input
|
||||||
|
|
||||||
|
|
|
@ -50,3 +50,4 @@ output:
|
||||||
authors:
|
authors:
|
||||||
- "@talnor"
|
- "@talnor"
|
||||||
- "@sofstam"
|
- "@sofstam"
|
||||||
|
- "@jfy133"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
nextflow.enable.dsl = 2
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { UNTAR } from '../../../../modules/untar/main.nf'
|
||||||
include { KAIJU_KAIJU } from '../../../../modules/kaiju/kaiju/main.nf'
|
include { KAIJU_KAIJU } from '../../../../modules/kaiju/kaiju/main.nf'
|
||||||
|
|
||||||
workflow test_kaiju_kaiju_single_end {
|
workflow test_kaiju_kaiju_single_end {
|
||||||
|
@ -10,12 +11,10 @@ workflow test_kaiju_kaiju_single_end {
|
||||||
[ id:'test', single_end:true ], // meta map
|
[ id:'test', single_end:true ], // meta map
|
||||||
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
||||||
]
|
]
|
||||||
db = [
|
db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ]
|
||||||
file(params.test_data['sarscov2']['genome']['kaiju_fmi'], checkIfExists: true), // database
|
|
||||||
file(params.test_data['sarscov2']['genome']['kaiju_nodes'], checkIfExists: true) // taxon nodes
|
|
||||||
]
|
|
||||||
|
|
||||||
KAIJU_KAIJU ( input, db )
|
UNTAR ( db )
|
||||||
|
KAIJU_KAIJU ( input, UNTAR.out.untar.map{ it[1] } )
|
||||||
}
|
}
|
||||||
|
|
||||||
workflow test_kaiju_kaiju_paired_end {
|
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_1_fastq_gz'], checkIfExists: true),
|
||||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
|
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
|
||||||
]
|
]
|
||||||
db = [
|
db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ]
|
||||||
file(params.test_data['sarscov2']['genome']['kaiju_fmi'], checkIfExists: true), // database
|
|
||||||
file(params.test_data['sarscov2']['genome']['kaiju_nodes'], checkIfExists: true) // taxon nodes
|
UNTAR ( db )
|
||||||
]
|
KAIJU_KAIJU ( input, UNTAR.out.untar.map{ it[1] } )
|
||||||
|
|
||||||
KAIJU_KAIJU ( input, db )
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue