forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump GUNC and add gunc/run test (nf-core#6920)
* Bump GUNC and add gunc/run test * Fix meta, use input_dir * Add snapshots * Change strategy to preserve filenames * Add gunc/mergecheckm test * Update tags * Fix test names * Update snapshots * Add stubs * Add stub snaps * Address review comments * Set args in nextflow.config again * Comment problematic tests * Comment another test --------- Co-authored-by: Edmund Miller <[email protected]>
- Loading branch information
1 parent
2a8530b
commit b6515a0
Showing
16 changed files
with
489 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')] } | ||
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() } | ||
) | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process { | ||
withName: CHECKM_QA { | ||
ext.args = '--tab_table' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.