2022-04-22 14:47:48 +00:00
process ANTISMASH_ANTISMASHLITE {
tag "$meta.id"
label 'process_medium'
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' }"
2022-04-26 14:28:39 +00:00
containerOptions {
workflow.containerEngine == 'singularity' ?
2022-05-02 15:30:46 +00:00
"-B $antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" :
2022-04-26 14:28:39 +00:00
workflow.containerEngine == 'docker' ?
2022-05-02 15:30:46 +00:00
"-v \$PWD/$antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" :
2022-04-26 14:28:39 +00:00
''
}
2022-04-22 14:47:48 +00:00
input:
tuple val(meta), path(sequence_input)
path(databases)
2022-05-02 15:30:46 +00:00
path(antismash_dir) // Optional input: AntiSMASH installation folder. It is not needed for using this module with conda, but required for docker/singularity (see meta.yml).
2022-05-11 10:06:02 +00:00
path(gff)
2022-04-22 14:47:48 +00:00
output:
tuple val(meta), path("${prefix}/clusterblast/*_c*.txt") , optional: true, emit: clusterblast_file
2022-05-12 08:56:48 +00:00
tuple val(meta), path("${prefix}/{css,images,js}") , emit: html_accessory_files
2022-04-22 14:47:48 +00:00
tuple val(meta), path("${prefix}/knownclusterblast/region*/ctg*.html") , optional: true, emit: knownclusterblast_html
tuple val(meta), path("${prefix}/knownclusterblast/*_c*.txt") , optional: true, emit: knownclusterblast_txt
tuple val(meta), path("${prefix}/svg/clusterblast*.svg") , optional: true, emit: svg_files_clusterblast
tuple val(meta), path("${prefix}/svg/knownclusterblast*.svg") , optional: true, emit: svg_files_knownclusterblast
2022-05-03 15:30:16 +00:00
tuple val(meta), path("${prefix}/*.gbk") , emit: gbk_input
tuple val(meta), path("${prefix}/*.json") , emit: json_results
tuple val(meta), path("${prefix}/*.log") , emit: log
tuple val(meta), path("${prefix}/*.zip") , emit: zip
tuple val(meta), path("${prefix}/*region*.gbk") , emit: gbk_results
2022-04-22 14:47:48 +00:00
tuple val(meta), path("${prefix}/clusterblastoutput.txt") , optional: true, emit: clusterblastoutput
2022-05-03 15:30:16 +00:00
tuple val(meta), path("${prefix}/index.html") , emit: html
2022-04-22 14:47:48 +00:00
tuple val(meta), path("${prefix}/knownclusterblastoutput.txt") , optional: true, emit: knownclusterblastoutput
2022-05-03 15:30:16 +00:00
tuple val(meta), path("${prefix}/regions.js") , emit: json_sideloading
2022-04-22 14:47:48 +00:00
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
2022-07-01 07:29:53 +00:00
gff_flag = gff ? "--genefinding-gff3 ${gff}" : ""
2022-04-22 14:47:48 +00:00
"""
2022-07-01 07:29:53 +00:00
## We specifically do not include on-the-fly annotations (--genefinding-tool none) as
2022-04-22 14:47:48 +00:00
## this should be run as a separate module for versioning purposes
2022-07-01 07:29:53 +00:00
2022-04-22 14:47:48 +00:00
antismash \\
$args \\
2022-05-11 10:06:02 +00:00
$gff_flag \\
2022-04-22 14:47:48 +00:00
-c $task.cpus \\
--output-dir $prefix \\
--genefinding-tool none \\
--logfile $prefix/${prefix}.log \\
2022-04-26 14:28:39 +00:00
--databases $databases \\
$sequence_input
2022-04-22 14:47:48 +00:00
cat <<-END_VERSIONS > versions.yml
"${task.process}":
2022-04-27 08:06:58 +00:00
antismash-lite: \$(antismash --version | sed 's/antiSMASH //')
2022-04-22 14:47:48 +00:00
END_VERSIONS
"""
}