From 009e03cea9c6b1b40a1b091c9544255acfdc002b Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Fri, 21 Jun 2024 17:41:03 +0000 Subject: [PATCH] resnap tests --- .../betcrop/antsbet/tests/main.nf.test.snap | 14 +- .../image/resample/tests/main.nf.test.snap | 50 +-- modules/nf-scil/io/readbids/main.nf | 4 +- .../nf-scil/io/readbids/tests/main.nf.test | 9 +- .../io/readbids/tests/main.nf.test.snap | 6 +- .../nf-scil/preproc/eddy/tests/main.nf.test | 34 +- .../preproc/eddy/tests/main.nf.test.snap | 8 +- .../preproc/eddy/tests/nextflow.config | 2 +- .../preproc/n4/tests/main.nf.test.snap | 20 +- .../nf-scil/preproc/topup/tests/main.nf.test | 32 +- .../preproc/topup/tests/main.nf.test.snap | 8 +- .../reconst/fodf/tests/main.nf.test.snap | 70 ++-- .../reconst/meanfrf/tests/main.nf.test.snap | 6 +- .../registration/ants/tests/main.nf.test.snap | 52 +-- modules/nf-scil/testdata/scilpy/main.nf | 13 +- nf-test.config | 2 +- .../nf-scil/anatomical_segmentation/meta.yml | 6 +- .../tests/main.nf.test | 32 +- .../tests/main.nf.test.snap | 223 +++++++++-- subworkflows/nf-scil/preproc_dwi/main.nf | 46 +-- .../nf-scil/preproc_dwi/tests/main.nf.test | 14 +- .../preproc_dwi/tests/main.nf.test.snap | 42 +-- .../nf-scil/preproc_dwi/tests/nextflow.config | 1 + .../nf-scil/preproc_t1/tests/main.nf.test | 18 +- .../preproc_t1/tests/main.nf.test.snap | 68 ++-- subworkflows/nf-scil/topup_eddy/main.nf | 15 +- .../nf-scil/topup_eddy/tests/main.nf.test | 10 +- .../topup_eddy/tests/main.nf.test.snap | 20 +- subworkflows/nf-scil/tractoflow/main.nf | 277 ++++++++++++++ subworkflows/nf-scil/tractoflow/meta.yml | 51 +++ .../nf-scil/tractoflow/tests/main.nf.test | 94 +++++ .../tractoflow/tests/main.nf.test.snap | 285 ++++++++++++++ .../nf-scil/tractoflow/tests/nextflow.config | 354 ++++++++++++++++++ .../nf-scil/tractoflow/tests/tags.yml | 2 + 34 files changed, 1568 insertions(+), 320 deletions(-) create mode 100644 subworkflows/nf-scil/tractoflow/main.nf create mode 100644 subworkflows/nf-scil/tractoflow/meta.yml create mode 100644 subworkflows/nf-scil/tractoflow/tests/main.nf.test create mode 100644 subworkflows/nf-scil/tractoflow/tests/main.nf.test.snap create mode 100644 subworkflows/nf-scil/tractoflow/tests/nextflow.config create mode 100644 subworkflows/nf-scil/tractoflow/tests/tags.yml diff --git a/modules/nf-scil/betcrop/antsbet/tests/main.nf.test.snap b/modules/nf-scil/betcrop/antsbet/tests/main.nf.test.snap index 0c168d660..8dfb8e7b8 100644 --- a/modules/nf-scil/betcrop/antsbet/tests/main.nf.test.snap +++ b/modules/nf-scil/betcrop/antsbet/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "test__t1_bet.nii.gz:md5,31ccfe501376952248b4d933645f1304" + "test__t1_bet.nii.gz:md5,b43dc42e2771a4a581d87d5ff832cf46" ] ], "1": [ @@ -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": [ @@ -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": [ @@ -38,7 +38,7 @@ "id": "test", "single_end": false }, - "test__t1_bet.nii.gz:md5,31ccfe501376952248b4d933645f1304" + "test__t1_bet.nii.gz:md5,b43dc42e2771a4a581d87d5ff832cf46" ] ], "versions": [ @@ -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" } } \ No newline at end of file diff --git a/modules/nf-scil/image/resample/tests/main.nf.test.snap b/modules/nf-scil/image/resample/tests/main.nf.test.snap index 5e74bfe76..2bcfea32b 100644 --- a/modules/nf-scil/image/resample/tests/main.nf.test.snap +++ b/modules/nf-scil/image/resample/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" + "test_resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" ] ], "1": [ @@ -20,7 +20,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" + "test_resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" ] ], "versions": [ @@ -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": [ @@ -43,7 +43,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" + "test_resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" ] ], "1": [ @@ -55,7 +55,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" + "test_resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" ] ], "versions": [ @@ -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": [ @@ -78,7 +78,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" + "test_resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" ] ], "1": [ @@ -90,7 +90,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" + "test_resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" ] ], "versions": [ @@ -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": [ @@ -113,7 +113,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" + "test_resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" ] ], "1": [ @@ -125,7 +125,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" + "test_resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" ] ], "versions": [ @@ -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": [ @@ -148,7 +148,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" + "test_resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" ] ], "1": [ @@ -160,7 +160,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" + "test_resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" ] ], "versions": [ @@ -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" } } \ No newline at end of file diff --git a/modules/nf-scil/io/readbids/main.nf b/modules/nf-scil/io/readbids/main.nf index dcb5d0a4a..28f2724c3 100644 --- a/modules/nf-scil/io/readbids/main.nf +++ b/modules/nf-scil/io/readbids/main.nf @@ -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 ' : '' diff --git a/modules/nf-scil/io/readbids/tests/main.nf.test b/modules/nf-scil/io/readbids/tests/main.nf.test index 92f7061af..ac7a054a3 100644 --- a/modules/nf-scil/io/readbids/tests/main.nf.test +++ b/modules/nf-scil/io/readbids/tests/main.nf.test @@ -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] = [] """ } } diff --git a/modules/nf-scil/io/readbids/tests/main.nf.test.snap b/modules/nf-scil/io/readbids/tests/main.nf.test.snap index 69f77a948..61b43d0e2 100644 --- a/modules/nf-scil/io/readbids/tests/main.nf.test.snap +++ b/modules/nf-scil/io/readbids/tests/main.nf.test.snap @@ -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" } } \ No newline at end of file diff --git a/modules/nf-scil/preproc/eddy/tests/main.nf.test b/modules/nf-scil/preproc/eddy/tests/main.nf.test index 4838395ca..b75485fb8 100644 --- a/modules/nf-scil/preproc/eddy/tests/main.nf.test +++ b/modules/nf-scil/preproc/eddy/tests/main.nf.test @@ -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" """ } @@ -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) """ } } diff --git a/modules/nf-scil/preproc/eddy/tests/main.nf.test.snap b/modules/nf-scil/preproc/eddy/tests/main.nf.test.snap index 7cbe92af0..2e3539937 100644 --- a/modules/nf-scil/preproc/eddy/tests/main.nf.test.snap +++ b/modules/nf-scil/preproc/eddy/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "test__bval_eddy:md5,4c61c53078316c31b4d5daf446a3d6ac" + "test__bval_eddy:md5,7995daabbd74fcf7c365a39a779f67e9" ] ], "test__dwi_eddy_corrected.bvec", @@ -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" ] ], [ @@ -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" } -} \ No newline at end of file +} diff --git a/modules/nf-scil/preproc/eddy/tests/nextflow.config b/modules/nf-scil/preproc/eddy/tests/nextflow.config index fe36c2173..5c81c4024 100644 --- a/modules/nf-scil/preproc/eddy/tests/nextflow.config +++ b/modules/nf-scil/preproc/eddy/tests/nextflow.config @@ -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 diff --git a/modules/nf-scil/preproc/n4/tests/main.nf.test.snap b/modules/nf-scil/preproc/n4/tests/main.nf.test.snap index 99809430a..55aa3dab4 100644 --- a/modules/nf-scil/preproc/n4/tests/main.nf.test.snap +++ b/modules/nf-scil/preproc/n4/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,6383b9ffb68d04bf089ba7a040c4a77f" + "test__image_n4.nii.gz:md5,e4273f0d050e7e07f5e2faba58a2d81f" ] ], "1": [ @@ -20,7 +20,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,6383b9ffb68d04bf089ba7a040c4a77f" + "test__image_n4.nii.gz:md5,e4273f0d050e7e07f5e2faba58a2d81f" ] ], "versions": [ @@ -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-10T16:06:45.886061" + "timestamp": "2024-06-24T05:34:20.913937" }, "preproc - n4 - anat": { "content": [ @@ -43,7 +43,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,a0329a81f3cc26dfa04e3fb8c6e6dc66" + "test__image_n4.nii.gz:md5,21ce6ff7fb39916b049fbc74618da762" ] ], "1": [ @@ -55,7 +55,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,a0329a81f3cc26dfa04e3fb8c6e6dc66" + "test__image_n4.nii.gz:md5,21ce6ff7fb39916b049fbc74618da762" ] ], "versions": [ @@ -64,9 +64,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T16:09:11.896134" + "timestamp": "2024-06-24T05:41:11.664344" } } \ No newline at end of file diff --git a/modules/nf-scil/preproc/topup/tests/main.nf.test b/modules/nf-scil/preproc/topup/tests/main.nf.test index b60362f4a..f69b4c0b2 100644 --- a/modules/nf-scil/preproc/topup/tests/main.nf.test +++ b/modules/nf-scil/preproc/topup/tests/main.nf.test @@ -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", "raw_EPI.zip" ] ) input[1] = "test.load-test-data" """ } @@ -30,17 +30,27 @@ 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" + raw_epi: it.SimpleName == "raw_EPI" + } + 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-AP_sbref.nii.gz", 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_dir-PA_sbref.nii.gz", 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_raw_epi = ch_split_test_data.raw_epi + .map{ test_data_directory -> [ + [ id:'test', single_end:false ], // meta map + file("\${test_data_directory}/epi.nii.gz", checkIfExists: true)]} + + input[0] = ch_raw_dwi.join(ch_raw_epi) input[1] = [] """ } diff --git a/modules/nf-scil/preproc/topup/tests/main.nf.test.snap b/modules/nf-scil/preproc/topup/tests/main.nf.test.snap index 25e2e37f1..f241a33a6 100644 --- a/modules/nf-scil/preproc/topup/tests/main.nf.test.snap +++ b/modules/nf-scil/preproc/topup/tests/main.nf.test.snap @@ -11,7 +11,7 @@ "id": "test", "single_end": false }, - "test__rev_b0_mean.nii.gz:md5,a0c63d7a8a234d85eeb63045ae2a8f60" + "test__rev_b0_mean.nii.gz:md5,0555e5a36b3b7c39f2aa6d62b32faf11" ] ], [ @@ -20,7 +20,7 @@ "id": "test", "single_end": false }, - "test__b0_mean.nii.gz:md5,f50e652bcdd1d45f7a4c592df7eb851a" + "test__b0_mean.nii.gz:md5,b6f6374890b211b2dc6758c2bd4e5f24" ] ], [ @@ -31,6 +31,6 @@ "nf-test": "0.9.0-rc1", "nextflow": "24.04.2" }, - "timestamp": "2024-07-22T03:44:06.877352" + "timestamp": "2024-07-04T17:37:38.673159" } -} \ No newline at end of file +} diff --git a/modules/nf-scil/reconst/fodf/tests/main.nf.test.snap b/modules/nf-scil/reconst/fodf/tests/main.nf.test.snap index 7c62f2ae0..d57d56028 100644 --- a/modules/nf-scil/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-scil/reconst/fodf/tests/main.nf.test.snap @@ -50,7 +50,7 @@ "id": "test", "single_end": false }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,c157f7035f70f620c1279e82fd7b23cd" ] ], "12": [ @@ -86,7 +86,7 @@ "id": "test", "single_end": false }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,59ec2b2c468b2f3f6753ae62b5dbb8f2" ] ], "7": [ @@ -95,7 +95,7 @@ "id": "test", "single_end": false }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,e19de818b90256fba505890ced8549bf" ] ], "8": [ @@ -104,7 +104,7 @@ "id": "test", "single_end": false }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,d7c6700bac6fda87def8eb50f6678807" ] ], "9": [ @@ -131,7 +131,7 @@ "id": "test", "single_end": false }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,c157f7035f70f620c1279e82fd7b23cd" ] ], "afd_total": [ @@ -173,7 +173,7 @@ "id": "test", "single_end": false }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,d7c6700bac6fda87def8eb50f6678807" ] ], "peak_values": [ @@ -182,7 +182,7 @@ "id": "test", "single_end": false }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,e19de818b90256fba505890ced8549bf" ] ], "peaks": [ @@ -191,7 +191,7 @@ "id": "test", "single_end": false }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,59ec2b2c468b2f3f6753ae62b5dbb8f2" ] ], "vent_mask": [ @@ -212,10 +212,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-01T19:21:03.487368" + "timestamp": "2024-07-02T15:58:32.550496" }, "reconst - fodf_no_metrics": { "content": [ @@ -360,7 +360,7 @@ "id": "test", "single_end": false }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,c157f7035f70f620c1279e82fd7b23cd" ] ], "12": [ @@ -396,7 +396,7 @@ "id": "test", "single_end": false }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,59ec2b2c468b2f3f6753ae62b5dbb8f2" ] ], "7": [ @@ -405,7 +405,7 @@ "id": "test", "single_end": false }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,e19de818b90256fba505890ced8549bf" ] ], "8": [ @@ -414,7 +414,7 @@ "id": "test", "single_end": false }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,d7c6700bac6fda87def8eb50f6678807" ] ], "9": [ @@ -441,7 +441,7 @@ "id": "test", "single_end": false }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,c157f7035f70f620c1279e82fd7b23cd" ] ], "afd_total": [ @@ -483,7 +483,7 @@ "id": "test", "single_end": false }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,d7c6700bac6fda87def8eb50f6678807" ] ], "peak_values": [ @@ -492,7 +492,7 @@ "id": "test", "single_end": false }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,e19de818b90256fba505890ced8549bf" ] ], "peaks": [ @@ -501,7 +501,7 @@ "id": "test", "single_end": false }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,59ec2b2c468b2f3f6753ae62b5dbb8f2" ] ], "vent_mask": [ @@ -522,10 +522,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-01T20:38:04.916377" + "timestamp": "2024-07-02T15:59:12.448341" }, "reconst - fodf_no_mask": { "content": [ @@ -536,7 +536,7 @@ "id": "test", "single_end": false }, - "test__fodf.nii.gz:md5,1c0aa14841e90acbdc048c6f0b117ce2" + "test__fodf.nii.gz:md5,df34bdedf4f1a45b1ff5ebc5576aca0e" ] ], "1": [ @@ -557,7 +557,7 @@ "id": "test", "single_end": false }, - "test__afd_sum.nii.gz:md5,e907c21b54410ad69531b58b2c6a5e5d" + "test__afd_sum.nii.gz:md5,0f4ed1f239d6a07e7aecec2cd2d052d0" ] ], "12": [ @@ -593,7 +593,7 @@ "id": "test", "single_end": false }, - "test__peaks.nii.gz:md5,3919c8117b3b800f52fc7319f523eb13" + "test__peaks.nii.gz:md5,6f6311dff0ffcc065307a7f6478b339a" ] ], "7": [ @@ -602,7 +602,7 @@ "id": "test", "single_end": false }, - "test__peak_values.nii.gz:md5,e92f556fe1a926d088590dd2a7d970d6" + "test__peak_values.nii.gz:md5,f89e6bfac8dd912f440e6662e7084c45" ] ], "8": [ @@ -611,7 +611,7 @@ "id": "test", "single_end": false }, - "test__peak_indices.nii.gz:md5,ab4c1129a3ede2db638115e71258a288" + "test__peak_indices.nii.gz:md5,9754986bc00c7710cae79f63633448e3" ] ], "9": [ @@ -638,7 +638,7 @@ "id": "test", "single_end": false }, - "test__afd_sum.nii.gz:md5,e907c21b54410ad69531b58b2c6a5e5d" + "test__afd_sum.nii.gz:md5,0f4ed1f239d6a07e7aecec2cd2d052d0" ] ], "afd_total": [ @@ -659,7 +659,7 @@ "id": "test", "single_end": false }, - "test__fodf.nii.gz:md5,1c0aa14841e90acbdc048c6f0b117ce2" + "test__fodf.nii.gz:md5,df34bdedf4f1a45b1ff5ebc5576aca0e" ] ], "gm_fodf": [ @@ -680,7 +680,7 @@ "id": "test", "single_end": false }, - "test__peak_indices.nii.gz:md5,ab4c1129a3ede2db638115e71258a288" + "test__peak_indices.nii.gz:md5,9754986bc00c7710cae79f63633448e3" ] ], "peak_values": [ @@ -689,7 +689,7 @@ "id": "test", "single_end": false }, - "test__peak_values.nii.gz:md5,e92f556fe1a926d088590dd2a7d970d6" + "test__peak_values.nii.gz:md5,f89e6bfac8dd912f440e6662e7084c45" ] ], "peaks": [ @@ -698,7 +698,7 @@ "id": "test", "single_end": false }, - "test__peaks.nii.gz:md5,3919c8117b3b800f52fc7319f523eb13" + "test__peaks.nii.gz:md5,6f6311dff0ffcc065307a7f6478b339a" ] ], "vent_mask": [ @@ -719,9 +719,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-01T19:50:32.073387" + "timestamp": "2024-07-02T16:01:03.515229" } } \ No newline at end of file diff --git a/modules/nf-scil/reconst/meanfrf/tests/main.nf.test.snap b/modules/nf-scil/reconst/meanfrf/tests/main.nf.test.snap index 79bdb410f..a3f14296b 100644 --- a/modules/nf-scil/reconst/meanfrf/tests/main.nf.test.snap +++ b/modules/nf-scil/reconst/meanfrf/tests/main.nf.test.snap @@ -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-05-14T15:32:27.0469" + "timestamp": "2024-07-02T16:12:16.934839" } } \ No newline at end of file diff --git a/modules/nf-scil/registration/ants/tests/main.nf.test.snap b/modules/nf-scil/registration/ants/tests/main.nf.test.snap index 2210d93a6..d2b3c388b 100644 --- a/modules/nf-scil/registration/ants/tests/main.nf.test.snap +++ b/modules/nf-scil/registration/ants/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "test__warped.nii.gz:md5,131b15551e4c2135b5d2beaf99b77b53" + "test__warped.nii.gz:md5,dd6eeadf55d2a2dd56b82f2fed42929d" ] ], "1": [ @@ -18,8 +18,8 @@ "single_end": false }, [ - "test__output0Warp.nii.gz:md5,8386e2afbc21d754877bcd75fc8edefa", - "test__output1GenericAffine.mat:md5,95fc005e7f2b4de689f3246b14b652c0" + "test__output0Warp.nii.gz:md5,2cf2c64471590619d91539194d5219b3", + "test__output1GenericAffine.mat:md5,807d6fec45c8a2026ccd090534566a08" ] ] ], @@ -30,8 +30,8 @@ "single_end": false }, [ - "test__output0InverseAffine.mat:md5,aa2254ecad64dcf4e931f3a6f6420039", - "test__output1InverseWarp.nii.gz:md5,6cfc53dc70a840be349f75131c82ec88" + "test__output0InverseAffine.mat:md5,31938565167f2f1766e3d8ad671e5fca", + "test__output1InverseWarp.nii.gz:md5,56b5d155e958b20035fec575e43545aa" ] ] ], @@ -44,7 +44,7 @@ "id": "test", "single_end": false }, - "test__warped.nii.gz:md5,131b15551e4c2135b5d2beaf99b77b53" + "test__warped.nii.gz:md5,dd6eeadf55d2a2dd56b82f2fed42929d" ] ], "transfo_image": [ @@ -54,8 +54,8 @@ "single_end": false }, [ - "test__output0Warp.nii.gz:md5,8386e2afbc21d754877bcd75fc8edefa", - "test__output1GenericAffine.mat:md5,95fc005e7f2b4de689f3246b14b652c0" + "test__output0Warp.nii.gz:md5,2cf2c64471590619d91539194d5219b3", + "test__output1GenericAffine.mat:md5,807d6fec45c8a2026ccd090534566a08" ] ] ], @@ -66,8 +66,8 @@ "single_end": false }, [ - "test__output0InverseAffine.mat:md5,aa2254ecad64dcf4e931f3a6f6420039", - "test__output1InverseWarp.nii.gz:md5,6cfc53dc70a840be349f75131c82ec88" + "test__output0InverseAffine.mat:md5,31938565167f2f1766e3d8ad671e5fca", + "test__output1InverseWarp.nii.gz:md5,56b5d155e958b20035fec575e43545aa" ] ] ], @@ -77,10 +77,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T15:21:55.658936" + "timestamp": "2024-07-02T16:19:29.820237" }, "registration - ants - quick": { "content": [ @@ -91,7 +91,7 @@ "id": "test", "single_end": false }, - "test__warped.nii.gz:md5,881bfbc46523ed4805ff199996ee199f" + "test__warped.nii.gz:md5,2e7f87575007e57881864fcb20086cbb" ] ], "1": [ @@ -101,8 +101,8 @@ "single_end": false }, [ - "test__output0Warp.nii.gz:md5,544b50db134e847bdd74bdb31a67f257", - "test__output1GenericAffine.mat:md5,fb0d319e41a7dd04cf65c793c3e78859" + "test__output0Warp.nii.gz:md5,e87f55e0a7562292582bb768dbe4feb4", + "test__output1GenericAffine.mat:md5,79ca56993d673c37553139fd0d8a87cc" ] ] ], @@ -113,8 +113,8 @@ "single_end": false }, [ - "test__output0InverseAffine.mat:md5,9d86318de62a00ea8ed59a8e0c5ee43c", - "test__output1InverseWarp.nii.gz:md5,909e5ac3b150a6edac675fadf3b348c0" + "test__output0InverseAffine.mat:md5,0b6d35c62e0374c467808f810091dcac", + "test__output1InverseWarp.nii.gz:md5,3532a01eb3f045e260f88fcec42c6a67" ] ] ], @@ -127,7 +127,7 @@ "id": "test", "single_end": false }, - "test__warped.nii.gz:md5,881bfbc46523ed4805ff199996ee199f" + "test__warped.nii.gz:md5,2e7f87575007e57881864fcb20086cbb" ] ], "transfo_image": [ @@ -137,8 +137,8 @@ "single_end": false }, [ - "test__output0Warp.nii.gz:md5,544b50db134e847bdd74bdb31a67f257", - "test__output1GenericAffine.mat:md5,fb0d319e41a7dd04cf65c793c3e78859" + "test__output0Warp.nii.gz:md5,e87f55e0a7562292582bb768dbe4feb4", + "test__output1GenericAffine.mat:md5,79ca56993d673c37553139fd0d8a87cc" ] ] ], @@ -149,8 +149,8 @@ "single_end": false }, [ - "test__output0InverseAffine.mat:md5,9d86318de62a00ea8ed59a8e0c5ee43c", - "test__output1InverseWarp.nii.gz:md5,909e5ac3b150a6edac675fadf3b348c0" + "test__output0InverseAffine.mat:md5,0b6d35c62e0374c467808f810091dcac", + "test__output1InverseWarp.nii.gz:md5,3532a01eb3f045e260f88fcec42c6a67" ] ] ], @@ -160,10 +160,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T18:08:59.528483" + "timestamp": "2024-07-02T16:20:38.29805" }, "registration - ants - options": { "content": [ diff --git a/modules/nf-scil/testdata/scilpy/main.nf b/modules/nf-scil/testdata/scilpy/main.nf index 5ae47a9be..8dc7dbbf6 100644 --- a/modules/nf-scil/testdata/scilpy/main.nf +++ b/modules/nf-scil/testdata/scilpy/main.nf @@ -76,7 +76,18 @@ process TESTDATA_SCILPY { "antsbet.zip": "66850bea7af7c1f3fc4e7d371d12d6e8", "freesurfer.zip": "3b876fba6fd77d4962243ac9647bc505", "light.zip": "f2a3a8bddf43d1f67a5e8867ce9ebaa2", - "heavy.zip": "6f2cd0bbdb162455e71de1c7d3b4eb18" + "heavy.zip": "6f2cd0bbdb162455e71de1c7d3b4eb18", + "raw_b0.zip": "e62a5e522b9679d3f06a299ed2a08865", + "raw_DWIms300-1000-2000-dir8-32-60.zip": "a142b006b5b6935d8f6fb23af5fa8587", + "raw_DWIms300-1000-dir8-32.zip": "737b1ed0e766f07ea00eb1868a108f10", + "raw_DWIms1000-2000-dir32-60.zip": "22e2618cc8a757c0e4c000ca657edc6f", + "raw_DWIss300-dir8.zip": "1af227ff769845a2e1cd7daced882825", + "raw_DWIss1000-dir32.zip": "d5a40ddba577d840a05ace7d6e34425e", + "raw_DWIss2000-dir60.zip": "e604ebf849bc5d6003019b51520e70dd", + "raw_EPI.zip": "3831660aebfdd02c84db1893d173a6c7", + "raw_FLAIR.zip": "6ed9a3097d66edbad4c8abe9f201e5c4", + "raw_T1w.zip": "78045d5913871a5a6c34bb2251bccd3c", + "topup_results.zip": "1e5b0e7e5d9219c503747a6d8d512ffb" } def fetch_data(files_dict, keys=None): diff --git a/nf-test.config b/nf-test.config index 5fbd39e02..4c2f3f73f 100755 --- a/nf-test.config +++ b/nf-test.config @@ -11,5 +11,5 @@ config { // run all test with the defined docker profile from the main nextflow.config profile "" - ignore ".venv/**/*.nf.test" + ignore ".venv/**/*.nf*" } diff --git a/subworkflows/nf-scil/anatomical_segmentation/meta.yml b/subworkflows/nf-scil/anatomical_segmentation/meta.yml index a1f29a127..eb4319d41 100644 --- a/subworkflows/nf-scil/anatomical_segmentation/meta.yml +++ b/subworkflows/nf-scil/anatomical_segmentation/meta.yml @@ -55,21 +55,21 @@ output: segmentation method and inputs provided. Structure: [ val(meta), path(csf_mask) ] pattern: "*.{nii,nii.gz}" - - wm_maps: + - wm_map: type: file description: | Channel containing WM probability maps. Will be only outputted if FSL's fast segmentation is used and not with FreeSurfer's parcellation files. Structure: [ val(meta), path(wm_maps) ] pattern: "*.{nii,nii.gz}" - - gm_maps: + - gm_map: type: file description: | Channel containing GM probability maps. Will be only outputted if FSL's fast segmentation is used and not with FreeSurfer's parcellation files. Structure: [ val(meta), path(gm_maps) ] pattern: "*.{nii,nii.gz}" - - csf_maps: + - csf_map: type: file description: | Channel containing CSF probability maps. Will be only outputted if FSL's fast segmentation diff --git a/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test b/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test index 5a27f8429..2170f24b7 100644 --- a/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test +++ b/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test @@ -38,7 +38,7 @@ nextflow_workflow { file("\${test_data_directory}/anat/anat_image.nii.gz", checkIfExists: true), [] ]} - input[1] = [] + input[1] = Channel.empty() """ } } @@ -56,7 +56,35 @@ nextflow_workflow { when { workflow { """ - input[0] = [] + input[0] = Channel.empty() + input[1] = LOAD_DATA.out.test_data_directory.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], // meta map + file("\${test_data_directory}/freesurfer/aparc_aseg.nii.gz", checkIfExists: true), + file("\${test_data_directory}/freesurfer/wmparc.nii.gz", checkIfExists: true) + ]} + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match() } + ) + } + } + + test("anatomical_segmentation - both") { + + when { + workflow { + """ + 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", checkIfExists: true) + ]} input[1] = LOAD_DATA.out.test_data_directory.map{ test_data_directory -> [ [ id:'test', single_end:false ], // meta map diff --git a/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test.snap b/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test.snap index 48d447fe7..7003fe05e 100644 --- a/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test.snap +++ b/subworkflows/nf-scil/anatomical_segmentation/tests/main.nf.test.snap @@ -3,6 +3,24 @@ "content": [ { "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ [ { "id": "test", @@ -11,7 +29,7 @@ "test__mask_wm.nii.gz:md5,2dc635526adb6ef185300acc326ead13" ] ], - "1": [ + "7": [ [ { "id": "test", @@ -20,7 +38,25 @@ "test__mask_gm.nii.gz:md5,247106ed727133078fe262b0b8244071" ] ], - "2": [ + "8": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_csf.nii.gz:md5,b92db7e454c95afadea320a143912ce8" + ] + ], + "9": [ + "versions.yml:md5,18dfcb72144006d4f3e2afc759d2ee6b" + ], + "csf_map": [ + + ], + "csf_mask": [ + + ], + "fs_csf_mask": [ [ { "id": "test", @@ -29,20 +65,100 @@ "test__mask_csf.nii.gz:md5,b92db7e454c95afadea320a143912ce8" ] ], + "fs_gm_mask": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_gm.nii.gz:md5,247106ed727133078fe262b0b8244071" + ] + ], + "fs_wm_mask": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_wm.nii.gz:md5,2dc635526adb6ef185300acc326ead13" + ] + ], + "gm_map": [ + + ], + "gm_mask": [ + + ], + "versions": [ + "versions.yml:md5,18dfcb72144006d4f3e2afc759d2ee6b" + ], + "wm_map": [ + + ], + "wm_mask": [ + + ] + } + ], + "meta": { + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T17:33:19.865748" + }, + "anatomical_segmentation - fslfast": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_wm.nii.gz:md5,f849e268007a747714e342162f13f631" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_gm.nii.gz:md5,39396421c6d1d32ea7943a5ec7a49dce" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_csf.nii.gz:md5,d0fbc088059f17faff38fbcd33257d27" + ] + ], "3": [ - + ], "4": [ - + ], "5": [ - + ], "6": [ - "versions.yml:md5,18dfcb72144006d4f3e2afc759d2ee6b" + + ], + "7": [ + + ], + "8": [ + + ], + "9": [ + "versions.yml:md5,0d100de62a24580c4abbed9193fb6352" ], "csf_map": [ - + ], "csf_mask": [ [ @@ -50,11 +166,20 @@ "id": "test", "single_end": false }, - "test__mask_csf.nii.gz:md5,b92db7e454c95afadea320a143912ce8" + "test__mask_csf.nii.gz:md5,d0fbc088059f17faff38fbcd33257d27" ] + ], + "fs_csf_mask": [ + + ], + "fs_gm_mask": [ + + ], + "fs_wm_mask": [ + ], "gm_map": [ - + ], "gm_mask": [ [ @@ -62,14 +187,14 @@ "id": "test", "single_end": false }, - "test__mask_gm.nii.gz:md5,247106ed727133078fe262b0b8244071" + "test__mask_gm.nii.gz:md5,39396421c6d1d32ea7943a5ec7a49dce" ] ], "versions": [ - "versions.yml:md5,18dfcb72144006d4f3e2afc759d2ee6b" + "versions.yml:md5,f098240b7d7f6df9a2a43215c5828669" ], "wm_map": [ - + ], "wm_mask": [ [ @@ -77,18 +202,18 @@ "id": "test", "single_end": false }, - "test__mask_wm.nii.gz:md5,2dc635526adb6ef185300acc326ead13" + "test__mask_wm.nii.gz:md5,f849e268007a747714e342162f13f631" ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-09T20:53:29.945493" + "timestamp": "2024-07-02T17:27:45.817175" }, - "anatomical_segmentation - fslfast": { + "anatomical_segmentation - both": { "content": [ { "0": [ @@ -119,82 +244,102 @@ ] ], "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ [ { "id": "test", "single_end": false }, - "test__map_wm.nii.gz:md5,1d5a9655d4e3c832b14c83e9424b00fc" + "test__mask_wm.nii.gz:md5,2dc635526adb6ef185300acc326ead13" ] ], - "4": [ + "7": [ [ { "id": "test", "single_end": false }, - "test__map_gm.nii.gz:md5,f7e51eb14af645c687db5d2c6a4f5bf4" + "test__mask_gm.nii.gz:md5,247106ed727133078fe262b0b8244071" ] ], - "5": [ + "8": [ [ { "id": "test", "single_end": false }, - "test__map_csf.nii.gz:md5,9c14d8f70e69d641d9c214d0d52b3663" + "test__mask_csf.nii.gz:md5,b92db7e454c95afadea320a143912ce8" ] ], - "6": [ - "versions.yml:md5,f098240b7d7f6df9a2a43215c5828669" + "9": [ + "versions.yml:md5,0d100de62a24580c4abbed9193fb6352", + "versions.yml:md5,18dfcb72144006d4f3e2afc759d2ee6b" ], "csf_map": [ + + ], + "csf_mask": [ [ { "id": "test", "single_end": false }, - "test__map_csf.nii.gz:md5,9c14d8f70e69d641d9c214d0d52b3663" + "test__mask_csf.nii.gz:md5,d0fbc088059f17faff38fbcd33257d27" ] ], - "csf_mask": [ + "fs_csf_mask": [ [ { "id": "test", "single_end": false }, - "test__mask_csf.nii.gz:md5,d0fbc088059f17faff38fbcd33257d27" + "test__mask_csf.nii.gz:md5,b92db7e454c95afadea320a143912ce8" ] ], - "gm_map": [ + "fs_gm_mask": [ [ { "id": "test", "single_end": false }, - "test__map_gm.nii.gz:md5,f7e51eb14af645c687db5d2c6a4f5bf4" + "test__mask_gm.nii.gz:md5,247106ed727133078fe262b0b8244071" ] ], - "gm_mask": [ + "fs_wm_mask": [ [ { "id": "test", "single_end": false }, - "test__mask_gm.nii.gz:md5,39396421c6d1d32ea7943a5ec7a49dce" + "test__mask_wm.nii.gz:md5,2dc635526adb6ef185300acc326ead13" ] ], - "versions": [ - "versions.yml:md5,f098240b7d7f6df9a2a43215c5828669" + "gm_map": [ + ], - "wm_map": [ + "gm_mask": [ [ { "id": "test", "single_end": false }, - "test__map_wm.nii.gz:md5,1d5a9655d4e3c832b14c83e9424b00fc" + "test__mask_gm.nii.gz:md5,39396421c6d1d32ea7943a5ec7a49dce" ] + ], + "versions": [ + "versions.yml:md5,0d100de62a24580c4abbed9193fb6352", + "versions.yml:md5,18dfcb72144006d4f3e2afc759d2ee6b" + ], + "wm_map": [ + ], "wm_mask": [ [ @@ -208,9 +353,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-06-17T14:24:57.988893" + "timestamp": "2024-07-02T17:44:03.066837" } -} \ No newline at end of file +} diff --git a/subworkflows/nf-scil/preproc_dwi/main.nf b/subworkflows/nf-scil/preproc_dwi/main.nf index 7a6b730d2..a6f79cc78 100644 --- a/subworkflows/nf-scil/preproc_dwi/main.nf +++ b/subworkflows/nf-scil/preproc_dwi/main.nf @@ -14,10 +14,10 @@ include { TOPUP_EDDY } from '../topup_eddy/main' workflow PREPROC_DWI { take: - ch_dwi // channel: [ val(meta), [ dwi, bval, bvec ] ] - ch_rev_dwi // channel: [ val(meta), [ rev_dwi, bval, bvec ] ], optional - ch_b0 // Channel: [ val(meta), [ b0 ] ], optional - ch_rev_b0 // channel: [ val(meta), [ reverse b0 ] ], optional + ch_dwi // channel: [ val(meta), dwi, bval, bvec ] + ch_rev_dwi // channel: [ val(meta), rev_dwi, bval, bvec ], optional + ch_b0 // Channel: [ val(meta), b0 ], optional + ch_rev_b0 // channel: [ val(meta), reverse b0 ], optional ch_config_topup // channel: [ 'config_topup' ], optional main: @@ -34,35 +34,21 @@ workflow PREPROC_DWI { DENOISE_DWI ( ch_denoise_dwi.dwi ) ch_versions = ch_versions.mix(DENOISE_DWI.out.versions.first()) - if ( ch_rev_dwi ) - { - ch_denoise_rev_dwi = ch_rev_dwi - .multiMap { meta, dwi, bval, bvec -> - rev_dwi: [ [id: "${meta.id}_rev", cache: meta], dwi ] - rev_bvs_files: [ meta, bval, bvec ] - } - // ** Denoised reverse DWI ** // - DENOISE_REVDWI ( ch_denoise_rev_dwi.rev_dwi ) - ch_versions = ch_versions.mix(DENOISE_REVDWI.out.versions.first()) - - ch_topup_eddy_rev_dwi = DENOISE_REVDWI.out.image - .map{ meta, dwi -> [ meta.cache, dwi ] } - .join(ch_denoise_rev_dwi.rev_bvs_files) - } - else - { - ch_topup_eddy_rev_dwi = [] // or Channel.empty() - } + ch_denoise_rev_dwi = ch_rev_dwi + .multiMap { meta, dwi, bval, bvec -> + rev_dwi: [ [id: "${meta.id}_rev", cache: meta], dwi ] + rev_bvs_files: [ meta, bval, bvec ] + } + // ** Denoised reverse DWI ** // + DENOISE_REVDWI ( ch_denoise_rev_dwi.rev_dwi ) + ch_versions = ch_versions.mix(DENOISE_REVDWI.out.versions.first()) + + ch_topup_eddy_rev_dwi = DENOISE_REVDWI.out.image + .map{ meta, dwi -> [ meta.cache, dwi ] } + .join(ch_denoise_rev_dwi.rev_bvs_files) // ** Eddy Topup ** // ch_topup_eddy_dwi = DENOISE_DWI.out.image.join(ch_denoise_dwi.bvs_files) - - if ( ! ch_b0 ) { - EXTRACTB0_TOPUP { ch_topup_eddy_dwi } - ch_versions = ch_versions.mix(EXTRACTB0_TOPUP.out.versions.first()) - ch_b0 = EXTRACTB0_TOPUP.out.b0 - } - TOPUP_EDDY ( ch_topup_eddy_dwi, ch_b0, ch_topup_eddy_rev_dwi, ch_rev_b0, ch_config_topup ) ch_versions = ch_versions.mix(TOPUP_EDDY.out.versions.first()) diff --git a/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test b/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test index dcfe9a6ae..9f8693b3b 100644 --- a/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test +++ b/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test @@ -44,14 +44,14 @@ nextflow_workflow { file("\${test_data_directory}/sub-01_dir-AP_dwi.bval"), file("\${test_data_directory}/sub-01_dir-AP_dwi.bvec") ]} - input[1] = [] - input[2] = [] + input[1] = Channel.from( [] ) + input[2] = Channel.from( [] ) input[3] = LOAD_DATA.out.test_data_directory.map{ test_data_directory -> [ [ id:'test', single_end:false ], file("\${test_data_directory}/sub-01_dir-PA_sbref.nii.gz") ]} - input[4] = [] + input[4] = Channel.from( [] ) """ } } @@ -92,9 +92,9 @@ nextflow_workflow { file("\${test_data_directory}/sub-01_dir-PA_dwi.bval"), file("\${test_data_directory}/sub-01_dir-PA_dwi.bvec") ]} - input[2] = [] - input[3] = [] - input[4] = [] + input[2] = Channel.from( [] ) + input[3] = Channel.from( [] ) + input[4] = Channel.from( [] ) """ } } @@ -146,7 +146,7 @@ nextflow_workflow { [ id:'test', single_end:false ], file("\${test_data_directory}/sub-01_dir-PA_sbref.nii.gz") ]} - input[4] = [] + input[4] = Channel.from( [] ) """ } } diff --git a/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test.snap b/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test.snap index 528a24f28..160cee97a 100644 --- a/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test.snap +++ b/subworkflows/nf-scil/preproc_dwi/tests/main.nf.test.snap @@ -7,35 +7,34 @@ "id": "test", "single_end": false }, - "test__bval_eddy:md5,4c61c53078316c31b4d5daf446a3d6ac" + "test__bval_eddy:md5,8192e97b08e8032382397bb844b31892" ] ], [ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,1662ab8cb093ea6d16798a8fa82639e1", + "versions.yml:md5,403aeab6aa4e08cf90c1bb51cf3ba4e5", "versions.yml:md5,4d981a0200b8820dd789f135a9dd320f", "versions.yml:md5,5dce7a8c0b0d6b91ef7826f88c86370e", - "versions.yml:md5,962f76092c8795ce5e6d768304e2d230", "versions.yml:md5,977c7cd0a14188f1dfeb0f69a819b79e", "versions.yml:md5,b4c068383da080f871c90828b1de0082", "versions.yml:md5,c15ba5efd24564dba4710b6da8c4b791", "versions.yml:md5,d1ae2ca80502bf88c4b1c4a42fba6ced", - "versions.yml:md5,d3010f785c88ee5946806a8a758e7efb", "versions.yml:md5,f041502e22449973d84ac1c618e8ebf9" ], "test_b0.nii.gz", - "test__resampled.nii.gz", + "test_resampled.nii.gz", "test__dwi_eddy_corrected.bvec", "test__image_boundingBox.pkl", "test__image_n4.nii.gz", - "test__resampled.nii.gz", + "test_resampled.nii.gz", "test__dwi_corrected.nii.gz" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T20:02:02.685487" + "timestamp": "2024-06-21T04:38:27.303442" }, "preproc_dwi_rev_b0": { "content": [ @@ -50,29 +49,28 @@ ], [ "versions.yml:md5,0280006ceecc575513278292734ffb27", + "versions.yml:md5,403aeab6aa4e08cf90c1bb51cf3ba4e5", "versions.yml:md5,4d981a0200b8820dd789f135a9dd320f", "versions.yml:md5,5dce7a8c0b0d6b91ef7826f88c86370e", - "versions.yml:md5,962f76092c8795ce5e6d768304e2d230", "versions.yml:md5,977c7cd0a14188f1dfeb0f69a819b79e", "versions.yml:md5,b4c068383da080f871c90828b1de0082", "versions.yml:md5,c15ba5efd24564dba4710b6da8c4b791", "versions.yml:md5,d1ae2ca80502bf88c4b1c4a42fba6ced", - "versions.yml:md5,d3010f785c88ee5946806a8a758e7efb", "versions.yml:md5,f041502e22449973d84ac1c618e8ebf9" ], "test_b0.nii.gz", - "test__resampled.nii.gz", + "test_resampled.nii.gz", "test__dwi_eddy_corrected.bvec", "test__image_boundingBox.pkl", "test__image_n4.nii.gz", - "test__resampled.nii.gz", + "test_resampled.nii.gz", "test__dwi_corrected.nii.gz" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T19:59:48.024911" + "timestamp": "2024-06-21T04:35:36.221361" }, "preproc_dwi_all_options": { "content": [ @@ -82,15 +80,15 @@ "id": "test", "single_end": false }, - "test__bval_eddy:md5,4c61c53078316c31b4d5daf446a3d6ac" + "test__bval_eddy:md5,8192e97b08e8032382397bb844b31892" ] ], [ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,1662ab8cb093ea6d16798a8fa82639e1", + "versions.yml:md5,403aeab6aa4e08cf90c1bb51cf3ba4e5", "versions.yml:md5,4d981a0200b8820dd789f135a9dd320f", "versions.yml:md5,5dce7a8c0b0d6b91ef7826f88c86370e", - "versions.yml:md5,962f76092c8795ce5e6d768304e2d230", "versions.yml:md5,977c7cd0a14188f1dfeb0f69a819b79e", "versions.yml:md5,b4c068383da080f871c90828b1de0082", "versions.yml:md5,c15ba5efd24564dba4710b6da8c4b791", @@ -98,17 +96,17 @@ "versions.yml:md5,f041502e22449973d84ac1c618e8ebf9" ], "test_b0.nii.gz", - "test__resampled.nii.gz", + "test_resampled.nii.gz", "test__dwi_eddy_corrected.bvec", "test__image_boundingBox.pkl", "test__image_n4.nii.gz", - "test__resampled.nii.gz", + "test_resampled.nii.gz", "test__dwi_corrected.nii.gz" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T20:04:37.270376" + "timestamp": "2024-06-21T04:41:17.034104" } } \ No newline at end of file diff --git a/subworkflows/nf-scil/preproc_dwi/tests/nextflow.config b/subworkflows/nf-scil/preproc_dwi/tests/nextflow.config index 4bf578f2e..139f53b09 100644 --- a/subworkflows/nf-scil/preproc_dwi/tests/nextflow.config +++ b/subworkflows/nf-scil/preproc_dwi/tests/nextflow.config @@ -7,6 +7,7 @@ process { } withName: "UTILS_EXTRACTB0" { ext.b0_extraction_strategy = "mean" + ext.b0_thr_extract_b0 = 10 } withName: "PREPROC_TOPUP" { ext.prefix_topup = "topup_results" diff --git a/subworkflows/nf-scil/preproc_t1/tests/main.nf.test b/subworkflows/nf-scil/preproc_t1/tests/main.nf.test index 73086b212..98ea3ca00 100644 --- a/subworkflows/nf-scil/preproc_t1/tests/main.nf.test +++ b/subworkflows/nf-scil/preproc_t1/tests/main.nf.test @@ -16,17 +16,17 @@ nextflow_workflow { tag "load_test_data" - setup { - run("LOAD_TEST_DATA", alias: "LOAD_DATA") { - script "../../load_test_data/main.nf" - process { - """ - input[0] = Channel.from( [ "antsbet.zip" , "others.zip" ] ) - input[1] = "test.load-test-data" - """ - } + setup { + run("LOAD_TEST_DATA", alias: "LOAD_DATA") { + script "../../load_test_data/main.nf" + process { + """ + input[0] = Channel.from( [ "antsbet.zip" , "others.zip" ] ) + input[1] = "test.load-test-data" + """ } } + } test("preproc_t1_classic") { config "./nextflow.config" diff --git a/subworkflows/nf-scil/preproc_t1/tests/main.nf.test.snap b/subworkflows/nf-scil/preproc_t1/tests/main.nf.test.snap index 981bcde89..19c225b99 100644 --- a/subworkflows/nf-scil/preproc_t1/tests/main.nf.test.snap +++ b/subworkflows/nf-scil/preproc_t1/tests/main.nf.test.snap @@ -17,7 +17,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,f9b1e5305c8c176c8ef72168b8a33f2d" + "test__image_n4.nii.gz:md5,c160137c26b8b11402f463227ee28d6e" ] ], "2": [ @@ -26,7 +26,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,a16a9d32732752b40f699cea2fb046bd" + "test_resampled.nii.gz:md5,06e452615bb075f5f3a5a80c220707f3" ] ], "3": [ @@ -35,7 +35,7 @@ "id": "test", "single_end": false }, - "test__t1_bet.nii.gz:md5,f0a2be8bc64bb8b0311bb7022e177623" + "test__t1_bet.nii.gz:md5,93b0d252e8885d8d939e747d5fe6d0a7" ] ], "4": [ @@ -44,7 +44,7 @@ "id": "test", "single_end": false }, - "test__t1_bet_mask.nii.gz:md5,bdafc62e0e2ab35d0d48e1021d0a82db" + "test__t1_bet_mask.nii.gz:md5,fb6c01740be1bbe81d4142719f0a3f50" ] ], "5": [ @@ -53,7 +53,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped_bbox.pkl:md5,39a3444e23d7ea6478ef1213f88e7715" + "test_t1_cropped_bbox.pkl:md5,56a715cd7f758999c586145c95c385e4" ] ], "6": [ @@ -62,7 +62,7 @@ "id": "test", "single_end": false }, - "test_cropped.nii.gz:md5,02b2ca05a95c8494a85cda69ebe6d5e7" + "test_cropped.nii.gz:md5,67fb0c639d0369d4530913bb97ef709c" ] ], "7": [ @@ -71,7 +71,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped.nii.gz:md5,593d0b155da379bb41e8557ea5f9b92e" + "test_t1_cropped.nii.gz:md5,18454290250b0a5941b9949b9e92dc66" ] ], "8": [ @@ -88,7 +88,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped_bbox.pkl:md5,39a3444e23d7ea6478ef1213f88e7715" + "test_t1_cropped_bbox.pkl:md5,56a715cd7f758999c586145c95c385e4" ] ], "image_N4": [ @@ -97,7 +97,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,f9b1e5305c8c176c8ef72168b8a33f2d" + "test__image_n4.nii.gz:md5,c160137c26b8b11402f463227ee28d6e" ] ], "image_bet": [ @@ -106,7 +106,7 @@ "id": "test", "single_end": false }, - "test__t1_bet.nii.gz:md5,f0a2be8bc64bb8b0311bb7022e177623" + "test__t1_bet.nii.gz:md5,93b0d252e8885d8d939e747d5fe6d0a7" ] ], "image_nlmeans": [ @@ -124,7 +124,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,a16a9d32732752b40f699cea2fb046bd" + "test_resampled.nii.gz:md5,06e452615bb075f5f3a5a80c220707f3" ] ], "mask_bet": [ @@ -133,7 +133,7 @@ "id": "test", "single_end": false }, - "test__t1_bet_mask.nii.gz:md5,bdafc62e0e2ab35d0d48e1021d0a82db" + "test__t1_bet_mask.nii.gz:md5,fb6c01740be1bbe81d4142719f0a3f50" ] ], "mask_final": [ @@ -142,7 +142,7 @@ "id": "test", "single_end": false }, - "test_cropped.nii.gz:md5,02b2ca05a95c8494a85cda69ebe6d5e7" + "test_cropped.nii.gz:md5,67fb0c639d0369d4530913bb97ef709c" ] ], "t1_final": [ @@ -151,7 +151,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped.nii.gz:md5,593d0b155da379bb41e8557ea5f9b92e" + "test_t1_cropped.nii.gz:md5,18454290250b0a5941b9949b9e92dc66" ] ], "versions": [ @@ -165,10 +165,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T19:57:38.341812" + "timestamp": "2024-06-21T01:37:51.279144" }, "preproc_t1_classic": { "content": [ @@ -188,7 +188,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,ef0d9af46aa1e330c5d7679ead500596" + "test__image_n4.nii.gz:md5,22f8703764e0faa5acdb97e5ca28f060" ] ], "2": [ @@ -197,7 +197,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,88bae6bfeea1734111621b437e09548d" + "test_resampled.nii.gz:md5,e4220a9c0ff443b98e1c492b00d57031" ] ], "3": [ @@ -206,7 +206,7 @@ "id": "test", "single_end": false }, - "test__t1_bet.nii.gz:md5,016f12c75e3543c27987a91eb2160a19" + "test__t1_bet.nii.gz:md5,c09879d6ea63f7bacf2a8c9820d95f0a" ] ], "4": [ @@ -215,7 +215,7 @@ "id": "test", "single_end": false }, - "test__t1_bet_mask.nii.gz:md5,cf0cc416ca8b352d3cba58d9132ab0da" + "test__t1_bet_mask.nii.gz:md5,807b6cdb41a8b53ba8f8de44b1fd36f9" ] ], "5": [ @@ -224,7 +224,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped_bbox.pkl:md5,5d9bd5d9c068031f34c34223b5892153" + "test_t1_cropped_bbox.pkl:md5,ef8174257c4db4009e18dfb082a784e1" ] ], "6": [ @@ -233,7 +233,7 @@ "id": "test", "single_end": false }, - "test_cropped.nii.gz:md5,aee59cb0bf2a4e14bfe116dc68be365b" + "test_cropped.nii.gz:md5,9c2cbf03b77336166e3e3eb820808e93" ] ], "7": [ @@ -242,7 +242,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped.nii.gz:md5,f4bea1286a90760eecf348dd9bffd2e6" + "test_t1_cropped.nii.gz:md5,505134ee3ab95dcbe0fdf787771c1402" ] ], "8": [ @@ -259,7 +259,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped_bbox.pkl:md5,5d9bd5d9c068031f34c34223b5892153" + "test_t1_cropped_bbox.pkl:md5,ef8174257c4db4009e18dfb082a784e1" ] ], "image_N4": [ @@ -268,7 +268,7 @@ "id": "test", "single_end": false }, - "test__image_n4.nii.gz:md5,ef0d9af46aa1e330c5d7679ead500596" + "test__image_n4.nii.gz:md5,22f8703764e0faa5acdb97e5ca28f060" ] ], "image_bet": [ @@ -277,7 +277,7 @@ "id": "test", "single_end": false }, - "test__t1_bet.nii.gz:md5,016f12c75e3543c27987a91eb2160a19" + "test__t1_bet.nii.gz:md5,c09879d6ea63f7bacf2a8c9820d95f0a" ] ], "image_nlmeans": [ @@ -295,7 +295,7 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,88bae6bfeea1734111621b437e09548d" + "test_resampled.nii.gz:md5,e4220a9c0ff443b98e1c492b00d57031" ] ], "mask_bet": [ @@ -304,7 +304,7 @@ "id": "test", "single_end": false }, - "test__t1_bet_mask.nii.gz:md5,cf0cc416ca8b352d3cba58d9132ab0da" + "test__t1_bet_mask.nii.gz:md5,807b6cdb41a8b53ba8f8de44b1fd36f9" ] ], "mask_final": [ @@ -313,7 +313,7 @@ "id": "test", "single_end": false }, - "test_cropped.nii.gz:md5,aee59cb0bf2a4e14bfe116dc68be365b" + "test_cropped.nii.gz:md5,9c2cbf03b77336166e3e3eb820808e93" ] ], "t1_final": [ @@ -322,7 +322,7 @@ "id": "test", "single_end": false }, - "test_t1_cropped.nii.gz:md5,f4bea1286a90760eecf348dd9bffd2e6" + "test_t1_cropped.nii.gz:md5,505134ee3ab95dcbe0fdf787771c1402" ] ], "versions": [ @@ -336,9 +336,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-10T19:36:04.155481" + "timestamp": "2024-06-22T00:07:42.03345" } } \ No newline at end of file diff --git a/subworkflows/nf-scil/topup_eddy/main.nf b/subworkflows/nf-scil/topup_eddy/main.nf index 217607b3b..7d0e169fc 100644 --- a/subworkflows/nf-scil/topup_eddy/main.nf +++ b/subworkflows/nf-scil/topup_eddy/main.nf @@ -9,9 +9,9 @@ workflow TOPUP_EDDY { // ** In both cases, it will perform EDDY and also extract a b0 from the corrected DWI image. ** // take: - ch_dwi // channel: [ val(meta), [ dwi, bval, bvec ] + ch_dwi // channel: [ val(meta), dwi, bval, bvec ] ch_b0 // channel: [ val(meta), b0 ] - ch_rev_dwi // channel: [ val(meta), [ rev_dwi, rev_bval, rev_bvec ] + ch_rev_dwi // channel: [ val(meta), rev_dwi, rev_bval, rev_bvec ] ch_rev_b0 // channel: [ val(meta), rev_b0 ] ch_config_topup // channel @@ -23,19 +23,16 @@ workflow TOPUP_EDDY { .join(ch_b0, remainder: true) .map{ it[0..3] + [it[4] ?: []] } - ch_topup_reverse = ch_rev_dwi - .join(ch_rev_b0, remainder: true) - .filter{ it ? it[1] : false } - .map{ it[0..3] + [it[4] ?: []] } - ch_topup = ch_topup - .join(ch_topup_reverse, remainder: true) + .join(ch_rev_dwi, remainder: true) + .map{ it[5] ? it : it[0..4] + [[], [], []] } + .join(ch_rev_b0, remainder: true) .branch{ with_topup: it[5] || it[8] } // ** RUN TOPUP ** // - PREPROC_TOPUP ( ch_topup.with_topup, ch_config_topup ) + PREPROC_TOPUP ( ch_topup.with_topup.view(), ch_config_topup.view() ) ch_versions = ch_versions.mix(PREPROC_TOPUP.out.versions.first()) // ** Create channel for EDDY ** // diff --git a/subworkflows/nf-scil/topup_eddy/tests/main.nf.test b/subworkflows/nf-scil/topup_eddy/tests/main.nf.test index 02ba90f4e..f47ca6d0b 100644 --- a/subworkflows/nf-scil/topup_eddy/tests/main.nf.test +++ b/subworkflows/nf-scil/topup_eddy/tests/main.nf.test @@ -45,9 +45,9 @@ nextflow_workflow { [ id:'test', single_end:false ], file("\${test_data_directory}/sub-01_dir-AP_sbref.nii.gz") ]} - input[2] = [] - input[3] = [] - input[4] = [] + input[2] = Channel.from( [] ) + input[3] = Channel.from( [] ) + input[4] = Channel.from( [] ) """ } } @@ -94,7 +94,7 @@ nextflow_workflow { [ id:'test', single_end:false ], file("\${test_data_directory}/sub-01_dir-PA_sbref.nii.gz") ]} - input[4] = [] + input[4] = Channel.from( [] ) """ } } @@ -141,7 +141,7 @@ nextflow_workflow { [ id:'test', single_end:false ], file("\${test_data_directory}/sub-01_dir-PA_sbref.nii.gz") ]} - input[4] = [] + input[4] = Channel.from( [] ) """ } } diff --git a/subworkflows/nf-scil/topup_eddy/tests/main.nf.test.snap b/subworkflows/nf-scil/topup_eddy/tests/main.nf.test.snap index ec0009aef..5413141c5 100644 --- a/subworkflows/nf-scil/topup_eddy/tests/main.nf.test.snap +++ b/subworkflows/nf-scil/topup_eddy/tests/main.nf.test.snap @@ -7,7 +7,7 @@ "id": "test", "single_end": false }, - "test__b0_bet_mask.nii.gz:md5,fc1f94e2a5e2cf5197d7fdc28a83ca28" + "test__b0_bet_mask.nii.gz:md5,3574cc8f29da429a0f610f2572c4886c" ] ], [ @@ -21,7 +21,6 @@ ], [ "versions.yml:md5,1210f8705c10f136e83e5f07c0d77b70", - "versions.yml:md5,3e57e2f1a94bbabf9be75f50b4cbcdb0", "versions.yml:md5,dc9478b4d3cb93d93799e493aefe5220" ], "test__dwi_corrected.nii.gz", @@ -29,10 +28,10 @@ "test_b0.nii.gz" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-09T00:17:01.349981" + "timestamp": "2024-06-22T14:40:30.486384" }, "eddy": { "content": [ @@ -76,7 +75,7 @@ "id": "test", "single_end": false }, - "test__b0_bet_mask.nii.gz:md5,fc1f94e2a5e2cf5197d7fdc28a83ca28" + "test__b0_bet_mask.nii.gz:md5,3574cc8f29da429a0f610f2572c4886c" ] ], [ @@ -85,12 +84,11 @@ "id": "test", "single_end": false }, - "test__bval_eddy:md5,4c61c53078316c31b4d5daf446a3d6ac" + "test__bval_eddy:md5,8192e97b08e8032382397bb844b31892" ] ], [ "versions.yml:md5,1210f8705c10f136e83e5f07c0d77b70", - "versions.yml:md5,3e57e2f1a94bbabf9be75f50b4cbcdb0", "versions.yml:md5,dc9478b4d3cb93d93799e493aefe5220" ], "test__dwi_corrected.nii.gz", @@ -98,9 +96,9 @@ "test_b0.nii.gz" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" }, - "timestamp": "2024-05-09T00:19:03.319712" + "timestamp": "2024-06-24T05:02:10.817762" } } \ No newline at end of file diff --git a/subworkflows/nf-scil/tractoflow/main.nf b/subworkflows/nf-scil/tractoflow/main.nf new file mode 100644 index 000000000..1a3aac62e --- /dev/null +++ b/subworkflows/nf-scil/tractoflow/main.nf @@ -0,0 +1,277 @@ +// PREPROCESSING +include { ANATOMICAL_SEGMENTATION } from '../anatomical_segmentation/main' +include { PREPROC_DWI } from '../preproc_dwi/main' +include { PREPROC_T1 } from '../preproc_t1/main' +include { REGISTRATION as T1_REGISTRATION } from '../registration/main' +include { RECONST_DTIMETRICS as REGISTRATION_FA } from '../../../modules/nf-scil/reconst/dtimetrics/main' +include { REGISTRATION_ANTSAPPLYTRANSFORMS as TRANSFORM_WMPARC } from '../../../modules/nf-scil/registration/antsapplytransforms/main' +include { REGISTRATION_ANTSAPPLYTRANSFORMS as TRANSFORM_APARC_ASEG } from '../../../modules/nf-scil/registration/antsapplytransforms/main' + +// RECONSTRUCTION +include { RECONST_FRF } from '../../../modules/nf-scil/reconst/frf/main' +include { RECONST_MEANFRF } from '../../../modules/nf-scil/reconst/meanfrf/main' +include { RECONST_DTIMETRICS } from '../../../modules/nf-scil/reconst/dtimetrics/main' +include { RECONST_FODF } from '../../../modules/nf-scil/reconst/fodf/main' + +// TRACKING +include { TRACKING_PFTTRACKING } from '../../../modules/nf-scil/tracking/pfttracking/main' +include { TRACKING_LOCALTRACKING } from '../../../modules/nf-scil/tracking/localtracking/main' + +params.dwi_fodf_fit_use_average_frf = false + +workflow TRACTOFLOW { + + take: + ch_dwi // channel: [ val(meta), dwi_nifti, bval_file, bvec_file ] + ch_sbref // channel: [ val(meta), sbref_nifti ], optional + ch_rev_dwi // channel: [ val(meta), rev_dwi_nifti, bval_file, bvec_file ], optional + ch_rev_sbref // channel: [ val(meta), rev_sbref_nifti ], optional + ch_t1 // channel: [ val(meta), t1_nifti ] + ch_wmparc // channel: [ val(meta), wmparc_nifti ], optional + ch_aparc_aseg // channel: [ val(meta), aparc+aseg_nifti ], optional + ch_topup_config // channel: [ topup_config_file ], optional + ch_bet_template // channel: [ bet_template_nifti ] + ch_bet_probability // channel: [ bet_template_nifti ] + + main: + + ch_versions = Channel.empty() + + /* Unpack inputs */ + ch_inputs = ch_dwi + .join(ch_sbref, remainder: true) + .join(ch_rev_dwi, remainder: true) + .map{ it[5] ? it : it[0..4] + [null, null, null] } + .join(ch_rev_sbref, remainder: true) + .join(ch_t1, remainder: true) + .join(ch_wmparc, remainder: true) + .join(ch_aparc_aseg, remainder: true) + .view() + .multiMap{meta, dwi, bval, bvec, sbref, rev_dwi, rev_bval, rev_bvec, rev_sbref, t1, wmparc, aparc_aseg -> + dwi: [meta, dwi, bval, bvec] + sbref: sbref ? [meta, sbref] : [] + rev_dwi: rev_dwi ? [meta, rev_dwi, rev_bval, rev_bvec] : [] + rev_sbref: rev_sbref ? [meta, rev_sbref] : [] + t1: [meta, t1] + wmparc: wmparc ? [meta, wmparc] : [] + aparc_aseg: aparc_aseg ? [meta, aparc_aseg] : [] + } + + /* PREPROCESSING */ + + // + // SUBWORKFLOW: Run PREPROC_DWI + // + PREPROC_DWI( + ch_inputs.dwi, ch_inputs.rev_dwi.filter{ it }, + ch_inputs.sbref.filter{ it }, ch_inputs.rev_sbref.filter{ it }, + ch_topup_config.ifEmpty( "b02b0.cnf" ) + ) + ch_versions = ch_versions.mix(PREPROC_DWI.out.versions.first()) + + // + // SUBWORKFLOW: Run PREPROC_T1 + // + ch_t1_meta = ch_inputs.t1.map{ it[0] } + PREPROC_T1( + ch_inputs.t1, + ch_t1_meta.combine(ch_bet_template), + ch_t1_meta.combine(ch_bet_probability), + Channel.empty(), + Channel.empty(), + Channel.empty() + ) + ch_versions = ch_versions.mix(PREPROC_T1.out.versions.first()) + + // + // MODULE: Run RECONST/DTIMETRICS (REGISTRATION_FA) + // + ch_registration_fa = PREPROC_DWI.out.dwi_resample + .join(PREPROC_DWI.out.bval) + .join(PREPROC_DWI.out.bvec) + .join(PREPROC_DWI.out.b0_mask) + REGISTRATION_FA( ch_registration_fa ) + ch_versions = ch_versions.mix(REGISTRATION_FA.out.versions.first()) + + // + // SUBWORKFLOW: Run REGISTRATION + // + T1_REGISTRATION( + PREPROC_T1.out.t1_final, + PREPROC_DWI.out.b0, + REGISTRATION_FA.out.fa, + [] + ) + ch_versions = ch_versions.mix(T1_REGISTRATION.out.versions.first()) + + /* SEGMENTATION */ + + // + // MODULE: Run REGISTRATION_ANTSAPPLYTRANSFORMS (TRANSFORM_WMPARC) + // + TRANSFORM_WMPARC( + ch_inputs.wmparc + .filter{ it[1] } + .join(PREPROC_DWI.out.b0) + .join(T1_REGISTRATION.out.transfo_image) + .map{ it[0..2] + [it[3..-1]] } + ) + ch_versions = ch_versions.mix(TRANSFORM_WMPARC.out.versions.first()) + + // + // MODULE: Run REGISTRATION_ANTSAPPLYTRANSFORMS (TRANSFORM_APARC_ASEG) + // + TRANSFORM_APARC_ASEG( + ch_inputs.aparc_aseg + .filter{ it[1] } + .join(PREPROC_DWI.out.b0) + .join(T1_REGISTRATION.out.transfo_image) + .map{ it[0..2] + [it[3..-1]] } + ) + ch_versions = ch_versions.mix(TRANSFORM_APARC_ASEG.out.versions.first()) + + // + // SUBWORKFLOW: Run ANATOMICAL_SEGMENTATION + // + ANATOMICAL_SEGMENTATION( + T1_REGISTRATION.out.image_warped, + TRANSFORM_WMPARC.out.warped_image + .join(TRANSFORM_APARC_ASEG.out.warped_image) + ) + ch_versions = ch_versions.mix(ANATOMICAL_SEGMENTATION.out.versions.first()) + + /* RECONSTRUCTION */ + + // + // MODULE: Run RECONST/DTIMETRICS + // + ch_dti_metrics = PREPROC_DWI.out.dwi_resample + .join(PREPROC_DWI.out.bval) + .join(PREPROC_DWI.out.bvec) + .join(PREPROC_DWI.out.b0_mask) + RECONST_DTIMETRICS( ch_dti_metrics ) + ch_versions = ch_versions.mix(RECONST_DTIMETRICS.out.versions.first()) + + // + // MODULE: Run RECONST/FRF + // + ch_reconst_frf = PREPROC_DWI.out.dwi_resample + .join(PREPROC_DWI.out.bval) + .join(PREPROC_DWI.out.bvec) + .join(PREPROC_DWI.out.b0_mask) + .join(ANATOMICAL_SEGMENTATION.out.wm_mask) + .join(ANATOMICAL_SEGMENTATION.out.gm_mask) + .join(ANATOMICAL_SEGMENTATION.out.csf_mask) + RECONST_FRF( ch_reconst_frf ) + ch_versions = ch_versions.mix(RECONST_FRF.out.versions.first()) + + /* Run fiber response aeraging over subjects */ + ch_fiber_response = RECONST_FRF.out.frf.map{ it.flatten() } + if ( params.dwi_fodf_fit_use_average_frf ) { + RECONST_MEANFRF( RECONST_FRF.out.frf.map{ it[1] }.flatten() ) + ch_versions = ch_versions.mix(RECONST_MEANFRF.out.versions.first()) + ch_fiber_response = RECONST_FRF.out.map{ it[0] } + .combine( RECONST_MEANFRF.out.meanfrf ) + } + + ch_fiber_response = ch_fiber_response + .map{ it.size() > 2 ? it : it + [[], []] } + + // + // MODULE: Run RECONST/FODF + // + ch_reconst_fodf = PREPROC_DWI.out.dwi_resample + .join(PREPROC_DWI.out.bval) + .join(PREPROC_DWI.out.bvec) + .join(PREPROC_DWI.out.b0_mask) + .join(RECONST_DTIMETRICS.out.fa) + .join(RECONST_DTIMETRICS.out.md) + .join(ch_fiber_response) + RECONST_FODF( ch_reconst_fodf ) + ch_versions = ch_versions.mix(RECONST_FODF.out.versions.first()) + + // + // MODULE: Run TRACKING/PFTTRACKING + // + ch_pft_tracking = ANATOMICAL_SEGMENTATION.out.wm_mask + .join(ANATOMICAL_SEGMENTATION.out.gm_mask) + .join(ANATOMICAL_SEGMENTATION.out.csf_mask) + .join(RECONST_FODF.out.fodf) + .join(RECONST_DTIMETRICS.out.fa) + TRACKING_PFTTRACKING( ch_pft_tracking ) + ch_versions = ch_versions.mix(TRACKING_PFTTRACKING.out.versions.first()) + + // + // MODULE: Run TRACKING/LOCALTRACKING + // + ch_local_tracking = ANATOMICAL_SEGMENTATION.out.wm_mask + .join(RECONST_FODF.out.fodf) + .join(RECONST_DTIMETRICS.out.fa) + TRACKING_LOCALTRACKING( ch_local_tracking ) + ch_versions = ch_versions.mix(TRACKING_LOCALTRACKING.out.versions.first()) + + // define output channels + ch_dwi_preprocessed = PREPROC_DWI.out.dwi_resample + .join(PREPROC_DWI.out.bval) + .join(PREPROC_DWI.out.bvec) + ch_brain_mask = PREPROC_DWI.out.b0_mask + ch_t1_registered = T1_REGISTRATION.out.image_warped + ch_t1_to_b0_transform = T1_REGISTRATION.out.transfo_image + .join(T1_REGISTRATION.out.transfo_trk) + ch_tissues_masks = ANATOMICAL_SEGMENTATION.out.wm_mask + .join(ANATOMICAL_SEGMENTATION.out.gm_mask) + .join(ANATOMICAL_SEGMENTATION.out.csf_mask) + ch_tissues_maps = ANATOMICAL_SEGMENTATION.out.wm_map + .join(ANATOMICAL_SEGMENTATION.out.gm_map) + .join(ANATOMICAL_SEGMENTATION.out.csf_map) + ch_dti_tensor = RECONST_DTIMETRICS.out.tensor + ch_dti_metrics = RECONST_DTIMETRICS.out.ad + .join(RECONST_DTIMETRICS.out.rd) + .join(RECONST_DTIMETRICS.out.md) + .join(RECONST_DTIMETRICS.out.fa) + .join(RECONST_DTIMETRICS.out.ga) + .join(RECONST_DTIMETRICS.out.rgb) + .join(RECONST_DTIMETRICS.out.evecs_v1) + .join(RECONST_DTIMETRICS.out.evecs_v2) + .join(RECONST_DTIMETRICS.out.evecs_v3) + .join(RECONST_DTIMETRICS.out.evals_e1) + .join(RECONST_DTIMETRICS.out.evals_e2) + .join(RECONST_DTIMETRICS.out.evals_e3) + .join(RECONST_DTIMETRICS.out.residual) + .join(RECONST_DTIMETRICS.out.nonphysical) + .join(RECONST_DTIMETRICS.out.mode) + .join(RECONST_DTIMETRICS.out.norm) + ch_local_tractogram = TRACKING_LOCALTRACKING.out.trk + .join(TRACKING_LOCALTRACKING.out.config) + ch_pft_tractogram = TRACKING_PFTTRACKING.out.trk + .join(TRACKING_PFTTRACKING.out.config) + + emit: + dwi = ch_dwi_preprocessed + // channel: [ val(meta), path(*.nii.gz), path(*.bval), path(*.bvec) ] + brain_mask = ch_brain_mask + // channel: [ val(meta), path(*.nii.gz) ] + t1 = ch_t1_registered + // channel: [ val(meta), path(*.nii.gz) ] + t1_to_b0_transformations = ch_t1_to_b0_transform + // channel: [ val(meta), [path(*.nii.gz | *.txt), ...], [path(*.nii.gz | *.txt), ...] ] + tissues_masks = ch_tissues_masks + // channel: [ val(meta), path(*.nii.gz), path(*.nii.gz), path(*.nii.gz) ] + tissues_maps = ch_tissues_maps + // channel: [ val(meta), path(*.nii.gz), path(*.nii.gz), path(*.nii.gz) ] + dti_tensor = ch_dti_tensor + // channel: [ val(meta), path(*.nii.gz) ] + dti_metrics = ch_dti_metrics + // channel: [ val(meta), path(*.nii.gz), path(*.nii.gz), ... ] + frf = ch_fiber_response + // channel: [ val(meta), path(*.txt) ] + fodf = RECONST_FODF.out.fodf + // channel: [ val(meta), path(*.nii.gz) ] + local_tractogram = ch_local_tractogram + // channel: [ val(meta), path(*.trk), path(*.json) ] + pft_tractogram = ch_pft_tractogram + // channel: [ val(meta), path(*.trk), path(*.json) ] + versions = ch_versions + // channel: [ path(versions.yml) ] +} + diff --git a/subworkflows/nf-scil/tractoflow/meta.yml b/subworkflows/nf-scil/tractoflow/meta.yml new file mode 100644 index 000000000..2585411a1 --- /dev/null +++ b/subworkflows/nf-scil/tractoflow/meta.yml @@ -0,0 +1,51 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "tractoflow" +## TODO nf-core: Add a description of the subworkflow and list keywords +description: Sort SAM/BAM/CRAM file +keywords: + - sort + - bam + - sam + - cram +## TODO nf-core: Add a list of the modules and/or subworkflows used in the subworkflow +components: + - samtools/sort + - samtools/index +## TODO nf-core: List all of the channels used as input with a description and their structure +input: + - ch_bam: + type: file + description: | + The input channel containing the BAM/CRAM/SAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.{bam/cram/sam}" +## TODO nf-core: List all of the channels used as output with a descriptions and their structure +output: + - bam: + type: file + description: | + Channel containing BAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.bam" + - bai: + type: file + description: | + Channel containing indexed BAM (BAI) files + Structure: [ val(meta), path(bai) ] + pattern: "*.bai" + - csi: + type: file + description: | + Channel containing CSI files + Structure: [ val(meta), path(csi) ] + pattern: "*.csi" + - versions: + type: file + description: | + File containing software versions + Structure: [ path(versions.yml) ] + pattern: "versions.yml" +authors: + - "@AlexVCaron" +maintainers: + - "@AlexVCaron" diff --git a/subworkflows/nf-scil/tractoflow/tests/main.nf.test b/subworkflows/nf-scil/tractoflow/tests/main.nf.test new file mode 100644 index 000000000..65ba4cc26 --- /dev/null +++ b/subworkflows/nf-scil/tractoflow/tests/main.nf.test @@ -0,0 +1,94 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core subworkflows test tractoflow +nextflow_workflow { + + name "Test Subworkflow TRACTOFLOW" + script "../main.nf" + workflow "TRACTOFLOW" + config "./nextflow.config" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/tractoflow" + // Included subworkflows + tag "anatomical_segmentation" + tag "preproc_dwi" + tag "preproc_t1" + tag "registration" + // Included modules + tag "reconst/dtimetrics" + tag "registration/antsapplytransforms" + tag "reconst/frf" + tag "reconst/meanfrf" + tag "reconst/dtimetrics" + tag "reconst/fodf" + tag "tracking/pfttracking" + tag "tracking/localtracking" + + tag "load_test_data" + + setup { + run("LOAD_TEST_DATA", alias: "LOAD_DATA") { + script "../../load_test_data/main.nf" + process { + """ + input[0] = Channel.from( + ["antsbet.zip" , "raw_T1w.zip", "raw_DWIss1000-dir32.zip", "raw_EPI.zip"] + ) + input[1] = "test.load-test-data" + """ + } + } + } + + test("tractoflow - REV B0") { + + when { + workflow { + """ + ch_split_test_data = LOAD_DATA.out.test_data_directory + .branch{ + antsbet: it.simpleName == "antsbet" + raw_t1w: it.simpleName == "raw_T1w" + raw_dwi: it.simpleName == "raw_DWIss1000-dir32" + raw_epi: it.SimpleName == "raw_EPI" + } + input[0] = ch_split_test_data.raw_dwi.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + file("\${test_data_directory}/dwi.nii.gz"), + file("\${test_data_directory}/dwi.bval"), + file("\${test_data_directory}/dwi.bvec") + ]} + input[1] = Channel.from( [] ) + input[2] = Channel.from( [] ) + input[3] = ch_split_test_data.raw_epi.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + file("\${test_data_directory}/epi.nii.gz") + ]} + input[4] = ch_split_test_data.raw_t1w.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + file("\${test_data_directory}/T1w.nii.gz") + ]} + input[5] = Channel.from( [] ) + input[6] = Channel.from( [] ) + input[7] = Channel.from( [] ) + input[8] = ch_split_test_data.antsbet.map{ + test_data_directory -> file("\${test_data_directory}/t1_template.nii.gz")} + input[9] = ch_split_test_data.antsbet.map{ + test_data_directory -> file("\${test_data_directory}/t1_brain_probability_map.nii.gz")} + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + //TODO nf-core: Add all required assertions to verify the test output. + ) + } + } +} diff --git a/subworkflows/nf-scil/tractoflow/tests/main.nf.test.snap b/subworkflows/nf-scil/tractoflow/tests/main.nf.test.snap new file mode 100644 index 000000000..0573fb0c2 --- /dev/null +++ b/subworkflows/nf-scil/tractoflow/tests/main.nf.test.snap @@ -0,0 +1,285 @@ +{ + "tractoflow - REV B0": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_dwi_resampled.nii.gz:md5,6db9e5b9e0cda99717ac7e32a797862c", + "test__bval_eddy:md5,7995daabbd74fcf7c365a39a779f67e9", + "test__dwi_eddy_corrected.bvec:md5,3544093830861901af949343f69e7a10" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_mask_resampled.nii.gz:md5,db4da2182f193c875f2d959e1b222ad1" + ] + ], + "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test__local_tracking.trk:md5,509d71fccb26821e65789240fe8414fd", + "test__local_tracking_config.json:md5,a278ccc2af912b62c0c4ecabff20db1f" + ] + ], + "11": [ + + ], + "12": [ + "versions.yml:md5,3a3c674e9221f19ed409a1890bc2eb39", + "versions.yml:md5,402c3604be37f571df13f983b1b5dd68", + "versions.yml:md5,689514aa26a4f84f83063f34c0e38190", + "versions.yml:md5,a3d1c964db9fa1079b738398a64219f7", + "versions.yml:md5,a986b4e17262e999e378666d281e9ef3", + "versions.yml:md5,ad06aa4db03ace5de5712b3fa021bf89", + "versions.yml:md5,b365d463ddf58fc7b47cd51c70876a11", + "versions.yml:md5,ba57313cd97586c885868a3aef7314a3", + "versions.yml:md5,fc6a2d3923b6ecd60b833ce5f09f8877" + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test__t1_warped.nii.gz:md5,310171fa6f46f5d32a9ff904592b65f4" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test__output1Warp.nii.gz:md5,0edcb8ad87b53d83d4fe410247cc6c1f", + "test__output0GenericAffine.mat:md5,4030a29e7c4a4aec3a893ea2feda59e3", + "test__output0GenericAffine.mat:md5,4030a29e7c4a4aec3a893ea2feda59e3", + "test__output1InverseWarp.nii.gz:md5,217d7238692c049c4fb63d04ef868c06" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_wm.nii.gz:md5,100b4de46ddf5828da7459c5e724feef", + "test__mask_gm.nii.gz:md5,7a2f778efbfd08e0de332bd765649d4b", + "test__mask_csf.nii.gz:md5,25b8c11928a2feab71900f2d4cc5de12" + ] + ], + "5": [ + + ], + "6": [ + [ + { + "id": "test", + "single_end": false + }, + "test__tensor.nii.gz:md5,7b670547328c2f53b9d5b5e5b96ca521" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": false + }, + "test__ad.nii.gz:md5,11c162fc83f9b3ea4cdeb9220906d706", + "test__rd.nii.gz:md5,ec74fd816e198af0953c638aa184b6fc", + "test__md.nii.gz:md5,7da8aae4115c5cd18eaa2719f5343c1a", + "test__fa.nii.gz:md5,311956c30a0eda6ba18481d69a9f2f77", + "test__ga.nii.gz:md5,da60890c479602bd9f1c913e16f38800", + "test__rgb.nii.gz:md5,d77c33aeb865130636e56c5b16a70c87", + "test__evecs_v1.nii.gz:md5,aed7b0de70f3c374aed914cdbf78dc54", + "test__evecs_v2.nii.gz:md5,eaede582b120ed48ac66b3fdd65bdb87", + "test__evecs_v3.nii.gz:md5,b07308487465f13efc7528d7dfd77672", + "test__evals_e1.nii.gz:md5,11c162fc83f9b3ea4cdeb9220906d706", + "test__evals_e2.nii.gz:md5,14f855488ec6800a84d6336740b7a10d", + "test__evals_e3.nii.gz:md5,8e9eec05cd1d86b9b40ebdf68ab2c841", + "test__residual.nii.gz:md5,77d8ea73ef9506750b31c6bc5ad2c4f7", + "test__nonphysical.nii.gz:md5,f4b5b404b0e5275fcb269f0e18d2d344", + "test__mode.nii.gz:md5,c959f553163c9258971726fadb94cedc", + "test__norm.nii.gz:md5,1f1c9135f82fdd86190e4118a7848f7b" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": false + }, + "test__frf.txt:md5,f7a4f04e590b9e124382e0ac3ce83d96", + [ + + ], + [ + + ] + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": false + }, + "test__fodf.nii.gz:md5,25394d554892205115c5dd1a66cff63b" + ] + ], + "brain_mask": [ + [ + { + "id": "test", + "single_end": false + }, + "test_mask_resampled.nii.gz:md5,db4da2182f193c875f2d959e1b222ad1" + ] + ], + "dti_metrics": [ + [ + { + "id": "test", + "single_end": false + }, + "test__ad.nii.gz:md5,11c162fc83f9b3ea4cdeb9220906d706", + "test__rd.nii.gz:md5,ec74fd816e198af0953c638aa184b6fc", + "test__md.nii.gz:md5,7da8aae4115c5cd18eaa2719f5343c1a", + "test__fa.nii.gz:md5,311956c30a0eda6ba18481d69a9f2f77", + "test__ga.nii.gz:md5,da60890c479602bd9f1c913e16f38800", + "test__rgb.nii.gz:md5,d77c33aeb865130636e56c5b16a70c87", + "test__evecs_v1.nii.gz:md5,aed7b0de70f3c374aed914cdbf78dc54", + "test__evecs_v2.nii.gz:md5,eaede582b120ed48ac66b3fdd65bdb87", + "test__evecs_v3.nii.gz:md5,b07308487465f13efc7528d7dfd77672", + "test__evals_e1.nii.gz:md5,11c162fc83f9b3ea4cdeb9220906d706", + "test__evals_e2.nii.gz:md5,14f855488ec6800a84d6336740b7a10d", + "test__evals_e3.nii.gz:md5,8e9eec05cd1d86b9b40ebdf68ab2c841", + "test__residual.nii.gz:md5,77d8ea73ef9506750b31c6bc5ad2c4f7", + "test__nonphysical.nii.gz:md5,f4b5b404b0e5275fcb269f0e18d2d344", + "test__mode.nii.gz:md5,c959f553163c9258971726fadb94cedc", + "test__norm.nii.gz:md5,1f1c9135f82fdd86190e4118a7848f7b" + ] + ], + "dti_tensor": [ + [ + { + "id": "test", + "single_end": false + }, + "test__tensor.nii.gz:md5,7b670547328c2f53b9d5b5e5b96ca521" + ] + ], + "dwi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_dwi_resampled.nii.gz:md5,6db9e5b9e0cda99717ac7e32a797862c", + "test__bval_eddy:md5,7995daabbd74fcf7c365a39a779f67e9", + "test__dwi_eddy_corrected.bvec:md5,3544093830861901af949343f69e7a10" + ] + ], + "fodf": [ + [ + { + "id": "test", + "single_end": false + }, + "test__fodf.nii.gz:md5,25394d554892205115c5dd1a66cff63b" + ] + ], + "frf": [ + [ + { + "id": "test", + "single_end": false + }, + "test__frf.txt:md5,f7a4f04e590b9e124382e0ac3ce83d96", + [ + + ], + [ + + ] + ] + ], + "local_tractogram": [ + [ + { + "id": "test", + "single_end": false + }, + "test__local_tracking.trk:md5,509d71fccb26821e65789240fe8414fd", + "test__local_tracking_config.json:md5,a278ccc2af912b62c0c4ecabff20db1f" + ] + ], + "pft_tractogram": [ + + ], + "t1": [ + [ + { + "id": "test", + "single_end": false + }, + "test__t1_warped.nii.gz:md5,310171fa6f46f5d32a9ff904592b65f4" + ] + ], + "t1_to_b0_transformations": [ + [ + { + "id": "test", + "single_end": false + }, + "test__output1Warp.nii.gz:md5,0edcb8ad87b53d83d4fe410247cc6c1f", + "test__output0GenericAffine.mat:md5,4030a29e7c4a4aec3a893ea2feda59e3", + "test__output0GenericAffine.mat:md5,4030a29e7c4a4aec3a893ea2feda59e3", + "test__output1InverseWarp.nii.gz:md5,217d7238692c049c4fb63d04ef868c06" + ] + ], + "tissues_maps": [ + + ], + "tissues_masks": [ + [ + { + "id": "test", + "single_end": false + }, + "test__mask_wm.nii.gz:md5,100b4de46ddf5828da7459c5e724feef", + "test__mask_gm.nii.gz:md5,7a2f778efbfd08e0de332bd765649d4b", + "test__mask_csf.nii.gz:md5,25b8c11928a2feab71900f2d4cc5de12" + ] + ], + "versions": [ + "versions.yml:md5,3a3c674e9221f19ed409a1890bc2eb39", + "versions.yml:md5,402c3604be37f571df13f983b1b5dd68", + "versions.yml:md5,689514aa26a4f84f83063f34c0e38190", + "versions.yml:md5,a3d1c964db9fa1079b738398a64219f7", + "versions.yml:md5,a986b4e17262e999e378666d281e9ef3", + "versions.yml:md5,ad06aa4db03ace5de5712b3fa021bf89", + "versions.yml:md5,b365d463ddf58fc7b47cd51c70876a11", + "versions.yml:md5,ba57313cd97586c885868a3aef7314a3", + "versions.yml:md5,fc6a2d3923b6ecd60b833ce5f09f8877" + ] + } + ], + "meta": { + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T02:09:28.140631" + } +} \ No newline at end of file diff --git a/subworkflows/nf-scil/tractoflow/tests/nextflow.config b/subworkflows/nf-scil/tractoflow/tests/nextflow.config new file mode 100644 index 000000000..cab5cf3d4 --- /dev/null +++ b/subworkflows/nf-scil/tractoflow/tests/nextflow.config @@ -0,0 +1,354 @@ + +params { + + //*BIDS options**// + clean_input_bids = false + + //**Global options**// + dwi_b0_extract_threshold = 10 + dwi_shell_extract_tolerance = 20 + + //**SH fitting**// + dwi_fit_signal_sh = true //FIXME + dwi_signal_sh_fit_order = 6 //FIXME + dwi_signal_sh_fit_basis = "descoteaux07" //FIXME + dwi_signal_sh_fit_shell = null //FIXME + + //**Preliminary DWI brain extraction**// + dwi_mask_prelim_bet_dilation_radius = 5 + dwi_mask_prelim_bet_f_threshold = 0.16 + + //**Denoise dwi (dwidenoise in Mrtrix3)**// + dwi_filter_noise = true //FIXME + dwi_noise_filter_patch_size = 3 + + //**GIBBS CORRECTION (mrdegibbs in Mrtrix3)**// + dwi_filter_gibbs = false //FIXME + + //**Topup**// + dwi_filter_susceptibility = true //FIXME + dwi_susceptibility_filter_config_file = "b02b0.cnf" + dwi_susceptibility_filter_output_prefix = "topup_results" + + //**Eddy**// + dwi_filter_eddy_and_motion = true //FIXME + dwi_motion_and_eddy_filter_command = "eddy_cpu" + dwi_motion_and_eddy_filter_bet_f_threshold = 0.16 + dwi_motion_and_eddy_filter_restore_slices = true + + //**N4 bias correction**// + dwi_bias_correction_bspline_knots_per_voxel = 0.25 + dwi_bias_correction_shrink_factor = 1 + + //**Final DWI BET**// + dwi_mask_final_bet_f_threshold = 0.16 + + //**Denoise T1**// + t1_filter_noise = true //FIXME + + //* T1 BET**// + t1_bet_template_t1 = "/human-data/mni_152_sym_09c/t1/t1_template.nii.gz" + t1_bet_template_probability_map = "/human-data/mni_152_sym_09c/t1/t1_brain_probability_map.nii.gz" + + + //**Resample T1**// + t1_resample_spatial = true //FIXME + t1_spatial_resample_resolution = 1 + t1_spatial_resample_interpolation = "lin" + + //**Normalize DWI**// + dwi_intensities_normalize_fa_mask_threshold = 0.4 //FIXME + + //**Resample DWI**// + dwi_resample_spatial = true //FIXME + dwi_spatial_resample_resolution = 1 + dwi_spatial_resample_interpolation = "lin" + + //**Extract DTI shells using this value as maximum**// + dwi_dti_fit_shell_max_bvalue = 1200 //FIXME + dwi_dti_fit_shells = null //FIXME + + //**Extract fODF shells using this value as minimum**// + dwi_fodf_fit_shell_min_bvalue = 700 + dwi_fodf_fit_shells = null + + //**Segment tissues**// + t1_tissue_segment_n_classes = 3 //FIXME + + //**Compute fiber response function (frf)**// + dwi_fodf_fit_frf_max_fa_threshold = 0.7 + dwi_fodf_fit_frf_min_fa_threshold = 0.5 + dwi_fodf_fit_frf_min_n_voxels = 100 + dwi_fodf_fit_frf_roi_radius = 20 + dwi_fodf_fit_force_frf = null + + //**Mean fiber response function (frf)**// + dwi_fodf_fit_use_average_frf = false //FIXME + + //**Compute fODF metrics**// + dwi_fodf_fit_order = 8 + dwi_fodf_fit_basis = "descoteaux07" + dwi_fodf_fit_peaks_absolute_factor = 2.0 + dwi_fodf_fit_peaks_relative_threshold = 0.1 + dwi_fodf_fit_peaks_ventricle_max_fa = 0.1 + dwi_fodf_fit_peaks_ventricle_min_md = 0.003 + + //**PFT tracking**// + fodf_fit_pft = true + fodf_pft_fit_random_seed = 0 + fodf_pft_fit_algorithm = "prob" + fodf_pft_fit_step_size = 0.5 + fodf_pft_fit_theta_max_deviation = 20 + fodf_pft_fit_streamline_min_length = 20 + fodf_pft_fit_streamline_max_length = 200 + fodf_pft_fit_seeding_type = "wm" + fodf_pft_fit_seeding_strategy = "npv" + fodf_pft_fit_seeding_n_seeds = 10 + fodf_pft_fit_seeding_fa_mask_threshold = 0.1 + fodf_pft_fit_filter_n_particles = 15 + fodf_pft_fit_filter_backward_step_size = 2 + fodf_pft_fit_filter_forward_step_size = 1 + fodf_pft_fit_sf_threshold = 0.1 + fodf_pft_fit_sf_initial_threshold = 0.5 + fodf_pft_fit_compress_tractogram = true + fodf_pft_fit_compress_max_displacement = 0.2 + + //**Local tracking**// + fodf_fit_local = true + fodf_local_fit_processor = "cpu" //FIXME + fodf_local_fit_gpu_batch_size = 10000 //FIXME + fodf_local_fit_random_seed = 0 + fodf_local_fit_algorithm = "prob" + fodf_local_fit_step_size = 0.5 + fodf_local_fit_theta_max_deviation = 20 + fodf_local_fit_streamline_min_length = 20 + fodf_local_fit_streamline_max_length = 200 + fodf_local_fit_seeding_type = "wm" + fodf_local_fit_seeding_strategy = "npv" + fodf_local_fit_seeding_n_seeds = 10 + fodf_local_fit_seeding_fa_threshold = 0.1 + fodf_local_fit_tracking_mask_type = "wm" + fodf_local_fit_tracking_mask_fa_threshold = 0.1 + fodf_local_fit_sf_threshold = 0.1 + fodf_local_fit_sf_initial_threshold = 0.5 //FIXME + fodf_local_fit_compress_tractogram = true + fodf_local_fit_compress_max_displacement = 0.2 +} + +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: "TRACTOFLOW:PREPROC_DWI:DENOISE_DWI" { + ext.extent = params.dwi_noise_filter_patch_size + } + + withName: "TRACTOFLOW:PREPROC_DWI:DENOISE_REVDWI" { + ext.extent = params.dwi_noise_filter_patch_size + } + + withName: "TRACTOFLOW:PREPROC_DWI:UTILS_EXTRACTB0" { + ext.b0_extraction_strategy = "mean" + } + + withName: "TRACTOFLOW:PREPROC_DWI:TOPUP_EDDY:PREPROC_TOPUP" { + ext.prefix_topup = params.dwi_susceptibility_filter_output_prefix + ext.default_config_topup = params.dwi_susceptibility_filter_config_file + ext.encoding = "y" //FIXME + ext.readout = 0.062 //FIXME + ext.b0_thr_extract_b0 = params.dwi_b0_extract_threshold + } + + withName: "TRACTOFLOW:PREPROC_DWI:TOPUP_EDDY:PREPROC_EDDY" { + ext.prefix_topup = params.dwi_susceptibility_filter_output_prefix + ext.slice_drop_flag = params.dwi_motion_and_eddy_filter_restore_slices + ext.bet_topup_before_eddy_f = params.dwi_motion_and_eddy_filter_bet_f_threshold + ext.eddy_cmd = params.dwi_motion_and_eddy_filter_command + ext.dilate_b0_mask_prelim_brain_extraction = params.dwi_mask_prelim_bet_dilation_radius + ext.bet_prelim_f = params.dwi_mask_prelim_bet_f_threshold + ext.b0_thr_extract_b0 = params.dwi_b0_extract_threshold + ext.encoding = "y" //FIXME + ext.readout = 0.062 //FIXME + } + + withName: "TRACTOFLOW:PREPROC_DWI:TOPUP_EDDY:UTILS_EXTRACTB0" { + ext.b0_extraction_strategy = "mean" + } + + + withName: "TRACTOFLOW:PREPROC_DWI:BETCROP_FSLBETCROP" { + ext.bet_f = params.dwi_mask_final_bet_f_threshold + ext.b0_thr = params.dwi_b0_extract_threshold + ext.crop = true + ext.dilate = false + } + + withName: "TRACTOFLOW:PREPROC_DWI:N4_DWI" { + ext.bspline_knot_per_voxel = params.dwi_bias_correction_bspline_knots_per_voxel + ext.shrink_factor = params.dwi_bias_correction_shrink_factor + } + + withName: "TRACTOFLOW:PREPROC_DWI:RESAMPLE_DWI" { + ext.voxel_size = params.dwi_spatial_resample_resolution + ext.interp = params.dwi_spatial_resample_interpolation + ext.first_suffix = "dwi" + } + + withName: "TRACTOFLOW:PREPROC_DWI:BETCROP_CROPVOLUME" { + ext.output_bbox = false + } + + withName: "TRACTOFLOW:PREPROC_DWI:RESAMPLE_MASK" { + ext.voxel_size = params.dwi_spatial_resample_resolution + ext.interp = "nn" + ext.first_suffix = "mask" + } + + withName: "TRACTOFLOW:PREPROC_T1:BETCROP_CROPVOLUME_T1" { + ext.output_bbox = true + ext.first_suffix = "t1" + } + + withName: "TRACTOFLOW:PREPROC_T1:IMAGE_RESAMPLE" { + ext.voxel_size = params.t1_spatial_resample_resolution + ext.interp = params.t1_spatial_resample_interpolation + ext.first_suffix = "t1" + } + + //withName: "TRACTOFLOW:T1_REGISTRATION:REGISTER_ANATTODWI" { + // Nothing to do ! + //} + + //withName: "TRACTOFLOW:ANATOMICAL_SEGMENTATION:SEGMENTATION_FASTSEG" { + // Nothing to do ! + //} + + //withName: "TRACTOFLOW:ANATOMICAL_SEGMENTATION:SEGMENTATION_FREESURFERSEG" { + // Nothing to do ! + //} + + /* MODULES CONFIGURATION */ + + withName: "TRACTOFLOW:REGISTRATION_FA" { + ext.fa = true + ext.ad = false + ext.evecs = false + ext.evals = false + ext.ga = false + ext.rgb = false + ext.md = false + ext.mode = false + ext.norm = false + ext.rd = false + ext.tensor = false + ext.nonphysical = false + ext.pulsation = false + ext.residual = false + } + + withName: "TRACTOFLOW:TRANSFORM_WMPARC" { + ext.dimensionality = 3 + ext.image_type = 0 + ext.interpolation = "NearestNeighbor" + ext.output_dtype = "uchar" + ext.default_val = 0 + } + + withName: "TRACTOFLOW:TRANSFORM_APARC_ASEG" { + ext.dimensionality = 3 + ext.image_type = 0 + ext.interpolation = "MultiLabel" + ext.output_dtype = "short" + ext.default_val = 0 + } + + withName: "TRACTOFLOW:RECONST_FRF" { + ext.fa = params.dwi_fodf_fit_frf_max_fa_threshold + ext.fa_min = params.dwi_fodf_fit_frf_min_fa_threshold + ext.nvox_min = params.dwi_fodf_fit_frf_min_n_voxels + ext.roi_radius = params.dwi_fodf_fit_frf_roi_radius + ext.set_frf = params.dwi_fodf_fit_force_frf ? true : false + ext.manual_frf = params.dwi_fodf_fit_force_frf + } + + //withName: "RECONST_MEANFRF" { + // Nothing to do ! + //} + + withName: "TRACTOFLOW:RECONST_DTIMETRICS" { + ext.ad = true + ext.evecs = true + ext.evals = true + ext.fa = true + ext.ga = true + ext.rgb = true + ext.md = true + ext.mode = true + ext.norm = true + ext.rd = true + ext.tensor = true + ext.nonphysical = true + ext.pulsation = true + ext.residual = true + } + + withName: "TRACTOFLOW:RECONST_FODF" { + ext.b0_thr_extract_b0 = params.dwi_b0_extract_threshold + ext.dwi_shell_tolerance = params.dwi_shell_extract_tolerance + ext.min_fodf_shell_value = params.dwi_fodf_fit_shell_min_bvalue + ext.fodf_shells = params.dwi_fodf_fit_shells + ext.sh_order = params.dwi_fodf_fit_order + ext.sh_basis = params.dwi_fodf_fit_basis + ext.fa_threshold = params.dwi_fodf_fit_peaks_ventricle_max_fa + ext.md_threshold = params.dwi_fodf_fit_peaks_ventricle_min_md + ext.relative_threshold = params.dwi_fodf_fit_peaks_relative_threshold + ext.fodf_metrics_a_factor = params.dwi_fodf_fit_peaks_absolute_factor + ext.absolute_peaks = true //FIXME + ext.processes = 4 //FIXME + ext.peaks = true + ext.peak_indices = true + ext.afd_max = true + ext.afd_total = true + ext.afd_sum = true + ext.nufo = true + } + + withName: "TRACTOFLOW:TRACKING_PFTTRACKING" { + ext.pft_seeding_mask_type = params.fodf_pft_fit_seeding_type + ext.pft_fa_seeding_mask_threshold = params.fodf_pft_fit_seeding_fa_mask_threshold + ext.pft_seeding = params.fodf_pft_fit_seeding_strategy + ext.pft_nbr_seeds = params.fodf_pft_fit_seeding_n_seeds + ext.pft_algo = params.fodf_pft_fit_algorithm + ext.pft_step = params.fodf_pft_fit_step_size + ext.pft_theta = params.fodf_pft_fit_theta_max_deviation + ext.pft_sfthres = params.fodf_pft_fit_sf_threshold + ext.pft_sfthres_init = params.fodf_pft_fit_sf_initial_threshold + ext.pft_min_len = params.fodf_pft_fit_streamline_min_length + ext.pft_max_len = params.fodf_pft_fit_streamline_max_length + ext.pft_particles = params.fodf_pft_fit_filter_n_particles + ext.pft_back = params.fodf_pft_fit_filter_backward_step_size + ext.pft_front = params.fodf_pft_fit_filter_forward_step_size + ext.pft_random_seed = params.fodf_pft_fit_random_seed + ext.pft_compress_streamlines = params.fodf_pft_fit_compress_tractogram + ext.pft_compress_value = params.fodf_pft_fit_compress_max_displacement + ext.basis = params.dwi_fodf_fit_basis + } + + withName: "TRACTOFLOW:TRACKING_LOCALTRACKING" { + ext.local_tracking_mask_type = params.fodf_local_fit_tracking_mask_type + ext.local_fa_tracking_mask_threshold = params.fodf_local_fit_tracking_mask_fa_threshold + ext.local_seeding_mask_type = params.fodf_local_fit_seeding_type + ext.local_fa_seeding_mask_threshold = params.fodf_local_fit_seeding_fa_threshold + ext.local_seeding = params.fodf_local_fit_seeding_strategy + ext.local_nbr_seeds = params.fodf_local_fit_seeding_n_seeds + ext.local_algo = params.fodf_local_fit_algorithm + ext.local_step = params.fodf_local_fit_step_size + ext.local_theta = params.fodf_local_fit_theta_max_deviation + ext.local_sfthres = params.fodf_local_fit_sf_threshold + ext.local_min_len = params.fodf_local_fit_streamline_min_length + ext.local_max_len = params.fodf_local_fit_streamline_max_length + ext.local_random_seed = params.fodf_local_fit_random_seed + ext.local_compress_streamlines = params.fodf_local_fit_compress_tractogram + ext.local_compress_value = params.fodf_local_fit_compress_max_displacement + ext.basis = params.dwi_fodf_fit_basis + } +} diff --git a/subworkflows/nf-scil/tractoflow/tests/tags.yml b/subworkflows/nf-scil/tractoflow/tests/tags.yml new file mode 100644 index 000000000..712e066f9 --- /dev/null +++ b/subworkflows/nf-scil/tractoflow/tests/tags.yml @@ -0,0 +1,2 @@ +subworkflows/tractoflow: + - subworkflows/nf-scil/tractoflow/**