-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try porting mmseqs/search to nf-test (#7231)
* try porting to nf-test * remove from pytest * Apply suggestions from code review Co-authored-by: Jim Downie <[email protected]> * fix stub * remove pytest * Working except for linting * Only check the names * Fix meta for linting --------- Co-authored-by: Jim Downie <[email protected]> Co-authored-by: Simon Pearce <[email protected]>
- Loading branch information
1 parent
89a5ca7
commit 0853f51
Showing
10 changed files
with
199 additions
and
69 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
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
nextflow_process { | ||
|
||
name "Test Process MMSEQS_SEARCH" | ||
script "../main.nf" | ||
process "MMSEQS_SEARCH" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "mmseqs" | ||
tag "mmseqs/search" | ||
tag "mmseqs/createdb" | ||
|
||
config "./nextflow.config" | ||
|
||
setup { | ||
run("MMSEQS_CREATEDB", alias: "MMSEQS_CREATEDB_QUERY") { | ||
script "../../../mmseqs/createdb/main.nf" | ||
process { | ||
""" | ||
input[0] = [ [ id:'test_query', single_end:true ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
run("MMSEQS_CREATEDB", alias: "MMSEQS_CREATEDB_TARGET") { | ||
script "../../../mmseqs/createdb/main.nf" | ||
process { | ||
""" | ||
input[0] = [ [ id:'test_target', single_end:true ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/scaffolds.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("sarscov2 - test-search") { | ||
|
||
when { | ||
params { | ||
module_args = '--remove-tmp-files 1 --search-type 2' | ||
module_prefix = 'test_output_search' | ||
} | ||
process { | ||
""" | ||
input[0] = MMSEQS_CREATEDB_QUERY.out.db | ||
input[1] = MMSEQS_CREATEDB_TARGET.out.db | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.db_search.get(0).get(1)).list().sort(), //second file is empty so fails linting | ||
path(process.out.versions[0]).yaml | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - test-search - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
params { | ||
module_args = '--remove-tmp-files 1 --search-type 2' | ||
module_prefix = 'test_output_search' | ||
} | ||
process { | ||
""" | ||
input[0] = MMSEQS_CREATEDB_QUERY.out.db | ||
input[1] = MMSEQS_CREATEDB_TARGET.out.db | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out, | ||
path(process.out.versions[0]).yaml | ||
).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,88 @@ | ||
{ | ||
"sarscov2 - test-search": { | ||
"content": [ | ||
[ | ||
"test_output_search.0", | ||
"test_output_search.1", | ||
"test_output_search.dbtype", | ||
"test_output_search.index" | ||
], | ||
{ | ||
"MMSEQS_SEARCH": { | ||
"mmseqs": "15.6f452" | ||
} | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-15T09:38:30.159081322" | ||
}, | ||
"sarscov2 - test-search - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_query", | ||
"single_end": true | ||
}, | ||
[ | ||
"test_output_search.0:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.1:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.2:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.3:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.4:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.5:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.6:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.7:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.8:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.9:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.index:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,2568126b1f8eb47999b31cd5f3b9c68e" | ||
], | ||
"db_search": [ | ||
[ | ||
{ | ||
"id": "test_query", | ||
"single_end": true | ||
}, | ||
[ | ||
"test_output_search.0:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.1:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.2:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.3:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.4:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.5:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.6:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.7:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.8:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.9:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"test_output_search.index:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,2568126b1f8eb47999b31cd5f3b9c68e" | ||
] | ||
}, | ||
{ | ||
"MMSEQS_SEARCH": { | ||
"mmseqs": "15.6f452" | ||
} | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-15T09:28:46.406630911" | ||
} | ||
} |
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,8 @@ | ||
process { | ||
|
||
withName: MMSEQS_SEARCH { | ||
ext.prefix = params.module_prefix | ||
ext.args = params.module_args | ||
} | ||
|
||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.