qx_utilities.bash.dwi_pre_tractography(sessionsfolder, sessions, scheduler)#


This function runs the Pretractography Dense trajectory space generation.

Note that this is a very quick function to run (less than 5min) so no overwrite options exist.


It explicitly assumes the Human Connectome Project folder structure for preprocessing and completed diffusion and bedpostX processing.

DWI data needs to be in the following folder:


BedpostX output data needs to be in the following folder:



--sessionsfolder (str):

Path to study folder that contains sessions.

--sessions (str):

Comma separated list of sessions to run.

--scheduler (str):

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



qunex pretractography_dense \
    --sessionsfolder='<path_to_study_sessions_folder>' \
    --sessions='<comma_separarated_list_of_cases>' \

Direct usage:

$0 <StudyFolder> <Session> <MSMflag>

T1w and MNINonLinear folders are expected within <StudyFolder>/<Session>.

MSMflag=0 uses the default surfaces, MSMflag=1 uses the MSM surfaces defined in make_trajectory_space_mni.sh.