Skip to content

Commit

Permalink
Added nf-test for ngmerge (#6269)
Browse files Browse the repository at this point in the history
* Added nf-test for ngmerge

* Fixed assertion
  • Loading branch information
GallVp authored Aug 23, 2024
1 parent eb57f88 commit 4f7edeb
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 33 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/ngmerge/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://github.com/jsh58/NGmerge"
tool_dev_url: "https://github.com/jsh58/NGmerge"
doi: "10.1186/s12859-018-2579-2"
licence: "['MIT']"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
43 changes: 43 additions & 0 deletions modules/nf-core/ngmerge/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "ngmerge"

test("test-ngmerge") {

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 path(process.out.merged_reads[0][1]).linesGzip[0].contains('ERR5069949') },
{ assert snapshot(
file(process.out.merged_reads[0][1]).name,
file(process.out.unstitched_read1[0][1]).name,
file(process.out.unstitched_read2[0][1]).name,
process.out.versions
).match()
}
)
}
}

}
17 changes: 17 additions & 0 deletions modules/nf-core/ngmerge/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"test-ngmerge": {
"content": [
"test.merged.fq.gz",
"test_unstitched_1.fastq.gz",
"test_unstitched_2.fastq.gz",
[
"versions.yml:md5,fbe3b4187e1c70c016f738aeff8ab5f1"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T12:02:38.100015"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -983,9 +983,6 @@ nextgenmap:
ngmaster:
- modules/nf-core/ngmaster/**
- tests/modules/nf-core/ngmaster/**
ngmerge:
- modules/nf-core/ngmerge/**
- tests/modules/nf-core/ngmerge/**
nucmer:
- modules/nf-core/nucmer/**
- tests/modules/nf-core/nucmer/**
Expand Down
15 changes: 0 additions & 15 deletions tests/modules/nf-core/ngmerge/main.nf

This file was deleted.

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

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/ngmerge/test.yml

This file was deleted.

0 comments on commit 4f7edeb

Please sign in to comment.