Skip to content

Commit

Permalink
Added nf-test for picard/fastqtosam (#6295)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Aug 26, 2024
1 parent daa7c50 commit e98394f
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 79 deletions.
100 changes: 100 additions & 0 deletions modules/nf-core/picard/fastqtosam/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "picard"
tag "picard/fastqtosam"

test("test-picard-fastqtosam-single") {

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-picard-fastqtosam-paired") {

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()
}
)
}
}

test("test-picard-fastqtosam-paired-custom-samplename") {
config "./nextflow.config"

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()
}
)
}
}

}
41 changes: 41 additions & 0 deletions modules/nf-core/picard/fastqtosam/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"test-picard-fastqtosam-paired-custom-samplename": {
"content": [
"e3cfa46b13cc4fc425cccae944f43b10",
[
"versions.yml:md5,24527dfda806cbcfd1609c4734f973f1"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T09:50:01.762254"
},
"test-picard-fastqtosam-single": {
"content": [
"e6a4aa204d980e177a0458596f0a70ac",
[
"versions.yml:md5,24527dfda806cbcfd1609c4734f973f1"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T09:49:32.460549"
},
"test-picard-fastqtosam-paired": {
"content": [
"e3cfa46b13cc4fc425cccae944f43b10",
[
"versions.yml:md5,24527dfda806cbcfd1609c4734f973f1"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T09:49:47.018269"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/picard/fastqtosam/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: 'PICARD_FASTQTOSAM' {
ext.args = "--SAMPLE_NAME CustomSample"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,6 @@ picard/collectinsertsizemetrics:
picard/collectrnaseqmetrics:
- modules/nf-core/picard/collectrnaseqmetrics/**
- tests/modules/nf-core/picard/collectrnaseqmetrics/**
picard/fastqtosam:
- modules/nf-core/picard/fastqtosam/**
- tests/modules/nf-core/picard/fastqtosam/**
picard/filtersamreads:
- modules/nf-core/picard/filtersamreads/**
- tests/modules/nf-core/picard/filtersamreads/**
Expand Down
43 changes: 0 additions & 43 deletions tests/modules/nf-core/picard/fastqtosam/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit e98394f

Please sign in to comment.