diff --git a/modules/nf-neuro/image/resample/main.nf b/modules/nf-neuro/image/resample/main.nf index c9c845e..b1e07f5 100755 --- a/modules/nf-neuro/image/resample/main.nf +++ b/modules/nf-neuro/image/resample/main.nf @@ -1,10 +1,11 @@ process IMAGE_RESAMPLE { tag "$meta.id" label 'process_single' + label 'process_high_memory' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://scil.usherbrooke.ca/containers/scilus_2.0.1.sif': - 'scilus/scilus:2.0.1' }" + 'https://scil.usherbrooke.ca/containers/scilus_2.0.2.sif': + 'scilus/scilus:2.0.2' }" input: tuple val(meta), path(image), path(ref) /* optional, input = [] */ @@ -18,6 +19,7 @@ process IMAGE_RESAMPLE { script: def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = task.ext.suffix ? "${task.ext.first_suffix}_resampled" : "resampled" def reference = "$ref" ? "--ref $ref" : "" def voxel_size = task.ext.voxel_size ? "--voxel_size " + task.ext.voxel_size : "" def volume_size = task.ext.volume_size ? "--volume_size " + task.ext.volume_size : "" @@ -31,28 +33,28 @@ process IMAGE_RESAMPLE { export OMP_NUM_THREADS=1 export OPENBLAS_NUM_THREADS=1 - scil_volume_resample.py $image ${prefix}__resampled.nii.gz \ + scil_volume_resample.py $image ${prefix}_${suffix}.nii.gz \ $voxel_size $volume_size $reference $iso_min \ $f $enforce_dimensions $interp - cat <<-END_VERSIONS > versions.yml "${task.process}": - scilpy: 2.0.1 + scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2) END_VERSIONS """ stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = task.ext.suffix ? "${task.ext.first_suffix}_resampled" : "resampled" """ scil_volume_resample.py -h - touch ${prefix}__resampled.nii.gz + touch ${prefix}_${suffix}.nii.gz cat <<-END_VERSIONS > versions.yml "${task.process}": - scilpy: 2.0.1 + scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2) END_VERSIONS """ } diff --git a/modules/nf-neuro/image/resample/meta.yml b/modules/nf-neuro/image/resample/meta.yml index 112c6ae..83aabf0 100755 --- a/modules/nf-neuro/image/resample/meta.yml +++ b/modules/nf-neuro/image/resample/meta.yml @@ -5,7 +5,7 @@ keywords: - resample - nifti - volume - - Scilpy + - scilpy tools: - "scilpy": description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox." diff --git a/modules/nf-neuro/image/resample/tests/main.nf.test.snap b/modules/nf-neuro/image/resample/tests/main.nf.test.snap index 5e74bfe..8d77f23 100644 --- a/modules/nf-neuro/image/resample/tests/main.nf.test.snap +++ b/modules/nf-neuro/image/resample/tests/main.nf.test.snap @@ -8,11 +8,11 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" + "test_resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" ] ], "1": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ], "image": [ [ @@ -20,19 +20,19 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" + "test_resampled.nii.gz:md5,f3164907d16ceabf606a03ea0efd3a2f" ] ], "versions": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-08T12:39:51.794554" + "timestamp": "2024-10-24T15:30:19.061192" }, "image - resample - nn": { "content": [ @@ -43,11 +43,11 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" + "test_resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" ] ], "1": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ], "image": [ [ @@ -55,19 +55,19 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" + "test_resampled.nii.gz:md5,8d3e1c9552673b1ce60bc4d090198564" ] ], "versions": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-08T12:40:24.002411" + "timestamp": "2024-10-24T15:30:42.725713" }, "image - resample - volsize": { "content": [ @@ -78,11 +78,11 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" + "test_resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" ] ], "1": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ], "image": [ [ @@ -90,19 +90,19 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" + "test_resampled.nii.gz:md5,7c83b666f9fb2d68643a20d1c7ac21d8" ] ], "versions": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-08T12:39:35.764922" + "timestamp": "2024-10-24T15:30:07.1626" }, "image - resample - voxsize": { "content": [ @@ -113,11 +113,11 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" + "test_resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" ] ], "1": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ], "image": [ [ @@ -125,19 +125,19 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" + "test_resampled.nii.gz:md5,6ffdabab138186db2dab6f98ea6e9ffb" ] ], "versions": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-08T12:39:18.016911" + "timestamp": "2024-10-24T15:29:55.01735" }, "image - resample - ref": { "content": [ @@ -148,11 +148,11 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" + "test_resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" ] ], "1": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ], "image": [ [ @@ -160,18 +160,18 @@ "id": "test", "single_end": false }, - "test__resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" + "test_resampled.nii.gz:md5,0a45d21ff294fda2e41c620cf83d0406" ] ], "versions": [ - "versions.yml:md5,f2c9fb731758ad9909571d60a85fa792" + "versions.yml:md5,06181e25531a3ebdefdfd2e641a3d645" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-08T12:40:07.720638" + "timestamp": "2024-10-24T15:30:31.018615" } } \ No newline at end of file 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 60fb0c2..c399df6 100644 --- a/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test.snap +++ b/subworkflows/nf-neuro/preproc_dwi/tests/main.nf.test.snap @@ -13,29 +13,29 @@ [ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,3340c4b5e56ca52f7342be3c9044eb47", - "versions.yml:md5,4d981a0200b8820dd789f135a9dd320f", "versions.yml:md5,5dce7a8c0b0d6b91ef7826f88c86370e", + "versions.yml:md5,7ddf2e98f59b19c9b933670550f26ad7", "versions.yml:md5,962f76092c8795ce5e6d768304e2d230", "versions.yml:md5,b4c068383da080f871c90828b1de0082", "versions.yml:md5,c15ba5efd24564dba4710b6da8c4b791", - "versions.yml:md5,d1ae2ca80502bf88c4b1c4a42fba6ced", "versions.yml:md5,d3010f785c88ee5946806a8a758e7efb", "versions.yml:md5,d68fe3399120f84f1add62181708780b", + "versions.yml:md5,ea5858879452a59bb355228ae7f38111", "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.9.0-rc1", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-05T18:15:01.714505" + "timestamp": "2024-10-24T15:39:59.890109" }, "preproc_dwi_rev_b0": { "content": [ @@ -51,28 +51,28 @@ [ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,3340c4b5e56ca52f7342be3c9044eb47", - "versions.yml:md5,4d981a0200b8820dd789f135a9dd320f", "versions.yml:md5,5dce7a8c0b0d6b91ef7826f88c86370e", + "versions.yml:md5,7ddf2e98f59b19c9b933670550f26ad7", "versions.yml:md5,962f76092c8795ce5e6d768304e2d230", "versions.yml:md5,b4c068383da080f871c90828b1de0082", "versions.yml:md5,c15ba5efd24564dba4710b6da8c4b791", - "versions.yml:md5,d1ae2ca80502bf88c4b1c4a42fba6ced", "versions.yml:md5,d3010f785c88ee5946806a8a758e7efb", + "versions.yml:md5,ea5858879452a59bb355228ae7f38111", "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.9.0-rc1", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-05T18:10:40.247701" + "timestamp": "2024-10-24T15:35:59.573081" }, "preproc_dwi_all_options": { "content": [ @@ -88,27 +88,27 @@ [ "versions.yml:md5,0280006ceecc575513278292734ffb27", "versions.yml:md5,3340c4b5e56ca52f7342be3c9044eb47", - "versions.yml:md5,4d981a0200b8820dd789f135a9dd320f", "versions.yml:md5,5dce7a8c0b0d6b91ef7826f88c86370e", + "versions.yml:md5,7ddf2e98f59b19c9b933670550f26ad7", "versions.yml:md5,962f76092c8795ce5e6d768304e2d230", "versions.yml:md5,b4c068383da080f871c90828b1de0082", "versions.yml:md5,c15ba5efd24564dba4710b6da8c4b791", - "versions.yml:md5,d1ae2ca80502bf88c4b1c4a42fba6ced", "versions.yml:md5,d68fe3399120f84f1add62181708780b", + "versions.yml:md5,ea5858879452a59bb355228ae7f38111", "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.9.0-rc1", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-05T18:20:22.568596" + "timestamp": "2024-10-24T15:44:27.839939" } } \ No newline at end of file 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 3a4c620..feddf85 100644 --- a/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test.snap +++ b/subworkflows/nf-neuro/preproc_t1/tests/main.nf.test.snap @@ -3,7 +3,7 @@ "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_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", [ @@ -23,20 +23,20 @@ "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", "versions.yml:md5,9d515db259af59f33ccd14061fbc45d1", "versions.yml:md5,b979132991d8f72a3585465533bd5730", - "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + "versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740" ] ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-29T23:18:49.778316" + "timestamp": "2024-10-24T18:16:56.928776" }, "preproc_t1_option": { "content": [ "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_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", [ @@ -56,20 +56,20 @@ "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", "versions.yml:md5,b979132991d8f72a3585465533bd5730", - "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + "versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740" ] ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-29T22:30:02.340948" + "timestamp": "2024-10-24T18:02:48.387787" }, "preproc_t1_classic": { "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_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", [ @@ -89,13 +89,13 @@ "versions.yml:md5,6aecd5fc2de479eaa81fb30b248c647c", "versions.yml:md5,97b6b9457caf964b9f20549672f692f0", "versions.yml:md5,b979132991d8f72a3585465533bd5730", - "versions.yml:md5,c6563545d67d7ab20ad849adcaafcb71" + "versions.yml:md5,bdd934b4b8456060c36d6d97e4f30740" ] ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-29T22:11:22.559727" + "timestamp": "2024-10-24T17:30:56.874211" } } \ No newline at end of file