diff --git a/modules/nf-neuro/betcrop/cropvolume/tests/tags.yml b/modules/nf-neuro/betcrop/cropvolume/tests/tags.yml deleted file mode 100644 index d6802302..00000000 --- a/modules/nf-neuro/betcrop/cropvolume/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -betcrop/cropvolume: - - "modules/nf-neuro/betcrop/cropvolume/**" diff --git a/modules/nf-neuro/betcrop/cropvolume/environment.yml b/modules/nf-neuro/image/cropvolume/environment.yml similarity index 54% rename from modules/nf-neuro/betcrop/cropvolume/environment.yml rename to modules/nf-neuro/image/cropvolume/environment.yml index 3adeaf1e..670802a8 100644 --- a/modules/nf-neuro/betcrop/cropvolume/environment.yml +++ b/modules/nf-neuro/image/cropvolume/environment.yml @@ -1,3 +1,3 @@ channels: [] dependencies: [] -name: betcrop_cropvolume +name: image_cropvolume diff --git a/modules/nf-neuro/betcrop/cropvolume/main.nf b/modules/nf-neuro/image/cropvolume/main.nf similarity index 98% rename from modules/nf-neuro/betcrop/cropvolume/main.nf rename to modules/nf-neuro/image/cropvolume/main.nf index e8f47015..08c5d388 100755 --- a/modules/nf-neuro/betcrop/cropvolume/main.nf +++ b/modules/nf-neuro/image/cropvolume/main.nf @@ -1,5 +1,5 @@ -process BETCROP_CROPVOLUME { +process IMAGE_CROPVOLUME { tag "$meta.id" label 'process_single' diff --git a/modules/nf-neuro/betcrop/cropvolume/meta.yml b/modules/nf-neuro/image/cropvolume/meta.yml similarity index 97% rename from modules/nf-neuro/betcrop/cropvolume/meta.yml rename to modules/nf-neuro/image/cropvolume/meta.yml index e981e340..df13e950 100755 --- a/modules/nf-neuro/betcrop/cropvolume/meta.yml +++ b/modules/nf-neuro/image/cropvolume/meta.yml @@ -1,6 +1,6 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/scilus/nf-neuro/main/modules/meta-schema.json -name: "betcrop_cropvolume" +name: "image_cropvolume" description: Crop empty planes around the data in a volume keywords: - nifti diff --git a/modules/nf-neuro/betcrop/cropvolume/tests/main.nf.test b/modules/nf-neuro/image/cropvolume/tests/main.nf.test similarity index 89% rename from modules/nf-neuro/betcrop/cropvolume/tests/main.nf.test rename to modules/nf-neuro/image/cropvolume/tests/main.nf.test index 06333238..af2c9486 100644 --- a/modules/nf-neuro/betcrop/cropvolume/tests/main.nf.test +++ b/modules/nf-neuro/image/cropvolume/tests/main.nf.test @@ -1,14 +1,14 @@ nextflow_process { - name "Test Process BETCROP_CROPVOLUME" + name "Test Process IMAGE_CROPVOLUME" script "../main.nf" - process "BETCROP_CROPVOLUME" + process "IMAGE_CROPVOLUME" config "./nextflow.config" tag "modules" tag "modules_nfcore" - tag "betcrop" - tag "betcrop/cropvolume" + tag "image" + tag "image/cropvolume" tag "subworkflows" tag "subworkflows/load_test_data" @@ -25,7 +25,7 @@ nextflow_process { } } - test("betcrop - cropvolume") { + test("image - cropvolume") { when { process { @@ -50,7 +50,7 @@ nextflow_process { } - test("betcrop - cropvolume - outputbbox") { + test("image - cropvolume - outputbbox") { config "./nextflow_bbox.config" diff --git a/modules/nf-neuro/betcrop/cropvolume/tests/main.nf.test.snap b/modules/nf-neuro/image/cropvolume/tests/main.nf.test.snap similarity index 82% rename from modules/nf-neuro/betcrop/cropvolume/tests/main.nf.test.snap rename to modules/nf-neuro/image/cropvolume/tests/main.nf.test.snap index ec0dfa70..b7c47661 100644 --- a/modules/nf-neuro/betcrop/cropvolume/tests/main.nf.test.snap +++ b/modules/nf-neuro/image/cropvolume/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "betcrop - cropvolume - outputbbox": { + "image - cropvolume": { "content": [ { "0": [ @@ -12,25 +12,13 @@ ] ], "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_cropped_bbox.pkl:md5,d6a03b61669b07683e8c4b21a613f16c" - ] + ], "2": [ - "versions.yml:md5,3b089d55a1116feffa69d739ced1d99f" + "versions.yml:md5,c9f9039fc9103e716e831016a61807f9" ], "bounding_box": [ - [ - { - "id": "test", - "single_end": false - }, - "test_cropped_bbox.pkl:md5,d6a03b61669b07683e8c4b21a613f16c" - ] + ], "image": [ [ @@ -42,17 +30,17 @@ ] ], "versions": [ - "versions.yml:md5,3b089d55a1116feffa69d739ced1d99f" + "versions.yml:md5,c9f9039fc9103e716e831016a61807f9" ] } ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nextflow": "24.10.0" }, - "timestamp": "2024-10-28T19:30:09.320626173" + "timestamp": "2024-12-12T18:59:41.317523464" }, - "betcrop - cropvolume": { + "image - cropvolume - outputbbox": { "content": [ { "0": [ @@ -65,13 +53,25 @@ ] ], "1": [ - + [ + { + "id": "test", + "single_end": false + }, + "test_cropped_bbox.pkl:md5,d6a03b61669b07683e8c4b21a613f16c" + ] ], "2": [ - "versions.yml:md5,3b089d55a1116feffa69d739ced1d99f" + "versions.yml:md5,c9f9039fc9103e716e831016a61807f9" ], "bounding_box": [ - + [ + { + "id": "test", + "single_end": false + }, + "test_cropped_bbox.pkl:md5,d6a03b61669b07683e8c4b21a613f16c" + ] ], "image": [ [ @@ -83,14 +83,14 @@ ] ], "versions": [ - "versions.yml:md5,3b089d55a1116feffa69d739ced1d99f" + "versions.yml:md5,c9f9039fc9103e716e831016a61807f9" ] } ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nextflow": "24.10.0" }, - "timestamp": "2024-10-28T19:30:00.033087617" + "timestamp": "2024-12-12T18:59:50.080977383" } } \ No newline at end of file diff --git a/modules/nf-neuro/betcrop/cropvolume/tests/nextflow.config b/modules/nf-neuro/image/cropvolume/tests/nextflow.config similarity index 77% rename from modules/nf-neuro/betcrop/cropvolume/tests/nextflow.config rename to modules/nf-neuro/image/cropvolume/tests/nextflow.config index 7a7632ff..3a9e735d 100644 --- a/modules/nf-neuro/betcrop/cropvolume/tests/nextflow.config +++ b/modules/nf-neuro/image/cropvolume/tests/nextflow.config @@ -1,5 +1,5 @@ process { - withName: "BETCROP_CROPVOLUME" { + withName: "IMAGE_CROPVOLUME" { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } } diff --git a/modules/nf-neuro/betcrop/cropvolume/tests/nextflow_bbox.config b/modules/nf-neuro/image/cropvolume/tests/nextflow_bbox.config similarity index 81% rename from modules/nf-neuro/betcrop/cropvolume/tests/nextflow_bbox.config rename to modules/nf-neuro/image/cropvolume/tests/nextflow_bbox.config index c998553c..6055585a 100644 --- a/modules/nf-neuro/betcrop/cropvolume/tests/nextflow_bbox.config +++ b/modules/nf-neuro/image/cropvolume/tests/nextflow_bbox.config @@ -1,5 +1,5 @@ process { - withName: "BETCROP_CROPVOLUME" { + withName: "IMAGE_CROPVOLUME" { ext.output_bbox = true publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } diff --git a/modules/nf-neuro/image/cropvolume/tests/tags.yml b/modules/nf-neuro/image/cropvolume/tests/tags.yml new file mode 100644 index 00000000..eeae1b2c --- /dev/null +++ b/modules/nf-neuro/image/cropvolume/tests/tags.yml @@ -0,0 +1,2 @@ +image/cropvolume: + - "modules/nf-neuro/image/cropvolume/**" diff --git a/subworkflows/nf-neuro/preproc_dwi/main.nf b/subworkflows/nf-neuro/preproc_dwi/main.nf index f16e2a36..c2ee7348 100644 --- a/subworkflows/nf-neuro/preproc_dwi/main.nf +++ b/subworkflows/nf-neuro/preproc_dwi/main.nf @@ -1,7 +1,7 @@ include { DENOISING_MPPCA as DENOISE_DWI } from '../../../modules/nf-neuro/denoising/mppca/main' include { DENOISING_MPPCA as DENOISE_REVDWI } from '../../../modules/nf-neuro/denoising/mppca/main' include { BETCROP_FSLBETCROP } from '../../../modules/nf-neuro/betcrop/fslbetcrop/main' -include { BETCROP_CROPVOLUME } from '../../../modules/nf-neuro/betcrop/cropvolume/main' +include { IMAGE_CROPVOLUME } from '../../../modules/nf-neuro/image/cropvolume/main' include { PREPROC_N4 as N4_DWI } from '../../../modules/nf-neuro/preproc/n4/main' include { PREPROC_NORMALIZE as NORMALIZE_DWI } from '../../../modules/nf-neuro/preproc/normalize/main' include { IMAGE_RESAMPLE as RESAMPLE_DWI } from '../../../modules/nf-neuro/image/resample/main' @@ -78,12 +78,12 @@ workflow PREPROC_DWI { ch_crop_b0 = TOPUP_EDDY.out.b0 .join(BETCROP_FSLBETCROP.out.bbox) - BETCROP_CROPVOLUME ( ch_crop_b0 ) - ch_versions = ch_versions.mix(BETCROP_CROPVOLUME.out.versions.first()) + IMAGE_CROPVOLUME ( ch_crop_b0 ) + ch_versions = ch_versions.mix(IMAGE_CROPVOLUME.out.versions.first()) // ** N4 DWI ** // ch_N4 = BETCROP_FSLBETCROP.out.image - .join(BETCROP_CROPVOLUME.out.image) + .join(IMAGE_CROPVOLUME.out.image) .join(BETCROP_FSLBETCROP.out.mask) N4_DWI ( ch_N4 ) diff --git a/subworkflows/nf-neuro/preproc_dwi/meta.yml b/subworkflows/nf-neuro/preproc_dwi/meta.yml index 705b64e9..6cd12eae 100644 --- a/subworkflows/nf-neuro/preproc_dwi/meta.yml +++ b/subworkflows/nf-neuro/preproc_dwi/meta.yml @@ -45,7 +45,7 @@ keywords: - Normalization - Resampling components: - - betcrop/cropvolume + - image/cropvolume - betcrop/fslbetcrop - denoising/mppca - image/resample diff --git a/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test b/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test index 9f8693b3..b3dbc324 100644 --- a/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test +++ b/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test @@ -9,7 +9,7 @@ nextflow_workflow { tag "subworkflows_nfcore" tag "subworkflows/preproc_dwi" tag "subworkflows/topup_eddy" - tag "betcrop/cropvolume" + tag "image/cropvolume" tag "betcrop/fslbetcrop" tag "denoising/mppca" tag "image/resample" diff --git a/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test.snap b/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test.snap index 370fa97f..81b13fe1 100644 --- a/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test.snap +++ b/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,0494fbf74bc9c16d2b30cb45b3bba66b", "versions.yml:md5,0b8c908e52917b0b706fc9d1b4d6cd24", - "versions.yml:md5,0e680a0c6b56892e1a7ec7f85bb95322", + "versions.yml:md5,10ec368dc91791041043fddf6ea3d5c9", "versions.yml:md5,571265e710ca29198e69be22c0f970d5", "versions.yml:md5,662ea558da42564a0f6140473132bcb4", "versions.yml:md5,7ddf2e98f59b19c9b933670550f26ad7", @@ -51,7 +51,7 @@ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,0494fbf74bc9c16d2b30cb45b3bba66b", "versions.yml:md5,0b8c908e52917b0b706fc9d1b4d6cd24", - "versions.yml:md5,0e680a0c6b56892e1a7ec7f85bb95322", + "versions.yml:md5,10ec368dc91791041043fddf6ea3d5c9", "versions.yml:md5,571265e710ca29198e69be22c0f970d5", "versions.yml:md5,7ddf2e98f59b19c9b933670550f26ad7", "versions.yml:md5,c15ba5efd24564dba4710b6da8c4b791", @@ -87,7 +87,7 @@ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,0494fbf74bc9c16d2b30cb45b3bba66b", "versions.yml:md5,0b8c908e52917b0b706fc9d1b4d6cd24", - "versions.yml:md5,0e680a0c6b56892e1a7ec7f85bb95322", + "versions.yml:md5,10ec368dc91791041043fddf6ea3d5c9", "versions.yml:md5,571265e710ca29198e69be22c0f970d5", "versions.yml:md5,662ea558da42564a0f6140473132bcb4", "versions.yml:md5,7ddf2e98f59b19c9b933670550f26ad7", @@ -109,4 +109,4 @@ }, "timestamp": "2024-12-12T18:31:26.492075412" } -} \ No newline at end of file +} diff --git a/subworkflows/nf-neuro/preproc_dwi/tests/nextflow.config b/subworkflows/nf-neuro/preproc_dwi/tests/nextflow.config index 4bf578f2..95e0160a 100644 --- a/subworkflows/nf-neuro/preproc_dwi/tests/nextflow.config +++ b/subworkflows/nf-neuro/preproc_dwi/tests/nextflow.config @@ -41,7 +41,7 @@ process { ext.voxel_size = 1 ext.interp = "lin" } - withName: "BETCROP_CROPVOLUME" { + withName: "IMAGE_CROPVOLUME" { ext.output_bbox = false } diff --git a/subworkflows/nf-neuro/preproc_t1/main.nf b/subworkflows/nf-neuro/preproc_t1/main.nf index 1fa17f74..c581ba1f 100644 --- a/subworkflows/nf-neuro/preproc_t1/main.nf +++ b/subworkflows/nf-neuro/preproc_t1/main.nf @@ -4,8 +4,8 @@ include { PREPROC_N4 } from '../../../modules/nf-neuro/preproc/n4/main' include { IMAGE_RESAMPLE } from '../../../modules/nf-neuro/image/resample/main' include { BETCROP_ANTSBET } from '../../../modules/nf-neuro/betcrop/antsbet/main' include { BETCROP_SYNTHBET} from '../../../modules/nf-neuro/betcrop/synthbet/main' -include { BETCROP_CROPVOLUME as BETCROP_CROPVOLUME_T1 } from '../../../modules/nf-neuro/betcrop/cropvolume/main' -include { BETCROP_CROPVOLUME as BETCROP_CROPVOLUME_MASK } from '../../../modules/nf-neuro/betcrop/cropvolume/main' +include { IMAGE_CROPVOLUME as IMAGE_CROPVOLUME_T1 } from '../../../modules/nf-neuro/image/cropvolume/main' +include { IMAGE_CROPVOLUME as IMAGE_CROPVOLUME_MASK } from '../../../modules/nf-neuro/image/cropvolume/main' params.run_synthbet = false @@ -126,18 +126,18 @@ workflow PREPROC_T1 { ch_crop = image_bet .map{ it + [[]] } - BETCROP_CROPVOLUME_T1 ( ch_crop ) - ch_versions = ch_versions.mix(BETCROP_CROPVOLUME_T1.out.versions.first()) - image_crop = BETCROP_CROPVOLUME_T1.out.image - bbox = BETCROP_CROPVOLUME_T1.out.bounding_box + IMAGE_CROPVOLUME_T1 ( ch_crop ) + ch_versions = ch_versions.mix(IMAGE_CROPVOLUME_T1.out.versions.first()) + image_crop = IMAGE_CROPVOLUME_T1.out.image + bbox = IMAGE_CROPVOLUME_T1.out.bounding_box // ** Crop mask ** // ch_crop_mask = mask_bet - .join(BETCROP_CROPVOLUME_T1.out.bounding_box) + .join(IMAGE_CROPVOLUME_T1.out.bounding_box) - BETCROP_CROPVOLUME_MASK ( ch_crop_mask ) - ch_versions = ch_versions.mix(BETCROP_CROPVOLUME_MASK.out.versions.first()) - mask_crop = BETCROP_CROPVOLUME_MASK.out.image + IMAGE_CROPVOLUME_MASK ( ch_crop_mask ) + ch_versions = ch_versions.mix(IMAGE_CROPVOLUME_MASK.out.versions.first()) + mask_crop = IMAGE_CROPVOLUME_MASK.out.image } else{ image_crop = image_bet diff --git a/subworkflows/nf-neuro/preproc_t1/meta.yml b/subworkflows/nf-neuro/preproc_t1/meta.yml index c06f6f1f..e736187d 100644 --- a/subworkflows/nf-neuro/preproc_t1/meta.yml +++ b/subworkflows/nf-neuro/preproc_t1/meta.yml @@ -45,7 +45,7 @@ components: - image/resample - betcrop/antsbet - betcrop/synthbet - - betcrop/cropvolume + - image/cropvolume input: - ch_image: diff --git a/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test b/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test index ccceb804..ec2d95bc 100644 --- a/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test +++ b/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test @@ -13,7 +13,7 @@ nextflow_workflow { tag "image/resample" tag "betcrop/antsbet" tag "betcrop/synthbet" - tag "betcrop/cropvolume" + tag "image/cropvolume" tag "load_test_data" diff --git a/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test.snap b/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test.snap index a126deec..da31b7df 100644 --- a/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test.snap +++ b/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test.snap @@ -12,7 +12,7 @@ ] ], "1": [ - + ], "2": [ [ @@ -51,18 +51,18 @@ ] ], "6": [ - + ], "7": [ - + ], "8": [ - "versions.yml:md5,657fbb224f260392e573b8511c4b798d", "versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740", + "versions.yml:md5,bf4dd58c38dd4863ebfb9e78a94c3a20", "versions.yml:md5,ea32c30f5320f720b2f5dc32ac2535ea" ], "crop_box": [ - + ], "image_N4": [ [ @@ -101,10 +101,10 @@ ] ], "mask_bet": [ - + ], "mask_final": [ - + ], "t1_final": [ [ @@ -116,8 +116,8 @@ ] ], "versions": [ - "versions.yml:md5,657fbb224f260392e573b8511c4b798d", "versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740", + "versions.yml:md5,bf4dd58c38dd4863ebfb9e78a94c3a20", "versions.yml:md5,ea32c30f5320f720b2f5dc32ac2535ea" ] } @@ -148,10 +148,10 @@ "test_t1_cropped.nii.gz:md5:header,efab188f3700b5b29d4b4ef99cec1295,data,8a93b9d76ead7dae4af4792b9cf70479", [ "versions.yml:md5,318cabe934be45528a25f52083d9c90d", - "versions.yml:md5,37229cd5cee6f6788fbc9083d6618c61", - "versions.yml:md5,657fbb224f260392e573b8511c4b798d", "versions.yml:md5,b979132991d8f72a3585465533bd5730", "versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740", + "versions.yml:md5,be3dbb0ac2589ad263d583018f339102", + "versions.yml:md5,bf4dd58c38dd4863ebfb9e78a94c3a20", "versions.yml:md5,ea32c30f5320f720b2f5dc32ac2535ea" ] ], @@ -174,7 +174,7 @@ ] ], "1": [ - + ], "2": [ [ @@ -213,16 +213,16 @@ ] ], "6": [ - + ], "7": [ - + ], "8": [ - + ], "crop_box": [ - + ], "image_N4": [ [ @@ -261,10 +261,10 @@ ] ], "mask_bet": [ - + ], "mask_final": [ - + ], "t1_final": [ [ @@ -276,7 +276,7 @@ ] ], "versions": [ - + ] } ], @@ -297,10 +297,10 @@ "test_cropped.nii.gz", "test_t1_cropped.nii.gz", [ - "versions.yml:md5,37229cd5cee6f6788fbc9083d6618c61", - "versions.yml:md5,657fbb224f260392e573b8511c4b798d", "versions.yml:md5,b979132991d8f72a3585465533bd5730", "versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740", + "versions.yml:md5,be3dbb0ac2589ad263d583018f339102", + "versions.yml:md5,bf4dd58c38dd4863ebfb9e78a94c3a20", "versions.yml:md5,da278daafbe3afa8454021e2716dd205", "versions.yml:md5,ea32c30f5320f720b2f5dc32ac2535ea" ] @@ -311,4 +311,4 @@ }, "timestamp": "2024-12-12T15:50:29.838128539" } -} \ No newline at end of file +} diff --git a/subworkflows/nf-neuro/preproc_t1/tests/nextflow.config b/subworkflows/nf-neuro/preproc_t1/tests/nextflow.config index eb8af0f0..067f4b20 100644 --- a/subworkflows/nf-neuro/preproc_t1/tests/nextflow.config +++ b/subworkflows/nf-neuro/preproc_t1/tests/nextflow.config @@ -4,7 +4,7 @@ process { ext.voxel_size = 1 ext.interp = "lin" } - withName: "BETCROP_CROPVOLUME_T1" { + withName: "IMAGE_CROPVOLUME_T1" { ext.output_bbox = true ext.first_suffix = "t1" } diff --git a/subworkflows/nf-neuro/preproc_t1/tests/nextflow_synthbet.config b/subworkflows/nf-neuro/preproc_t1/tests/nextflow_synthbet.config index 33344d61..a1f4d280 100644 --- a/subworkflows/nf-neuro/preproc_t1/tests/nextflow_synthbet.config +++ b/subworkflows/nf-neuro/preproc_t1/tests/nextflow_synthbet.config @@ -4,7 +4,7 @@ process { ext.voxel_size = 1 ext.interp = "lin" } - withName: "BETCROP_CROPVOLUME_T1" { + withName: "IMAGE_CROPVOLUME_T1" { ext.output_bbox = true ext.first_suffix = "t1" }