Skip to content

Commit

Permalink
Added nf-test for pairtools/sort
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Aug 22, 2024
1 parent fe9614c commit 4606202
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 34 deletions.
38 changes: 38 additions & 0 deletions modules/nf-core/pairtools/sort/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "pairtools"
tag "pairtools/sort"

test("test-pairtools-sort") {

when {
process {
"""
input[0] = [ [ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pairtools/mock.pairsam', checkIfExists: true) ]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.sorted[0][1]).linesGzip[3..7],
process.out.versions
).match()
}
)
}
}

}
21 changes: 21 additions & 0 deletions modules/nf-core/pairtools/sort/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"test-pairtools-sort": {
"content": [
[
"#genome_assembly: unknown",
"#chromosomes: : chr1 chr2 chr3",
"#chromsize: chr2 100",
"#chromsize: chr3 100",
"#chromsize: chr1 100"
],
[
"versions.yml:md5,6f5e6b4260ee11d35e306d2e085fb762"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T11:12:01.451816"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/pairtools/sort/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: PAIRTOOLS_SORT {
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 @@ -1019,9 +1019,6 @@ pairtools/restrict:
pairtools/select:
- modules/nf-core/pairtools/select/**
- tests/modules/nf-core/pairtools/select/**
pairtools/sort:
- modules/nf-core/pairtools/sort/**
- tests/modules/nf-core/pairtools/sort/**
pairtools/stats:
- modules/nf-core/pairtools/stats/**
- tests/modules/nf-core/pairtools/stats/**
Expand Down
13 changes: 0 additions & 13 deletions tests/modules/nf-core/pairtools/sort/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit 4606202

Please sign in to comment.