qx_utilities.bash.dwi_parcellate(sessionsfolder, session, matrixversion, parcellationfile, outname, lengths, waytotal)#


This function implements parcellation on the DWI dense connectomes using a whole-brain parcellation (e.g. Glasser parcellation with subcortical labels included).

It explicitly assumes the the Human Connectome Project folder structure for preprocessing. Dense Connectome DWI data needs to be in the following folder:



--sessionsfolder (str):

Path to study data folder.

--session (str):

Comma separated list of sessions to run.

--matrixversion (str):

Matrix solution version to run parcellation on; e.g. 1 or 3.

--parcellationfile (str):

Specify the absolute path of the file you want to use for parcellation (e.g. /gpfs/project/fas/n3/Studies/Connectome/Parcellations/glasser_parcellation/LR_Colelab_partitions_v1d_islands_withsubcortex.dlabel.nii).

--outname (str):

Specify the suffix output name of the pconn file.

--lengths (str, defaults 'no'):

Parcellate lengths matrix ('yes' / 'no').

--waytotal (str, defaults 'none'):

Use the waytotal normalized version of the DWI dense connectome. Default:

  • 'none' ... without waytotal normalization

  • 'standard' ... standard waytotal normalized

  • 'log' ... log-transformed waytotal normalized.


Run directly via:

${TOOLS}/${QUNEXREPO}/bash/qx_utilities/dwi_parcellate.sh \
    --<parameter1> \
    --<parameter2> \
    --<parameter3> ... \

NOTE: --scheduler is not available via direct script call.

Run via:

qunex dwi_parcellate \
    --<parameter1> \
    --<parameter2> ... \

NOTE: scheduler is available via qunex call.


A string for the cluster scheduler (e.g. LSF, PBS or SLURM) followed by relevant options.

For SLURM scheduler the string would look like this via the qunex call:

qunex dwi_parcellate \
    --sessionsfolder='<folder_with_sessions>' \
    --sessions='<comma_separarated_list_of_cases>' \
    --matrixversion='3' \
    --parcellationfile='<dlabel_file_for_parcellation>' \
    --overwrite='no' \

Example with flagged parameters for submission to the scheduler:

qunex dwi_parcellate \
    --sessionsfolder='<folder_with_sessions>' \
    --sessions='<comma_separarated_list_of_cases>' \
    --matrixversion='3' \
    --parcellationfile='<dlabel_file_for_parcellation>' \
    --overwrite='no' \
    --outname='LR_Colelab_partitions_v1d_islands_withsubcortex' \