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.
Added nf-tests for ADAPTERREMOVALFIXPREFIX (nf-core#6243)
* Added nf-tests for ADAPTERREMOVALFIXPREFIX * Update modules/nf-core/adapterremovalfixprefix/tests/main.nf.test Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/adapterremovalfixprefix/tests/main.nf.test Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com>
- Loading branch information
1 parent
1667117
commit 5662e1d
Showing
8 changed files
with
151 additions
and
38 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
modules/nf-core/adapterremovalfixprefix/tests/main.nf.test
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,72 @@ | ||
nextflow_process { | ||
|
||
name "Test Process ADAPTERREMOVALFIXPREFIX" | ||
script "../main.nf" | ||
process "ADAPTERREMOVALFIXPREFIX" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "adapterremoval" | ||
tag "adapterremovalfixprefix" | ||
|
||
setup { | ||
run("ADAPTERREMOVAL") { | ||
script "../../adapterremoval/main.nf" | ||
config "./nextflow.config" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) | ||
] | ||
] | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("paired-end - sarscov2 - [fastq]") { | ||
|
||
when { | ||
|
||
process { | ||
""" | ||
input[0] = ADAPTERREMOVAL.out.collapsed | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("paired-end - sarscov2 - [fastq] - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = ADAPTERREMOVAL.out.collapsed | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
72 changes: 72 additions & 0 deletions
72
modules/nf-core/adapterremovalfixprefix/tests/main.nf.test.snap
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,72 @@ | ||
{ | ||
"paired-end - sarscov2 - [fastq] - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.fq.gz:md5,369452751050a7f1e31b839702d61417" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c" | ||
], | ||
"fixed_fastq": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.fq.gz:md5,369452751050a7f1e31b839702d61417" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-22T08:19:25.477451" | ||
}, | ||
"paired-end - sarscov2 - [fastq]": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.fq.gz:md5,369452751050a7f1e31b839702d61417" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c" | ||
], | ||
"fixed_fastq": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.fq.gz:md5,369452751050a7f1e31b839702d61417" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-22T07:57:53.853795" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
modules/nf-core/adapterremovalfixprefix/tests/nextflow.config
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: ADAPTERREMOVAL { | ||
ext.args = "--collapse" | ||
} | ||
} |
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,2 @@ | ||
adapterremovalfixprefix: | ||
- "modules/nf-core/adapterremovalfixprefix/**" |
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.
9 changes: 0 additions & 9 deletions
9
tests/modules/nf-core/adapterremovalfixprefix/nextflow.config
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.