diff --git a/subworkflows/nf-scil/preproc_t1/main.nf b/subworkflows/nf-scil/preproc_t1/main.nf index 7d5dd548..70c7bb51 100644 --- a/subworkflows/nf-scil/preproc_t1/main.nf +++ b/subworkflows/nf-scil/preproc_t1/main.nf @@ -3,18 +3,22 @@ include { DENOISING_NLMEANS } from '../../../modules/nf-scil/denoising/nlmeans/m include { PREPROC_N4 } from '../../../modules/nf-scil/preproc/n4/main' include { IMAGE_RESAMPLE } from '../../../modules/nf-scil/image/resample/main' include { BETCROP_ANTSBET } from '../../../modules/nf-scil/betcrop/antsbet/main' +include { BETCROP_SYNTHBET} from '../../../modules/nf-scil/betcrop/synthbet/main' include { BETCROP_CROPVOLUME as BETCROP_CROPVOLUME_T1 } from '../../../modules/nf-scil/betcrop/cropvolume/main' include { BETCROP_CROPVOLUME as BETCROP_CROPVOLUME_MASK } from '../../../modules/nf-scil/betcrop/cropvolume/main' +params.run_synthbet = params.run_synthbet ?: false + workflow PREPROC_T1 { take: ch_image // channel: [ val(meta), [ image ] ] - ch_template // channel: [ val(meta), [ template ] ] - ch_probability_map // channel: [ val(meta), [ probability_map ] ] + ch_template // channel: [ val(meta), [ template ] ] , optional + ch_probability_map // channel: [ val(meta), [ probability_map ] ] , optional ch_mask_nlmeans // channel: [ val(meta), [ mask ] ] , optional ch_ref_n4 // channel: [ val(meta), [ ref, ref_mask ] ] , optional ch_ref_resample // channel: [ val(meta), [ ref ] ] , optional + ch_weights // channel: [ val(meta), [ weights ] ] , optional main: @@ -36,28 +40,46 @@ workflow PREPROC_T1 { ch_versions = ch_versions.mix(IMAGE_RESAMPLE.out.versions.first()) // ** Brain extraction ** // - ch_bet = IMAGE_RESAMPLE.out.image.join(ch_template).join(ch_probability_map) - BETCROP_ANTSBET ( ch_bet ) - ch_versions = ch_versions.mix(BETCROP_ANTSBET.out.versions.first()) + if ( params.run_synthbet) { + ch_bet = IMAGE_RESAMPLE.out.image.join(ch_weights) + BETCROP_SYNTHBET ( ch_bet ) + ch_versions = ch_versions.mix(BETCROP_SYNTHBET.out.versions.first()) + + // ** Setting BET output ** // + image_bet = BETCROP_SYNTHBET.out.bet_image + mask_bet = BETCROP_SYNTHBET.out.brain_mask + } + + else { + ch_template = ch_template.ifEmpty(Channel.error('Template is required for ANTS registration')) + ch_probability_map = ch_probability_map.ifEmpty(Channel.error('Probability map is required for ANTS registration')) + ch_bet = IMAGE_RESAMPLE.out.image.join(ch_template).join(ch_probability_map) + BETCROP_ANTSBET ( ch_bet ) + ch_versions = ch_versions.mix(BETCROP_ANTSBET.out.versions.first()) + + // ** Setting BET output ** // + image_bet = BETCROP_ANTSBET.out.t1 + mask_bet = BETCROP_ANTSBET.out.mask + } // ** crop image ** // - ch_crop = BETCROP_ANTSBET.out.t1.map{it + [[]]} + ch_crop = image_bet.map{it + [[]]} BETCROP_CROPVOLUME_T1 ( ch_crop ) ch_versions = ch_versions.mix(BETCROP_CROPVOLUME_T1.out.versions.first()) // ** crop mask ** // - ch_crop_mask = BETCROP_ANTSBET.out.mask.join(BETCROP_CROPVOLUME_T1.out.bounding_box) + ch_crop_mask = mask_bet.join(BETCROP_CROPVOLUME_T1.out.bounding_box) BETCROP_CROPVOLUME_MASK ( ch_crop_mask ) ch_versions = ch_versions.mix(BETCROP_CROPVOLUME_MASK.out.versions.first()) emit: - image_nlmeans = DENOISING_NLMEANS.out.image // channel: [ val(meta), [ image ] ] - image_N4 = PREPROC_N4.out.image // channel: [ val(meta), [ image ] ] - image_resample = IMAGE_RESAMPLE.out.image // channel: [ val(meta), [ image ] ] - image_bet = BETCROP_ANTSBET.out.t1 // channel: [ val(meta), [ t1 ] ] - mask_bet = BETCROP_ANTSBET.out.mask // channel: [ val(meta), [ mask ] ] + image_nlmeans = DENOISING_NLMEANS.out.image // channel: [ val(meta), [ image ] ] + image_N4 = PREPROC_N4.out.image // channel: [ val(meta), [ image ] ] + image_resample = IMAGE_RESAMPLE.out.image // channel: [ val(meta), [ image ] ] + image_bet = image_bet // channel: [ val(meta), [ t1 ] ] + mask_bet = mask_bet // channel: [ val(meta), [ mask ] ] crop_box = BETCROP_CROPVOLUME_T1.out.bounding_box // channel: [ val(meta), [ bounding_box ] ] - mask_final = BETCROP_CROPVOLUME_MASK.out.image // channel: [ val(meta), [ mask ] ] + mask_final = BETCROP_CROPVOLUME_MASK.out.image // channel: [ val(meta), [ image ] ] t1_final = BETCROP_CROPVOLUME_T1.out.image // channel: [ val(meta), [ image ] ] - versions = ch_versions // channel: [ versions.yml ] + versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-scil/preproc_t1/meta.yml b/subworkflows/nf-scil/preproc_t1/meta.yml index 35baefa7..c12ce8b4 100644 --- a/subworkflows/nf-scil/preproc_t1/meta.yml +++ b/subworkflows/nf-scil/preproc_t1/meta.yml @@ -21,7 +21,7 @@ description: | Resamples the T1 to an isotropic spatial resolution. The default is 1mm, a standard in humans which usually facilitate registration with corrected DWI images. This spatial resolution is modifiable in the configuration file. - Brain Extraction (bet, ANTs). + Brain Extraction (bet, ANTs, freesurfer). Isolates the brain tissue voxels from the remaining image. Also creates a binary brain mask. This brain extraction is required for the T1 to DWI Registration. Cropping (scil). @@ -42,6 +42,7 @@ components: - preproc/n4 - image/resample - betcrop/antsbet + - betcrop/synthbet - betcrop/cropvolume input: @@ -81,6 +82,17 @@ input: The input channel containing the reference for the resampling. Optional Structure: [ val(meta), path(ref) ] pattern: "*.{nii,nii.gz}" + - ch_weights: + type: file + description: | + The input channel containing an alternative model weights for synthbet. Optional + Structure: [ val(meta), path (weights)] + pattern: "*.pt" + - val_synth: + type: boolean + description: | + Boolean input specifying which BET method is employed. Optional: defaults at false (ANTs) + pattern: "true" output: - image_nlmeans: type: file diff --git a/subworkflows/nf-scil/preproc_t1/tests/main.nf.test b/subworkflows/nf-scil/preproc_t1/tests/main.nf.test index 73086b21..e69f717d 100644 --- a/subworkflows/nf-scil/preproc_t1/tests/main.nf.test +++ b/subworkflows/nf-scil/preproc_t1/tests/main.nf.test @@ -12,6 +12,7 @@ nextflow_workflow { tag "preproc/n4" tag "image/resample" tag "betcrop/antsbet" + tag "betcrop/synthbet" tag "betcrop/cropvolume" tag "load_test_data" @@ -69,6 +70,11 @@ nextflow_workflow { [ id:'test', single_end:false ], [] ]} + input[6] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [] + ]} """ } } @@ -76,7 +82,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success}, - { assert snapshot(workflow.out).match()} + { assert snapshot( + niftiMD5SUM(workflow.out.image_nlmeans.get(0).get(1)), + niftiMD5SUM(workflow.out.image_N4.get(0).get(1)), + niftiMD5SUM(workflow.out.image_resample.get(0).get(1)), + niftiMD5SUM(workflow.out.image_bet.get(0).get(1)), + niftiMD5SUM(workflow.out.mask_bet.get(0).get(1)), + file(workflow.out.crop_box.get(0).get(1)), + niftiMD5SUM(workflow.out.mask_final.get(0).get(1)), + niftiMD5SUM(workflow.out.t1_final.get(0).get(1)), + workflow.out.versions + ).match()} ) } } @@ -123,6 +139,80 @@ nextflow_workflow { [ id:'test', single_end:false ], file("\${test_data_directory}/t1_unaligned.nii.gz") ]} + input[6] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [] + ]} + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + niftiMD5SUM(workflow.out.image_nlmeans.get(0).get(1)), + niftiMD5SUM(workflow.out.image_N4.get(0).get(1)), + niftiMD5SUM(workflow.out.image_resample.get(0).get(1)), + niftiMD5SUM(workflow.out.image_bet.get(0).get(1)), + niftiMD5SUM(workflow.out.mask_bet.get(0).get(1)), + workflow.out.crop_box, + niftiMD5SUM(workflow.out.mask_final.get(0).get(1)), + niftiMD5SUM(workflow.out.t1_final.get(0).get(1)), + workflow.out.versions + ).match()} + ) + } + } + +test("preproc_t1_synthbet") { + config "./nextflow_synthbet.config" + + when { + workflow { + """ + ch_split_test_data = LOAD_DATA.out.test_data_directory + .branch{ + antsbet: it.simpleName == "antsbet" + others: it.simpleName == "others" + } + input[0] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + file("\${test_data_directory}/t1_unaligned.nii.gz") + ]} + input[1] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [] + ]} + input[2] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [] + ]} + input[3] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [] + ]} + input[4] = ch_split_test_data.others.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [], + [] + ]} + input[5] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [] + ]} + input[6] = ch_split_test_data.antsbet.map{ + test_data_directory -> [ + [ id:'test', single_end:false ], + [] + ]} """ } } @@ -130,7 +220,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success}, - { assert snapshot(workflow.out).match()} + { assert snapshot( + niftiMD5SUM(workflow.out.image_nlmeans.get(0).get(1)), + niftiMD5SUM(workflow.out.image_N4.get(0).get(1)), + niftiMD5SUM(workflow.out.image_resample.get(0).get(1)), + niftiMD5SUM(workflow.out.image_bet.get(0).get(1)), + niftiMD5SUM(workflow.out.mask_bet.get(0).get(1)), + workflow.out.crop_box, + niftiMD5SUM(workflow.out.mask_final.get(0).get(1)), + niftiMD5SUM(workflow.out.t1_final.get(0).get(1)), + workflow.out.versions + ).match()} ) } } 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 981bcde8..c8e94855 100644 --- a/subworkflows/nf-scil/preproc_t1/tests/main.nf.test.snap +++ b/subworkflows/nf-scil/preproc_t1/tests/main.nf.test.snap @@ -1,344 +1,118 @@ { + "preproc_t1_synthbet": { + "content": [ + "test_denoised.nii.gz:md5:header,9dc5bba881cdb4f3b3b58b20d006d114,data,2ef8a474437349ed365aed6bfa9e4f41", + "test__image_n4.nii.gz:md5:header,fab880e51a5409298b94877a3c69c3d9,data,5d16ef7e8e31bf8e77c225df9a940f89", + "test__resampled.nii.gz:md5:header,ba56bf67f95a0353a1c8c916b9941664,data,5d16ef7e8e31bf8e77c225df9a940f89", + "test__bet_image.nii.gz:md5:header,79da6ee5e42ce49059a1d6a88fd38bdc,data,4df29fb64119840e66e7545fcb2c7a6a", + "test__brain_mask.nii.gz:md5:header,86100a14ceb6518088609a1f677e0885,data,d308b05abcb3cbd03774486a42c647b2", + [ + [ + { + "id": "test", + "single_end": false + }, + "test_t1_cropped_bbox.pkl:md5,0107af810df4d572bd9d8ad2b6d4de10" + ] + ], + "test_cropped.nii.gz:md5:header,b35aea7e0234cc19fdd56e8274823273,data,8503316d9f1e2b1be78eacbaba0ecf21", + "test_t1_cropped.nii.gz:md5:header,b35aea7e0234cc19fdd56e8274823273,data,72d63beb1aab2005e8aac2e8b0a44fc4", + [ + "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", + "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", + "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", + "versions.yml:md5,9d515db259af59f33ccd14061fbc45d1", + "versions.yml:md5,b979132991d8f72a3585465533bd5730", + "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + ] + ], + "meta": { + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-17T19:35:44.047363" + }, "preproc_t1_option": { "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_denoised.nii.gz:md5,ba910fdd1c9cc8f3d1c98b24dde522ef" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test__image_n4.nii.gz:md5,f9b1e5305c8c176c8ef72168b8a33f2d" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test__resampled.nii.gz:md5,a16a9d32732752b40f699cea2fb046bd" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet.nii.gz:md5,f0a2be8bc64bb8b0311bb7022e177623" - ] - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet_mask.nii.gz:md5,bdafc62e0e2ab35d0d48e1021d0a82db" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped_bbox.pkl:md5,39a3444e23d7ea6478ef1213f88e7715" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test_cropped.nii.gz:md5,02b2ca05a95c8494a85cda69ebe6d5e7" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped.nii.gz:md5,593d0b155da379bb41e8557ea5f9b92e" - ] - ], - "8": [ - "versions.yml:md5,209daf2d60de195845dedbdf80c98afd", - "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", - "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", - "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", - "versions.yml:md5,b979132991d8f72a3585465533bd5730", - "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" - ], - "crop_box": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped_bbox.pkl:md5,39a3444e23d7ea6478ef1213f88e7715" - ] - ], - "image_N4": [ - [ - { - "id": "test", - "single_end": false - }, - "test__image_n4.nii.gz:md5,f9b1e5305c8c176c8ef72168b8a33f2d" - ] - ], - "image_bet": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet.nii.gz:md5,f0a2be8bc64bb8b0311bb7022e177623" - ] - ], - "image_nlmeans": [ - [ - { - "id": "test", - "single_end": false - }, - "test_denoised.nii.gz:md5,ba910fdd1c9cc8f3d1c98b24dde522ef" - ] - ], - "image_resample": [ - [ - { - "id": "test", - "single_end": false - }, - "test__resampled.nii.gz:md5,a16a9d32732752b40f699cea2fb046bd" - ] - ], - "mask_bet": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet_mask.nii.gz:md5,bdafc62e0e2ab35d0d48e1021d0a82db" - ] - ], - "mask_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test_cropped.nii.gz:md5,02b2ca05a95c8494a85cda69ebe6d5e7" - ] - ], - "t1_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped.nii.gz:md5,593d0b155da379bb41e8557ea5f9b92e" - ] - ], - "versions": [ - "versions.yml:md5,209daf2d60de195845dedbdf80c98afd", - "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", - "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", - "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", - "versions.yml:md5,b979132991d8f72a3585465533bd5730", - "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + "test_denoised.nii.gz:md5:header,9dc5bba881cdb4f3b3b58b20d006d114,data,19e488aa93257a256b4fbf91c1fed25c", + "test__image_n4.nii.gz:md5:header,fab880e51a5409298b94877a3c69c3d9,data,8762a19ca79073d501522c786071166c", + "test__resampled.nii.gz:md5:header,ba56bf67f95a0353a1c8c916b9941664,data,8762a19ca79073d501522c786071166c", + "test__t1_bet.nii.gz:md5:header,7edd352b8d21871ff520685f25426d37,data,39485cf56f7f5b8488fb6d966138dac5", + "test__t1_bet_mask.nii.gz:md5:header,83448ac1e189cc82bff23ca4f67ebc7c,data,07c0d1f8132bd853cb33dd4114ab5e94", + [ + [ + { + "id": "test", + "single_end": false + }, + "test_t1_cropped_bbox.pkl:md5,39a3444e23d7ea6478ef1213f88e7715" ] - } + ], + "test_cropped.nii.gz:md5:header,b6580e9aab12c852552d57d76240650a,data,b6ddca5a4e1f1cc445650653c29045bc", + "test_t1_cropped.nii.gz:md5:header,45c39d7777c888a5a7dc6fb0a3b4c914,data,0872cfc1cae1d7d6e7c9fe3f3555376d", + [ + "versions.yml:md5,209daf2d60de195845dedbdf80c98afd", + "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", + "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", + "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", + "versions.yml:md5,b979132991d8f72a3585465533bd5730", + "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-10T19:57:38.341812" + "timestamp": "2024-09-08T20:58:06.563081" + }, + "preproc_t1_surgery": { + "content": [ + "test_denoised.nii.gz:md5:header,9dc5bba881cdb4f3b3b58b20d006d114,data,2ef8a474437349ed365aed6bfa9e4f41", + "test__image_n4.nii.gz:md5:header,fab880e51a5409298b94877a3c69c3d9,data,5d16ef7e8e31bf8e77c225df9a940f89", + "test__resampled.nii.gz:md5:header,ba56bf67f95a0353a1c8c916b9941664,data,5d16ef7e8e31bf8e77c225df9a940f89", + "test__bet_image.nii.gz:md5:header,79da6ee5e42ce49059a1d6a88fd38bdc,data,4df29fb64119840e66e7545fcb2c7a6a", + "test__brain_mask.nii.gz:md5:header,86100a14ceb6518088609a1f677e0885,data,d308b05abcb3cbd03774486a42c647b2", + "test_t1_cropped_bbox.pkl:md5,0107af810df4d572bd9d8ad2b6d4de10", + "test_cropped.nii.gz:md5:header,b35aea7e0234cc19fdd56e8274823273,data,8503316d9f1e2b1be78eacbaba0ecf21", + "test_t1_cropped.nii.gz:md5:header,b35aea7e0234cc19fdd56e8274823273,data,72d63beb1aab2005e8aac2e8b0a44fc4", + [ + "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", + "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", + "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", + "versions.yml:md5,9d515db259af59f33ccd14061fbc45d1", + "versions.yml:md5,b979132991d8f72a3585465533bd5730", + "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + ] + ], + "meta": { + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-08T19:44:22.995519" }, "preproc_t1_classic": { "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_denoised.nii.gz:md5,b6d25b37b1101fea5c77bbbc711757c3" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test__image_n4.nii.gz:md5,ef0d9af46aa1e330c5d7679ead500596" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test__resampled.nii.gz:md5,88bae6bfeea1734111621b437e09548d" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet.nii.gz:md5,016f12c75e3543c27987a91eb2160a19" - ] - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet_mask.nii.gz:md5,cf0cc416ca8b352d3cba58d9132ab0da" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped_bbox.pkl:md5,5d9bd5d9c068031f34c34223b5892153" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test_cropped.nii.gz:md5,aee59cb0bf2a4e14bfe116dc68be365b" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped.nii.gz:md5,f4bea1286a90760eecf348dd9bffd2e6" - ] - ], - "8": [ - "versions.yml:md5,209daf2d60de195845dedbdf80c98afd", - "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", - "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", - "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", - "versions.yml:md5,b979132991d8f72a3585465533bd5730", - "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" - ], - "crop_box": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped_bbox.pkl:md5,5d9bd5d9c068031f34c34223b5892153" - ] - ], - "image_N4": [ - [ - { - "id": "test", - "single_end": false - }, - "test__image_n4.nii.gz:md5,ef0d9af46aa1e330c5d7679ead500596" - ] - ], - "image_bet": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet.nii.gz:md5,016f12c75e3543c27987a91eb2160a19" - ] - ], - "image_nlmeans": [ - [ - { - "id": "test", - "single_end": false - }, - "test_denoised.nii.gz:md5,b6d25b37b1101fea5c77bbbc711757c3" - ] - ], - "image_resample": [ - [ - { - "id": "test", - "single_end": false - }, - "test__resampled.nii.gz:md5,88bae6bfeea1734111621b437e09548d" - ] - ], - "mask_bet": [ - [ - { - "id": "test", - "single_end": false - }, - "test__t1_bet_mask.nii.gz:md5,cf0cc416ca8b352d3cba58d9132ab0da" - ] - ], - "mask_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test_cropped.nii.gz:md5,aee59cb0bf2a4e14bfe116dc68be365b" - ] - ], - "t1_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test_t1_cropped.nii.gz:md5,f4bea1286a90760eecf348dd9bffd2e6" - ] - ], - "versions": [ - "versions.yml:md5,209daf2d60de195845dedbdf80c98afd", - "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", - "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", - "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", - "versions.yml:md5,b979132991d8f72a3585465533bd5730", - "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" - ] - } + "test_denoised.nii.gz:md5:header,9dc5bba881cdb4f3b3b58b20d006d114,data,2ef8a474437349ed365aed6bfa9e4f41", + "test__image_n4.nii.gz:md5:header,fab880e51a5409298b94877a3c69c3d9,data,5d16ef7e8e31bf8e77c225df9a940f89", + "test__resampled.nii.gz:md5:header,ba56bf67f95a0353a1c8c916b9941664,data,5d16ef7e8e31bf8e77c225df9a940f89", + "test__t1_bet.nii.gz:md5:header,7edd352b8d21871ff520685f25426d37,data,2a7080722359efac17193d4bac7a60f2", + "test__t1_bet_mask.nii.gz:md5:header,83448ac1e189cc82bff23ca4f67ebc7c,data,d8965c8a469b8e19b27219a08ae43371", + "test_t1_cropped_bbox.pkl:md5,5d9bd5d9c068031f34c34223b5892153", + "test_cropped.nii.gz:md5:header,8faac291b61ec44528a86761561b8901,data,92d02eab2672eb0e71e5069a9404e1c3", + "test_t1_cropped.nii.gz:md5:header,a2eb72dc338a2f7916415675185911bf,data,a2a72674fc1661421cd4065b06373992", + [ + "versions.yml:md5,209daf2d60de195845dedbdf80c98afd", + "versions.yml:md5,2c0a6f978891003ebdf35c1ba060aa90", + "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", + "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", + "versions.yml:md5,b979132991d8f72a3585465533bd5730", + "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0-rc1", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-10T19:36:04.155481" + "timestamp": "2024-09-08T20:38:28.275064" } } \ No newline at end of file diff --git a/subworkflows/nf-scil/preproc_t1/tests/nextflow_synthbet.config b/subworkflows/nf-scil/preproc_t1/tests/nextflow_synthbet.config new file mode 100644 index 00000000..9da8baf3 --- /dev/null +++ b/subworkflows/nf-scil/preproc_t1/tests/nextflow_synthbet.config @@ -0,0 +1,19 @@ +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: "IMAGE_RESAMPLE" { + ext.voxel_size = 1 + ext.interp = "lin" + } + withName: "BETCROP_CROPVOLUME_T1" { + ext.output_bbox = true + ext.first_suffix = "t1" + } + withName: "BETCROP_SYNTHBET" { + memory = 8.GB + ext.nocsf = true + } +} + +params { + run_synthbet = true +}