forked from scilus/nf-scil
-
Notifications
You must be signed in to change notification settings - Fork 0
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 scilus#137 from gagnonanthony/denoising_2.0
Migrate denoising modules to scilpy 2.0.0 + nf-test.
- Loading branch information
Showing
19 changed files
with
283 additions
and
105 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: denoising_mppca | ||
|
||
channels: | ||
- Docker | ||
- Apptainer | ||
|
||
dependencies: | ||
- FSL | ||
- Mrtrix |
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,52 @@ | ||
nextflow_process { | ||
|
||
name "Test Process DENOISING_MPPCA" | ||
script "../main.nf" | ||
process "DENOISING_MPPCA" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "denoising" | ||
tag "denoising/mppca" | ||
|
||
tag "subworkflows" | ||
tag "subworkflows/load_test_data" | ||
|
||
test("denoising - mppca") { | ||
|
||
setup { | ||
run("LOAD_TEST_DATA", alias: "LOAD_DATA") { | ||
script "../../../../../subworkflows/nf-scil/load_test_data/main.nf" | ||
process { | ||
""" | ||
input[0] = Channel.from( [ "heavy.zip" ] ) | ||
input[1] = "test.load-test-data" | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = LOAD_DATA.out.test_data_directory.map{ | ||
test_data_directory -> [ | ||
[ id:'test', single_end:false ], // meta map | ||
file("\${test_data_directory}/dwi/dwi.nii.gz") | ||
] | ||
} | ||
""" | ||
} | ||
} | ||
|
||
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,37 @@ | ||
{ | ||
"denoising - mppca": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_dwi_denoised.nii.gz:md5,c949b91d96513cba506975c271e53596" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,fb589ae27eb3edb1cd1a50b0e13d2714" | ||
], | ||
"image": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_dwi_denoised.nii.gz:md5,c949b91d96513cba506975c271e53596" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,fb589ae27eb3edb1cd1a50b0e13d2714" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.1" | ||
}, | ||
"timestamp": "2024-04-25T11:07:06.152814" | ||
} | ||
} |
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,6 @@ | ||
process { | ||
withNAME: "DENOISING_MPPCA" { | ||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
ext.extent = 3 | ||
} | ||
} |
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,2 @@ | ||
denoising/mppca: | ||
- "modules/nf-scil/denoising/mppca/**" |
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,7 @@ | ||
--- | ||
name: "denoising_nlmeans" | ||
channels: | ||
- Docker | ||
- Apptainer | ||
dependencies: | ||
- "Scilpy" |
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,78 @@ | ||
nextflow_process { | ||
|
||
name "Test Process DENOISING_NLMEANS" | ||
script "../main.nf" | ||
process "DENOISING_NLMEANS" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "denoising" | ||
tag "denoising/nlmeans" | ||
|
||
tag "subworkflows" | ||
tag "subworkflows/load_test_data" | ||
|
||
setup { | ||
run("LOAD_TEST_DATA", alias: "LOAD_DATA") { | ||
script "../../../../../subworkflows/nf-scil/load_test_data/main.nf" | ||
process { | ||
""" | ||
input[0] = Channel.from( [ "heavy.zip" ] ) | ||
input[1] = "test.load-test-data" | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("denoising - nlmeans") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = LOAD_DATA.out.test_data_directory.map{ | ||
test_data_directory -> [ | ||
[ id:'test', single_end:false ], // meta map | ||
file("\${test_data_directory}/anat/anat_image.nii.gz"), | ||
[] | ||
] | ||
} | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("denoising - nlmeans - withmask") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = LOAD_DATA.out.test_data_directory.map{ | ||
test_data_directory -> [ | ||
[ id:'test', single_end:false ], // meta map | ||
file("\${test_data_directory}/anat/anat_image.nii.gz"), | ||
file("\${test_data_directory}/anat/anat_mask.nii.gz") | ||
] | ||
} | ||
""" | ||
} | ||
} | ||
|
||
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,72 @@ | ||
{ | ||
"denoising - nlmeans": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_denoised.nii.gz:md5,4a4eaa8956682b97589682c62c3226e5" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,e5c9936e9d01b8503f706aecd0a39027" | ||
], | ||
"image": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_denoised.nii.gz:md5,4a4eaa8956682b97589682c62c3226e5" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,e5c9936e9d01b8503f706aecd0a39027" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.1" | ||
}, | ||
"timestamp": "2024-04-23T21:07:32.369936" | ||
}, | ||
"denoising - nlmeans - withmask": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_denoised.nii.gz:md5,a4925934f71fc40c2182e8c1d3bc6687" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,e5c9936e9d01b8503f706aecd0a39027" | ||
], | ||
"image": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_denoised.nii.gz:md5,a4925934f71fc40c2182e8c1d3bc6687" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,e5c9936e9d01b8503f706aecd0a39027" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.1" | ||
}, | ||
"timestamp": "2024-04-23T21:09:03.715606" | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
...nf-scil/denoising/nlmeans/nextflow.config → ...l/denoising/nlmeans/tests/nextflow.config
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
} |
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,2 @@ | ||
denoising/nlmeans: | ||
- "modules/nf-scil/denoising/nlmeans/**" |
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.