Skip to content

Latest commit

 

History

History
90 lines (69 loc) · 4.83 KB

README.md

File metadata and controls

90 lines (69 loc) · 4.83 KB

span tracts

This repository has scripts to track fibers between the anterior insula and nucleus accumbens (NAcc). Each matlab script is commented, but feel free to email josiah@uark.edu with questions. Instructions to track MPFC-NAcc and VTA-NAcc fibers are also below.

Workflow:
(1) Set up computing environment
(2) Set up directory structure
(3) Align T1 anatomical scan to AC/PC space
(4) Run FreeSurfer on the T1 scan
(5) Preprocess diffusion data
(6) Extract FreeSurfer ROIs
(7) Perform MRtrix tractography
(8) Visualize fibers and clean outliers
(9) Extract diffusion measures along the fibers

(1) Set up computing environment
We rely on these software:
VISTASOFT
FreeSurfer
MRtrix 0.2
Helpful instruction

and matlab packages:
Matlab Brain Anatomy
knkutils
SPM8

(2) Set up directory structure
subject/
    subject_t1.nii.gz
    raw/
        subject.nii.gz
        subject.bvec
        subject.bval

(3) Align T1 anatomical scan to AC/PC space
Run mrAnatAverageAcpcNifti.m in matlab. You will be prompted to load the T1 data (subject_t1.nii.gz), and then to set the output filename (subject_t1_acpc.nii.gz).
Use GUI to set the anterior commissure, posterior commissure, and a midsagittal point high (superior) in the brain.

(4) Run FreeSurfer on the T1 scan
Set freesurfer environment, then run in command line: recon-all -all -s subject -i subject_t1_acpc.nii.gz

(5) Preprocess diffusion data
Run s_dtiInit.m

(6) Extract FreeSurfer ROIs
(i) Convert brain segmentation from freesurfer space to acpc space:
Run in command line: mri_convert -rl rawavg.mgz -rt nearest -odt int aparc.a2009s+aseg.mgz a2009seg2acpc.nii.gz
(ii) Copy a2009seg2acpc.nii.gz to /subject/ROIs
(iii) Extract relevant ROIs. Run s_dtiConvFSroi2mat.m
(iv) Create white matter mask. Run s_make_wmmask_fsseg_rh.m and s_make_wmmask_fsseg_lh.m
(v) Smooth ROIs. Run s_make_and_smooth_roi.m
(vi) Combine anterior and short gyrus insula ROIs. Run s_merge_insula_rois.m

(7) Perform MRtrix tractography
Run s_mrtrix_track_ains_nacc

(8) Visualize fibers and clean outliers
(i) Use mrDiffusion in matlab to visualize fibers on the T1. Check for abnormal fibers (e.g., cross hemispheres, enter cerebrospinal fluid, loop in many directions).
(ii) Exclude outlier fibers based on quantitative criteria (i.e., length and mahalanobis distance). Run s_clean_mbafiberoutlier_ains_nacc.m

(9) Extract diffusion measures along the fibers
Create csv with tract data for further analysis. Run s_mrtrix_tractprofiles_ainsnacc.m

Use ConTrack to track MPFC-NAcc and VTA-NAcc

(1-5) Same as above

(6) Define ROIs
NAcc: use ROI from FreeSurfer, same as above.
MPFC: use mrDiffusion to manually place spherical ROI (5 mm diameter) in each hemisphere. Coronally, identify the second gyrus in from the front of the brain, and axially at the level of the genu of the corpus callosum.
VTA: use mrDiffusion to manually place spherical ROI (or consult Kelly Hennigan for automatic method).

(7) Perform ConTrack tractography
(i) Track fibers
Run ctrBatchCreateContrackFiles.m, with parameters set to include your subject names, ROIs, number of fibers, max/min fiber length, etc. This creates:
(a) a shell script in each subject folder with command line code to track fibers.
(b) one shell script that includes command line code for each subject, which simply goes into the subject folder to run the script from 7ia.

(ii) Either run the script for each subject from step 7ia, or run the script from step 7ib.

(iii) Score top fibers
Run ctrBatchScore.m, which will ask for .mat file created in (7). This creates:
(a) a shell script in each subject folder with command line code to score fibers.
(b) one shell script that includes command line code for each subject, which simply goes into the subject folder to run the scoring script in step 7iiia.

(iv) Either run the script for each subject from step 7iiia, or run the script from 7iiib.

(8-9) Same as above