Difference between revisions of "DTI Quality Control"

From Pheno Wiki
Jump to: navigation, search
Line 11: Line 11:
 
[[DTI Analysis Tools and Scripts List]]
 
[[DTI Analysis Tools and Scripts List]]
  
==Check Raw DTI Data==
+
#Check Raw DTI Data Exists
 
Check that the raw DTI data exists for each subject
 
Check that the raw DTI data exists for each subject
  
==Run dti_proc.sh Script==
+
#Run dti_proc.sh Script
 
<b>dti_proc.sh</b> is a script written by Russ Poldrack, originally for CNP to preprocess raw DTI data.  The path for the script is /space/raid2/data/poldrack/CNP/scripts/DTI/dti_proc.sh. The directory structure will need to be adapted for individual projects. The usage is dti_proc <input directory path>.<br/>
 
<b>dti_proc.sh</b> is a script written by Russ Poldrack, originally for CNP to preprocess raw DTI data.  The path for the script is /space/raid2/data/poldrack/CNP/scripts/DTI/dti_proc.sh. The directory structure will need to be adapted for individual projects. The usage is dti_proc <input directory path>.<br/>
  
Line 20: Line 20:
  
 
For example, to run the script on one CNP subject,<br/>
 
For example, to run the script on one CNP subject,<br/>
1. Log on to func and go to the directory /space/raid2/data/poldrack/CNP/scripts:
+
Find the path of the raw DTI directory for one subject, and run the script, e.g.:
:> 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 &
 
:> dti_proc /space/raid2/data/poldrack/CNP/SCHZ/CNP_50006B/raw/DTI_64DIR_3 &
  
Line 49: Line 45:
 
:FA2std.mat
 
:FA2std.mat
  
==Run DTI_QA.sh Script==
+
#Run DTI_QA.sh Script
 
To obtain additional QA measures, to supplement the dti_diag.pdf file, then run the <b>DTI_QA.sh</b> script. This script was written by Katie Karlsgodt to produce a text file which checks that the bvals and bvecs match the CNP standards, and calculates the mean MD, mean FA, mean motion, and the maximum motion, and other QA measures.
 
To obtain additional QA measures, to supplement the dti_diag.pdf file, then run the <b>DTI_QA.sh</b> script. This script was written by Katie Karlsgodt to produce a text file which checks that the bvals and bvecs match the CNP standards, and calculates the mean MD, mean FA, mean motion, and the maximum motion, and other QA measures.
  
Line 57: Line 53:
 
For example, to run the script on one subject in the CNP schizophrenia group,<br/>
 
For example, to run the script on one subject in the CNP schizophrenia group,<br/>
  
1. Run the script, e.g.:
 
 
:> dti_proc_temp.sh CNP_50006B SCHZ &
 
:> dti_proc_temp.sh CNP_50006B SCHZ &
 +
Alternatively, to run the script on all subjects in the CNP schizophrenia group,<br/>
 +
:> dti_proc_temp.sh all SCHZ &
  
 
The script will create a <b>dti_report.txt</b> file in the raw DTI directory of the subject.
 
The script will create a <b>dti_report.txt</b> file in the raw DTI directory of the subject.
  
==Check Preprocessed DTI Data==
+
#Check Preprocessed DTI Data
===Check Diagnostic Log===
+
##Check Diagnostic PDF
After running the dti_proc.sh script, check the diagnostic log for quality assurance of the DTI data:<br/>
+
Open the dti_diag.pdf, using the command <b>[[Basic UNIX Commands#evince | evince]]</b>:
 
+
2. Open the dti_diag.pdf, using the command <b>[[Basic UNIX Commands#evince | evince]]</b>:
+
 
:> evince dti_diag.pdf &
 
:> evince dti_diag.pdf &
  
3. Check whether the bvals and bvecs match the CNP standards.<br/>
+
###Check whether the bvals and bvecs match the CNP standards.<br/>
 
Note: across scanners (BMC vs CCN) and within the CCN scanner there were multiple permutations of the 64 direction sequence. All subjects were run using their own directions so the analysis is valid within subject, but they have been flagged so that users are aware if someone does not match the scanner standard.<br/>
 
Note: across scanners (BMC vs CCN) and within the CCN scanner there were multiple permutations of the 64 direction sequence. All subjects were run using their own directions so the analysis is valid within subject, but they have been flagged so that users are aware if someone does not match the scanner standard.<br/>
  
 +
##Check Diagnostic text file
 +
Go to the raw DTI directory of the subject, and view the dti_report.txt file, using more or emacs<br/>
 +
### Check whether the bvals and bvecs match the CNP standards
 +
### Check degree of cropping. The cerebellum will almost always have the most. If any other regions have more than 10% cropping, check the raw data carefully and rate degree of cropping on the log.
  
 +
##Check for Artifacts
 +
Artifacts included in the CNP data include the Siemen's vibration artifact (indicated by a red blob on the midline in the dorsal posterior part of the brain), blank slices (usually associated with motion) on individual<br/>
 +
The first step to check for artifacts is to watch the raw data like a movie, going through each direction. Open in fslview, click the "film" icon, and watch each volume, inspecting for noise, dropped slices, etc.
  
Alternatively, to run the script on all subjects in the CNP schizophrenia group,<br/>
+
###Check FA Map
:> dti_proc_temp.sh all SCHZ &
+
 
+
2. Go to the raw DTI directory of the subject, and view the dti_report.txt file, using more or emacs
+
-- Check whether the bvals and bvecs match the CNP standards
+
-- Check degree of cropping. The cerebellum will almost always have the most. If any other regions have more than 10% cropping, check the raw data carefully and rate degree of cropping on the log.
+
 
+
====Check for Artifacts====
+
 
+
Artifacts included in the CNP data include the Siemen's vibration artifact (indicated by a red blob on the midline in the dorsal posterior part of the brain), blank slices (usually associated with motion) on individual
+
 
+
===Check FA Map===
+
 
After running the dti_proc_regressor.sh script, check the fractional anisotropy (FA) map for quality assurance:<br/>
 
After running the dti_proc_regressor.sh script, check the fractional anisotropy (FA) map for quality assurance:<br/>
1. Log on to func and go to the directory /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*:
+
Open the FA map in FSLView:
:> 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 &
 
:> fslview dtifit_FA.nii.gz &
 +
Check if the FA map includes the entire brain and if the FA map looks unusual or not
  
3. Check if the FA map includes the entire brain and if the FA map looks unusual or not, and log this in the [https://spreadsheets.google.com/ccc?key=0AhLKRRgAIOCVdG9rY0szNFppcGZ0QmF3ejBYLUY5S0E&hl=en#gid=0 CNP DTI QA Google Document].
+
###Check Color Map
 
+
===Check Color Map===
+
 
After running the dti_proc.sh script, check the color map for quality assurance:<br/>
 
After running the dti_proc.sh script, check the color map for quality assurance:<br/>
1. Log on to func and go to the directory /space/raid2/data/poldrack/CNP/${group}/CNP_{subjectID}/raw/DTI_64DIR_*:
+
Open both the FA and color maps in FSLView (or add the color map to FSLView, if you are already viewing the FA map):
:> 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 &
 
:> fslview dtifit_FA.nii.gz dtifit_V1.nii.gz &
  
The FSLView GUI will display these files as:
+
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.
 
+
[[Image: dti fslview.jpg ]]<br/><br/>
+
 
+
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.
+
 
+
[[Image: dti display options.jpg ]]<br/><br/>
+
 
+
4. The color map should now display as:
+
 
+
[[Image: dti color map.jpg]]<br/><br/>
+
  
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.
+
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.
+
Also, check if the color map includes the entire brain and if the color map looks unusual or not.  
  
 +
###Check Line Image
 +
While viewing the V1 image, click the 'i' and change the view from RGB to Lines. The lines should be aligned and orderly, particularly in the largest tracts.
  
 +
##Rate Data
 +
Based on the QA findings all data were rated on a scale from 1-4 with 1 being excellent and 4 being unusable.
  
  
 
Return to [[DTI_Resources]]
 
Return to [[DTI_Resources]]

Revision as of 17:01, 13 June 2012

Link back to LA5C page.

These are the useable subjects for each group, on each scanner.

DTI Rankings.png



QA Procedures

DTI Analysis Tools and Scripts List

  1. Check Raw DTI Data Exists

Check that the raw DTI data exists for each subject

  1. Run dti_proc.sh Script

dti_proc.sh is a script written by Russ Poldrack, originally for CNP to preprocess raw DTI data. The path for the script is /space/raid2/data/poldrack/CNP/scripts/DTI/dti_proc.sh. The directory structure will need to be adapted for individual projects. The usage is dti_proc <input directory path>.

Note: an alternate version called "dti_proc_regressor" exists. The difference between the two versions is that the regressor script contains a nuisance regressor based on the Galachan, 2010 paper, that we hoped could 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. However, this effort to correct the artifact was unsuccessful and the individuals with vibration artifacts were eliminated.

For example, to run the script on one CNP subject,
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 &

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
  1. Run DTI_QA.sh Script

To obtain additional QA measures, to supplement the dti_diag.pdf file, then run the DTI_QA.sh script. This script was written by Katie Karlsgodt to produce a text file which checks that the bvals and bvecs match the CNP standards, and calculates the mean MD, mean FA, mean motion, and the maximum motion, and other QA measures.

The path for the script is /space/raid2/data/poldrack/CNP/scripts/DTI//DTI_QA.
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,

> dti_proc_temp.sh CNP_50006B SCHZ &

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

> dti_proc_temp.sh all SCHZ &

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

  1. Check Preprocessed DTI Data
    1. Check Diagnostic PDF

Open the dti_diag.pdf, using the command evince:

> evince dti_diag.pdf &
      1. Check whether the bvals and bvecs match the CNP standards.

Note: across scanners (BMC vs CCN) and within the CCN scanner there were multiple permutations of the 64 direction sequence. All subjects were run using their own directions so the analysis is valid within subject, but they have been flagged so that users are aware if someone does not match the scanner standard.

    1. Check Diagnostic text file

Go to the raw DTI directory of the subject, and view the dti_report.txt file, using more or emacs

      1. Check whether the bvals and bvecs match the CNP standards
      2. Check degree of cropping. The cerebellum will almost always have the most. If any other regions have more than 10% cropping, check the raw data carefully and rate degree of cropping on the log.
    1. Check for Artifacts

Artifacts included in the CNP data include the Siemen's vibration artifact (indicated by a red blob on the midline in the dorsal posterior part of the brain), blank slices (usually associated with motion) on individual
The first step to check for artifacts is to watch the raw data like a movie, going through each direction. Open in fslview, click the "film" icon, and watch each volume, inspecting for noise, dropped slices, etc.

      1. Check FA Map

After running the dti_proc_regressor.sh script, check the fractional anisotropy (FA) map for quality assurance:
Open the FA map in FSLView:

> fslview dtifit_FA.nii.gz &
Check if the FA map includes the entire brain and if the FA map looks unusual or not
      1. Check Color Map

After running the dti_proc.sh script, check the color map for quality assurance:
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 &

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.

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.

      1. Check Line Image

While viewing the V1 image, click the 'i' and change the view from RGB to Lines. The lines should be aligned and orderly, particularly in the largest tracts.

    1. Rate Data

Based on the QA findings all data were rated on a scale from 1-4 with 1 being excellent and 4 being unusable.


Return to DTI_Resources