Skip to content

Commit

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

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "pairtools"
tag "pairtools/parse"

test("test-pairtools-parse") {

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

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

}
30 changes: 30 additions & 0 deletions modules/nf-core/pairtools/parse/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"test-pairtools-parse": {
"content": [
[
"#chromsize: chr1 1000",
"#chromsize: chr2 1000",
"#samheader: @SQ\tSN:chr1\tLN:1000",
"#samheader: @SQ\tSN:chr2\tLN:1000",
"#samheader: @PG\tID:mock\tPN:mock\tVN:0.0.0\tCL:mock"
],
[
[
{
"id": "test",
"single_end": false
},
"test.raw.pairsam.stat:md5,054bf78ee4f0a4c447ad3eeb81f1f4ae"
]
],
[
"versions.yml:md5,2c8cb00722749f8e3831464a5057c519"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T11:17:35.185642"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/pairtools/parse/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: PAIRTOOLS_PARSE {
ext.prefix = { "${meta.id}.raw" }
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1010,9 +1010,6 @@ pairtools/flip:
pairtools/merge:
- modules/nf-core/pairtools/merge/**
- tests/modules/nf-core/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/**
Expand Down
14 changes: 0 additions & 14 deletions tests/modules/nf-core/pairtools/parse/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit 285cff6

Please sign in to comment.