Dear dHCP team,
I’m facing problems running FSL probtrackx2 using surface files. We want to track the white matter connectivity between some ROIs that we selected based on the HCP MMP atlas. Namely, we chose some functional areas from it.
With this scope in mind, we processed the dwi data following your suggestion for bedpostx here.
And, we successfully upscaled and aligned HCP MMP ROIs to the native space of the neonates thanks to the help of one of your team members here.
However, when running probtrackx2 only some of those ROIs works. The procedure is the following:
First, we applied FSL surf2surf function:
surf2surf -i $WM_L -o $TRACK_DIR/asc_roi/L_${ROI}.asc --outputtype=ASCII --values=$NAT_ROI_DIR/surf_L_${ROI}_ROI.func.gii
where:
-i $WM_L
is the subject white matter surface sub-${subjid}_ses-${session}_hemi-R_space-T2w_wm.surf.gii
-o $TRACK_DIR/asc_roi/L_${ROI}.asc
the output name
--outputtype=ASCII
output type
--values=$NAT_ROI_DIR/surf_L_${ROI}_ROI.func.gii
the functional ROI in native space with the same amount of vertices as the downloaded surfaces. Those ROIs work if opened using connectome workbench software: if I open the white matter surface and the ROIs I can visualize them and they are in the correct position.
Then, probtrackx2:
probtrackx2 -x $TRACK_DIR/asc_roi/${hemi}_${ROI_A}.asc -l -c 0.2 -S 2000 --meshspace=caret --steplength=0.5 -P 5000 --fibthresh=0.01 --distthresh=0.0 --sampvox=0.0 --forcedir --opd -s $Bedpostx_DIR/merged -m $Bedpostx_DIR/nodif_brain_mask.nii.gz --dir=$TRACK_DIR -o ${hemi}_${subjid}_${ROI_A}2${ROI_B} --seedref=$FA_DIR/data.nii.gz --stop=$TRACK_DIR/txt_roi/${hemi}_STOPmask_pial.txt --waypoints=$TRACK_DIR/asc_roi/${hemi}_${ROI_A}.asc
Where:
-x $TRACK_DIR/asc_roi/${hemi}_${ROI_A}.asc
ascii file created by surf2surf
-l -c 0.2 -S 2000 --meshspace=caret --steplength=0.5 -P 5000 --fibthresh=0.01 --distthresh=0.0 --sampvox=0.0 --forcedir --opd
basic settings
-s $Bedpostx_DIR/merged
bedpostx directory & basename
-m $Bedpostx_DIR/nodif_brain_mask.nii.gz
same no_diff_brain_mask used in bedpostx
--dir=$TRACK_DIR
outout directory
-o ${hemi}_${subjid}_${ROI_A}2${ROI_B}
output name
--seedref=$FA_DIR/B0_data.nii.gz
B0 as seed reference
--stop=$TRACK_DIR/txt_roi/${hemi}_STOPmask_pial.txt
stop masks: pial surface
--waypoints=$TRACK_DIR/asc_roi/${hemi}_${ROI_A}.asc
waypoint is another mask output of surf2surf.
However, when ran, probtrackx2 returns NEWMAT::IndexException
error ONLY for some ROIs.
Of course, I’ve tried several configurations of probtrackx2, passing additional flags such as:
--xfm=dhcp_HPC_data/sub-CC00747XX22/ses-238600/xfm/sub-CC00747XX22_ses-238600_from-T2w_to-dwi_mode-image.mat
T2w to dwi affine trasform, provided by you
--seedref=dhcp_HPC_data/sub-CC00747XX22/ses-238600/dwi/sub-CC00747XX22_ses-238600_desc-preproc_dwi.nii.gz
setting the seed reference as the T2w image.
As providing the --xfm
to the surf2surf function, changing setting during the upsampling of the ROIs from the 32k HCP MMP to the native 84K vertices, removing stop masks/waypoints. All of which returns the same error for the same subset of ROIs.
What I suspect is that there is an error or a missing step I was not able to spot before, after or the sur2surf function itself, since the only thing that increases the number of ROIs returning the NEWMAT error is changing the surface type within the surf2surf function. Using PIAL returns more NEWMAT error than WM and MIDTHICKNESS.
Additionally, I’ve run -metric-to-volume-mapping in order to check wheter the ROIs are good or not and they are fine.
wb_command -metric-to-volume-mapping $NAT_ROI_DIR/surf_L_${ROI}_ROI.func.gii $STRUCT_DIR/sub-${subjid}_ses-${session}_hemi-L_space-T2w_wm.surf.gii $STRUCT_DIR/sub-${subjid}_ses-${session}_desc-restore_T2w.nii.gz $STRUCT_DIR/surface2volume_map/sub-${subjid}_ses-${ses}_L_${ROI}_wm-mapped.nii.gz -nearest-vertex 1
This is an already long post so I will not include additional information or pictures but I’m willing to provide any additional information you need.
Thank you for your help.
Tommaso