Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e7e07c3
update to new versions capture for checkm2 databasedownload and check…
eit-maxlcummins Jan 22, 2026
9539272
update tests and snapshots for topic versions
eit-maxlcummins Jan 23, 2026
d711094
Merge branch 'master' into checkm2_versions
eit-maxlcummins Jan 23, 2026
210723e
add trailing linebreak to test nextflow.config
eit-maxlcummins Jan 23, 2026
7326d8d
add trailing linebreak to main.nf.test
eit-maxlcummins Jan 23, 2026
444ba74
Merge branch 'master' into checkm2_versions
eit-maxlcummins Jan 23, 2026
f20d7c3
fix args function to prevent issues where users provide args but not …
eit-maxlcummins Jan 23, 2026
d2c197a
update checkm2 tests and snaps, and galah test and snaps - uses check…
eit-maxlcummins Jan 30, 2026
58cbb02
Merge branch 'master' into checkm2_versions
eit-maxlcummins Jan 30, 2026
10f40aa
Merge branch 'master' into checkm2_versions
mashehu Feb 2, 2026
8ee3665
Merge branch 'master' into checkm2_versions
jdc-eit Feb 3, 2026
2a683aa
Update modules/nf-core/checkm2/databasedownload/main.nf
eit-maxlcummins Feb 3, 2026
5d01ce4
Merge branch 'master' into checkm2_versions
eit-maxlcummins Feb 3, 2026
3450b41
update meta.yml after change to version capture in main.nf
eit-maxlcummins Feb 3, 2026
7b1b52e
Merge branch 'master' into checkm2_versions
eit-maxlcummins Feb 3, 2026
3b51a12
update checkm2/predict/meta.yml with lint --fix
eit-maxlcummins Feb 3, 2026
4fe8b4a
update main.nf and meta.yml to pass linting
eit-maxlcummins Feb 3, 2026
cc655bf
Merge branch 'master' into checkm2_versions
eit-maxlcummins Feb 3, 2026
8f5cb2a
Merge branch 'master' into checkm2_versions
eit-maxlcummins Feb 3, 2026
0e2e63e
Merge branch 'master' into checkm2_versions
eit-maxlcummins Feb 3, 2026
7edaca3
Merge branch 'master' into checkm2_versions
eit-maxlcummins Feb 3, 2026
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
19 changes: 8 additions & 11 deletions modules/nf-core/checkm2/databasedownload/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ process CHECKM2_DATABASEDOWNLOAD {

output:
tuple val(meta), path("checkm2_db_v${db_version}.dmnd"), emit: database
path("versions.yml") , emit: versions
tuple val("${task.process}"), val('aria2'), eval("aria2c --version 2>&1 | sed '1s/[^ ]* [^ ]* //; q'"), topic: versions, emit: versions_checkm2_databasedownload

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def args = task.ext.args ?: ''
// Append user-agent if not already present
if( !args.contains('--user-agent') ) {
args = args ? "${args} --user-agent=\"Wget/1.21.4\"" : '--user-agent="Wget/1.21.4"'
}
zenodo_id = db_zenodo_id ?: 14897628 // Default to version 3 if no ID provided
api_data = downloadZenodoApiEntry(zenodo_id)
db_version = api_data.metadata.version
Expand All @@ -48,21 +52,14 @@ process CHECKM2_DATABASEDOWNLOAD {
db_path=\$(find -name *.dmnd)
mv \$db_path checkm2_db_v${db_version}.dmnd

cat <<-END_VERSIONS > versions.yml
"${task.process}":
aria2: \$(echo \$(aria2c --version 2>&1) | grep 'aria2 version' | cut -f3 -d ' ')
END_VERSIONS
# cleanup
rm -f checkm2_database.tar.gz
"""

stub:
db_version = 0
meta = [id: 'checkm2_db', version: db_version]
"""
touch checkm2_db_v${db_version}.dmnd

cat <<-END_VERSIONS > versions.yml
"${task.process}":
aria2: \$(echo \$(aria2c --version 2>&1) | grep 'aria2 version' | cut -f3 -d ' ')
END_VERSIONS
"""
}
32 changes: 23 additions & 9 deletions modules/nf-core/checkm2/databasedownload/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "checkm2_databasedownload"
description: CheckM2 database download
keywords:
Expand All @@ -16,12 +15,10 @@ tools:
doi: "10.1038/s41592-023-01940-w"
licence: ["GPL v3"]
identifier: ""

input:
- db_zenodo_id:
type: integer
description: Zenodo ID of the CheckM2 database to download

output:
database:
- - meta:
Expand All @@ -34,12 +31,29 @@ output:
description: CheckM2 database file
pattern: "checkm2_db_v*.dmnd"
ontologies: []
versions_checkm2_databasedownload:
- - ${task.process}:
type: string
description: The process the versions were collected from
- aria2:
type: string
description: The tool name
- "aria2c --version 2>&1 | sed '1s/[^ ]* [^ ]* //; q'":
type: eval
description: The expression to obtain the version of the tool

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 the versions were collected from
- aria2:
type: string
description: The tool name
- "aria2c --version 2>&1 | sed '1s/[^ ]* [^ ]* //; q'":
type: eval
description: The expression to obtain the version of the tool

authors:
- "@dialvarezs"
- "@eit-maxlcummins"
8 changes: 6 additions & 2 deletions modules/nf-core/checkm2/databasedownload/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions).match() },
{ assert path(process.out.database.get(0).get(1)).exists() },
{ assert snapshot(
process.out.findAll { key, val -> key.startsWith('versions') }).match() },
)
}

Expand All @@ -42,7 +44,9 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions).match() },
{ assert path(process.out.database.get(0).get(1)).exists() },
{ assert snapshot(
process.out.findAll { key, val -> key.startsWith('versions') }).match() },
)
}

Expand Down
36 changes: 24 additions & 12 deletions modules/nf-core/checkm2/databasedownload/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
{
"test_checkm2_databasedownload": {
"content": [
[
"versions.yml:md5,74b6560ab3e6bae88ae53cb8ae3c283e"
]
{
"versions_checkm2_databasedownload": [
[
"CHECKM2_DATABASEDOWNLOAD",
"aria2",
"1.37.0"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-03-13T21:41:14.428719466"
"timestamp": "2026-01-23T09:04:29.73758792"
},
"test_checkm2_databasedownload - stub": {
"content": [
[
"versions.yml:md5,74b6560ab3e6bae88ae53cb8ae3c283e"
]
{
"versions_checkm2_databasedownload": [
[
"CHECKM2_DATABASEDOWNLOAD",
"aria2",
"1.37.0"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-03-13T21:41:24.118075242"
"timestamp": "2026-01-29T15:49:13.916311854"
}
}
24 changes: 6 additions & 18 deletions modules/nf-core/checkm2/predict/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ process CHECKM2_PREDICT {
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/0a/0af812c983aeffc99c0fca9ed2c910816b2ddb9a9d0dcad7b87dab0c9c08a16f/data'
: 'community.wave.seqera.io/library/checkm2:1.1.0--60f287bc25d7a10d'}"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/0a/0af812c983aeffc99c0fca9ed2c910816b2ddb9a9d0dcad7b87dab0c9c08a16f/data':
'community.wave.seqera.io/library/checkm2:1.1.0--60f287bc25d7a10d' }"

input:
tuple val(meta), path(fasta, stageAs: "input_bins/*")
tuple val(dbmeta), path(db)

output:
tuple val(meta), path("${prefix}"), emit: checkm2_output
tuple val(meta), path("${prefix}") , emit: checkm2_output
tuple val(meta), path("${prefix}_checkm2_report.tsv"), emit: checkm2_tsv
path ("versions.yml"), emit: versions
tuple val("${task.process}"), val('checkm2'), eval('checkm2 --version'), topic: versions, emit: versions_checkm2_predict

when:
task.ext.when == null || task.ext.when
Expand All @@ -23,33 +23,21 @@ process CHECKM2_PREDICT {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
export DB=\$(find -L . -name "*.dmnd" -type f)

checkm2 \\
predict \\
--input ${fasta} \\
--output-directory ${prefix} \\
--threads ${task.cpus} \\
--database_path \$DB \\
--database_path ${db} \\
${args}

cp ${prefix}/quality_report.tsv ${prefix}_checkm2_report.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
checkm2: \$(checkm2 --version)
END_VERSIONS
"""

stub:
prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir ${prefix}/
touch ${prefix}_checkm2_report.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
checkm2: \$(checkm2 --version)
END_VERSIONS
"""
}
29 changes: 21 additions & 8 deletions modules/nf-core/checkm2/predict/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "checkm2_predict"
description: CheckM2 bin quality prediction
keywords:
Expand All @@ -16,7 +15,6 @@ tools:
doi: "10.1038/s41592-023-01940-w"
licence: ["GPL v3"]
identifier: ""

input:
- - meta:
type: map
Expand Down Expand Up @@ -60,12 +58,27 @@ output:
pattern: "*.tsv"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
versions_checkm2_predict:
- - ${task.process}:
type: string
description: The name of the process
- checkm2:
type: string
description: The name of the tool
- "checkm2 --version":
type: eval
description: The expression to obtain the version of the tool
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 name of the process
- checkm2:
type: string
description: The name of the tool
- "checkm2 --version":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@dialvarezs"
- "@eit-maxlcummins"
18 changes: 8 additions & 10 deletions modules/nf-core/checkm2/predict/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ nextflow_process {
tag "modules"
tag "checkm2"
tag "checkm2/predict"
tag "untar"
tag "checkm2/databasedownload"
script "modules/nf-core/checkm2/predict/main.nf"
process "CHECKM2_PREDICT"

setup {
run("UNTAR") {
script "../../../untar/main.nf"
run("CHECKM2_DATABASEDOWNLOAD") {
script "../../databasedownload/main.nf"
process {
"""
input[0] = channel
.fromPath("https://zenodo.org/records/14897628/files/checkm2_database.tar.gz", checkIfExists: true)
.map { dbfile -> [ [id: 'checkm2db'], dbfile ] }
input[0] = []
"""
}
}
Expand All @@ -31,15 +29,15 @@ nextflow_process {
process {
"""
input[0] = [ [id: 'test'], [file(params.modules_testdata_base_path + 'genomics/prokaryotes/escherichia_coli/genome/genome.fa', checkIfExists: true)] ]
input[1] = UNTAR.out.untar
input[1] = CHECKM2_DATABASEDOWNLOAD.out.database
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.checkm2_tsv, process.out.versions).match() }
{ assert snapshot(process.out.checkm2_tsv, process.out.findAll { key, val -> key.startsWith('versions') }).match() }
)
}
}
Expand All @@ -55,15 +53,15 @@ nextflow_process {
process {
"""
input[0] = [ [id: 'test'], [file(params.modules_testdata_base_path + 'genomics/prokaryotes/escherichia_coli/genome/genome.fa', checkIfExists: true)] ]
input[1] = UNTAR.out.untar
input[1] = CHECKM2_DATABASEDOWNLOAD.out.database
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.checkm2_tsv, process.out.versions).match() }
{ assert snapshot(process.out.checkm2_tsv, process.out.findAll { key, val -> key.startsWith('versions') }).match() }
)
}
}
Expand Down
36 changes: 24 additions & 12 deletions modules/nf-core/checkm2/predict/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@
"test_checkm2_report.tsv:md5,1b6021262d336b21f526d8369f6ddd3f"
]
],
[
"versions.yml:md5,f13e02312d6a08ca746e6de2659d8195"
]
{
"versions_checkm2_predict": [
[
"CHECKM2_PREDICT",
"checkm2",
"1.1.0"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-03-13T15:23:26.857419645"
"timestamp": "2026-01-30T09:44:45.556228913"
},
"test_checkm2_predict - stub": {
"content": [
Expand All @@ -29,14 +35,20 @@
"test_checkm2_report.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
[
"versions.yml:md5,f13e02312d6a08ca746e6de2659d8195"
]
{
"versions_checkm2_predict": [
[
"CHECKM2_PREDICT",
"checkm2",
"1.1.0"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-03-13T15:23:40.153127645"
"timestamp": "2026-01-23T09:28:10.0910672"
}
}
Loading
Loading