mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge pull request #1528 from jianhong/motus_downloaddb
add module motus_downloaddb
This commit is contained in:
commit
1be14375ce
6 changed files with 106 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_script
|
||||
|
||||
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 ?: ''
|
||||
def software = "${motus_downloaddb_script.simpleName}_copy.py"
|
||||
"""
|
||||
## must copy script file to working directory,
|
||||
## otherwise the reference_db will be download to bin folder
|
||||
## other than current directory
|
||||
cp $motus_downloaddb_script ${software}
|
||||
python ${software} \\
|
||||
$args \\
|
||||
-t $task.cpus
|
||||
|
||||
## 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
|
||||
"""
|
||||
}
|
39
modules/motus/downloaddb/meta.yml
Normal file
39
modules/motus/downloaddb/meta.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: "motus_downloaddb"
|
||||
description: Download the mOTUs database
|
||||
keywords:
|
||||
- classify
|
||||
- metagenomics
|
||||
- fastq
|
||||
- taxonomic profiling
|
||||
- database
|
||||
- download
|
||||
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: directory
|
||||
description: |
|
||||
The mOTUs downloadDB script source file.
|
||||
It is the source file installed or
|
||||
remote source in github such as https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py
|
||||
pattern: "downloadDB.py"
|
||||
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- db:
|
||||
type: directory
|
||||
description: The mOTUs database directory
|
||||
pattern: "db_mOTU"
|
||||
|
||||
authors:
|
||||
- "@jianhong"
|
|
@ -1254,6 +1254,10 @@ mosdepth:
|
|||
- modules/mosdepth/**
|
||||
- tests/modules/mosdepth/**
|
||||
|
||||
motus/downloaddb:
|
||||
- modules/motus/downloaddb/**
|
||||
- tests/modules/motus/downloaddb/**
|
||||
|
||||
msisensor/msi:
|
||||
- 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()}" }
|
||||
|
||||
}
|
7
tests/modules/motus/downloaddb/test.yml
Normal file
7
tests/modules/motus/downloaddb/test.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- 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
|
Loading…
Reference in a new issue