Skip to content

Commit

Permalink
resnap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVCaron committed Jul 23, 2024
1 parent 1cfaddf commit 009e03c
Show file tree
Hide file tree
Showing 34 changed files with 1,568 additions and 320 deletions.
14 changes: 7 additions & 7 deletions modules/nf-scil/betcrop/antsbet/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "test",
"single_end": false
},
"test__t1_bet.nii.gz:md5,31ccfe501376952248b4d933645f1304"
"test__t1_bet.nii.gz:md5,b43dc42e2771a4a581d87d5ff832cf46"
]
],
"1": [
Expand All @@ -17,7 +17,7 @@
"id": "test",
"single_end": false
},
"test__t1_bet_mask.nii.gz:md5,0874069d069f06bfc40d7f6be2347259"
"test__t1_bet_mask.nii.gz:md5,5020c0022664ce53b33e8252b7a3a0a4"
]
],
"2": [
Expand All @@ -29,7 +29,7 @@
"id": "test",
"single_end": false
},
"test__t1_bet_mask.nii.gz:md5,0874069d069f06bfc40d7f6be2347259"
"test__t1_bet_mask.nii.gz:md5,5020c0022664ce53b33e8252b7a3a0a4"
]
],
"t1": [
Expand All @@ -38,7 +38,7 @@
"id": "test",
"single_end": false
},
"test__t1_bet.nii.gz:md5,31ccfe501376952248b4d933645f1304"
"test__t1_bet.nii.gz:md5,b43dc42e2771a4a581d87d5ff832cf46"
]
],
"versions": [
Expand All @@ -47,9 +47,9 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-04-23T16:07:14.789765"
"timestamp": "2024-06-21T00:50:55.054746"
}
}
50 changes: 25 additions & 25 deletions modules/nf-scil/image/resample/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f"
"test_resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f"
]
],
"1": [
Expand All @@ -20,7 +20,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f"
"test_resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f"
]
],
"versions": [
Expand All @@ -29,10 +29,10 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-05-08T12:39:51.794554"
"timestamp": "2024-06-21T22:35:51.636197"
},
"image - resample - nn": {
"content": [
Expand All @@ -43,7 +43,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564"
"test_resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564"
]
],
"1": [
Expand All @@ -55,7 +55,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564"
"test_resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564"
]
],
"versions": [
Expand All @@ -64,10 +64,10 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-05-08T12:40:24.002411"
"timestamp": "2024-06-21T22:37:56.254527"
},
"image - resample - volsize": {
"content": [
Expand All @@ -78,7 +78,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8"
"test_resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8"
]
],
"1": [
Expand All @@ -90,7 +90,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8"
"test_resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8"
]
],
"versions": [
Expand All @@ -99,10 +99,10 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-05-08T12:39:35.764922"
"timestamp": "2024-06-21T22:34:48.762793"
},
"image - resample - voxsize": {
"content": [
Expand All @@ -113,7 +113,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb"
"test_resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb"
]
],
"1": [
Expand All @@ -125,7 +125,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb"
"test_resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb"
]
],
"versions": [
Expand All @@ -134,10 +134,10 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-05-08T12:39:18.016911"
"timestamp": "2024-06-21T22:33:40.565359"
},
"image - resample - ref": {
"content": [
Expand All @@ -148,7 +148,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406"
"test_resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406"
]
],
"1": [
Expand All @@ -160,7 +160,7 @@
"id": "test",
"single_end": false
},
"test__resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406"
"test_resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406"
]
],
"versions": [
Expand All @@ -169,9 +169,9 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-05-08T12:40:07.720638"
"timestamp": "2024-06-21T22:36:53.039746"
}
}
4 changes: 2 additions & 2 deletions modules/nf-scil/io/readbids/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ process IO_READBIDS {

script:
def args = task.ext.args ?: ''
def fsfolder = task.ext.fs_folder ? "--fs " + task.ext.fs_folder : ''
def bidsignore = task.ext.bidsignore ? "--bids_ignore " + task.ext.bidsignore : ''
def fsfolder = fsfolder ? "--fs $fsfolder" : ''
def bidsignore = bidsignore ? "--bids_ignore $bidsignore" : ''
def readout = task.ext.readout ? "--readout " + task.ext.readout : ""
def clean_flag = task.ext.clean_bids ? '--clean ' : ''

Expand Down
9 changes: 5 additions & 4 deletions modules/nf-scil/io/readbids/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ nextflow_process {
process {
"""
input[0] = LOAD_DATA.out.test_data_directory.map{
test_data_directory ->
file("\${test_data_directory}/i_bids", checkIfExists: true)
test_data_directory -> [
file("\${test_data_directory}/i_bids", checkIfExists: true),
[],
[]
]
}
input[1] = []
input[2] = []
"""
}
}
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-scil/io/readbids/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-04-29T20:34:58.293363"
"timestamp": "2024-06-22T14:18:58.455287"
}
}
34 changes: 22 additions & 12 deletions modules/nf-scil/preproc/eddy/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nextflow_process {
script "../../../../../subworkflows/nf-scil/load_test_data/main.nf"
process {
"""
input[0] = Channel.from( [ "topup_eddy_light.zip" ] )
input[0] = Channel.from( [ "raw_DWIss1000-dir32.zip", "topup_results.zip" ] )
input[1] = "test.load-test-data"
"""
}
Expand All @@ -30,18 +30,28 @@ nextflow_process {
when {
process {
"""
input[0] = LOAD_DATA.out.test_data_directory
ch_split_test_data = LOAD_DATA.out.test_data_directory
.branch{
raw_dwi: it.simpleName == "raw_DWIss1000-dir32"
topup_results: it.SimpleName == "topup_results"
}
ch_raw_dwi = ch_split_test_data.raw_dwi
.map{ test_data_directory -> [
[ id:'test', single_end:false ], // meta map
file("\${test_data_directory}/sub-01_dir-AP_dwi.nii.gz", checkIfExists: true),
file("\${test_data_directory}/sub-01_dir-AP_dwi.bval", checkIfExists: true),
file("\${test_data_directory}/sub-01_dir-AP_dwi.bvec", checkIfExists: true),
file("\${test_data_directory}/sub-01_dir-PA_dwi.nii.gz", checkIfExists: true),
file("\${test_data_directory}/sub-01_dir-PA_dwi.bval", checkIfExists: true),
file("\${test_data_directory}/sub-01_dir-PA_dwi.bvec", checkIfExists: true),
file("\${test_data_directory}/sub-01__corrected_b0s.nii.gz", checkIfExists: true),
file("\${test_data_directory}/topup_results_fieldcoef.nii.gz", checkIfExists: true),
file("\${test_data_directory}/topup_results_movpar.txt", checkIfExists: true)]}
[ id:'test', single_end:false ], // meta map
file("\${test_data_directory}/dwi.nii.gz", checkIfExists: true),
file("\${test_data_directory}/dwi.bval", checkIfExists: true),
file("\${test_data_directory}/dwi.bvec", checkIfExists: true),
[],
[],
[]]}
ch_topup = ch_split_test_data.topup_results
.map{ test_data_directory -> [
[ id:'test', single_end:false ], // meta map
file("\${test_data_directory}/topup_corrected_b0s.nii.gz", checkIfExists: true),
file("\${test_data_directory}/topup_fieldcoef.nii.gz", checkIfExists: true),
file("\${test_data_directory}/topup_movpar.txt", checkIfExists: true)]}

input[0] = ch_raw_dwi.join(ch_topup)
"""
}
}
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-scil/preproc/eddy/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "test",
"single_end": false
},
"test__bval_eddy:md5,4c61c53078316c31b4d5daf446a3d6ac"
"test__bval_eddy:md5,7995daabbd74fcf7c365a39a779f67e9"
]
],
"test__dwi_eddy_corrected.bvec",
Expand All @@ -18,7 +18,7 @@
"id": "test",
"single_end": false
},
"test__b0_bet_mask.nii.gz:md5,fc1f94e2a5e2cf5197d7fdc28a83ca28"
"test__b0_bet_mask.nii.gz:md5,f7593774c048491bbe1e08ad43077301"
]
],
[
Expand All @@ -29,6 +29,6 @@
"nf-test": "0.9.0-rc1",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-22T03:27:48.011429"
"timestamp": "2024-07-04T18:30:02.443274"
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-scil/preproc/eddy/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process {
withName: "PREPROC_EDDY" {
ext.prefix_topup = "topup_results"
ext.prefix_topup = "topup"
ext.default_config_topup = "b02b0.cnf"
ext.encoding = "y"
ext.readout = 0.062
Expand Down
Loading

0 comments on commit 009e03c

Please sign in to comment.