nf-core_modules/modules/emboss/seqret/main.nf

38 lines
1.1 KiB
Text
Raw Normal View History

process EMBOSS_SEQRET {
tag "$meta.id"
label 'process_single'
conda (params.enable_conda ? "bioconda::emboss=6.6.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/emboss:6.6.0--hf657eab_5':
'quay.io/biocontainers/emboss:6.6.0--h440b012_4' }"
input:
2022-07-15 00:14:56 +00:00
tuple val(meta), path(sequence)
val out_ext
output:
2022-07-15 00:14:56 +00:00
tuple val(meta), path("*.${out_ext}"), emit: outseq
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}"
2022-07-18 14:56:46 +00:00
def osformat = args.contains('-osformat') ? '' : "-osformat ${out_ext}"
"""
2022-07-15 00:14:56 +00:00
seqret \\
${args} \\
-sequence ${sequence} \\
2022-07-18 14:56:46 +00:00
${osformat} \\
2022-07-15 00:14:56 +00:00
-outseq ${prefix}.${out_ext}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
2022-07-15 00:14:56 +00:00
emboss: \$(echo \$(seqret -version 2>&1) | sed 's/EMBOSS://')
END_VERSIONS
"""
}