mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
44 lines
1.3 KiB
Text
44 lines
1.3 KiB
Text
|
def VERSION = '1.0.4' // Version information not provided by tool on CLI
|
||
|
|
||
|
process MCRONI {
|
||
|
tag "$meta.id"
|
||
|
label 'process_low'
|
||
|
|
||
|
conda (params.enable_conda ? "bioconda::mcroni=1.0.4" : null)
|
||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||
|
'https://depot.galaxyproject.org/singularity/mcroni%3A1.0.4--pyh5e36f6f_0':
|
||
|
'quay.io/biocontainers/mcroni:1.0.4--pyh5e36f6f_0' }"
|
||
|
|
||
|
input:
|
||
|
tuple val(meta), path(fasta)
|
||
|
|
||
|
output:
|
||
|
tuple val(meta), path("*.tsv") , emit: tsv
|
||
|
tuple val(meta), path("*.fa"), optional: true, emit: fa
|
||
|
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 is_compressed = fasta.getName().endsWith(".gz") ? true : false
|
||
|
def fasta_name = fasta.getName().replace(".gz", "")
|
||
|
"""
|
||
|
if [ "$is_compressed" == "true" ]; then
|
||
|
gzip -c -d $fasta > $fasta_name
|
||
|
fi
|
||
|
|
||
|
mcroni \\
|
||
|
$args \\
|
||
|
--output $prefix \\
|
||
|
--fasta $fasta_name
|
||
|
|
||
|
cat <<-END_VERSIONS > versions.yml
|
||
|
"${task.process}":
|
||
|
mcroni: $VERSION
|
||
|
END_VERSIONS
|
||
|
"""
|
||
|
}
|