mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
add input database and intermediate bam file.
This commit is contained in:
parent
61799e80ab
commit
0f24e4dcff
3 changed files with 20 additions and 5 deletions
|
@ -9,6 +9,8 @@ process MOTUS_PROFILE {
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(reads)
|
||||||
|
path db
|
||||||
|
path bam
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.out"), emit: out
|
tuple val(meta), path("*.out"), emit: out
|
||||||
|
@ -25,12 +27,16 @@ process MOTUS_PROFILE {
|
||||||
"-i ${reads}" :
|
"-i ${reads}" :
|
||||||
meta.single_end ?
|
meta.single_end ?
|
||||||
"-s $reads" : "-f ${reads[0]} -r ${reads[1]}"
|
"-s $reads" : "-f ${reads[0]} -r ${reads[1]}"
|
||||||
|
def refdb = db ? "-db ${db}" : ""
|
||||||
|
def intermediateBam = bam ? "-I $bam" : ""
|
||||||
"""
|
"""
|
||||||
motus profile \\
|
motus profile \\
|
||||||
$args \\
|
$args \\
|
||||||
$inputs \\
|
$inputs \\
|
||||||
|
$refdb \\
|
||||||
|
$intermediateBam \\
|
||||||
-t $task.cpus \\
|
-t $task.cpus \\
|
||||||
-n ${prefix} \\
|
-n $prefix \\
|
||||||
-o ${prefix}.out
|
-o ${prefix}.out
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
|
|
@ -14,7 +14,6 @@ tools:
|
||||||
doi: "10.1038/s41467-019-08844-4"
|
doi: "10.1038/s41467-019-08844-4"
|
||||||
licence: "['GPL v3']"
|
licence: "['GPL v3']"
|
||||||
|
|
||||||
## TODO nf-core: Add a description of all of the variables used as input
|
|
||||||
input:
|
input:
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
|
@ -31,6 +30,11 @@ input:
|
||||||
type: derectory
|
type: derectory
|
||||||
description: |
|
description: |
|
||||||
mOTUs database downloaded by `motus downloadDB`
|
mOTUs database downloaded by `motus downloadDB`
|
||||||
|
- bam:
|
||||||
|
type: file
|
||||||
|
description: |
|
||||||
|
The intermediate bam file mapped by bwa to the mOTUs database or
|
||||||
|
the output bam file from motus profile
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- meta:
|
- meta:
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
nextflow.enable.dsl = 2
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { MOTUS_DOWNLOADDB } from '../../../../modules/motus/downloaddb/main.nf'
|
||||||
include { MOTUS_PROFILE } from '../../../../modules/motus/profile/main.nf'
|
include { MOTUS_PROFILE } from '../../../../modules/motus/profile/main.nf'
|
||||||
|
|
||||||
workflow test_motus_profile_single_end {
|
workflow test_motus_profile_single_end {
|
||||||
|
@ -11,7 +12,9 @@ workflow test_motus_profile_single_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)
|
||||||
]
|
]
|
||||||
|
|
||||||
MOTUS_PROFILE ( input )
|
MOTUS_DOWNLOADDB(file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py'))
|
||||||
|
|
||||||
|
MOTUS_PROFILE ( input, MOTUS_DOWNLOADDB.out.db, [])
|
||||||
}
|
}
|
||||||
|
|
||||||
workflow test_motus_profile_paired_end {
|
workflow test_motus_profile_paired_end {
|
||||||
|
@ -21,6 +24,8 @@ workflow test_motus_profile_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) ]
|
||||||
]
|
]
|
||||||
MOTUS_PROFILE ( input )
|
|
||||||
|
|
||||||
|
MOTUS_DOWNLOADDB(file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py'))
|
||||||
|
|
||||||
|
MOTUS_PROFILE ( input, MOTUS_DOWNLOADDB.out.db, [])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue