diff --git a/modules/nf-neuro/bundle/recognize/main.nf b/modules/nf-neuro/bundle/recognize/main.nf index bec2b29..627785a 100644 --- a/modules/nf-neuro/bundle/recognize/main.nf +++ b/modules/nf-neuro/bundle/recognize/main.nf @@ -1,10 +1,10 @@ process BUNDLE_RECOGNIZE { 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(tractograms), path(transform), path(config), path(directory) diff --git a/subworkflows/nf-neuro/bundle_seg/main.nf b/subworkflows/nf-neuro/bundle_seg/main.nf index 5850200..68b3432 100644 --- a/subworkflows/nf-neuro/bundle_seg/main.nf +++ b/subworkflows/nf-neuro/bundle_seg/main.nf @@ -52,17 +52,16 @@ workflow BUNDLE_SEG { take: ch_fa // channel: [ val(meta), [ fa ] ] ch_tractogram // channel: [ val(meta), [ tractogram ] ] - atlas_directory // channel: [ directory ], optional: True main: ch_versions = Channel.empty() // ** Setting up Atlas reference channels. ** // - if ( atlas_directory ) { - atlas_anat = Channel.fromPath("$atlas_directory/*.{nii,nii.gz}") - atlas_config = Channel.fromPath("$atlas_directory/*.json") - atlas_directory = Channel.fromPath("$atlas_directory/atlas/") + if ( params.atlas_directory ) { + atlas_anat = Channel.fromPath("$atlas_directory/atlas/mni_masked.nii.gz") + atlas_config = Channel.fromPath("$atlas_directory/config/config_fss_1.json") + atlas_average = Channel.fromPath("$atlas_directory/atlas/atlas/") } else { fetch_bundleseg_atlas( "https://zenodo.org/records/10103446/files/atlas.zip?download=1", @@ -70,7 +69,7 @@ workflow BUNDLE_SEG { "${workflow.workDir}/") atlas_anat = Channel.fromPath("$workflow.workDir/atlas/mni_masked.nii.gz") atlas_config = Channel.fromPath("$workflow.workDir/config/config_fss_1.json") - atlas_directory = Channel.fromPath("$workflow.workDir/atlas/atlas/") + atlas_average = Channel.fromPath("$workflow.workDir/atlas/atlas/") } // ** Register the atlas to subject's space. Set up atlas file as moving image ** // @@ -84,7 +83,7 @@ workflow BUNDLE_SEG { // ** Perform bundle recognition and segmentation ** // ch_recognize_bundle = ch_tractogram.join(REGISTRATION_ANTS.out.transfo_image) .combine(atlas_config) - .combine(atlas_directory) + .combine(atlas_average) BUNDLE_RECOGNIZE ( ch_recognize_bundle ) ch_versions = ch_versions.mix(BUNDLE_RECOGNIZE.out.versions.first()) diff --git a/subworkflows/nf-neuro/bundle_seg/tests/main.nf.test b/subworkflows/nf-neuro/bundle_seg/tests/main.nf.test index 46e1174..4ab6273 100644 --- a/subworkflows/nf-neuro/bundle_seg/tests/main.nf.test +++ b/subworkflows/nf-neuro/bundle_seg/tests/main.nf.test @@ -43,7 +43,6 @@ nextflow_workflow { file("\${test_data_directory}/pft.trk") ] } - input[2] = [] """ } }