Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions modules/nf-core/hmmer/hmmalign/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ process HMMER_HMMALIGN {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/07/07c4cbd91c4459dc86b13b5cd799cacba96b27d66c276485550d299c7a4c6f8a/data' :
'community.wave.seqera.io/library/hmmer:3.4--cb5d2dd2e85974ca' }"
'https://depot.galaxyproject.org/singularity/hmmer:3.4--hb6cb901_4' :
'quay.io/biocontainers/hmmer:3.4--hb6cb901_4' }"

input:
tuple val(meta), path(fasta)
path hmm

output:
tuple val(meta), path("*.sto.gz"), emit: sto
path "versions.yml" , emit: versions
tuple val("${task.process}"), val("hmmer"), eval("hmmalign -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER //'"), topic: versions, emit: versions_hmmer

when:
task.ext.when == null || task.ext.when
Expand All @@ -26,21 +26,11 @@ process HMMER_HMMALIGN {
$args \\
$hmm \\
$fasta | gzip -c > ${prefix}.sto.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmmer: \$(hmmalign -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER *//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo | gzip > ${prefix}.sto.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmmer: \$(hmmalign -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER *//')
END_VERSIONS
echo "" | gzip > ${prefix}.sto.gz
"""
}
28 changes: 22 additions & 6 deletions modules/nf-core/hmmer/hmmalign/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,29 @@ output:
pattern: "*.sto.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
versions_hmmer:
- - ${task.process}:
type: string
description: The process name
- hmmer:
type: string
description: The tool name
- hmmalign -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER //':
type: eval
description: The tool version

topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The process name
- hmmer:
type: string
description: The tool name
- hmmalign -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER //':
type: eval
description: The tool version

authors:
- "@erikrikarddaniel"
- "@jfy133"
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/hmmer/hmmalign/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand All @@ -50,7 +50,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
50 changes: 18 additions & 32 deletions modules/nf-core/hmmer/hmmalign/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,53 @@
"test-hmmer-hmmalign": {
"content": [
{
"0": [
"sto": [
[
{
"id": "test"
},
"test.sto.gz:md5,4ae989d5ade2aaae9578cb88ba031e8f"
]
],
"1": [
"versions.yml:md5,601e13e7a1e6057766d862a828d501c4"
],
"sto": [
"versions_hmmer": [
[
{
"id": "test"
},
"test.sto.gz:md5,4ae989d5ade2aaae9578cb88ba031e8f"
"HMMER_HMMALIGN",
"hmmer",
"3.4"
]
],
"versions": [
"versions.yml:md5,601e13e7a1e6057766d862a828d501c4"
]
}
],
"timestamp": "2026-05-01T15:54:13.981909183",
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.04.5"
},
"timestamp": "2024-11-13T12:37:26.551497424"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"test-hmmer-hmmalign-stub": {
"content": [
{
"0": [
"sto": [
[
{
"id": "test"
},
"test.sto.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"1": [
"versions.yml:md5,601e13e7a1e6057766d862a828d501c4"
],
"sto": [
"versions_hmmer": [
[
{
"id": "test"
},
"test.sto.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
"HMMER_HMMALIGN",
"hmmer",
"3.4"
]
],
"versions": [
"versions.yml:md5,601e13e7a1e6057766d862a828d501c4"
]
}
],
"timestamp": "2026-05-01T15:54:21.354318795",
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.04.5"
},
"timestamp": "2024-11-13T12:37:32.244343836"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
}
}
18 changes: 4 additions & 14 deletions modules/nf-core/hmmer/hmmbuild/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process HMMER_HMMBUILD {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/07/07c4cbd91c4459dc86b13b5cd799cacba96b27d66c276485550d299c7a4c6f8a/data' :
'community.wave.seqera.io/library/hmmer:3.4--cb5d2dd2e85974ca' }"
'https://depot.galaxyproject.org/singularity/hmmer:3.4--hb6cb901_4' :
'quay.io/biocontainers/hmmer:3.4--hb6cb901_4' }"

input:
tuple val(meta), path(alignment)
Expand All @@ -14,7 +14,7 @@ process HMMER_HMMBUILD {
output:
tuple val(meta), path("*.hmm.gz"), emit: hmm
path "*.hmmbuild.txt", emit: hmmbuildout
path "versions.yml", emit: versions
tuple val("${task.process}"), val("hmmer"), eval("hmmbuild -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER //'"), topic: versions, emit: versions_hmmer

when:
task.ext.when == null || task.ext.when
Expand All @@ -35,22 +35,12 @@ process HMMER_HMMBUILD {
$alignment

gzip ${prefix}.hmm

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmmer: \$(echo \$(hmmbuild -h | grep HMMER | sed 's/# HMMER //' | sed 's/ .*//' 2>&1))
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo | gzip > ${prefix}.hmm.gz
echo "" | gzip > ${prefix}.hmm.gz
touch ${prefix}.hmmbuild.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmmer: \$(echo \$(hmmbuild -h | grep HMMER | sed 's/# HMMER //' | sed 's/ .*//' 2>&1))
END_VERSIONS
"""
}
36 changes: 26 additions & 10 deletions modules/nf-core/hmmer/hmmbuild/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ input:
output:
hmm:
- - meta:
type: file
description: Gzipped HMM file
pattern: "*.{hmm.gz}"
ontologies: []
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.hmm.gz":
type: file
description: Gzipped HMM file
Expand All @@ -50,13 +50,29 @@ output:
type: file
description: HMM build output
ontologies: []
versions_hmmer:
- - ${task.process}:
type: string
description: The process name
- hmmer:
type: string
description: The tool name
- hmmbuild -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER //':
type: eval
description: The tool version

topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The process name
- hmmer:
type: string
description: The tool name
- hmmbuild -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER //':
type: eval
description: The tool version

authors:
- "@erikrikarddaniel"
maintainers:
Expand Down
13 changes: 4 additions & 9 deletions modules/nf-core/hmmer/hmmbuild/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nextflow_process {
[ id: 'PF14720' ], // meta map
file(params.modules_testdata_base_path + 'delete_me/hmmer/PF14720_seed.alnfaa.gz', checkIfExists: true)
]
input[1] = []
input[1] = []

"""
}
Expand All @@ -29,12 +29,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert file(process.out.hmmbuildout[0]).text.contains('CPU time:') },
{ assert snapshot(
file(process.out.hmm[0][1]).name, // unstable
file(process.out.hmmbuildout[0]).name, // unstable
process.out.versions
).match()
}
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["hmm", "hmmbuildout"])).match() }
)
}
}
Expand All @@ -49,7 +44,7 @@ nextflow_process {
[ id: 'PF14720' ], // meta map
file(params.modules_testdata_base_path + 'delete_me/hmmer/PF14720_seed.alnfaa.gz', checkIfExists: true)
]
input[1] = []
input[1] = []

"""
}
Expand All @@ -58,7 +53,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
Loading
Loading