Skip to content

Commit

Permalink
Added nf-test for picard/sortsam
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Aug 25, 2024
1 parent 13b1571 commit b47e984
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 35 deletions.
40 changes: 40 additions & 0 deletions modules/nf-core/picard/sortsam/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

nextflow_process {

name "Test Process PICARD_SORTSAM"
script "../main.nf"
process "PICARD_SORTSAM"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
tag "picard"
tag "picard/sortsam"

test("test-picard-sortsam") {

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

then {
assertAll(
{ assert process.success },
{ assert snapshot(
bam(process.out.bam[0][1]).getReadsMD5(),
process.out.versions
).match()
}
)
}
}

}
15 changes: 15 additions & 0 deletions modules/nf-core/picard/sortsam/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"test-picard-sortsam": {
"content": [
"b9847fed94d2b7286e18caaa099658ce",
[
"versions.yml:md5,f53876b7c58b5aa1564606f3c9c34108"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T09:23:48.485054"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/picard/sortsam/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: PICARD_SORTSAM {
ext.prefix = { "${meta.id}.sorted" }
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1073,9 +1073,6 @@ picard/renamesampleinvcf:
picard/scatterintervalsbyns:
- modules/nf-core/picard/scatterintervalsbyns/**
- tests/modules/nf-core/picard/scatterintervalsbyns/**
picard/sortsam:
- modules/nf-core/picard/sortsam/**
- tests/modules/nf-core/picard/sortsam/**
picard/sortvcf:
- modules/nf-core/picard/sortvcf/**
- tests/modules/nf-core/picard/sortvcf/**
Expand Down
14 changes: 0 additions & 14 deletions tests/modules/nf-core/picard/sortsam/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit b47e984

Please sign in to comment.