nf-core_modules/modules/hmmer/eslreformat/main.nf
Daniel Lundin 8bc5236371
Add hmmer/eslreformat (#2009)
* Created hmmer/eslalimask from template

* esl-alimask module with --rf-is-mask test case

* Add optional file output

* Add hmmer to test name

* Move from process_single to process_low

* Test for versions.yml, plus content

* Prettier

* Avoid gzipping input alignment

* hmmer/eslreformat from template

* Started on main.nf

* meta.id to prefix

* Continued work

* Fix version string so it's from *this* tool

* hmmer/eslreformat

* Prettier

* Get tests/config/pytest_modules.yml back

* Delete extra hmmer/eslalimask in pytest_modules.yml

* More prettier

* Fix path to versions.yml in test

* Remove 'format' param

* Fix problems with format param deletion

* Document format param
2022-09-05 15:21:09 +02:00

36 lines
1 KiB
Text

process HMMER_ESLREFORMAT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::hmmer=3.3.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/hmmer:3.3.2--h1b792b2_1':
'quay.io/biocontainers/hmmer:3.3.2--h1b792b2_1' }"
input:
tuple val(meta), path(seqfile)
output:
tuple val(meta), path("*.sequences.gz"), emit: seqreformated
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}"
"""
esl-reformat \\
-o ${prefix}.sequences \\
$args \\
$seqfile
gzip ${prefix}.sequences
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmmer/easel: \$(esl-reformat -h | grep -o '^# Easel [0-9.]*' | sed 's/^# Easel *//')
END_VERSIONS
"""
}