Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump GUNC and add gunc/run test #6920

Merged
merged 25 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a61af0e
Bump GUNC and add gunc/run test
dialvarezs Nov 1, 2024
778a061
Fix meta, use input_dir
dialvarezs Nov 1, 2024
eba9d2c
Add snapshots
dialvarezs Nov 1, 2024
2687220
Merge branch 'master' into dev-gunc
dialvarezs Nov 1, 2024
57c1ae5
Change strategy to preserve filenames
dialvarezs Nov 1, 2024
2ed3b98
Merge branch 'dev-gunc' of github.com:dialvarezs/nf-core-modules into…
dialvarezs Nov 1, 2024
795b919
Merge branch 'master' into dev-gunc
dialvarezs Nov 5, 2024
0b866d1
Add gunc/mergecheckm test
dialvarezs Nov 5, 2024
38fe7a4
Update tags
dialvarezs Nov 5, 2024
abdd969
Fix test names
dialvarezs Nov 5, 2024
df50382
Merge remote-tracking branch 'upstream/master' into dev-gunc
dialvarezs Nov 5, 2024
fb18ac2
Update snapshots
dialvarezs Nov 12, 2024
f436ef3
Merge branch 'master' into dev-gunc
dialvarezs Nov 12, 2024
e4c79ab
Merge branch 'master' into dev-gunc
edmundmiller Nov 13, 2024
e10a08a
Add stubs
dialvarezs Nov 21, 2024
b8f8b90
Add stub snaps
dialvarezs Nov 22, 2024
6e2537f
Merge branch 'master' into dev-gunc
dialvarezs Nov 22, 2024
d0efa40
Address review comments
dialvarezs Nov 25, 2024
b9447f4
Merge branch 'dev-gunc' of github.com:dialvarezs/nf-core-modules into…
dialvarezs Nov 25, 2024
e617c9c
Set args in nextflow.config again
dialvarezs Nov 26, 2024
6dccfa8
Merge branch 'master' into dev-gunc
dialvarezs Nov 26, 2024
1e8c7ec
Comment problematic tests
dialvarezs Nov 26, 2024
0fd1d59
Comment another test
dialvarezs Nov 26, 2024
80a726d
Merge branch 'master' into dev-gunc
dialvarezs Nov 26, 2024
6da2126
Merge branch 'master' into dev-gunc
dialvarezs Nov 26, 2024
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
3 changes: 2 additions & 1 deletion modules/nf-core/gunc/downloaddb/environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::gunc=1.0.5
- bioconda::gunc=1.0.6
4 changes: 2 additions & 2 deletions modules/nf-core/gunc/downloaddb/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GUNC_DOWNLOADDB {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gunc:1.0.5--pyhdfd78af_0' :
'biocontainers/gunc:1.0.5--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gunc:1.0.6--pyhdfd78af_0' :
'biocontainers/gunc:1.0.6--pyhdfd78af_0' }"

input:
val db_name
Expand Down
18 changes: 9 additions & 9 deletions modules/nf-core/gunc/downloaddb/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"content": [
"gunc_db_progenomes2.1.dmnd",
[
"versions.yml:md5,ab391d00f34801f2caa143c4c05eba56"
"versions.yml:md5,5ce1c695848ee48977b982a369b01141"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nf-test": "0.9.1",
"nextflow": "24.10.0"
},
"timestamp": "2024-09-06T10:25:14.217951"
"timestamp": "2024-11-01T07:23:05.696265018"
},
"test-gunc-downloaddb-stub": {
"content": [
Expand All @@ -19,20 +19,20 @@
"progenomes.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"1": [
"versions.yml:md5,ab391d00f34801f2caa143c4c05eba56"
"versions.yml:md5,5ce1c695848ee48977b982a369b01141"
],
"db": [
"progenomes.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,ab391d00f34801f2caa143c4c05eba56"
"versions.yml:md5,5ce1c695848ee48977b982a369b01141"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nf-test": "0.9.1",
"nextflow": "24.10.0"
},
"timestamp": "2024-09-06T10:25:20.120206"
"timestamp": "2024-11-01T07:23:16.109775313"
}
}
3 changes: 2 additions & 1 deletion modules/nf-core/gunc/mergecheckm/environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::gunc=1.0.5
- bioconda::gunc=1.0.6
14 changes: 12 additions & 2 deletions modules/nf-core/gunc/mergecheckm/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GUNC_MERGECHECKM {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gunc:1.0.5--pyhdfd78af_0' :
'biocontainers/gunc:1.0.5--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gunc:1.0.6--pyhdfd78af_0' :
'biocontainers/gunc:1.0.6--pyhdfd78af_0' }"

input:
tuple val(meta), path(gunc_file), path(checkm_file)
Expand Down Expand Up @@ -33,4 +33,14 @@ process GUNC_MERGECHECKM {
gunc: \$( gunc --version )
END_VERSIONS
"""

stub:
"""
touch gunc_merge_checkm.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
gunc: \$( gunc --version )
END_VERSIONS
"""
}
175 changes: 175 additions & 0 deletions modules/nf-core/gunc/mergecheckm/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
nextflow_process {

name "Test Process GUNC_MERGECHECKM"
script "../main.nf"
process "GUNC_MERGECHECKM"
config "./nextflow.config"

tag "modules_nfcore"
tag "modules"
tag "gunc"
tag "gunc/mergecheckm"
tag "gunc/run"
tag "gunc/downloaddb"
tag "checkm/lineagewf"
tag "checkm/qa"

// commented out because GitHub runners are not able to run this test
// test("gunc - mergecheckm") {

// setup {
// run("CHECKM_LINEAGEWF") {
// script "../../../checkm/lineagewf/main.nf"
// process {
// """
// input[0] = [
// [id: 'test'], // meta map
// file(
// params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta',
// checkIfExists: true
// )
// ]
// input[1] = 'fasta'
// input[2] = [] // Download CheckM database
// """
// }
// }

// run("CHECKM_QA") {
// script "../../../checkm/qa/main.nf"
// process {
// """
// input[0] = CHECKM_LINEAGEWF.out.checkm_output
// .join(CHECKM_LINEAGEWF.out.marker_file)
// .map { sample_data -> sample_data + [file('NO_FILE')] }
// input[1] = []
// """
// }
// }

// run("GUNC_DOWNLOADDB") {
// script "../../downloaddb/main.nf"
// process {
// """
// input[0] = 'progenomes'
// """
// }
// }

// run("GUNC_RUN") {
// script "../../run/main.nf"
// process {
// """
// input[0] = [
// [id: 'test'],
// [file(
// params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta',
// checkIfExists: true
// )]
// ]
// input[1] = GUNC_DOWNLOADDB.out.db
// """
// }
// }
// }

// when {
// params {
// outdir = "${launchDir}/tests/results"
// }
// process {
// """
// input[0] = GUNC_RUN.out.maxcss_level_tsv.join(CHECKM_QA.out.output)
// """
// }
// }

// then {
// assertAll(
// { assert process.success },
// { assert snapshot(process.out).match() }
// )
// }

// }

test("gunc - mergecheckm - stub") {

options "-stub"

setup {
run("CHECKM_LINEAGEWF") {
script "../../../checkm/lineagewf/main.nf"
process {
"""
input[0] = [
[id: 'test'], // meta map
file(
params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta',
checkIfExists: true
)
]
input[1] = 'fasta'
input[2] = [] // Download CheckM database
"""
}
}

run("CHECKM_QA") {
script "../../../checkm/qa/main.nf"
process {
"""
input[0] = CHECKM_LINEAGEWF.out.checkm_output
.join(CHECKM_LINEAGEWF.out.marker_file)
.map { v -> v + [file('NO_FILE')] }
dialvarezs marked this conversation as resolved.
Show resolved Hide resolved
input[1] = []
"""
}
}

run("GUNC_DOWNLOADDB") {
script "../../downloaddb/main.nf"
process {
"""
input[0] = 'progenomes'
"""
}
}

run("GUNC_RUN") {
script "../../run/main.nf"
process {
"""
input[0] = [
[id: 'test'],
[file(
params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta',
checkIfExists: true
)]
]
input[1] = GUNC_DOWNLOADDB.out.db
"""
}
}
}

when {
params {
outdir = "${launchDir}/tests/results"
}
process {
"""
input[0] = GUNC_RUN.out.maxcss_level_tsv.join(CHECKM_QA.out.output)
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}
}
68 changes: 68 additions & 0 deletions modules/nf-core/gunc/mergecheckm/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"gunc - mergecheckm": {
"content": [
{
"0": [
[
{
"id": "test"
},
"GUNC_checkM.merged.tsv:md5,24cbd3c76a36cb90ac993c83525a2c1b"
]
],
"1": [
"versions.yml:md5,a94747201129170b1cfbce5e59de62b0"
],
"tsv": [
[
{
"id": "test"
},
"GUNC_checkM.merged.tsv:md5,24cbd3c76a36cb90ac993c83525a2c1b"
]
],
"versions": [
"versions.yml:md5,a94747201129170b1cfbce5e59de62b0"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-22T09:37:48.146410153"
},
"gunc - mergecheckm - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"gunc_merge_checkm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,a94747201129170b1cfbce5e59de62b0"
],
"tsv": [
[
{
"id": "test"
},
"gunc_merge_checkm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,a94747201129170b1cfbce5e59de62b0"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-21T16:47:06.752273424"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/gunc/mergecheckm/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: CHECKM_QA {
ext.args = '--tab_table'
}
}
6 changes: 6 additions & 0 deletions modules/nf-core/gunc/mergecheckm/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
gunc/run:
- modules/nf-core/gunc/mergecheckm/**
- modules/nf-core/gunc/run/**
- modules/nf-core/gunc/downloaddb/**
- modules/nf-core/checkm/lineagewf/**
- modules/nf-core/checkm/qa/**
3 changes: 2 additions & 1 deletion modules/nf-core/gunc/run/environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::gunc=1.0.5
- bioconda::gunc=1.0.6
Loading
Loading