-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* nf-test for ashlar * Update modules/nf-core/ashlar/main.nf Co-authored-by: Simon Pearce <[email protected]> * added multiple tests * pin tifffile version --------- Co-authored-by: Simon Pearce <[email protected]>
- Loading branch information
Showing
9 changed files
with
348 additions
and
146 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ channels: | |
- bioconda | ||
dependencies: | ||
- bioconda::ashlar=1.18.0 | ||
- tifffile=2024.1.30 |
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,155 @@ | ||
nextflow_process { | ||
|
||
name "Test Process ASHLAR" | ||
script "../main.nf" | ||
process "ASHLAR" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "ashlar" | ||
|
||
test("ashlar - with fields") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test_all' ], | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-dfp.ome.tif', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-ffp.ome.tif', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("ashlar - 1 cycle - ome-tif") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test_1' ], | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif', checkIfExists: true) | ||
] | ||
input[1] = [] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("ashlar - all cycles - ome-tif") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test_1' ], | ||
[ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle3.ome.tif', checkIfExists: true) | ||
] | ||
] | ||
input[1] = [] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("ashlar - all cycles - with fields - ome-tif") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test_1' ], | ||
[ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle3.ome.tif', checkIfExists: true) | ||
] | ||
] | ||
input[1] = [ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-dfp.ome.tif', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-ffp.ome.tif', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("ashlar - with fields - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test_all' ], | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-dfp.ome.tif', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
file(params.modules_testdata_base_path + 'imaging/ome-tiff/cycif-tonsil-ffp.ome.tif', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,167 @@ | ||
{ | ||
"ashlar - with fields - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_all" | ||
}, | ||
"test_all.ome.tif:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
], | ||
"tif": [ | ||
[ | ||
{ | ||
"id": "test_all" | ||
}, | ||
"test_all.ome.tif:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.1", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-04T13:32:44.241620025" | ||
}, | ||
"ashlar - 1 cycle - ome-tif": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_1" | ||
}, | ||
"test_1.ome.tif:md5,988bbb2c74d47dc22a9f3ac348f53ef5" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
], | ||
"tif": [ | ||
[ | ||
{ | ||
"id": "test_1" | ||
}, | ||
"test_1.ome.tif:md5,988bbb2c74d47dc22a9f3ac348f53ef5" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.1", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-06T11:13:49.614970275" | ||
}, | ||
"ashlar - with fields": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_all" | ||
}, | ||
"test_all.ome.tif:md5,988bbb2c74d47dc22a9f3ac348f53ef5" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
], | ||
"tif": [ | ||
[ | ||
{ | ||
"id": "test_all" | ||
}, | ||
"test_all.ome.tif:md5,988bbb2c74d47dc22a9f3ac348f53ef5" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.1", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-04T13:28:26.923837754" | ||
}, | ||
"ashlar - all cycles - ome-tif": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_1" | ||
}, | ||
"test_1.ome.tif:md5,c01dda923325588ea34a4fe341b17e6e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
], | ||
"tif": [ | ||
[ | ||
{ | ||
"id": "test_1" | ||
}, | ||
"test_1.ome.tif:md5,c01dda923325588ea34a4fe341b17e6e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.1", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-06T11:14:14.530220621" | ||
}, | ||
"ashlar - all cycles - with fields - ome-tif": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_1" | ||
}, | ||
"test_1.ome.tif:md5,c01dda923325588ea34a4fe341b17e6e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
], | ||
"tif": [ | ||
[ | ||
{ | ||
"id": "test_1" | ||
}, | ||
"test_1.ome.tif:md5,c01dda923325588ea34a4fe341b17e6e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d5b1baeee01093ff65d37e155c9ce462" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.1", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-06T11:14:56.268009236" | ||
} | ||
} |
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,5 @@ | ||
process { | ||
withName: ASHLAR_TILE { | ||
ext.args = "--tile-size 512" | ||
} | ||
} |
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
Oops, something went wrong.