mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-24 20:09:54 +00:00
remove the database auto-download for mOTUs.
This commit is contained in:
parent
53c4399052
commit
c8a59adbce
10 changed files with 53 additions and 121 deletions
54
.github/workflows/ci.yml
vendored
54
.github/workflows/ci.yml
vendored
|
@ -42,8 +42,6 @@ jobs:
|
|||
- "--perform_runmerging"
|
||||
- "--perform_runmerging --shortread_qc_mergepairs"
|
||||
- "--shortread_complexityfilter false --perform_shortread_hostremoval"
|
||||
# Test different profiles
|
||||
profile: ["test", "test_motus"]
|
||||
|
||||
steps:
|
||||
- name: Check out pipeline code
|
||||
|
@ -72,4 +70,54 @@ jobs:
|
|||
# For example: adding multiple test runs with different parameters
|
||||
# Remember that you can parallelise this by using strategy.matrix
|
||||
run: |
|
||||
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.profile }},docker --outdir ./results ${{ matrix.parameters }}
|
||||
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results ${{ matrix.parameters }}
|
||||
|
||||
motus:
|
||||
name: Test mOTUs with workflow parameters
|
||||
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/taxprofiler') }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NXF_VER: ${{ matrix.nxf_ver }}
|
||||
NXF_ANSI_LOG: false
|
||||
strategy:
|
||||
matrix:
|
||||
# Nextflow versions
|
||||
include:
|
||||
# Test pipeline minimum Nextflow version
|
||||
- NXF_VER: "21.10.3"
|
||||
NXF_EDGE: ""
|
||||
# Test latest edge release of Nextflow
|
||||
- NXF_VER: ""
|
||||
NXF_EDGE: "1"
|
||||
|
||||
steps:
|
||||
- name: Check out pipeline code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Nextflow
|
||||
env:
|
||||
NXF_VER: ${{ matrix.NXF_VER }}
|
||||
# Uncomment only if the edge release is more recent than the latest stable release
|
||||
# See https://github.com/nextflow-io/nextflow/issues/2467
|
||||
# NXF_EDGE: ${{ matrix.NXF_EDGE }}
|
||||
run: |
|
||||
wget -qO- get.nextflow.io | bash
|
||||
sudo mv nextflow /usr/local/bin/
|
||||
|
||||
- name: Show current locale
|
||||
run: locale
|
||||
|
||||
- name: Set UTF-8 enabled locale
|
||||
run: |
|
||||
sudo locale-gen en_US.UTF-8
|
||||
sudo update-locale LANG=en_US.UTF-8
|
||||
|
||||
- name: Prepare the database
|
||||
run: |
|
||||
wget https://github.com/motu-tool/mOTUs/blob/master/motus/downloadDB.py
|
||||
python downloadDB.py
|
||||
echo 'tool,db_name,db_params,db_path\nmotus,db_mOTU,,db_mOTU' > 'database_motus.csv'
|
||||
|
||||
- name: Run pipeline with test data
|
||||
run: |
|
||||
nextflow run ${GITHUB_WORKSPACE} -profile test_motus,docker --outdir ./results --databases ./database_motus.csv
|
||||
|
|
|
@ -353,13 +353,6 @@ process {
|
|||
]
|
||||
}
|
||||
|
||||
withName: MOTUS_DOWNLOADDB {
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/motus/db/${meta.db_name}" },
|
||||
mode: params.publish_dir_mode
|
||||
]
|
||||
}
|
||||
|
||||
withName: MOTUS_PROFILE {
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/motus/${meta.db_name}" },
|
||||
|
|
|
@ -23,7 +23,7 @@ params {
|
|||
// TODO nf-core: Specify the paths to your test data on nf-core/test-datasets
|
||||
// TODO nf-core: Give any required params for the test so that command line flags are not needed
|
||||
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/samplesheet.csv'
|
||||
databases = 'https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/database.csv'
|
||||
databases = 'database_motus.csv'
|
||||
perform_shortread_clipmerge = false
|
||||
perform_longread_clip = false
|
||||
perform_shortread_complexityfilter = false
|
||||
|
|
|
@ -138,8 +138,7 @@ Expected (uncompressed) database files for each tool are as follows:
|
|||
The database download step can be time consuming and the database will be consisting
|
||||
with same release version of the mOTUs tools. The database for same version tools
|
||||
can be thus reused for multiple runs. Users can download the database once and
|
||||
assign the database with the table. User can also set the parameter
|
||||
`download_motus_db` and let the pipeline download the database automatically.
|
||||
assign the database with the table.
|
||||
|
||||
## Running the pipeline
|
||||
|
||||
|
|
|
@ -63,9 +63,6 @@
|
|||
"minimap2/index": {
|
||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||
},
|
||||
"motus/downloaddb": {
|
||||
"git_sha": "6393a085c5fcea11963774c041808df169907487"
|
||||
},
|
||||
"motus/profile": {
|
||||
"git_sha": "6b960f0e75bbb4d5bd301cd3875fa078d0eab4d1"
|
||||
},
|
||||
|
|
39
modules/nf-core/modules/motus/downloaddb/main.nf
generated
39
modules/nf-core/modules/motus/downloaddb/main.nf
generated
|
@ -1,39 +0,0 @@
|
|||
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/nf-core/modules/motus/downloaddb/meta.yml
generated
39
modules/nf-core/modules/motus/downloaddb/meta.yml
generated
|
@ -1,39 +0,0 @@
|
|||
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"
|
|
@ -126,8 +126,6 @@ params {
|
|||
|
||||
// mOTUs
|
||||
run_motus = false
|
||||
download_motus_db = true
|
||||
motus_downloaddb_script = 'https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py'
|
||||
}
|
||||
|
||||
// Load base.config by default for all pipelines
|
||||
|
|
|
@ -430,14 +430,6 @@
|
|||
},
|
||||
"run_motus": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"download_motus_db": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"motus_downloaddb_script": {
|
||||
"type": "string",
|
||||
"default": "https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py",
|
||||
"description": "mOTUs database download script path."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
include { DATABASE_CHECK } from '../../modules/local/database_check'
|
||||
include { UNTAR } from '../../modules/nf-core/modules/untar/main'
|
||||
include { MOTUS_DOWNLOADDB } from '../../modules/nf-core/modules/motus/downloaddb/main'
|
||||
|
||||
workflow DB_CHECK {
|
||||
take:
|
||||
|
@ -21,22 +20,6 @@ workflow DB_CHECK {
|
|||
.splitCsv ( header:true, sep:',' )
|
||||
.map { create_db_channels(it) }
|
||||
|
||||
// Download database for mOTUs
|
||||
if( params.run_motus ){
|
||||
check_motus_db =
|
||||
parsed_samplesheet.filter{ it[0].tool == "motus" }
|
||||
.ifEmpty{[]}
|
||||
if( params.download_motus_db ){
|
||||
MOTUS_DOWNLOADDB( params.motus_downloaddb_script )
|
||||
check_motus_db = MOTUS_DOWNLOADDB.out.db
|
||||
.map{[
|
||||
[tool: "motus", db_name: "db_mOTU", db_params: ''],
|
||||
it
|
||||
]}
|
||||
}
|
||||
parsed_samplesheet = parsed_samplesheet.mix(check_motus_db)
|
||||
}
|
||||
|
||||
ch_dbs_for_untar = parsed_samplesheet
|
||||
.branch {
|
||||
untar: it[1].toString().endsWith(".tar.gz")
|
||||
|
|
Loading…
Reference in a new issue