mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-11 12:43:09 +00:00
45 lines
1.2 KiB
Text
45 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
|
||
|
"""
|
||
|
}
|