Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ workflow {
if ( params.use_fodf_for_tracking && ! params.run_tracking ) {
error "The parameter use_fodf_for_tracking cannot be enabled if run_tracking is disabled."
}

if ( params.use_fodf_for_tracking && ! params.run_fodf) {
error "The parameter use_fodf_for_tracking cannot be enabled if run_fodf is disabled."
}

ch_dwi_bvalbvec = data.dwi
.multiMap { meta, dwi, bval, bvec ->
Expand Down Expand Up @@ -167,14 +171,15 @@ workflow {
ch_multiqc_files = ch_multiqc_files.mix(RECONST_DTIMETRICS.out.mqc)

/* FODF */
if ( params.run_fodf ) {
RECONST_FRF(ch_for_reconst.map{ it + [[], [], []]})
ch_for_reconst_fodf = ch_for_reconst
.join(RECONST_DTIMETRICS.out.fa)
.join(RECONST_DTIMETRICS.out.md)
.join(RECONST_FRF.out.frf)
.map{ it + [[], []]}
RECONST_FODF(ch_for_reconst_fodf)

}
Comment on lines +174 to +182
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ( params.run_fodf ) {
RECONST_FRF(ch_for_reconst.map{ it + [[], [], []]})
ch_for_reconst_fodf = ch_for_reconst
.join(RECONST_DTIMETRICS.out.fa)
.join(RECONST_DTIMETRICS.out.md)
.join(RECONST_FRF.out.frf)
.map{ it + [[], []]}
RECONST_FODF(ch_for_reconst_fodf)
}
if ( params.run_fodf ) {
RECONST_FRF(ch_for_reconst.map{ it + [[], [], []]})
ch_for_reconst_fodf = ch_for_reconst
.join(RECONST_DTIMETRICS.out.fa)
.join(RECONST_DTIMETRICS.out.md)
.join(RECONST_FRF.out.frf)
.map{ it + [[], []]}
RECONST_FODF(ch_for_reconst_fodf)
}

/* QBALL */
RECONST_QBALL(ch_for_reconst)

Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ params {
nvox_min = 100

// FODF || QBALL
run_fodf = true
use_fodf_for_tracking = false
sh_order = 6
min_fodf_value = 1000
Expand Down
6 changes: 6 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@
"description": "Set it to false if you don't want to resample your data to the smallest current voxel dimension.",
"fa_icon": "fas fa-brain"
},
"run_fodf": {
"type": "boolean",
"default": true,
"description": "Set it to false if you don't want to run fODF",
"fa_icon": "fas fa-brain"
},
"run_tracking": {
"type": "boolean",
"default": true,
Expand Down