Skip to content

Commit

Permalink
Added nf-test for pairtools/restrict
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Aug 22, 2024
1 parent fe9614c commit aa34408
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 @@ -1013,9 +1013,6 @@ pairtools/merge:
pairtools/parse:
- modules/nf-core/pairtools/parse/**
- tests/modules/nf-core/pairtools/parse/**
pairtools/restrict:
- modules/nf-core/pairtools/restrict/**
- tests/modules/nf-core/pairtools/restrict/**
pairtools/select:
- modules/nf-core/pairtools/select/**
- tests/modules/nf-core/pairtools/select/**
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 aa34408

Please sign in to comment.