From 15b72c93d21fcaf7c366c6b3257ee54c9ae6352d Mon Sep 17 00:00:00 2001 From: medde Date: Wed, 30 Oct 2024 19:16:58 +0000 Subject: [PATCH 1/4] update reconst_fodf module --- modules/nf-neuro/reconst/fodf/main.nf | 14 +- modules/nf-neuro/reconst/fodf/meta.yml | 7 +- .../nf-neuro/reconst/fodf/tests/main.nf.test | 220 +++++++++++------- .../reconst/fodf/tests/main.nf.test.snap | 200 +++++++--------- .../reconst/fodf/tests/nextflow_shells.config | 2 +- 5 files changed, 231 insertions(+), 212 deletions(-) diff --git a/modules/nf-neuro/reconst/fodf/main.nf b/modules/nf-neuro/reconst/fodf/main.nf index 7deb635..ff5fe87 100644 --- a/modules/nf-neuro/reconst/fodf/main.nf +++ b/modules/nf-neuro/reconst/fodf/main.nf @@ -1,11 +1,11 @@ process RECONST_FODF { tag "$meta.id" - label 'process_single' + label 'process_high' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://scil.usherbrooke.ca/containers/scilus_2.0.0.sif': - 'scilus/scilus:2.0.0' }" + 'https://scil.usherbrooke.ca/containers/scilus_2.0.2.sif': + 'scilus/scilus:2.0.2' }" input: tuple val(meta), path(dwi), path(bval), path(bvec), path(mask), path(fa), path(md), path(wm_frf), path(gm_frf), path(csf_frf) @@ -40,7 +40,7 @@ process RECONST_FODF { def sh_order = task.ext.sh_order ? "--sh_order " + task.ext.sh_order : "" def sh_basis = task.ext.sh_basis ? "--sh_basis " + task.ext.sh_basis : "" def set_method = task.ext.method ? task.ext.method : "ssst" - def processes = task.ext.processes ? "--processes " + task.ext.processes : "" + def processes = task.cpus > 1 ? "--processes " + task.cpus : "" def set_mask = mask ? "--mask $mask" : "" def relative_threshold = task.ext.relative_threshold ? "--rt " + task.ext.relative_threshold : "" def fodf_metrics_a_factor = task.ext.fodf_metrics_a_factor ? task.ext.fodf_metrics_a_factor : 2.0 @@ -122,13 +122,13 @@ process RECONST_FODF { $set_mask $sh_basis $absolute_peaks \ $peaks $peak_values $peak_indices \ $afd_max $afd_total \ - $afd_sum $nufo \ + $afd_sum $nufo $processes \ $relative_threshold --not_all --at \${a_threshold} fi cat <<-END_VERSIONS > versions.yml "${task.process}": - scilpy: 2.0.0 + scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2) END_VERSIONS """ @@ -159,7 +159,7 @@ process RECONST_FODF { cat <<-END_VERSIONS > versions.yml "${task.process}": - scilpy: 2.0.0 + scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2) END_VERSIONS """ } diff --git a/modules/nf-neuro/reconst/fodf/meta.yml b/modules/nf-neuro/reconst/fodf/meta.yml index 1f9aca2..ab3c5d7 100644 --- a/modules/nf-neuro/reconst/fodf/meta.yml +++ b/modules/nf-neuro/reconst/fodf/meta.yml @@ -14,7 +14,7 @@ keywords: - Local Model - Reconst tools: - - "Scilpy": + - "scilpy": description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox." homepage: "https://github.com/scilus/scilpy.git" @@ -146,6 +146,11 @@ output: description: Number of Fiber Orientation (NuFO) map. pattern: "*nufo.nii.gz" + - vent_mask: + type: file + description: Ventricule mask estimated from an MD and FA threshold. + pattern: "*ventricles_mask.nii.gz" + - versions: type: file description: File containing software versions diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test b/modules/nf-neuro/reconst/fodf/tests/main.nf.test index 76f38ec..5b9b23b 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test @@ -13,16 +13,22 @@ nextflow_process { tag "subworkflows/load_test_data" setup { - run("LOAD_TEST_DATA", alias: "LOAD_DATA") { - script "../../../../../subworkflows/nf-neuro/load_test_data/main.nf" - process { - """ - input[0] = Channel.from( [ "processing.zip" , "commit_amico.zip" ] ) - input[1] = "test.load-test-data" - """ - } + run("LOAD_TEST_DATA", alias: "LOAD_DATA") { + script "../../../../../subworkflows/nf-neuro/load_test_data/main.nf" + process { + """ + input[0] = Channel.from( [ + "DWIss2000-dir60.zip", + "DWIms1000-2000-dir32-60.zip" , + "segmentation.zip", + "dti.zip", + "responses.zip" + ] ) + input[1] = "test.load-test-data" + """ } } + } test("reconst - fodf") { @@ -33,23 +39,43 @@ nextflow_process { """ ch_split_test_data = LOAD_DATA.out.test_data_directory .branch{ - ssst: it.simpleName == "processing" - msmt: it.simpleName == "commit_amico" + ssst: it.simpleName == "DWIss2000-dir60" + segmentation: it.simpleName == "segmentation" + dti: it.simpleName == "dti" + responses: it.simpleName == "responses" } - input[0] = ch_split_test_data.ssst.map{ + ch_dwi = ch_split_test_data.ssst.map{ test_data_directory -> [ - [ id:'test', single_end:false ], + [ id:'test' ], file("\${test_data_directory}/dwi.nii.gz"), file("\${test_data_directory}/dwi.bval"), - file("\${test_data_directory}/dwi.bvec"), - file("\${test_data_directory}/cc.nii.gz"), + file("\${test_data_directory}/dwi.bvec") + ] + } + ch_mask = ch_split_test_data.segmentation.map{ + test_data_directory -> [ + [ id:'test' ], + file("\${test_data_directory}/brainmask/brainmask.nii.gz") + ] + } + ch_metrics = ch_split_test_data.dti.map{ + test_data_directory -> [ + [ id:'test' ], file("\${test_data_directory}/fa.nii.gz"), - file("\${test_data_directory}/md.nii.gz"), - file("\${test_data_directory}/frf.txt"), - [], - [] + file("\${test_data_directory}/md.nii.gz") + ] + } + ch_response = ch_split_test_data.responses.map{ + test_data_directory -> [ + [ id:'test' ], + file("\${test_data_directory}/DWIss1000-dir32.txt") ] } + input[0] = ch_dwi + .join(ch_mask) + .join(ch_metrics) + .join(ch_response) + .map{ it + [[], []] } """ } } @@ -72,62 +98,43 @@ nextflow_process { """ ch_split_test_data = LOAD_DATA.out.test_data_directory .branch{ - ssst: it.simpleName == "processing" - msmt: it.simpleName == "commit_amico" + msmt: it.simpleName == "DWIms1000-2000-dir32-60" + segmentation: it.simpleName == "segmentation" + dti: it.simpleName == "dti" + responses: it.simpleName == "responses" } - input[0] = ch_split_test_data.ssst.map{ + ch_dwi = ch_split_test_data.msmt.map{ test_data_directory -> [ - [ id:'test', single_end:false ], + [ id:'test' ], file("\${test_data_directory}/dwi.nii.gz"), file("\${test_data_directory}/dwi.bval"), - file("\${test_data_directory}/dwi.bvec"), - file("\${test_data_directory}/cc.nii.gz"), - file("\${test_data_directory}/fa.nii.gz"), - file("\${test_data_directory}/md.nii.gz"), - file("\${test_data_directory}/frf.txt"), - [], - [] + file("\${test_data_directory}/dwi.bvec") ] } - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("reconst - fodf_no_mask") { - - config "./nextflow.config" - - when { - process { - """ - ch_split_test_data = LOAD_DATA.out.test_data_directory - .branch{ - ssst: it.simpleName == "processing" - msmt: it.simpleName == "commit_amico" - } - input[0] = ch_split_test_data.ssst.map{ + ch_mask = ch_split_test_data.segmentation.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"), - [], + [ id:'test' ], + file("\${test_data_directory}/brainmask/brainmask.nii.gz") + ] + } + ch_metrics = ch_split_test_data.dti.map{ + test_data_directory -> [ + [ id:'test' ], file("\${test_data_directory}/fa.nii.gz"), - file("\${test_data_directory}/md.nii.gz"), - file("\${test_data_directory}/frf.txt"), - [], - [] + file("\${test_data_directory}/md.nii.gz") + ] + } + ch_response = ch_split_test_data.responses.map{ + test_data_directory -> [ + [ id:'test' ], + file("\${test_data_directory}/DWIss1000-dir32.txt") ] } + input[0] = ch_dwi + .join(ch_mask) + .join(ch_metrics) + .join(ch_response) + .map{ it + [[], []] } """ } } @@ -150,23 +157,43 @@ nextflow_process { """ ch_split_test_data = LOAD_DATA.out.test_data_directory .branch{ - ssst: it.simpleName == "processing" - msmt: it.simpleName == "commit_amico" + ssst: it.simpleName == "DWIss2000-dir60" + segmentation: it.simpleName == "segmentation" + dti: it.simpleName == "dti" + responses: it.simpleName == "responses" } - input[0] = ch_split_test_data.ssst.map{ + ch_dwi = ch_split_test_data.ssst.map{ test_data_directory -> [ - [ id:'test', single_end:false ], + [ id:'test' ], file("\${test_data_directory}/dwi.nii.gz"), file("\${test_data_directory}/dwi.bval"), - file("\${test_data_directory}/dwi.bvec"), - file("\${test_data_directory}/cc.nii.gz"), + file("\${test_data_directory}/dwi.bvec") + ] + } + ch_mask = ch_split_test_data.segmentation.map{ + test_data_directory -> [ + [ id:'test' ], + file("\${test_data_directory}/brainmask/brainmask.nii.gz") + ] + } + ch_metrics = ch_split_test_data.dti.map{ + test_data_directory -> [ + [ id:'test' ], file("\${test_data_directory}/fa.nii.gz"), - file("\${test_data_directory}/md.nii.gz"), - file("\${test_data_directory}/frf.txt"), - [], - [] + file("\${test_data_directory}/md.nii.gz") + ] + } + ch_response = ch_split_test_data.responses.map{ + test_data_directory -> [ + [ id:'test' ], + file("\${test_data_directory}/DWIss1000-dir32.txt") ] } + input[0] = ch_dwi + .join(ch_mask) + .join(ch_metrics) + .join(ch_response) + .map{ it + [[], []] } """ } } @@ -189,24 +216,44 @@ nextflow_process { """ ch_split_test_data = LOAD_DATA.out.test_data_directory .branch{ - ssst: it.simpleName == "processing" - msmt: it.simpleName == "commit_amico" + msmt: it.simpleName == "DWIms1000-2000-dir32-60" + segmentation: it.simpleName == "segmentation" + dti: it.simpleName == "dti" + responses: it.simpleName == "responses" } - input[0] = ch_split_test_data.msmt.map{ + ch_dwi = ch_split_test_data.msmt.map{ test_data_directory -> [ - [ id:'test', single_end:false ], + [ id:'test' ], file("\${test_data_directory}/dwi.nii.gz"), file("\${test_data_directory}/dwi.bval"), - file("\${test_data_directory}/dwi.bvec"), - file("\${test_data_directory}/mask.nii.gz"), + file("\${test_data_directory}/dwi.bvec") + ] + } + ch_mask = ch_split_test_data.segmentation.map{ + test_data_directory -> [ + [ id:'test' ], + file("\${test_data_directory}/brainmask/brainmask.nii.gz") + ] + } + ch_metrics = ch_split_test_data.dti.map{ + test_data_directory -> [ + [ id:'test' ], file("\${test_data_directory}/fa.nii.gz"), - file("\${test_data_directory}/md.nii.gz"), - file("\${test_data_directory}/wm_frf.txt"), - file("\${test_data_directory}/gm_frf.txt"), - file("\${test_data_directory}/csf_frf.txt") - + file("\${test_data_directory}/md.nii.gz") + ] + } + ch_response = ch_split_test_data.responses.map{ + test_data_directory -> [ + [ id:'test' ], + file("\${test_data_directory}/DWIms1000-2000-dir32-60_wm.txt"), + file("\${test_data_directory}/DWIms1000-2000-dir32-60_gm.txt"), + file("\${test_data_directory}/DWIms1000-2000-dir32-60_csf.txt") ] } + input[0] = ch_dwi + .join(ch_mask) + .join(ch_metrics) + .join(ch_response) """ } } @@ -226,7 +273,8 @@ nextflow_process { file(process.out.afd_max.get(0).get(1)).name, file(process.out.afd_total.get(0).get(1)).name, file(process.out.afd_sum.get(0).get(1)).name, - file(process.out.nufo.get(0).get(1)).name).match() } + file(process.out.nufo.get(0).get(1)).name, + file(process.out.vent_mask.get(0).get(1)).name).match() } ) } diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap index 7c62f2a..19c210f 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap @@ -26,10 +26,9 @@ "0": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" + "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" ] ], "1": [ @@ -38,35 +37,32 @@ "10": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" + "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" ] ], "11": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,51303ca849b1eb26b9ccd0922f33cc6a" ] ], "12": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" + "test__nufo.nii.gz:md5,458bdae89a9918b2dfc13f154bde5e1b" ] ], "13": [ ], "14": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" ], "2": [ @@ -83,64 +79,57 @@ "6": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,e306caaad31fb77e6a068f8122651aef" ] ], "7": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,d65563027b11d49a0335856b924309f2" ] ], "8": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,44bb0df2cfac7efec9355b0533041f62" ] ], "9": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" + "test__afd_max.nii.gz:md5,9dbb9a0ce187b41a2a102fa3d3ca8ab7" ] ], "afd_max": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" + "test__afd_max.nii.gz:md5,9dbb9a0ce187b41a2a102fa3d3ca8ab7" ] ], "afd_sum": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,51303ca849b1eb26b9ccd0922f33cc6a" ] ], "afd_total": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" + "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" ] ], "csf_fodf": [ @@ -149,10 +138,9 @@ "fodf": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" + "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" ] ], "gm_fodf": [ @@ -161,44 +149,40 @@ "nufo": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" + "test__nufo.nii.gz:md5,458bdae89a9918b2dfc13f154bde5e1b" ] ], "peak_indices": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,44bb0df2cfac7efec9355b0533041f62" ] ], "peak_values": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,d65563027b11d49a0335856b924309f2" ] ], "peaks": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,e306caaad31fb77e6a068f8122651aef" ] ], "vent_mask": [ ], "versions": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" ], "vf": [ @@ -212,10 +196,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.10.0" }, - "timestamp": "2024-05-01T19:21:03.487368" + "timestamp": "2024-10-30T18:24:51.004240051" }, "reconst - fodf_no_metrics": { "content": [ @@ -223,10 +207,9 @@ "0": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" + "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" ] ], "1": [ @@ -245,7 +228,7 @@ ], "14": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" ], "2": [ @@ -286,10 +269,9 @@ "fodf": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" + "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" ] ], "gm_fodf": [ @@ -311,7 +293,7 @@ ], "versions": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" ], "vf": [ @@ -325,10 +307,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.10.0" }, - "timestamp": "2024-05-01T20:22:29.171158" + "timestamp": "2024-10-30T18:26:49.04678007" }, "reconst - fodf_with_shells": { "content": [ @@ -336,10 +318,9 @@ "0": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" + "test__fodf.nii.gz:md5,39a5a4a7f79ae7bfb408453887711fe2" ] ], "1": [ @@ -348,35 +329,32 @@ "10": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" + "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" ] ], "11": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,7662527e52c86a99610bd87394b314e8" ] ], "12": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" + "test__nufo.nii.gz:md5,a8c3883e9dc99a661998d8cae6f08051" ] ], "13": [ ], "14": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" ], "2": [ @@ -393,64 +371,57 @@ "6": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,2d4fad6ba2729dacf805aa7d056a765e" ] ], "7": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,5b614aae3e0b78c9ae9f7e4b85b157e3" ] ], "8": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,632878be6b5e01ad45f93553d955beeb" ] ], "9": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" + "test__afd_max.nii.gz:md5,61fb2106315ec2a20c4590b98d7e1a2c" ] ], "afd_max": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" + "test__afd_max.nii.gz:md5,61fb2106315ec2a20c4590b98d7e1a2c" ] ], "afd_sum": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" + "test__afd_sum.nii.gz:md5,7662527e52c86a99610bd87394b314e8" ] ], "afd_total": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" + "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" ] ], "csf_fodf": [ @@ -459,10 +430,9 @@ "fodf": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" + "test__fodf.nii.gz:md5,39a5a4a7f79ae7bfb408453887711fe2" ] ], "gm_fodf": [ @@ -471,44 +441,40 @@ "nufo": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" + "test__nufo.nii.gz:md5,a8c3883e9dc99a661998d8cae6f08051" ] ], "peak_indices": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" + "test__peak_indices.nii.gz:md5,632878be6b5e01ad45f93553d955beeb" ] ], "peak_values": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" + "test__peak_values.nii.gz:md5,5b614aae3e0b78c9ae9f7e4b85b157e3" ] ], "peaks": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" + "test__peaks.nii.gz:md5,2d4fad6ba2729dacf805aa7d056a765e" ] ], "vent_mask": [ ], "versions": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" ], "vf": [ @@ -522,10 +488,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.10.0" }, - "timestamp": "2024-05-01T20:38:04.916377" + "timestamp": "2024-10-30T18:26:01.188172837" }, "reconst - fodf_no_mask": { "content": [ diff --git a/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config b/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config index 791ab8c..d9bb854 100644 --- a/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config +++ b/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config @@ -18,6 +18,6 @@ process { ext.afd_total = true ext.afd_sum = true ext.nufo = true - ext.fodf_shells = "1000 2000 3000" + ext.fodf_shells = "1000 2000" } } From 22d4e109d3b7af59df7d3386bfed5bac8ebe50e2 Mon Sep 17 00:00:00 2001 From: medde Date: Wed, 30 Oct 2024 19:21:49 +0000 Subject: [PATCH 2/4] update reconst_meanfrf module --- modules/nf-neuro/reconst/meanfrf/main.nf | 6 +++--- modules/nf-neuro/reconst/meanfrf/meta.yml | 2 +- modules/nf-neuro/reconst/meanfrf/tests/main.nf.test | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/nf-neuro/reconst/meanfrf/main.nf b/modules/nf-neuro/reconst/meanfrf/main.nf index 75c0a07..5006be5 100644 --- a/modules/nf-neuro/reconst/meanfrf/main.nf +++ b/modules/nf-neuro/reconst/meanfrf/main.nf @@ -8,7 +8,7 @@ process RECONST_MEANFRF { 'scilus/scilus:2.0.2' }" input: - tuple path(frf_list) + path(frf_list) output: path("mean_frf.txt") , emit: meanfrf @@ -27,7 +27,7 @@ process RECONST_MEANFRF { cat <<-END_VERSIONS > versions.yml "${task.process}": - scilpy: 2.0.2 + scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2) END_VERSIONS """ @@ -39,7 +39,7 @@ process RECONST_MEANFRF { cat <<-END_VERSIONS > versions.yml "${task.process}": - scilpy: 2.0.2 + scilpy: \$(pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2) END_VERSIONS """ } diff --git a/modules/nf-neuro/reconst/meanfrf/meta.yml b/modules/nf-neuro/reconst/meanfrf/meta.yml index 19f5dd7..ac628bd 100644 --- a/modules/nf-neuro/reconst/meanfrf/meta.yml +++ b/modules/nf-neuro/reconst/meanfrf/meta.yml @@ -10,7 +10,7 @@ keywords: - Average tools: - - "Scilpy": + - "scilpy": description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox." homepage: "https://github.com/scilus/scilpy.git" diff --git a/modules/nf-neuro/reconst/meanfrf/tests/main.nf.test b/modules/nf-neuro/reconst/meanfrf/tests/main.nf.test index 8f1685c..e9f4856 100644 --- a/modules/nf-neuro/reconst/meanfrf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/meanfrf/tests/main.nf.test @@ -31,11 +31,11 @@ nextflow_process { process { """ input[0] = LOAD_DATA.out.test_data_directory - .map{ test_data_directory -> [[ + .map{ test_data_directory -> [ file("\${test_data_directory}/frf.txt"), file("\${test_data_directory}/mfrf.txt"), file("\${test_data_directory}/nfrf.txt") - ]]} + ]} """ } } From 43d2f895bfca7442197646466e5ca21a354f6de5 Mon Sep 17 00:00:00 2001 From: medde Date: Thu, 31 Oct 2024 19:57:59 +0000 Subject: [PATCH 3/4] update test modules fodf --- .../nf-neuro/reconst/fodf/tests/main.nf.test | 2 +- .../reconst/fodf/tests/main.nf.test.snap | 250 ++++++++++++++++-- 2 files changed, 236 insertions(+), 16 deletions(-) diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test b/modules/nf-neuro/reconst/fodf/tests/main.nf.test index 5b9b23b..9b64133 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test @@ -257,11 +257,11 @@ nextflow_process { """ } } - then { assertAll( { assert process.success }, { assert snapshot( + file(process.out.fodf.get(0).get(1)).name, file(process.out.wm_fodf.get(0).get(1)).name, file(process.out.gm_fodf.get(0).get(1)).name, file(process.out.csf_fodf.get(0).get(1)).name, diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap index 19c210f..a418e16 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap @@ -1,24 +1,244 @@ { "reconst - fodf_msmt": { "content": [ - "test__wm_fodf.nii.gz", - "test__gm_fodf.nii.gz", - "test__csf_fodf.nii.gz", - "test__vf.nii.gz", - "test__vf_rgb.nii.gz", - "test__peaks.nii.gz", - "test__peak_values.nii.gz", - "test__peak_indices.nii.gz", - "test__afd_max.nii.gz", - "test__afd_total.nii.gz", - "test__afd_sum.nii.gz", - "test__nufo.nii.gz" + { + "0": [ + [ + { + "id": "test" + }, + [ + "test__csf_fodf.nii.gz:md5,4d0f434a1bfa3ce541101c72d9e67dda", + "test__fodf.nii.gz:md5,b58a2696ec28accaad8b0255bcc0a758", + "test__gm_fodf.nii.gz:md5,bed2f8fcdf28852bfe87117aea67fd06", + "test__wm_fodf.nii.gz:md5,b58a2696ec28accaad8b0255bcc0a758" + ] + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test__wm_fodf.nii.gz:md5,b58a2696ec28accaad8b0255bcc0a758" + ] + ], + "10": [ + [ + { + "id": "test" + }, + "test__afd_total.nii.gz:md5,3eaed1ef8f7904202ce23ecae07b4ffc" + ] + ], + "11": [ + [ + { + "id": "test" + }, + "test__afd_sum.nii.gz:md5,74c60aa313d05df1dd184a509e3d45b6" + ] + ], + "12": [ + [ + { + "id": "test" + }, + "test__nufo.nii.gz:md5,30080f4210d95635ed8a0126bc5ea554" + ] + ], + "13": [ + + ], + "14": [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ], + "2": [ + [ + { + "id": "test" + }, + "test__gm_fodf.nii.gz:md5,bed2f8fcdf28852bfe87117aea67fd06" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "test__csf_fodf.nii.gz:md5,4d0f434a1bfa3ce541101c72d9e67dda" + ] + ], + "4": [ + [ + { + "id": "test" + }, + "test__vf.nii.gz:md5,5909660781eb3aa6b8dae816460576c8" + ] + ], + "5": [ + [ + { + "id": "test" + }, + "test__vf_rgb.nii.gz:md5,cc270c48617e814047ca33335ca67c36" + ] + ], + "6": [ + [ + { + "id": "test" + }, + "test__peaks.nii.gz:md5,a181a94b708ee8fdfb4a9cbee3fabe46" + ] + ], + "7": [ + [ + { + "id": "test" + }, + "test__peak_values.nii.gz:md5,54d55559dcc6910228c6ffb0b422ddb1" + ] + ], + "8": [ + [ + { + "id": "test" + }, + "test__peak_indices.nii.gz:md5,4f134a0f0a6f0b1c55365d4f9569b42e" + ] + ], + "9": [ + [ + { + "id": "test" + }, + "test__afd_max.nii.gz:md5,4d0482ab9f57b0869cd13e1c8ad150ae" + ] + ], + "afd_max": [ + [ + { + "id": "test" + }, + "test__afd_max.nii.gz:md5,4d0482ab9f57b0869cd13e1c8ad150ae" + ] + ], + "afd_sum": [ + [ + { + "id": "test" + }, + "test__afd_sum.nii.gz:md5,74c60aa313d05df1dd184a509e3d45b6" + ] + ], + "afd_total": [ + [ + { + "id": "test" + }, + "test__afd_total.nii.gz:md5,3eaed1ef8f7904202ce23ecae07b4ffc" + ] + ], + "csf_fodf": [ + [ + { + "id": "test" + }, + "test__csf_fodf.nii.gz:md5,4d0f434a1bfa3ce541101c72d9e67dda" + ] + ], + "fodf": [ + [ + { + "id": "test" + }, + [ + "test__csf_fodf.nii.gz:md5,4d0f434a1bfa3ce541101c72d9e67dda", + "test__fodf.nii.gz:md5,b58a2696ec28accaad8b0255bcc0a758", + "test__gm_fodf.nii.gz:md5,bed2f8fcdf28852bfe87117aea67fd06", + "test__wm_fodf.nii.gz:md5,b58a2696ec28accaad8b0255bcc0a758" + ] + ] + ], + "gm_fodf": [ + [ + { + "id": "test" + }, + "test__gm_fodf.nii.gz:md5,bed2f8fcdf28852bfe87117aea67fd06" + ] + ], + "nufo": [ + [ + { + "id": "test" + }, + "test__nufo.nii.gz:md5,30080f4210d95635ed8a0126bc5ea554" + ] + ], + "peak_indices": [ + [ + { + "id": "test" + }, + "test__peak_indices.nii.gz:md5,4f134a0f0a6f0b1c55365d4f9569b42e" + ] + ], + "peak_values": [ + [ + { + "id": "test" + }, + "test__peak_values.nii.gz:md5,54d55559dcc6910228c6ffb0b422ddb1" + ] + ], + "peaks": [ + [ + { + "id": "test" + }, + "test__peaks.nii.gz:md5,a181a94b708ee8fdfb4a9cbee3fabe46" + ] + ], + "vent_mask": [ + + ], + "versions": [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ], + "vf": [ + [ + { + "id": "test" + }, + "test__vf.nii.gz:md5,5909660781eb3aa6b8dae816460576c8" + ] + ], + "vf_rgb": [ + [ + { + "id": "test" + }, + "test__vf_rgb.nii.gz:md5,cc270c48617e814047ca33335ca67c36" + ] + ], + "wm_fodf": [ + [ + { + "id": "test" + }, + "test__wm_fodf.nii.gz:md5,b58a2696ec28accaad8b0255bcc0a758" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.10.0" }, - "timestamp": "2024-05-07T17:04:27.988184" + "timestamp": "2024-10-31T15:39:37.96014247" }, "reconst - fodf": { "content": [ From f609d8e850e71779e12409fada0f976d07a3efb8 Mon Sep 17 00:00:00 2001 From: medde Date: Thu, 31 Oct 2024 20:00:00 +0000 Subject: [PATCH 4/4] update test modules fodf add version --- modules/nf-neuro/reconst/fodf/tests/main.nf.test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test b/modules/nf-neuro/reconst/fodf/tests/main.nf.test index 9b64133..5827248 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test @@ -274,7 +274,8 @@ nextflow_process { file(process.out.afd_total.get(0).get(1)).name, file(process.out.afd_sum.get(0).get(1)).name, file(process.out.nufo.get(0).get(1)).name, - file(process.out.vent_mask.get(0).get(1)).name).match() } + file(process.out.vent_mask.get(0).get(1)).name, + file(process.out.versions.get(0).get(1)).name).match() } ) }