Skip to content

Commit

Permalink
Added nf-test for atlas/pmd (#6346)
Browse files Browse the repository at this point in the history
* Added nf-test for atlas/pmd

* Fixed power assertion

---------

Co-authored-by: Simon Pearce <[email protected]>
  • Loading branch information
GallVp and SPPearce authored Aug 26, 2024
1 parent d3b8821 commit 066bf9b
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 42 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/atlas/pmd/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home"
tool_dev_url: "https://bitbucket.org/wegmannlab/atlas"
doi: "10.1101/105346"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand Down
46 changes: 46 additions & 0 deletions modules/nf-core/atlas/pmd/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

nextflow_process {

name "Test Process ATLAS_PMD"
script "../main.nf"
process "ATLAS_PMD"

tag "modules"
tag "modules_nfcore"
tag "atlas"
tag "atlas/pmd"

test("test-atlas-pmd") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
[]
]
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.empiric[0][1]).readLines()[0],
file(process.out.exponential[0][1]).readLines()[0][0..13],
file(process.out.counts[0][1]).readLines()[0],
file(process.out.table[0][1]).readLines()[0],
process.out.versions
).match()
}
)
}
}

}
18 changes: 18 additions & 0 deletions modules/nf-core/atlas/pmd/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"test-atlas-pmd": {
"content": [
"1\tCT\tEmpiric[0.000831,0.000000,0.001339,0.001350,0.001437,0.000000,0.002210,0.001314,0.001466,0.000000,0.001395,0.001403,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.001362,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000794,0.000000,0.000000,0.000000,0.001297,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000]",
"1\tExponential[",
"1\tforward\tA->A\t2050\t2033\t2081\t2078\t2138\t2119\t2038\t2007\t2035\t2113\t2049\t2048\t1974\t2012\t2066\t2093\t2110\t1971\t1976\t1906\t1968\t1951\t1917\t1912\t1955\t1956\t1933\t1872\t1922\t1933\t1974\t1840\t1963\t1897\t1870\t1823\t1923\t1908\t1902\t1883\t1973\t1899\t1908\t1912\t1972\t1913\t1922\t1959\t1995\t2039",
"1\tforward\tA->A\t0.998539\t0.997547\t0.997603\t1\t0.998133\t0.998586\t0.99902\t0.998507\t0.998038\t0.999527\t0.997566\t0.997565\t0.998988\t0.998016\t0.99855\t0.999522\t0.996223\t0.99848\t0.999494\t0.998952\t0.999492\t0.997444\t0.998958\t0.997912\t0.997958\t0.997959\t0.997935\t0.998933\t0.996888\t0.999483\t0.998988\t0.999457\t0.998474\t0.998947\t0.998398\t0.998357\t0.997924\t0.999476\t0.999475\t1\t0.998987\t0.998423\t0.999476\t1\t1\t0.998956\t0.998442\t0.997454\t0.9975\t0.99951",
[
"versions.yml:md5,abec49256c52cb677fa0dad3473ed5a6"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T16:01:09.837624"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ ataqv/ataqv:
ataqv/mkarv:
- modules/nf-core/ataqv/mkarv/**
- tests/modules/nf-core/ataqv/mkarv/**
atlas/pmd:
- modules/nf-core/atlas/pmd/**
- tests/modules/nf-core/atlas/pmd/**
atlas/splitmerge:
- modules/nf-core/atlas/splitmerge/**
- tests/modules/nf-core/atlas/splitmerge/**
Expand Down
19 changes: 0 additions & 19 deletions tests/modules/nf-core/atlas/pmd/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/atlas/pmd/nextflow.config

This file was deleted.

14 changes: 0 additions & 14 deletions tests/modules/nf-core/atlas/pmd/test.yml

This file was deleted.

0 comments on commit 066bf9b

Please sign in to comment.