mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
5644df8d43
* Make gene and cluster TSVs optional output in case no hits found * update indicating optional output * Apply suggestions from code review Co-authored-by: Jasmin F <73216762+jasmezz@users.noreply.github.com> Co-authored-by: Jasmin F <73216762+jasmezz@users.noreply.github.com>
47 lines
1.4 KiB
Text
47 lines
1.4 KiB
Text
process GECCO_RUN {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::gecco=0.9.2" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/gecco:0.9.2--pyhdfd78af_0':
|
|
'quay.io/biocontainers/gecco:0.9.2--pyhdfd78af_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(input), path(hmm)
|
|
path model_dir
|
|
|
|
|
|
output:
|
|
tuple val(meta), path("*.genes.tsv") , optional: true, emit: genes
|
|
tuple val(meta), path("*.features.tsv") , emit: features
|
|
tuple val(meta), path("*.clusters.tsv") , optional: true, emit: clusters
|
|
tuple val(meta), path("*_cluster_*.gbk"), optional: true, emit: gbk
|
|
tuple val(meta), path("*.json") , optional: true, emit: json
|
|
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
def custom_model = model_dir ? "--model ${model_dir}" : ""
|
|
def custom_hmm = hmm ? "--hmm ${hmm}" : ""
|
|
"""
|
|
gecco \\
|
|
run \\
|
|
$args \\
|
|
-j $task.cpus \\
|
|
-o ./ \\
|
|
-g ${input} \\
|
|
$custom_model \\
|
|
$custom_hmm
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
gecco: \$(echo \$(gecco --version) | cut -f 2 -d ' ' )
|
|
END_VERSIONS
|
|
"""
|
|
}
|