From 15b72c93d21fcaf7c366c6b3257ee54c9ae6352d Mon Sep 17 00:00:00 2001 From: medde Date: Wed, 30 Oct 2024 19:16:58 +0000 Subject: [PATCH 01/11] 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 02/11] 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 03/11] 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 04/11] 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() } ) } From 752339b489a09fae8c65b2b7ebbb30a51e458984 Mon Sep 17 00:00:00 2001 From: medde Date: Mon, 11 Nov 2024 22:06:49 +0000 Subject: [PATCH 05/11] fix main, tests and snap --- modules/nf-neuro/reconst/fodf/main.nf | 30 +- .../nf-neuro/reconst/fodf/tests/main.nf.test | 4 +- .../reconst/fodf/tests/main.nf.test.snap | 453 +----------------- .../reconst/fodf/tests/nextflow_msmt.config | 1 + 4 files changed, 42 insertions(+), 446 deletions(-) diff --git a/modules/nf-neuro/reconst/fodf/main.nf b/modules/nf-neuro/reconst/fodf/main.nf index ff5fe87..8e56439 100644 --- a/modules/nf-neuro/reconst/fodf/main.nf +++ b/modules/nf-neuro/reconst/fodf/main.nf @@ -11,21 +11,21 @@ process RECONST_FODF { tuple val(meta), path(dwi), path(bval), path(bvec), path(mask), path(fa), path(md), path(wm_frf), path(gm_frf), path(csf_frf) output: - tuple val(meta), path("*fodf.nii.gz") , emit: fodf, optional: true - tuple val(meta), path("*wm_fodf.nii.gz") , emit: wm_fodf, optional: true - tuple val(meta), path("*gm_fodf.nii.gz") , emit: gm_fodf, optional: true - tuple val(meta), path("*csf_fodf.nii.gz") , emit: csf_fodf, optional: true - tuple val(meta), path("*vf.nii.gz") , emit: vf, optional: true - tuple val(meta), path("*vf_rgb.nii.gz") , emit: vf_rgb, optional: true - tuple val(meta), path("*peaks.nii.gz") , emit: peaks, optional: true - tuple val(meta), path("*peak_values.nii.gz") , emit: peak_values, optional: true - tuple val(meta), path("*peak_indices.nii.gz") , emit: peak_indices, optional: true - tuple val(meta), path("*afd_max.nii.gz") , emit: afd_max, optional: true - tuple val(meta), path("*afd_total.nii.gz") , emit: afd_total, optional: true - tuple val(meta), path("*afd_sum.nii.gz") , emit: afd_sum, optional: true - tuple val(meta), path("*nufo.nii.gz") , emit: nufo, optional: true - tuple val(meta), path("*ventricles_mask.nii.gz"), emit: vent_mask, optional: true - path "versions.yml" , emit: versions + tuple val(meta), path("*__fodf.nii.gz") , emit: fodf, optional: true + tuple val(meta), path("*__wm_fodf.nii.gz") , emit: wm_fodf, optional: true + tuple val(meta), path("*__gm_fodf.nii.gz") , emit: gm_fodf, optional: true + tuple val(meta), path("*__csf_fodf.nii.gz") , emit: csf_fodf, optional: true + tuple val(meta), path("*__vf.nii.gz") , emit: vf, optional: true + tuple val(meta), path("*__vf_rgb.nii.gz") , emit: vf_rgb, optional: true + tuple val(meta), path("*__peaks.nii.gz") , emit: peaks, optional: true + tuple val(meta), path("*__peak_values.nii.gz") , emit: peak_values, optional: true + tuple val(meta), path("*__peak_indices.nii.gz") , emit: peak_indices, optional: true + tuple val(meta), path("*__afd_max.nii.gz") , emit: afd_max, optional: true + tuple val(meta), path("*__afd_total.nii.gz") , emit: afd_total, optional: true + tuple val(meta), path("*__afd_sum.nii.gz") , emit: afd_sum, optional: true + tuple val(meta), path("*__nufo.nii.gz") , emit: nufo, optional: true + tuple val(meta), path("*__ventricles_mask.nii.gz"), emit: vent_mask, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test b/modules/nf-neuro/reconst/fodf/tests/main.nf.test index 5827248..fe238d0 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test @@ -274,8 +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, - file(process.out.versions.get(0).get(1)).name).match() } + process.out.vent_mask, + process.out.versions).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 a418e16..afb0e8a 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap @@ -1,244 +1,36 @@ { "reconst - fodf_msmt": { "content": [ - { - "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" - ] + "test__fodf.nii.gz:md5,bfd557528121f9d819df042b7d55872c", + "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", + [ + [ + { + "id": "test" + }, + "test__ventricles_mask.nii.gz:md5,848409863defb87ed4e29e8e50e5dbc8" ] - } + ], + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { "nf-test": "0.9.0", "nextflow": "24.10.0" }, - "timestamp": "2024-10-31T15:39:37.96014247" + "timestamp": "2024-11-11T20:19:56.756618167" }, "reconst - fodf": { "content": [ @@ -712,202 +504,5 @@ "nextflow": "24.10.0" }, "timestamp": "2024-10-30T18:26:01.188172837" - }, - "reconst - fodf_no_mask": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,1c0aa14841e90acbdc048c6f0b117ce2" - ] - ], - "1": [ - - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_total.nii.gz:md5,713fae8f03e15434034c21dc647f4a20" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_sum.nii.gz:md5,e907c21b54410ad69531b58b2c6a5e5d" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test__nufo.nii.gz:md5,0e58d2571878aa13882f858cb4e572ad" - ] - ], - "13": [ - - ], - "14": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peaks.nii.gz:md5,3919c8117b3b800f52fc7319f523eb13" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_values.nii.gz:md5,e92f556fe1a926d088590dd2a7d970d6" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_indices.nii.gz:md5,ab4c1129a3ede2db638115e71258a288" - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_max.nii.gz:md5,db6d8bd847e08e2857173f572b46670a" - ] - ], - "afd_max": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_max.nii.gz:md5,db6d8bd847e08e2857173f572b46670a" - ] - ], - "afd_sum": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_sum.nii.gz:md5,e907c21b54410ad69531b58b2c6a5e5d" - ] - ], - "afd_total": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_total.nii.gz:md5,713fae8f03e15434034c21dc647f4a20" - ] - ], - "csf_fodf": [ - - ], - "fodf": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,1c0aa14841e90acbdc048c6f0b117ce2" - ] - ], - "gm_fodf": [ - - ], - "nufo": [ - [ - { - "id": "test", - "single_end": false - }, - "test__nufo.nii.gz:md5,0e58d2571878aa13882f858cb4e572ad" - ] - ], - "peak_indices": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_indices.nii.gz:md5,ab4c1129a3ede2db638115e71258a288" - ] - ], - "peak_values": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_values.nii.gz:md5,e92f556fe1a926d088590dd2a7d970d6" - ] - ], - "peaks": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peaks.nii.gz:md5,3919c8117b3b800f52fc7319f523eb13" - ] - ], - "vent_mask": [ - - ], - "versions": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "vf": [ - - ], - "vf_rgb": [ - - ], - "wm_fodf": [ - - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-01T19:50:32.073387" } } \ No newline at end of file diff --git a/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config b/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config index f070614..5cf18f8 100644 --- a/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config +++ b/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config @@ -24,5 +24,6 @@ process { ext.vf = true ext.vf_rgb = true ext.method = "msmt" + ext.ventricles_mask = true } } From 57c8934abfec36c77e5417a424ee286658fe0b93 Mon Sep 17 00:00:00 2001 From: medde Date: Wed, 13 Nov 2024 15:29:31 +0000 Subject: [PATCH 06/11] fix snap, test and config --- .../nf-neuro/reconst/fodf/tests/main.nf.test | 26 +- .../reconst/fodf/tests/main.nf.test.snap | 558 ++++-------------- .../reconst/fodf/tests/nextflow.config | 1 - .../reconst/fodf/tests/nextflow_msmt.config | 1 - .../fodf/tests/nextflow_no_metrics.config | 1 - .../reconst/fodf/tests/nextflow_shells.config | 1 - 6 files changed, 127 insertions(+), 461 deletions(-) diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test b/modules/nf-neuro/reconst/fodf/tests/main.nf.test index fe238d0..8d6d757 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test @@ -83,7 +83,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + niftiMD5SUM(process.out.fodf.get(0).get(1), 6), + process.out.peaks, + niftiMD5SUM(process.out.peak_values.get(0).get(1), 6), + file(process.out.peak_indices.get(0).get(1)).name, + process.out.afd_max, + process.out.afd_total, + process.out.afd_sum, + process.out.nufo, + process.out.versions).match()} ) } @@ -142,7 +151,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + niftiMD5SUM(process.out.fodf.get(0).get(1), 6), + process.out.peaks, + niftiMD5SUM(process.out.peak_values.get(0).get(1), 6), + file(process.out.peak_indices.get(0).get(1)).name, + process.out.afd_max, + process.out.afd_total, + process.out.afd_sum, + process.out.nufo, + process.out.versions).match()} ) } @@ -201,7 +219,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + niftiMD5SUM(process.out.fodf.get(0).get(1), 6), + process.out.versions).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 afb0e8a..723ceae 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap @@ -1,7 +1,7 @@ { "reconst - fodf_msmt": { "content": [ - "test__fodf.nii.gz:md5,bfd557528121f9d819df042b7d55872c", + "test__fodf.nii.gz", "test__wm_fodf.nii.gz", "test__gm_fodf.nii.gz", "test__csf_fodf.nii.gz", @@ -28,481 +28,131 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.10.0" + "nextflow": "24.04.4" }, - "timestamp": "2024-11-11T20:19:56.756618167" + "timestamp": "2024-11-12T20:01:53.02243736" }, "reconst - fodf": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" - ] - ], - "1": [ - - ], - "10": [ - [ - { - "id": "test" - }, - "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" - ] - ], - "11": [ - [ - { - "id": "test" - }, - "test__afd_sum.nii.gz:md5,51303ca849b1eb26b9ccd0922f33cc6a" - ] - ], - "12": [ - [ - { - "id": "test" - }, - "test__nufo.nii.gz:md5,458bdae89a9918b2dfc13f154bde5e1b" - ] - ], - "13": [ - - ], - "14": [ - "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - [ - { - "id": "test" - }, - "test__peaks.nii.gz:md5,e306caaad31fb77e6a068f8122651aef" - ] - ], - "7": [ - [ - { - "id": "test" - }, - "test__peak_values.nii.gz:md5,d65563027b11d49a0335856b924309f2" - ] - ], - "8": [ - [ - { - "id": "test" - }, - "test__peak_indices.nii.gz:md5,44bb0df2cfac7efec9355b0533041f62" - ] - ], - "9": [ - [ - { - "id": "test" - }, - "test__afd_max.nii.gz:md5,9dbb9a0ce187b41a2a102fa3d3ca8ab7" - ] - ], - "afd_max": [ - [ - { - "id": "test" - }, - "test__afd_max.nii.gz:md5,9dbb9a0ce187b41a2a102fa3d3ca8ab7" - ] - ], - "afd_sum": [ - [ - { - "id": "test" - }, - "test__afd_sum.nii.gz:md5,51303ca849b1eb26b9ccd0922f33cc6a" - ] - ], - "afd_total": [ - [ - { - "id": "test" - }, - "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" - ] - ], - "csf_fodf": [ - - ], - "fodf": [ - [ - { - "id": "test" - }, - "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" - ] - ], - "gm_fodf": [ - - ], - "nufo": [ - [ - { - "id": "test" - }, - "test__nufo.nii.gz:md5,458bdae89a9918b2dfc13f154bde5e1b" - ] - ], - "peak_indices": [ - [ - { - "id": "test" - }, - "test__peak_indices.nii.gz:md5,44bb0df2cfac7efec9355b0533041f62" - ] - ], - "peak_values": [ - [ - { - "id": "test" - }, - "test__peak_values.nii.gz:md5,d65563027b11d49a0335856b924309f2" - ] - ], - "peaks": [ - [ - { - "id": "test" - }, - "test__peaks.nii.gz:md5,e306caaad31fb77e6a068f8122651aef" - ] - ], - "vent_mask": [ - - ], - "versions": [ - "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" - ], - "vf": [ - - ], - "vf_rgb": [ - - ], - "wm_fodf": [ - + "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,24baf44d4f5d75e6156e7d448eb9393a", + [ + [ + { + "id": "test" + }, + "test__peaks.nii.gz:md5,e306caaad31fb77e6a068f8122651aef" + ] + ], + "test__peak_values.nii.gz:md5:header,f55799c7ffe93b1148a313f0aade0f5f,data,2449c61f84ea3f605c1787e9d83338d1", + "test__peak_indices.nii.gz", + [ + [ + { + "id": "test" + }, + "test__afd_max.nii.gz:md5,9dbb9a0ce187b41a2a102fa3d3ca8ab7" + ] + ], + [ + [ + { + "id": "test" + }, + "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" ] - } + ], + [ + [ + { + "id": "test" + }, + "test__afd_sum.nii.gz:md5,51303ca849b1eb26b9ccd0922f33cc6a" + ] + ], + [ + [ + { + "id": "test" + }, + "test__nufo.nii.gz:md5,458bdae89a9918b2dfc13f154bde5e1b" + ] + ], + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.10.0" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-30T18:24:51.004240051" + "timestamp": "2024-11-12T22:13:00.56824277" }, "reconst - fodf_no_metrics": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" - ] - ], - "1": [ - - ], - "10": [ - - ], - "11": [ - - ], - "12": [ - - ], - "13": [ - - ], - "14": [ - "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - - ], - "7": [ - - ], - "8": [ - - ], - "9": [ - - ], - "afd_max": [ - - ], - "afd_sum": [ - - ], - "afd_total": [ - - ], - "csf_fodf": [ - - ], - "fodf": [ - [ - { - "id": "test" - }, - "test__fodf.nii.gz:md5,4ff8f1081dec638bb70fe3a12e823612" - ] - ], - "gm_fodf": [ - - ], - "nufo": [ - - ], - "peak_indices": [ - - ], - "peak_values": [ - - ], - "peaks": [ - - ], - "vent_mask": [ - - ], - "versions": [ - "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" - ], - "vf": [ - - ], - "vf_rgb": [ - - ], - "wm_fodf": [ - - ] - } + "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,24baf44d4f5d75e6156e7d448eb9393a", + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.10.0" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-30T18:26:49.04678007" + "timestamp": "2024-11-12T22:14:25.926392952" }, "reconst - fodf_with_shells": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test__fodf.nii.gz:md5,39a5a4a7f79ae7bfb408453887711fe2" - ] - ], - "1": [ - - ], - "10": [ - [ - { - "id": "test" - }, - "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" - ] - ], - "11": [ - [ - { - "id": "test" - }, - "test__afd_sum.nii.gz:md5,7662527e52c86a99610bd87394b314e8" - ] - ], - "12": [ - [ - { - "id": "test" - }, - "test__nufo.nii.gz:md5,a8c3883e9dc99a661998d8cae6f08051" - ] - ], - "13": [ - - ], - "14": [ - "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - [ - { - "id": "test" - }, - "test__peaks.nii.gz:md5,2d4fad6ba2729dacf805aa7d056a765e" - ] - ], - "7": [ - [ - { - "id": "test" - }, - "test__peak_values.nii.gz:md5,5b614aae3e0b78c9ae9f7e4b85b157e3" - ] - ], - "8": [ - [ - { - "id": "test" - }, - "test__peak_indices.nii.gz:md5,632878be6b5e01ad45f93553d955beeb" - ] - ], - "9": [ - [ - { - "id": "test" - }, - "test__afd_max.nii.gz:md5,61fb2106315ec2a20c4590b98d7e1a2c" - ] - ], - "afd_max": [ - [ - { - "id": "test" - }, - "test__afd_max.nii.gz:md5,61fb2106315ec2a20c4590b98d7e1a2c" - ] - ], - "afd_sum": [ - [ - { - "id": "test" - }, - "test__afd_sum.nii.gz:md5,7662527e52c86a99610bd87394b314e8" - ] - ], - "afd_total": [ - [ - { - "id": "test" - }, - "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" - ] - ], - "csf_fodf": [ - - ], - "fodf": [ - [ - { - "id": "test" - }, - "test__fodf.nii.gz:md5,39a5a4a7f79ae7bfb408453887711fe2" - ] - ], - "gm_fodf": [ - - ], - "nufo": [ - [ - { - "id": "test" - }, - "test__nufo.nii.gz:md5,a8c3883e9dc99a661998d8cae6f08051" - ] - ], - "peak_indices": [ - [ - { - "id": "test" - }, - "test__peak_indices.nii.gz:md5,632878be6b5e01ad45f93553d955beeb" - ] - ], - "peak_values": [ - [ - { - "id": "test" - }, - "test__peak_values.nii.gz:md5,5b614aae3e0b78c9ae9f7e4b85b157e3" - ] - ], - "peaks": [ - [ - { - "id": "test" - }, - "test__peaks.nii.gz:md5,2d4fad6ba2729dacf805aa7d056a765e" - ] - ], - "vent_mask": [ - - ], - "versions": [ - "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" - ], - "vf": [ - - ], - "vf_rgb": [ - - ], - "wm_fodf": [ - + "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,f25eaf88162605407297dfad70c913f2", + [ + [ + { + "id": "test" + }, + "test__peaks.nii.gz:md5,1fa02ad6627544bf276862f8168648ff" + ] + ], + "test__peak_values.nii.gz:md5:header,f55799c7ffe93b1148a313f0aade0f5f,data,59ed163b180b612419ec754b08da98eb", + "test__peak_indices.nii.gz", + [ + [ + { + "id": "test" + }, + "test__afd_max.nii.gz:md5,61fb2106315ec2a20c4590b98d7e1a2c" + ] + ], + [ + [ + { + "id": "test" + }, + "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" + ] + ], + [ + [ + { + "id": "test" + }, + "test__afd_sum.nii.gz:md5,7662527e52c86a99610bd87394b314e8" + ] + ], + [ + [ + { + "id": "test" + }, + "test__nufo.nii.gz:md5,a8c3883e9dc99a661998d8cae6f08051" ] - } + ], + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.10.0" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-30T18:26:01.188172837" + "timestamp": "2024-11-12T22:13:49.99416081" } -} \ No newline at end of file +} diff --git a/modules/nf-neuro/reconst/fodf/tests/nextflow.config b/modules/nf-neuro/reconst/fodf/tests/nextflow.config index d297175..f9c0329 100644 --- a/modules/nf-neuro/reconst/fodf/tests/nextflow.config +++ b/modules/nf-neuro/reconst/fodf/tests/nextflow.config @@ -10,7 +10,6 @@ process { ext.md_threshold = 0.003 ext.relative_threshold = 0.1 ext.absolute_peaks = true - ext.processes = 4 ext.peaks = true ext.peak_values = true ext.peak_indices = true diff --git a/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config b/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config index 5cf18f8..9fe6d30 100644 --- a/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config +++ b/modules/nf-neuro/reconst/fodf/tests/nextflow_msmt.config @@ -10,7 +10,6 @@ process { ext.md_threshold = 0.003 ext.relative_threshold = 0.1 ext.absolute_peaks = true - ext.processes = 4 ext.peaks = true ext.peak_values = true ext.peak_indices = true diff --git a/modules/nf-neuro/reconst/fodf/tests/nextflow_no_metrics.config b/modules/nf-neuro/reconst/fodf/tests/nextflow_no_metrics.config index 400ad15..cd4c275 100644 --- a/modules/nf-neuro/reconst/fodf/tests/nextflow_no_metrics.config +++ b/modules/nf-neuro/reconst/fodf/tests/nextflow_no_metrics.config @@ -10,7 +10,6 @@ process { ext.md_threshold = 0.003 ext.relative_threshold = 0.1 ext.absolute_peaks = true - ext.processes = 4 ext.peaks = false ext.peak_values = false ext.peak_indices = false diff --git a/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config b/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config index d9bb854..79958ef 100644 --- a/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config +++ b/modules/nf-neuro/reconst/fodf/tests/nextflow_shells.config @@ -10,7 +10,6 @@ process { ext.md_threshold = 0.003 ext.relative_threshold = 0.1 ext.absolute_peaks = true - ext.processes = 4 ext.peaks = true ext.peak_values = true ext.peak_indices = true From ed82fb6034c1f37f6369004368cae0411247db52 Mon Sep 17 00:00:00 2001 From: medde Date: Wed, 13 Nov 2024 21:11:17 +0000 Subject: [PATCH 07/11] update test_component.yml --- .github/workflows/test_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 30d8612..dc913b6 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -97,7 +97,7 @@ jobs: - name: Fix nf-test launching jvm with too much memory run: | - sed -i 's/-Xmx10G//' $(which nf-test) + sed -i 's/-Xmx10g/-Xmx4g/' $(which nf-test) - name: Compute test run UID uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 From 988fc395d1e2a2a662f9ec4427ef6994fcfef26b Mon Sep 17 00:00:00 2001 From: medde Date: Wed, 13 Nov 2024 21:26:56 +0000 Subject: [PATCH 08/11] fix size format --- .github/workflows/test_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index dc913b6..7acbb05 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -97,7 +97,7 @@ jobs: - name: Fix nf-test launching jvm with too much memory run: | - sed -i 's/-Xmx10g/-Xmx4g/' $(which nf-test) + sed -i 's/-Xmx10g/-Xmx4G/' $(which nf-test) - name: Compute test run UID uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 From c96900b56d034d79686f1fba23919bf73ef1752d Mon Sep 17 00:00:00 2001 From: medde Date: Wed, 13 Nov 2024 21:27:30 +0000 Subject: [PATCH 09/11] fix size format --- .github/workflows/test_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 7acbb05..c4ec993 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -97,7 +97,7 @@ jobs: - name: Fix nf-test launching jvm with too much memory run: | - sed -i 's/-Xmx10g/-Xmx4G/' $(which nf-test) + sed -i 's/-Xmx10G/-Xmx4G/' $(which nf-test) - name: Compute test run UID uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 From 6dcdb072efe26b179ba7b7a837faa7bb8e9bbf6b Mon Sep 17 00:00:00 2001 From: medde Date: Thu, 14 Nov 2024 19:55:30 +0000 Subject: [PATCH 10/11] fix test, snap --- .../nf-neuro/reconst/fodf/tests/main.nf.test | 8 ++-- .../reconst/fodf/tests/main.nf.test.snap | 40 +++---------------- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test b/modules/nf-neuro/reconst/fodf/tests/main.nf.test index 8d6d757..488045b 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test @@ -85,10 +85,10 @@ nextflow_process { { assert process.success }, { assert snapshot( niftiMD5SUM(process.out.fodf.get(0).get(1), 6), - process.out.peaks, + file(process.out.peaks.get(0).get(1)).name, niftiMD5SUM(process.out.peak_values.get(0).get(1), 6), file(process.out.peak_indices.get(0).get(1)).name, - process.out.afd_max, + niftiMD5SUM(process.out.afd_max.get(0).get(1), 6), process.out.afd_total, process.out.afd_sum, process.out.nufo, @@ -153,10 +153,10 @@ nextflow_process { { assert process.success }, { assert snapshot( niftiMD5SUM(process.out.fodf.get(0).get(1), 6), - process.out.peaks, + file(process.out.peaks.get(0).get(1)).name, niftiMD5SUM(process.out.peak_values.get(0).get(1), 6), file(process.out.peak_indices.get(0).get(1)).name, - process.out.afd_max, + niftiMD5SUM(process.out.afd_max.get(0).get(1), 6), process.out.afd_total, process.out.afd_sum, process.out.nufo, 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 723ceae..0900e75 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap @@ -35,24 +35,10 @@ "reconst - fodf": { "content": [ "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,24baf44d4f5d75e6156e7d448eb9393a", - [ - [ - { - "id": "test" - }, - "test__peaks.nii.gz:md5,e306caaad31fb77e6a068f8122651aef" - ] - ], + "test__peaks.nii.gz", "test__peak_values.nii.gz:md5:header,f55799c7ffe93b1148a313f0aade0f5f,data,2449c61f84ea3f605c1787e9d83338d1", "test__peak_indices.nii.gz", - [ - [ - { - "id": "test" - }, - "test__afd_max.nii.gz:md5,9dbb9a0ce187b41a2a102fa3d3ca8ab7" - ] - ], + "test__afd_max.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,e12b752beb43fa9e7f238ee4799bdfd8", [ [ { @@ -85,7 +71,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-11-12T22:13:00.56824277" + "timestamp": "2024-11-14T18:13:16.224103027" }, "reconst - fodf_no_metrics": { "content": [ @@ -103,24 +89,10 @@ "reconst - fodf_with_shells": { "content": [ "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,f25eaf88162605407297dfad70c913f2", - [ - [ - { - "id": "test" - }, - "test__peaks.nii.gz:md5,1fa02ad6627544bf276862f8168648ff" - ] - ], + "test__peaks.nii.gz", "test__peak_values.nii.gz:md5:header,f55799c7ffe93b1148a313f0aade0f5f,data,59ed163b180b612419ec754b08da98eb", "test__peak_indices.nii.gz", - [ - [ - { - "id": "test" - }, - "test__afd_max.nii.gz:md5,61fb2106315ec2a20c4590b98d7e1a2c" - ] - ], + "test__afd_max.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,92589ae2cd489340eb1ba25771f8d053", [ [ { @@ -153,6 +125,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-11-12T22:13:49.99416081" + "timestamp": "2024-11-14T18:14:00.521112716" } } From f5f828913f220527a965d5aebe09578180db3396 Mon Sep 17 00:00:00 2001 From: medde Date: Fri, 15 Nov 2024 18:40:08 +0000 Subject: [PATCH 11/11] fix snap, test check snap --- modules/nf-neuro/reconst/fodf/tests/main.nf.test | 8 ++++---- .../reconst/fodf/tests/main.nf.test.snap | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/nf-neuro/reconst/fodf/tests/main.nf.test b/modules/nf-neuro/reconst/fodf/tests/main.nf.test index 488045b..44679ed 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test @@ -88,9 +88,9 @@ nextflow_process { file(process.out.peaks.get(0).get(1)).name, niftiMD5SUM(process.out.peak_values.get(0).get(1), 6), file(process.out.peak_indices.get(0).get(1)).name, - niftiMD5SUM(process.out.afd_max.get(0).get(1), 6), + process.out.afd_max, process.out.afd_total, - process.out.afd_sum, + niftiMD5SUM(process.out.afd_sum.get(0).get(1), 6), process.out.nufo, process.out.versions).match()} ) @@ -156,9 +156,9 @@ nextflow_process { file(process.out.peaks.get(0).get(1)).name, niftiMD5SUM(process.out.peak_values.get(0).get(1), 6), file(process.out.peak_indices.get(0).get(1)).name, - niftiMD5SUM(process.out.afd_max.get(0).get(1), 6), + process.out.afd_max, process.out.afd_total, - process.out.afd_sum, + niftiMD5SUM(process.out.afd_sum.get(0).get(1), 6), process.out.nufo, process.out.versions).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 0900e75..62f4d2d 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap @@ -38,13 +38,12 @@ "test__peaks.nii.gz", "test__peak_values.nii.gz:md5:header,f55799c7ffe93b1148a313f0aade0f5f,data,2449c61f84ea3f605c1787e9d83338d1", "test__peak_indices.nii.gz", - "test__afd_max.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,e12b752beb43fa9e7f238ee4799bdfd8", [ [ { "id": "test" }, - "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" + "test__afd_max.nii.gz:md5,9dbb9a0ce187b41a2a102fa3d3ca8ab7" ] ], [ @@ -52,9 +51,10 @@ { "id": "test" }, - "test__afd_sum.nii.gz:md5,51303ca849b1eb26b9ccd0922f33cc6a" + "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" ] ], + "test__afd_sum.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,ee3aff13954be703a5cf4ab604c8eafa", [ [ { @@ -71,7 +71,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-11-14T18:13:16.224103027" + "timestamp": "2024-11-14T20:46:21.956053982" }, "reconst - fodf_no_metrics": { "content": [ @@ -92,13 +92,12 @@ "test__peaks.nii.gz", "test__peak_values.nii.gz:md5:header,f55799c7ffe93b1148a313f0aade0f5f,data,59ed163b180b612419ec754b08da98eb", "test__peak_indices.nii.gz", - "test__afd_max.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,92589ae2cd489340eb1ba25771f8d053", [ [ { "id": "test" }, - "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" + "test__afd_max.nii.gz:md5,61fb2106315ec2a20c4590b98d7e1a2c" ] ], [ @@ -106,9 +105,10 @@ { "id": "test" }, - "test__afd_sum.nii.gz:md5,7662527e52c86a99610bd87394b314e8" + "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" ] ], + "test__afd_sum.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,42a8407c3b6e9f743ed01e625c209c03", [ [ { @@ -125,6 +125,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-11-14T18:14:00.521112716" + "timestamp": "2024-11-14T20:47:10.242722801" } }