Skip to content

Commit

Permalink
Added nf-test for gatk4/fastqtosam (#6315)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Pearce <[email protected]>
  • Loading branch information
GallVp and SPPearce authored Aug 26, 2024
1 parent 3f42e07 commit ec4e1f6
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 46 deletions.
64 changes: 64 additions & 0 deletions modules/nf-core/gatk4/fastqtosam/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "gatk4"
tag "gatk4/fastqtosam"

test("test-gatk4-fastqtosam-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(
bam(process.out.bam[0][1]).getReadsMD5(),
process.out.versions
).match()
}
)
}
}

test("test-gatk4-fastqtosam-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(
bam(process.out.bam[0][1]).getReadsMD5(),
process.out.versions
).match()
}
)
}
}

}
28 changes: 28 additions & 0 deletions modules/nf-core/gatk4/fastqtosam/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"test-gatk4-fastqtosam-single-end": {
"content": [
"e6a4aa204d980e177a0458596f0a70ac",
[
"versions.yml:md5,ac3f2cf1b686e56d72f1dd4a5977f7ab"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T12:29:12.362942"
},
"test-gatk4-fastqtosam-paired-end": {
"content": [
"e6a4aa204d980e177a0458596f0a70ac",
[
"versions.yml:md5,ac3f2cf1b686e56d72f1dd4a5977f7ab"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T12:29:22.385798"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,6 @@ gatk4/createsomaticpanelofnormals:
gatk4/determinegermlinecontigploidy:
- modules/nf-core/gatk4/determinegermlinecontigploidy/**
- tests/modules/nf-core/gatk4/determinegermlinecontigploidy/**
gatk4/fastqtosam:
- modules/nf-core/gatk4/fastqtosam/**
- tests/modules/nf-core/gatk4/fastqtosam/**
gatk4/filtervarianttranches:
- modules/nf-core/gatk4/filtervarianttranches/**
- tests/modules/nf-core/gatk4/filtervarianttranches/**
Expand Down
22 changes: 0 additions & 22 deletions tests/modules/nf-core/gatk4/fastqtosam/main.nf

This file was deleted.

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

This file was deleted.

16 changes: 0 additions & 16 deletions tests/modules/nf-core/gatk4/fastqtosam/test.yml

This file was deleted.

0 comments on commit ec4e1f6

Please sign in to comment.