nf-core_modules/modules/ssuissero/main.nf
Robert A. Petit III 9e0abcc443
add module for ssuisero (#1329)
* add module for ssuisero

* Update main.nf

* Update meta.yml

Co-authored-by: Sateesh <33637490+sateeshperi@users.noreply.github.com>
2022-02-27 20:04:03 -07:00

44 lines
1.2 KiB
Text

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