mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
add module motus_downloaddb
This commit is contained in:
parent
c7def8707b
commit
ee04fc2737
6 changed files with 104 additions and 0 deletions
39
modules/motus/downloaddb/main.nf
Normal file
39
modules/motus/downloaddb/main.nf
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
process MOTUS_DOWNLOADDB {
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::motus=3.0.1" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/motus:3.0.1--pyhdfd78af_0':
|
||||||
|
'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
path motus_downloaddb
|
||||||
|
|
||||||
|
output:
|
||||||
|
path "db_mOTU" , emit: db
|
||||||
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
|
when:
|
||||||
|
task.ext.when == null || task.ext.when
|
||||||
|
|
||||||
|
script:
|
||||||
|
def args = task.ext.args ?: ''
|
||||||
|
"""
|
||||||
|
## must copy file to working directory,
|
||||||
|
## otherwise the reference_db will be download to bin folder
|
||||||
|
## other than current directory
|
||||||
|
cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py
|
||||||
|
python ${motus_downloaddb.simpleName}_copy.py \\
|
||||||
|
-t $task.cpus
|
||||||
|
## clean up
|
||||||
|
rm ${motus_downloaddb.simpleName}_copy.py
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g')
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
35
modules/motus/downloaddb/meta.yml
Normal file
35
modules/motus/downloaddb/meta.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
name: "motus_downloaddb"
|
||||||
|
description: Download the mOTUs database
|
||||||
|
keywords:
|
||||||
|
- classify
|
||||||
|
- metagenomics
|
||||||
|
- fastq
|
||||||
|
- taxonomic profiling
|
||||||
|
tools:
|
||||||
|
- "motus":
|
||||||
|
description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data."
|
||||||
|
homepage: "None"
|
||||||
|
documentation: "https://github.com/motu-tool/mOTUs/wiki"
|
||||||
|
tool_dev_url: "https://github.com/motu-tool/mOTUs"
|
||||||
|
doi: "10.1038/s41467-019-08844-4"
|
||||||
|
licence: "['GPL v3']"
|
||||||
|
|
||||||
|
input:
|
||||||
|
- motus_downloaddb:
|
||||||
|
type: file
|
||||||
|
description: |
|
||||||
|
the mOTUs downloadDB source file
|
||||||
|
pattern: "*{.py}"
|
||||||
|
|
||||||
|
output:
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
- db:
|
||||||
|
type: file
|
||||||
|
description: The mOTUs database
|
||||||
|
pattern: "db_mOTU"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@jianhong"
|
|
@ -1194,6 +1194,10 @@ mosdepth:
|
||||||
- modules/mosdepth/**
|
- modules/mosdepth/**
|
||||||
- tests/modules/mosdepth/**
|
- tests/modules/mosdepth/**
|
||||||
|
|
||||||
|
motus/downloaddb:
|
||||||
|
- modules/motus/downloaddb/**
|
||||||
|
- tests/modules/motus/downloaddb/**
|
||||||
|
|
||||||
msisensor/msi:
|
msisensor/msi:
|
||||||
- modules/msisensor/msi/**
|
- modules/msisensor/msi/**
|
||||||
- tests/modules/msisensor/msi/**
|
- tests/modules/msisensor/msi/**
|
||||||
|
|
12
tests/modules/motus/downloaddb/main.nf
Normal file
12
tests/modules/motus/downloaddb/main.nf
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { MOTUS_DOWNLOADDB } from '../../../../modules/motus/downloaddb/main.nf'
|
||||||
|
|
||||||
|
workflow test_motus_downloaddb {
|
||||||
|
|
||||||
|
input = file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py')
|
||||||
|
|
||||||
|
MOTUS_DOWNLOADDB ( input )
|
||||||
|
}
|
5
tests/modules/motus/downloaddb/nextflow.config
Normal file
5
tests/modules/motus/downloaddb/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
9
tests/modules/motus/downloaddb/test.yml
Normal file
9
tests/modules/motus/downloaddb/test.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
- name: motus downloaddb test_motus_downloaddb
|
||||||
|
command: nextflow run tests/modules/motus/downloaddb -entry test_motus_downloaddb -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- motus
|
||||||
|
- motus/downloaddb
|
||||||
|
files:
|
||||||
|
- path: output/motus/db_mOTU/db_mOTU_versions
|
||||||
|
- path: output/motus/versions.yml
|
||||||
|
md5sum: b9b843b2435b01bb430ee8780b5c639e
|
Loading…
Reference in a new issue