mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-11 04:33:10 +00:00
61e740f79c
* Add missing container folders as output channels * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update tool name * Update test output checksum Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
50 lines
2.6 KiB
Text
50 lines
2.6 KiB
Text
process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES {
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::antismash-lite=6.0.1" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' :
|
|
'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }"
|
|
|
|
/*
|
|
These files are normally downloaded/created by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH.
|
|
Reason: Upon execution, the tool checks if certain database files are present within the container and if not, it tries to create them in /usr/local/bin, for which only root user has write permissions. Mounting those database files with this module prevents the tool from trying to create them.
|
|
These files are also emitted as output channels in this module to enable the antismash-lite module to use them as mount volumes to the docker/singularity containers.
|
|
*/
|
|
|
|
containerOptions {
|
|
workflow.containerEngine == 'singularity' ?
|
|
"-B $database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css,$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection,$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" :
|
|
workflow.containerEngine == 'docker' ?
|
|
"-v \$PWD/$database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css -v \$PWD/$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection -v \$PWD/$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" :
|
|
''
|
|
}
|
|
|
|
input:
|
|
path database_css
|
|
path database_detection
|
|
path database_modules
|
|
|
|
output:
|
|
path("antismash_db") , emit: database
|
|
path("css"), emit: css_dir
|
|
path("detection"), emit: detection_dir
|
|
path("modules"), emit: modules_dir
|
|
path "versions.yml", emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
"""
|
|
download-antismash-databases \\
|
|
--database-dir antismash_db \\
|
|
$args
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
antismash-lite: \$(antismash --version | sed 's/antiSMASH //')
|
|
END_VERSIONS
|
|
"""
|
|
}
|