Skip to content

Commit

Permalink
Added nf-test for pairtools/restrict (#6263)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Aug 25, 2024
1 parent 3da38da commit 13b1571
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 35 deletions.
40 changes: 40 additions & 0 deletions modules/nf-core/pairtools/restrict/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "pairtools"
tag "pairtools/restrict"

test("test-pairtools-restrict") {

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

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

}
21 changes: 21 additions & 0 deletions modules/nf-core/pairtools/restrict/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"test-pairtools-restrict": {
"content": [
[
"#chromosomes: chr1 chr2",
"#chromsize: chr1 10000",
"#chromsize: chr2 10000",
"#samheader: @SQ\tSN:chr1\tLN:10000",
"#samheader: @SQ\tSN:chr2\tLN:10000"
],
[
"versions.yml:md5,c67dacbd4b0c4f2f060bd65b776113da"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T11:15:44.880469"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/pairtools/restrict/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: PAIRTOOLS_RESTRICT {
ext.prefix = { "${meta.id}.restrict" }
}
}
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 @@ oncocnv:
paftools/sam2paf:
- modules/nf-core/paftools/sam2paf/**
- test/modules/nf-core/paftools/sam2paf/**
pairtools/restrict:
- modules/nf-core/pairtools/restrict/**
- tests/modules/nf-core/pairtools/restrict/**
panaroo/run:
- modules/nf-core/panaroo/run/**
- tests/modules/nf-core/panaroo/run/**
Expand Down
14 changes: 0 additions & 14 deletions tests/modules/nf-core/pairtools/restrict/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit 13b1571

Please sign in to comment.