diff --git a/conf/modules.config b/conf/modules.config index 331f68e..818c61e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -356,6 +356,8 @@ process { withName: 'NF_PEDIATRIC:PEDIATRIC:PREPROC_DWI:NORMALIZE_DWI' { ext.fa_mask_threshold = params.dwi_normalize_fa_mask_threshold ext.dwi_shell_tolerance = params.dwi_normalize_shell_tolerance + ext.dti_shells = params.dti_shells + ext.max_dti_shell_value = params.dti_max_shell_value publishDir = [ path: { "${params.outdir}/${meta.id}/dwi/"}, mode: params.publish_dir_mode, @@ -458,6 +460,7 @@ process { ext.dwi_shell_tolerance = params.dti_shell_tolerance ext.max_dti_shell_value = params.dti_max_shell_value ext.b0_thr_extract_b0 = params.dti_b0_threshold + ext.dti_shells = params.dti_shells // ** DTI metrics to output ** // ext.ad = true @@ -502,6 +505,8 @@ process { ext.dwi_shell_tolerance = params.frf_dwi_shell_tolerance ext.max_dti_shell_value = params.frf_max_dti_shell_value ext.min_fodf_shell_value = params.frf_min_fodf_shell_value + ext.fodf_shells = params.fodf_shells + ext.dti_shells = params.dti_shells ext.b0_thr_extract_b0 = params.frf_b0_threshold ext.set_method = params.frf_set_method ext.set_frf = params.frf_set_frf @@ -522,6 +527,7 @@ process { withName: 'NF_PEDIATRIC:PEDIATRIC:RECONST_FODF' { ext.dwi_shell_tolerance = params.fodf_shell_tolerance ext.min_fodf_shell_value = params.fodf_min_fodf_shell_value + ext.fodf_shells = params.fodf_shells ext.b0_thr_extract_b0 = params.fodf_b0_threshold ext.sh_order = params.fodf_sh_order ext.sh_basis = params.fodf_sh_basis diff --git a/nextflow.config b/nextflow.config index dd302d2..651e167 100644 --- a/nextflow.config +++ b/nextflow.config @@ -103,6 +103,7 @@ params { dti_shell_tolerance = 50 dti_max_shell_value = 1500 dti_b0_threshold = 20 + dti_shells = null // FRF frf_fa = 0.7 @@ -121,6 +122,7 @@ params { // FODF Metrics fodf_shell_tolerance = 50 fodf_min_fodf_shell_value = 100 + fodf_shells = null fodf_b0_threshold = 20 fodf_sh_order = 8 fodf_sh_basis = "descoteaux07" diff --git a/nextflow_schema.json b/nextflow_schema.json index 0f666b7..1d20aab 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -406,6 +406,7 @@ "fa_icon": "fas fa-brain", "description": "Options for DTI processing.", "help_text": "These options are used to configure the DTI processing steps in the pipeline. You can use these options to customise the behaviour of the DTI processing steps.", + "required": ["dti_shells"], "properties": { "dti_shell_tolerance": { "type": "integer", @@ -419,7 +420,7 @@ "description": "Maximum shell value used in the DTI processing step.", "fa_icon": "fas fa-brain", "default": 1500, - "hidden": false + "hidden": true }, "dti_b0_threshold": { "type": "integer", @@ -427,6 +428,12 @@ "fa_icon": "fas fa-brain", "default": 20, "hidden": true + }, + "dti_shells": { + "type": "string", + "description": "Shells used in the DTI processing step.", + "fa_icon": "fas fa-brain", + "hidden": false } } }, @@ -477,14 +484,14 @@ "description": "Maximum DTI shell value used.", "fa_icon": "fas fa-brain", "default": 1500, - "hidden": false + "hidden": true }, "frf_min_fodf_shell_value": { "type": "integer", "description": "Minimum FODF shell value used.", "fa_icon": "fas fa-brain", "default": 100, - "hidden": false + "hidden": true }, "frf_b0_threshold": { "type": "integer", @@ -530,6 +537,7 @@ "fa_icon": "fas fa-brain", "description": "Options for FODF processing.", "help_text": "These options are used to configure the FODF processing steps in the pipeline. You can use these options to customise the behaviour of the FODF processing steps.", + "required": ["fodf_shells"], "properties": { "fodf_shell_tolerance": { "type": "integer", @@ -543,6 +551,12 @@ "description": "Minimum FODF shell value used.", "fa_icon": "fas fa-brain", "default": 100, + "hidden": true + }, + "fodf_shells": { + "type": "string", + "description": "Shells used in the FODF processing step.", + "fa_icon": "fas fa-brain", "hidden": false }, "fodf_b0_threshold": { diff --git a/subworkflows/nf-neuro/preproc_t1/main.nf b/subworkflows/nf-neuro/preproc_t1/main.nf index 5ca4ec9..a77c95b 100644 --- a/subworkflows/nf-neuro/preproc_t1/main.nf +++ b/subworkflows/nf-neuro/preproc_t1/main.nf @@ -92,6 +92,7 @@ workflow PREPROC_T1 { ch_bet = IMAGE_RESAMPLE.out.image .join(ch_template) .join(ch_probability_map) + .map{ it + [[], []] } BETCROP_ANTSBET ( ch_bet ) ch_versions = ch_versions.mix(BETCROP_ANTSBET.out.versions.first()) diff --git a/subworkflows/nf-neuro/preproc_t1/preproc_t1.diff b/subworkflows/nf-neuro/preproc_t1/preproc_t1.diff index dc38d6a..7e25254 100644 --- a/subworkflows/nf-neuro/preproc_t1/preproc_t1.diff +++ b/subworkflows/nf-neuro/preproc_t1/preproc_t1.diff @@ -3,7 +3,7 @@ Changes in component 'nf-neuro/preproc_t1' Changes in 'preproc_t1/main.nf': --- subworkflows/nf-neuro/preproc_t1/main.nf +++ subworkflows/nf-neuro/preproc_t1/main.nf -@@ -88,9 +88,10 @@ +@@ -88,9 +88,11 @@ // The template and probability maps are mandatory if running antsBET. Since the // error message from nextflow when they are absent is either non-informative or // missing, we use ifEmpty to provide a more informative one. @@ -13,6 +13,7 @@ Changes in 'preproc_t1/main.nf': - .join(ch_probability_map.ifEmpty{ error("ANTS BET needs a tissue probability map") }) + .join(ch_template) + .join(ch_probability_map) ++ .map{ it + [[], []] } BETCROP_ANTSBET ( ch_bet ) ch_versions = ch_versions.mix(BETCROP_ANTSBET.out.versions.first()) diff --git a/workflows/pediatric.nf b/workflows/pediatric.nf index 4935ce2..c3097be 100644 --- a/workflows/pediatric.nf +++ b/workflows/pediatric.nf @@ -126,7 +126,7 @@ workflow PEDIATRIC { ch_template = Channel.fromPath(params.t1_bet_template, checkIfExists: true) ch_probability_map = Channel.fromPath(params.t1_bet_template_probability_map, checkIfExists: true) - .map{ it + [[], []] } + if ( params.t1_synthstrip_weights ) { ch_t1_weights = Channel.fromPath(params.t1_synthstrip_weights, checkIfExists: false) } else {