mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
update motus module.
This commit is contained in:
parent
c8f2c44e22
commit
fb5c5d310a
4 changed files with 30 additions and 25 deletions
|
@ -10,7 +10,6 @@ process MOTUS_PROFILE {
|
|||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path db
|
||||
path bam
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.out"), emit: out
|
||||
|
@ -28,20 +27,26 @@ process MOTUS_PROFILE {
|
|||
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 \\
|
||||
-o ${prefix}.out
|
||||
|
||||
## mOTUs version number is not available from command line.
|
||||
## mOTUs save the version number in index database folder.
|
||||
## mOTUs will check the database version is same version as exec version.
|
||||
if [ "$refdb" == "" ]; then
|
||||
VERSION=\$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//')
|
||||
else
|
||||
VERSION=\$(grep motus $refdb/db_mOTU_versions | sed 's/motus\\t//g')
|
||||
fi
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//')
|
||||
mOTUs: \$VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -25,16 +25,13 @@ input:
|
|||
description: |
|
||||
List of input fastq/fasta files of size 1 and 2 for single-end and paired-end data,
|
||||
respectively.
|
||||
pattern: "*.{fastq,fq,fasta,fa,fastq.gz,fq.gz,fasta.gz,fa.gz}"
|
||||
Or the intermediate bam file mapped by bwa to the mOTUs database or
|
||||
the output bam file from motus profile
|
||||
pattern: "*.{fastq,fq,fasta,fa,fastq.gz,fq.gz,fasta.gz,fa.gz,.bam}"
|
||||
- db:
|
||||
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:
|
||||
|
|
|
@ -8,13 +8,13 @@ include { MOTUS_PROFILE } from '../../../../modules/motus/profile/main.nf'
|
|||
workflow test_motus_profile_single_end {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
[ id:'test', single_end:true ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
||||
]
|
||||
|
||||
MOTUS_DOWNLOADDB(file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py'))
|
||||
|
||||
MOTUS_PROFILE ( input, MOTUS_DOWNLOADDB.out.db, [])
|
||||
MOTUS_PROFILE ( input, MOTUS_DOWNLOADDB.out.db)
|
||||
}
|
||||
|
||||
workflow test_motus_profile_paired_end {
|
||||
|
@ -27,5 +27,5 @@ workflow test_motus_profile_paired_end {
|
|||
|
||||
MOTUS_DOWNLOADDB(file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py'))
|
||||
|
||||
MOTUS_PROFILE ( input, MOTUS_DOWNLOADDB.out.db, [])
|
||||
MOTUS_PROFILE ( input, MOTUS_DOWNLOADDB.out.db)
|
||||
}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
## TODO nf-core: Please run the following command to build this file:
|
||||
# nf-core modules create-test-yml motus/profile
|
||||
- name: "motus profile"
|
||||
command: nextflow run ./tests/modules/motus/profile -entry test_motus_profile -c ./tests/config/nextflow.config -c ./tests/modules/motus/profile/nextflow.config
|
||||
- name: motus profile test_motus_profile_single_end
|
||||
command: nextflow run tests/modules/motus/profile -entry test_motus_profile_single_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- "motus"
|
||||
#
|
||||
- "motus/profile"
|
||||
#
|
||||
- motus
|
||||
- motus/profile
|
||||
files:
|
||||
- path: "output/motus/test.bam"
|
||||
md5sum: e667c7caad0bc4b7ac383fd023c654fc
|
||||
- path: output/motus/versions.yml
|
||||
md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b
|
||||
- path: output/motus/test.out
|
||||
contains: ["#consensus_taxonomy\ttest"]
|
||||
|
||||
- name: motus profile test_motus_profile_paired_end
|
||||
command: nextflow run tests/modules/motus/profile -entry test_motus_profile_paired_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- motus
|
||||
- motus/profile
|
||||
files:
|
||||
- path: output/motus/test.out
|
||||
contains: ["#consensus_taxonomy\ttest"]
|
||||
|
|
Loading…
Reference in a new issue