diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 30d8612..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//' $(which nf-test) + sed -i 's/-Xmx10G/-Xmx4G/' $(which nf-test) - name: Compute test run UID uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 diff --git a/modules/nf-neuro/reconst/fodf/main.nf b/modules/nf-neuro/reconst/fodf/main.nf index 7deb635..8e56439 100644 --- a/modules/nf-neuro/reconst/fodf/main.nf +++ b/modules/nf-neuro/reconst/fodf/main.nf @@ -1,31 +1,31 @@ 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) 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 @@ -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..44679ed 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 + [[], []] } """ } } @@ -57,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), + 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, + process.out.afd_total, + niftiMD5SUM(process.out.afd_sum.get(0).get(1), 6), + process.out.nufo, + process.out.versions).match()} ) } @@ -72,62 +107,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 + [[], []] } """ } } @@ -135,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), + 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, + process.out.afd_total, + niftiMD5SUM(process.out.afd_sum.get(0).get(1), 6), + process.out.nufo, + process.out.versions).match()} ) } @@ -150,23 +175,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 + [[], []] } """ } } @@ -174,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()} ) } @@ -189,32 +236,52 @@ 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) """ } } - 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, @@ -226,7 +293,9 @@ 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, + 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 7c62f2a..62f4d2d 100644 --- a/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap +++ b/modules/nf-neuro/reconst/fodf/tests/main.nf.test.snap @@ -1,6 +1,7 @@ { "reconst - fodf_msmt": { "content": [ + "test__fodf.nii.gz", "test__wm_fodf.nii.gz", "test__gm_fodf.nii.gz", "test__csf_fodf.nii.gz", @@ -12,716 +13,118 @@ "test__afd_max.nii.gz", "test__afd_total.nii.gz", "test__afd_sum.nii.gz", - "test__nufo.nii.gz" + "test__nufo.nii.gz", + [ + [ + { + "id": "test" + }, + "test__ventricles_mask.nii.gz:md5,848409863defb87ed4e29e8e50e5dbc8" + ] + ], + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-07T17:04:27.988184" + "timestamp": "2024-11-12T20:01:53.02243736" }, "reconst - fodf": { "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" - ] - ], - "1": [ - - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" - ] - ], - "13": [ - - ], - "14": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" - ] - ], - "afd_max": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" - ] - ], - "afd_sum": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" - ] - ], - "afd_total": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" - ] - ], - "csf_fodf": [ - - ], - "fodf": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" - ] - ], - "gm_fodf": [ - - ], - "nufo": [ - [ - { - "id": "test", - "single_end": false - }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" - ] - ], - "peak_indices": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" - ] - ], - "peak_values": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" - ] - ], - "peaks": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" - ] - ], - "vent_mask": [ - - ], - "versions": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "vf": [ - - ], - "vf_rgb": [ - - ], - "wm_fodf": [ - + "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,24baf44d4f5d75e6156e7d448eb9393a", + "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" + ] + ], + [ + [ + { + "id": "test" + }, + "test__afd_total.nii.gz:md5,01a6fc27716a79cb57e1faed7ff8297b" ] - } + ], + "test__afd_sum.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,ee3aff13954be703a5cf4ab604c8eafa", + [ + [ + { + "id": "test" + }, + "test__nufo.nii.gz:md5,458bdae89a9918b2dfc13f154bde5e1b" + ] + ], + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-01T19:21:03.487368" + "timestamp": "2024-11-14T20:46:21.956053982" }, "reconst - fodf_no_metrics": { "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" - ] - ], - "1": [ - - ], - "10": [ - - ], - "11": [ - - ], - "12": [ - - ], - "13": [ - - ], - "14": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - - ], - "7": [ - - ], - "8": [ - - ], - "9": [ - - ], - "afd_max": [ - - ], - "afd_sum": [ - - ], - "afd_total": [ - - ], - "csf_fodf": [ - - ], - "fodf": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" - ] - ], - "gm_fodf": [ - - ], - "nufo": [ - - ], - "peak_indices": [ - - ], - "peak_values": [ - - ], - "peaks": [ - - ], - "vent_mask": [ - - ], - "versions": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "vf": [ - - ], - "vf_rgb": [ - - ], - "wm_fodf": [ - - ] - } + "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,24baf44d4f5d75e6156e7d448eb9393a", + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-01T20:22:29.171158" + "timestamp": "2024-11-12T22:14:25.926392952" }, "reconst - fodf_with_shells": { "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" - ] - ], - "1": [ - - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" - ] - ], - "13": [ - - ], - "14": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" - ] - ], - "afd_max": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_max.nii.gz:md5,96b7a2dbab6306ca053b45bfad21be55" - ] - ], - "afd_sum": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_sum.nii.gz:md5,a849e3eb8c67cc176e88daca01669eef" - ] - ], - "afd_total": [ - [ - { - "id": "test", - "single_end": false - }, - "test__afd_total.nii.gz:md5,9bac465d58b8662c3dce2c4937300a5a" - ] - ], - "csf_fodf": [ - - ], - "fodf": [ - [ - { - "id": "test", - "single_end": false - }, - "test__fodf.nii.gz:md5,c45f0391a462d358930809502dd2da15" - ] - ], - "gm_fodf": [ - - ], - "nufo": [ - [ - { - "id": "test", - "single_end": false - }, - "test__nufo.nii.gz:md5,711f0ee8d01e71166099ffdf4c684b5f" - ] - ], - "peak_indices": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_indices.nii.gz:md5,d39ad843a7b86ac7042c44b87356e68b" - ] - ], - "peak_values": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peak_values.nii.gz:md5,4fd4a44c18544413c0e9bb672e60f709" - ] - ], - "peaks": [ - [ - { - "id": "test", - "single_end": false - }, - "test__peaks.nii.gz:md5,fbc8af94bce991a6ebe3bfb837d39a52" - ] - ], - "vent_mask": [ - - ], - "versions": [ - "versions.yml:md5,8f5a73278d63aac3bf8073c5d0ef488b" - ], - "vf": [ - - ], - "vf_rgb": [ - - ], - "wm_fodf": [ - + "test__fodf.nii.gz:md5:header,b6ba80bf9e8830bc10f9b8b091b9b34b,data,f25eaf88162605407297dfad70c913f2", + "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" ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-01T20:38:04.916377" - }, - "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": [ - + ], + [ + [ + { + "id": "test" + }, + "test__afd_total.nii.gz:md5,31edb24c528419fcb8f6f423479e8cd9" + ] + ], + "test__afd_sum.nii.gz:md5:header,c9e720b9a8acfe45a617e6486ebb8de0,data,42a8407c3b6e9f743ed01e625c209c03", + [ + [ + { + "id": "test" + }, + "test__nufo.nii.gz:md5,a8c3883e9dc99a661998d8cae6f08051" ] - } + ], + [ + "versions.yml:md5,f80e57f2c24a4a1fd403de1d132ec6e7" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-01T19:50:32.073387" + "timestamp": "2024-11-14T20:47:10.242722801" } -} \ 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 f070614..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 @@ -24,5 +23,6 @@ process { ext.vf = true ext.vf_rgb = true ext.method = "msmt" + ext.ventricles_mask = 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 791ab8c..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 @@ -18,6 +17,6 @@ process { ext.afd_total = true ext.afd_sum = true ext.nufo = true - ext.fodf_shells = "1000 2000 3000" + ext.fodf_shells = "1000 2000" } } 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") - ]]} + ]} """ } }