nf-core_modules/modules/hpsuissero/main.nf
Robert A. Petit III 55bee0b02e
add module for hpsuisero (#1331)
* add module for hpsuisero

* Update meta.yml

* Update main.nf

Co-authored-by: Sateesh <33637490+sateeshperi@users.noreply.github.com>
2022-02-27 17:58:35 -07:00

44 lines
1.2 KiB
Text

def VERSION = '1.0.1' // Version information not provided by tool on CLI
process HPSUISSERO {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::hpsuissero=1.0.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/hpsuissero%3A1.0.1--hdfd78af_0':
'quay.io/biocontainers/hpsuissero:1.0.1--hdfd78af_0' }"
input:
tuple val(meta), path(fasta)
output:
tuple val(meta), path("*.tsv"), emit: tsv
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
HpsuisSero.sh \\
-i $fasta_name \\
-o ./ \\
-s $prefix \\
-x fasta \\
-t $task.cpus
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hpsuissero: $VERSION
END_VERSIONS
"""
}