-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #586 from atrigila/starfusion_detect
Add nf-test to local module `STARFUSION_DETECT`
- Loading branch information
Showing
5 changed files
with
206 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
nextflow_process { | ||
|
||
name "Test Process STARFUSION" | ||
script "../main.nf" | ||
process "STARFUSION" | ||
|
||
setup { | ||
run("STARFUSION_BUILD") { | ||
script "../../../starfusion/build/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'minigenome fasta' ], | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.fa") | ||
] | ||
input[1] = [ | ||
[ id:'minigenome gtf' ], | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.gtf") | ||
] | ||
input [2] = file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/CTAT_HumanFusionLib.mini.dat.gz") | ||
input [3] = "human" | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("Should run without failures") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
[ | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_1.fastq.gz"), | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_2.fastq.gz") | ||
], // reads | ||
[] // empty list for junction, as we don't have a pre-computed Chimeric.out.junction file | ||
] | ||
input[1] = STARFUSION_BUILD.out.reference.map { it[1] } | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assert snapshot( | ||
process.out.fusions, | ||
process.out.abridged, | ||
process.out.coding_effect, | ||
process.out.versions | ||
).match() | ||
} | ||
|
||
} | ||
|
||
test("Should create stub files") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test_stub', single_end:false ], | ||
[ | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_1.fastq.gz"), | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_2.fastq.gz") | ||
], | ||
[] // empty list for junction | ||
] | ||
input[1] = STARFUSION_BUILD.out.reference.map { it[1] } | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assert snapshot( | ||
process.out | ||
).match() | ||
} | ||
|
||
} | ||
|
||
} |
112 changes: 112 additions & 0 deletions
112
modules/local/starfusion/detect/tests/main.nf.test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"Should create stub files": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_stub", | ||
"single_end": false | ||
}, | ||
"test_stub.starfusion.fusion_predictions.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test_stub", | ||
"single_end": false | ||
}, | ||
"test_stub.starfusion.abridged.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"2": [ | ||
[ | ||
{ | ||
"id": "test_stub", | ||
"single_end": false | ||
}, | ||
"test_stub.starfusion.abridged.coding_effect.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"3": [ | ||
"versions.yml:md5,a8fb6344fdf740dde0941048313fc243" | ||
], | ||
"abridged": [ | ||
[ | ||
{ | ||
"id": "test_stub", | ||
"single_end": false | ||
}, | ||
"test_stub.starfusion.abridged.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"coding_effect": [ | ||
[ | ||
{ | ||
"id": "test_stub", | ||
"single_end": false | ||
}, | ||
"test_stub.starfusion.abridged.coding_effect.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"fusions": [ | ||
[ | ||
{ | ||
"id": "test_stub", | ||
"single_end": false | ||
}, | ||
"test_stub.starfusion.fusion_predictions.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,a8fb6344fdf740dde0941048313fc243" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2024-12-19T18:42:06.988178092" | ||
}, | ||
"Should run without failures": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.starfusion.fusion_predictions.tsv:md5,82834fffed743afe07da82bd56d50c99" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.starfusion.abridged.tsv:md5,d6d20fdd4b5cba21b9c0ebf8e0ea19ff" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.starfusion.abridged.coding_effect.tsv:md5,95dfce6fdaf3589f23881fe1e855c62b" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,a8fb6344fdf740dde0941048313fc243" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2024-12-19T18:41:49.150362156" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters