Skip to content

Commit

Permalink
Added nf-test for pairtools/dedup (#6267)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Aug 23, 2024
1 parent b193226 commit 1147cc4
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 35 deletions.
39 changes: 39 additions & 0 deletions modules/nf-core/pairtools/dedup/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "pairtools"
tag "pairtools/dedup"

test("test-pairtools-dedup") {

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

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

}
30 changes: 30 additions & 0 deletions modules/nf-core/pairtools/dedup/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"test-pairtools-dedup": {
"content": [
[
"#genome_assembly: unknown",
"#chromosomes: chr1 chr2",
"#columns: readID chrom1 pos1 chrom2 pos2 strand1 strand2 pair_type sam1 sam2",
"readid3\tchr1\t1\tchr1\t20\t+\t+\tUU\t.\t.",
"readid5\tchr1\t1\tchr1\t25\t+\t+\tUU\t.\t."
],
[
[
{
"id": "test",
"single_end": false
},
"test.dedup.pairs.stat:md5,94682d1bc608ade150dd11993fbfd2a3"
]
],
[
"versions.yml:md5,485fbdd68f35d563c8559e1afedc4c53"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T11:23:16.451408"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/pairtools/dedup/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: PAIRTOOLS_DEDUP {
ext.prefix = { "${meta.id}.dedup" }
}
}
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/dedup:
- modules/nf-core/pairtools/dedup/**
- tests/modules/nf-core/pairtools/dedup/**
pairtools/parse:
- modules/nf-core/pairtools/parse/**
- tests/modules/nf-core/pairtools/parse/**
Expand Down
13 changes: 0 additions & 13 deletions tests/modules/nf-core/pairtools/dedup/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit 1147cc4

Please sign in to comment.