mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
90aef30f43
* Set process label to `process_single` for modules with no `task.cpus` usage * Fix tests of 'borked' modules * prettier * More modules are single-threaded and can use process_single * Adding process_single to hmmer/esl* modules * Fix failing tests * Prettier Co-authored-by: Matthieu Muffato <mm49@sanger.ac.uk> Co-authored-by: Daniel Lundin <erik.rikard.daniel@gmail.com>
38 lines
1.2 KiB
Text
38 lines
1.2 KiB
Text
process HMMER_ESLREFORMAT {
|
|
tag "$meta.id"
|
|
label 'process_single'
|
|
|
|
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("*.*.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}"
|
|
def suffix = args ? args.trim().tokenize(" ")[-1] : "sequences"
|
|
// Use for any postprocessing of the sequence file, e.g. removal of gap characters
|
|
def postproc = task.ext.postprocessing ?: ""
|
|
"""
|
|
esl-reformat \\
|
|
$args \\
|
|
$seqfile \\
|
|
$postproc \\
|
|
| gzip -c > ${prefix}.${suffix}.gz
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
hmmer/easel: \$(esl-reformat -h | grep -o '^# Easel [0-9.]*' | sed 's/^# Easel *//')
|
|
END_VERSIONS
|
|
"""
|
|
}
|