Skip to content

Commit

Permalink
Added nf-test for bbmap/clumpify (#6338)
Browse files Browse the repository at this point in the history
* Added nf-test for bbmap/clumpify

* Swap to snapshot all

---------

Co-authored-by: Simon Pearce <[email protected]>
  • Loading branch information
GallVp and SPPearce authored Aug 26, 2024
1 parent 2a6fda4 commit d3b8821
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 50 deletions.
72 changes: 72 additions & 0 deletions modules/nf-core/bbmap/clumpify/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

nextflow_process {

name "Test Process BBMAP_CLUMPIFY"
script "../main.nf"
process "BBMAP_CLUMPIFY"

tag "modules"
tag "modules_nfcore"
tag "bbmap"
tag "bbmap/clumpify"

test("test-bbmap-clumpify-single-end") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
]
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.reads,
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
)
}
}

test("test-bbmap-clumpify-paired-end") {

when {
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)
]
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.reads,
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
)
}
}

}
49 changes: 49 additions & 0 deletions modules/nf-core/bbmap/clumpify/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"test-bbmap-clumpify-paired-end": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
[
"test_1.clumped.fastq.gz:md5,27e51643262c1ef3905c4be184c3814c",
"test_2.clumped.fastq.gz:md5,c70ab7bbd44d6b6fadd6a1a79ef1648f"
]
]
],
"test.clumpify.log",
[
"versions.yml:md5,ec30171b7944e601f3fd733bb5408bf6"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T06:43:39.816170993"
},
"test-bbmap-clumpify-single-end": {
"content": [
[
[
{
"id": "test",
"single_end": true
},
"test.clumped.fastq.gz:md5,27e51643262c1ef3905c4be184c3814c"
]
],
"test.clumpify.log",
[
"versions.yml:md5,ec30171b7944e601f3fd733bb5408bf6"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T06:43:28.923674245"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ bbmap/align:
bbmap/bbnorm:
- modules/nf-core/bbmap/bbnorm/**
- tests/modules/nf-core/bbmap/bbnorm/**
bbmap/clumpify:
- modules/nf-core/bbmap/clumpify/**
- tests/modules/nf-core/bbmap/clumpify/**
bbmap/index:
- modules/nf-core/bbmap/index/**
- tests/modules/nf-core/bbmap/index/**
Expand Down
24 changes: 0 additions & 24 deletions tests/modules/nf-core/bbmap/clumpify/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/bbmap/clumpify/nextflow.config

This file was deleted.

18 changes: 0 additions & 18 deletions tests/modules/nf-core/bbmap/clumpify/test.yml

This file was deleted.

0 comments on commit d3b8821

Please sign in to comment.