Skip to content

Commit

Permalink
Add nf-test for inferExp process
Browse files Browse the repository at this point in the history
  • Loading branch information
emi80 committed Apr 18, 2024
1 parent 3ff6919 commit 1ddc282
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/modules/inferExp/rseqc/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
nextflow_process {

name "Test Process inferExp"
script "modules/inferExp/rseqc/main.nf"
process "inferExp"

test("Should infer strendedness from BAM (compressed annotation)") {

when {
process {
"""
input[0] = file("${baseDir}/data/annotation.gtf.gz")
input[1] = Channel.from([
[ "sample3", "test3", file("${baseDir}/data/sample3_m4_n10_toGenome.bam"), "bam", "GenomeAlignments", true]
])
"""
}
}

then {
assert process.success
assert snapshot(process.out).match()
}

}

test("Should infer strendedness from BAM (uncompressed annotation)") {

when {
process {
"""
input[0] = file("${baseDir}/data/annotation.gtf.gz")
input[1] = Channel.from([
[ "sample3", "test3", file("${baseDir}/data/sample3_m4_n10_toGenome.bam"), "bam", "GenomeAlignments", true]
])
"""
}
}

then {
assert process.success
assert snapshot(process.out).match()
}

}

}
38 changes: 38 additions & 0 deletions tests/modules/inferExp/rseqc/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"Should infer strendedness from BAM (uncompressed annotation)": {
"content": [
{
"0": [
[
"sample3",
"test3",
"{\"paired\": true, \"exp\": \"MATE2_SENSE\"}"
]
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-18T18:54:10.824148"
},
"Should infer strendedness from BAM (compressed annotation)": {
"content": [
{
"0": [
[
"sample3",
"test3",
"{\"paired\": true, \"exp\": \"MATE2_SENSE\"}"
]
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-18T18:54:02.195879"
}
}

0 comments on commit 1ddc282

Please sign in to comment.