DTI

From Pheno Wiki
Revision as of 15:43, 16 April 2012 by Katie (Talk | contribs) (How to Do QA)

Jump to: navigation, search

Documentation

All CNP DTI processing and quality assurance is documented in the CNP DTI QA Google Document. To view and edit the document, request access from Katie Karlsgodt or Anna Xu.

Processing

dti_proc script

dti_proc.sh is a script written by Russ Poldrack to preprocess the raw CNP DTI data. The path for the script is /space/raid2/data/poldrack/CNP/scripts/dti_proc.sh.

To run the script on an entire subject group (CONTROLS, SCHZ, BIPOLAR, ADHD) use the wrapper script run_dti_proc.sh

NOTE: An alternate version exists called dti_proc_regressor. The difference between the two versions is that the regressor script contains a nuisance regressor based on the Galachan, 2010 paper, that can to some extent correct for vibration artifacts. This artifact exists on BMC data before Fall 2010. After Fall 2010 the table was bolted down, correcting the artifact. The CCN table was bolted at installation, thus avoiding the artifact entirely. Unfortunately it does not entirely correct the issue, so the shareable data uses the original version of the script with people who show the artifact marked for elimination.

Usage

For example, to run the script on one CNP subject,
1. Log on to func and go to the directory /space/raid2/data/poldrack/CNP/scripts:

> ssh $username@funcserv1
> cd /space/raid2/data/poldrack/CNP/scripts

2. Find the path of the raw DTI directory for one subject, and run the script, e.g.:

> dti_proc /space/raid2/data/poldrack/CNP/SCHZ/CNP_50006B/raw/DTI_64DIR_3 &

Script Actions

The dti_proc script processes the data using FSL Diffusion Toolbox (FDT).

Steps:
1. B0 image is skull stripped, creating B0_image_brain
2. the raw data are registered to the first (B0) image using mcflirt- this both corrects for eddy currents and helps motion, the resulting file is dti_mcf
3. dtifit is run, creating FA, L1, L2, MD and other processed images in subject space
4. the FA and color maps are registered to MNI space (FA2std and V12std).
5. Generic ROIs from the JHU atlas are applied to the FA image in standard space.

WARNING- the resulting values are NOT to be used as data, rather just as first pass markers for scan integrity. They are not well registered enough to be used for anything, as evidenced by the low FA values.

6. Motion is calculated
7. bvecs and bvals for each subject are compared to the CNP standards.

NOTE: there are different bvecs and bvals for subjects on the CCN and BMC scanners, as well as for a subset of subjects scanned during the transition and intial set up of the CCN

7. a pdf is generated (dti_diag.pdf)

Output

For the subject indicated, the script will output the following files in the raw DTI directory:

B0_image_brain_mask.nii.gz
B0_image_brain.nii.gz
B0_image.nii.gz
dti_diag.pdf
dtifit_FA2std.nii.gz
dtifit_FA.nii.gz
dtifit_L1.nii.gz
dtifit_L2.nii.gz
dtifit_L3.nii.gz
dtifit.log
dtifit_MD.nii.gz
dtifit_MO.nii.gz
dtifit_SO.nii.gz
dtifit_V12std.nii.gz
dtifit_V1.nii.gz
dtifit_V2.nii.gz
dtifit_V3.nii.gz
dti_mcf.par
dti_proc.log
FA2std.mat

Quality Control

The checking procedures for CNP follow the Cannon Lab DTI QA Protocol, which was adapted from procedures in Paul Thompson's lab. This can be found at: Cannon_Lab_Processing_and_QA

DTI_QA script

The additional QA script is located at /space/raid2/data/poldrack/CNP/scripts/DTI_QA.sh

Usage

The usage is DTI_QA <subjectID> <group>, or dti_proc all <group>.

For example, to run the script on one subject in the CNP schizophrenia group,
1. Log on to func and go to the directory /space/raid2/data/poldrack/CNP/scripts:

> ssh $username@funcserv1
> cd /space/raid2/data/poldrack/CNP/scripts

2. Run the script, e.g.:

> dti_proc_temp.sh CNP_50006B SCHZ &

3. Alternatively, to run the script on all subjects in the CNP schizophrenia group,

> dti_proc_temp.sh all SCHZ &

Script Actions

This script creates a small text file to be used in QA. If the script runs properly it:
1. matches bvals and bvecs
2. calculates mean in-mask FA and MD
3. calculates motion in each direction
4. creates a standard deviation file for regular and mcf images
5. uses regional masks to calculate the percentage of cropped voxels in the occipital lobe, frontal lobe, superior region, temporal lobes and cerebellum.

Output

The script will create a dti_report.txt file in the raw DTI directory of the subject.

How to Do QA

Check Diagnostic Log

After running the dti_proc.sh script, check the diagnostic log for quality assurance of the DTI data:
1. Log on to func and go to the directory, for example, /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*:

> ssh $username@funcserv1
> cd /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*
> ls

2. Open the dti_diag.pdf, using the command evince:

> evince dti_diag.pdf &

3. Check whether the bvals and bvecs match the CNP standards, and log this in the CNP DTI QA Google Document.

4. Go to the raw DTI directory of the subject, and open the dti_report.txt file, using the command emacs:

> cd /space/raid2/data/poldrack/CNP/SCHZ/CNP_50006B/DTI_64DIR_3
> ls
> emacs dti_report.txt &

5. Check whether the bvals and bvecs match the CNP standards, and log this in the CNP DTI QA Google Document.

Check for Artifacts

Artifacts observed in this data set include-

-missing slices- this would be on only one volume, and consist of an entire isolated missing horizontal slice
-vibration artifact (only on BMC subjects)- this usually shows as a red patch directly on the midline, primarily in the parietal region
-striping
-cropping

Check Raw Data

Check FA Map

After running the dti_proc_regressor.sh script, check the fractional anisotropy (FA) map for quality assurance:
1. Log on to func and go to the directory /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*:

> ssh $username@funcserv1
> cd /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*
> ls

2. Open the FA map in FSLView:

> fslview dtifit_FA.nii.gz &

3. Check if the FA map includes the entire brain and if the FA map looks unusual or not, and log this in the CNP DTI QA Google Document.

Check Color Map

After running the dti_proc.sh script, check the color map for quality assurance:
1. Log on to func and go to the directory /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*:

> ssh $username@funcserv1
> cd /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*
> ls

2. Open both the FA and color maps in FSLView (or add the color map to FSLView, if you are already viewing the FA map):

> fslview dtifit_FA.nii.gz dtifit_V1.nii.gz &

The FSLView GUI will display these files as:

File:Dti fslview.jpg

3. To view the color map, select the dtifit_V1 file, and press the "i" button. An "Overlay Information Dialog" window will appear. For "Display as:", select "RGB" and for "Modulation:", select "dtifit_FA". Close this window.

File:Dti display options.jpg

4. The color map should now display as:

File:Dti color map.jpg

5. Check if the directions of the major fiber tracts are colored appropriately by scrolling through the slices. In the coronal view, the corticospinal tract (superior-inferior) should be blue. In the sagittal view, the corpus callosum (right-left) should be red. In the axial view, the anterior-posterior tracts should be green.

Also, check if the color map includes the entire brain and if the color map looks unusual or not. Log this in the appropriate google doc.







Return to CNP