add input database and intermediate bam file.

This commit is contained in:
JIANHONG OU 2022-05-02 08:37:12 -04:00
parent 61799e80ab
commit 0f24e4dcff
3 changed files with 20 additions and 5 deletions

View file

@ -9,6 +9,8 @@ process MOTUS_PROFILE {
input:
tuple val(meta), path(reads)
path db
path bam
output:
tuple val(meta), path("*.out"), emit: out
@ -25,12 +27,16 @@ process MOTUS_PROFILE {
"-i ${reads}" :
meta.single_end ?
"-s $reads" : "-f ${reads[0]} -r ${reads[1]}"
def refdb = db ? "-db ${db}" : ""
def intermediateBam = bam ? "-I $bam" : ""
"""
motus profile \\
$args \\
$inputs \\
$refdb \\
$intermediateBam \\
-t $task.cpus \\
-n ${prefix} \\
-n $prefix \\
-o ${prefix}.out
cat <<-END_VERSIONS > versions.yml

View file

@ -14,7 +14,6 @@ tools:
doi: "10.1038/s41467-019-08844-4"
licence: "['GPL v3']"
## TODO nf-core: Add a description of all of the variables used as input
input:
- meta:
type: map
@ -31,6 +30,11 @@ input:
type: derectory
description: |
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:
- meta:

View file

@ -2,6 +2,7 @@
nextflow.enable.dsl = 2
include { MOTUS_DOWNLOADDB } from '../../../../modules/motus/downloaddb/main.nf'
include { MOTUS_PROFILE } from '../../../../modules/motus/profile/main.nf'
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)
]
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 {
@ -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_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, [])
}