Checking output from 3dTrackID PROB

Dear experts

(preferably ptaylor, as were discussing the same data / different issue in a recent thread: Re: "Killed" during 3dTrackID)

I ran 3dTrackID PROB, and would like to check my results. Some questions:

  1. As the PROB mode produces no tract results, does this mean I cannot visually check? Should I then also run DET on the same data and check? (for instance, make sure that things aren’t flipped along X/Y/Z axis)

  2. ptaylor mentioned OR-logic for PROB mode. However, I believe we can only specify AND/OR logic for DET and MINIP. Am I missing something?

  3. I used fat_mat_sel.py to create a matrix of FA values:
    fat_mat_sel.py
    –matr_in 3dTrackID_prob_000.grid
    –Pars ‘FA’
    –A_plotmin 0.2
    –B_plotmax 1
    –dpi_file 200
    –xlen_file 32
    –Size_font 20
    -M ‘gap_jet’
    –Tight_layout_on

When viewing this matrix (attached png) I see 4 grids within the overall matrix. I’m quite confused why I see these 4 grids. It would be very helpful if someone could briefly explain why this might be and what it means.

  1. Lastly, these were the specific command options I used for 3dTrackID. I would really appreciate it if you could let me know if I’ve missed any important things:
    3dTrackID
    -mode PROB
    -uncert DWUncert+orig.
    -netrois $dtipath/subject1/mri/parc5002dwi.nii.gz
    -mask $dtipath/subject1/MASK.nii.gz
    -prefix 3dTrackID_prob
    -dti_in 3dDWItoDT_
    -alg_Thresh_FA 0.2
    -nifti
    -dump_rois AFNI
    -no_indipair_out
    -overwrite

Thank you for your time and feedback on my output!

Hi-

Re. Q1:
You can check the output of tracking directly with PROB. (If you want to check closer results with *.tract files, you should use “-mode MINIP” for mini-probabilistic tracking, which is a better approximation of the fully-probabilistic tracking results.) To view the PROB tracking output most easily, you should use the “-dump_rois …” option to output volumetric files of each bundle connection; those can be viewed in the volumetric viewer, or in SUMA as per-bundle colorized surfaces using fat_proc_connec_vis as described here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/fatcat_prep/Postprocessing_IV.html

Re. Q1b:
If you haven’t checked about gradient flips prior to this point in your DWI processing/analysis, then you should use @GradFlipTest to do so-- that should always be done to be more confident about final tracking results. More about this is described here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/FATCAT/GradFlipTest.html

Re. Q2:
ptaylor is a notorious liar. Well, maybe just forgetful. But indeed, in looking at this more now the “-logic …” option applies to the *tract files themselves; the full matrices are always output, and the full sets of WM ROIs are always output by “-dump_rois …”. So, you will have all the information for free. The “OR-logic” info you want just lives along the diagonals of the output matrices. In the directory of WM ROI maps made when “-dump_rois …” is used, you will just want connections that have the ROI repeated in the name, e.g., NET_000_ROI_001__001.nii.gz, NET_000_ROI_033__033.nii.gz, etc. and not NET_000_ROI_001__004.nii.gz.

Re. Q3a:
Using fat_mat_sel.py is fine for looking at those files, but I will just point out that I have recently made a newer program, fat_mat2d_plot.py, that works more nicely (closer syntax to standard AFNI programs, and running in Python 3.*, which may simplify your life), though I have yet to create a colorbar like “gap_jet” that will point out 0-valued matrix elements more easily. The benefit of fat_mat2d_plot.py is that you can output SVG file type, which is vector graphics driven, and so you can zoom in and see the ROI names more easily; it will also try to “guess” sizes appropriately to fit text labels well.
For example, try:


fat_mat2d_plot.py                   \
       -input 3dTrackID_prob_000.grid           \
       -vmin  0                        \
       -vmax  0.8                        \
       -pars   FA                      \
       -ftype svg
       -prefix IMAGE                   \
       -cbar   cool

Re. Q3b: “Why are there 4 grids (or submatrices) in the image?”
This is pretty common in wholebrain tracking. You have left and right hemispheres, each of which will be more tightly coupled intrahemisphereically (tractographically, if not physiologically) than interhemispherically. The upper left and lower right submatrices are likely your intra-hemisphere connections (pretty dense), and the lower left and upper right matrices are the inter-hemisphere ones (sparser). Note the matrix is symmetric across the diagonal (and the diagonal is your OR-logic connections).

Re second Q3: commenting on the 3dTrackID command.
Your command looks good to me. Personally, I like to specify the parameters explicitly rather than depend on the defaults, just for clarity and future reference (and in case the defaults ever trickily change); so I might write it with more “-alg_* …” options specified explicitly. Also, over time, I have come to think that having a higher “alg_Thresh_Frac” value might be useful, particularly if someone is doing connectomic tracking. That would reduce the “false positive” tract results (while, of course then increasing the “false negative” results-- the standard specifity vs sensitivity trade-off), but base on people’s testing in the field, probably false positives are more an issue than false negatives for major tract bundles. So, I would write your command like this:


3dTrackID \
-mode PROB \
-uncert DWUncert+orig. \
-netrois $dtipath/subject1/mri/parc5002dwi.nii.gz \
-mask $dtipath/subject1/MASK.nii.gz \
-prefix 3dTrackID_prob \
-dti_in 3dDWItoDT_ \
-alg_Thresh_FA 0.2 \
-alg_Nmonte 1000 \
-alg_Nseed_Vox  5 \
-alg_Thresh_Frac 0.1 \
-nifti \
-dump_rois AFNI \
-no_indipair_out \
-overwrite

… where the only “-alg_*” value that has changed from default is “alg_Thresh_Frac” going from 0.001 → 0.1.

–pt

Great!

I ran fat_proc_connec_vis to view PROB tracking and looks fine.
I will make sure to run @GradFlipTest first. So far, no flip recommended - so, ok.
And I’m very grateful that you explained the 4 submatrices within the matrix. Was a bit scared at first.
I like your suggestion of including alg_* options, as they are informative even if using the default. I’m now using your recommendation of alg_Thresh_Frac 0.1

In conclusion, you have really helped me understand and feel more confident about the output. THANK YOU!!!

Glad that was useful-- happy tracking!

–pt