Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2012-09-20 12:15:40
Size: 3036
Editor: tanha
Comment:
Revision 8 as of 2013-12-18 17:06:43
Size: 4298
Editor: 172
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

[[FsFastTutorialV5.1|top]] | [[FsFastTutorialV5.1|previous]]| [[FsFastTutorialV5.1/FsFastDirStruct|next (Directory Structure)]]
Line 8: Line 5:
= FSFAST Tutorial Data Description = = Surface-based Interhemispheric Registration =
Line 10: Line 7:
The functional data were collected as part of the Functional Biomedical Research Network (fBIRN, www.nbirn.net). Those using this procedure should site the following paper: Greve, Douglas N., Lise Van der Haegen, Qing Cai, Steven Stufflebeam, Mert R. Sabuncu, Bruce Fischl, and Marc Bysbaert. "A surface-based analysis of language lateralization and cortical asymmetry." (2013). Journal of Cognitive Neuroscience. In press.
Line 12: Line 9:
 * Working-memory paradigm with distractors
 * 18 subjects
 * Each subject has 1 run (except sess01 which has 4 runs)
 * Collected at MGH Bay 4 (3T Siemens)
 * FreeSurfer anatomical analyses
== Installation ==
Line 18: Line 11:
= Functional Paradigm = Note: you only need to do this installation if you have version 5.1 or lower
Line 20: Line 13:
The paradigm was designed to study the effects of emotional stimuli on
the ability to recall items stored in working memory.
 * Blocked design
 * Each block consisted of 3 phases
   1. Encode (16 sec) - 8 stick figures to remember (no response)
   1. Distractor (16 sec) - 8 distractor images (response whether there is a face in the image)
      a. Emotional - Distractors are emotionally disturbing
      a. Neutral - Distractors are emotionally neutral
   1. Probe (16 sec) - 8 pairs of stick figures. Subject responds as to which of the pair was in the original Encode.
 * Between each block was a 16 sec scrambled image used as baseline.

{{attachment:wmparadigm.jpg}}

The above yields 5 conditions:
  1. Encode
  1. Emotional Distractor
  1. Neutral Distractor
  1. Probe following Emotional Distractor
  1. Probe following Neutral Distractor

The scrambled image will be modeled as a baseline, not as a condition.

= Functional Data =

 * Original data: each subject had 8 runs
 * This data: each subject has 1 run (except for sess01 who has 4)
 * Each run lasts 142 time points
 * TR = 2 sec.
 * There is one run of rest data for 13 subjects
 * There is a B0 map for each subject

= Anatomical Data =

 * FreeSurfer analysis has been run for all 18 subjects

= Getting the Data (not necessary for the Boston FreeSurfer Course) =

You can get the analyzed functional data (10G) from:
Download these files
Line 59: Line 15:
wget ftp://surfer.nmr.mgh.harvard.edu/pub/data/fsfast-functional.tar.gz ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/surfreg
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/xhemireg
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mris_preproc
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/fsaverage_sym.tar.gz
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mult-comp-cor.tar.gz
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mri_convert.{linux,mac}
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mri_vol2vol.{linux,mac}
Line 62: Line 24:
You can get the structural data (5G) from: Copy surfreg, xhemireg, mris_preproc into $FREESURFER_HOME/bin
Copy mri_convert.{linux,mac} into $FREESURFER_HOME/bin/mri_convert
Copy mri_vol2vol.{linux,mac} into $FREESURFER_HOME/bin/mri_vol2vol

# Untar fsaverage_sym.tar.gz into your $SUBJECTS_DIR
cd $SUBJECTS_DIR
tar xvfz fsaverage_sym.tar.gz

# Untar mult-comp-cor.tar.gz into $FREESURFER_HOME/average
cd $FREESURFER_HOME/average
tar xvfz mult-comp-cor.tar.gz

# Copy mris_preproc into $FREESURFER_HOME/bin after making a backup
To apply an existing atlas (eg, fsaverage_sym) to an anatomical analysis

== Apply an existing atlas (fsaverage_sym) ==

# Reg to atlas (1-2 hours per subject)
# Creates $subject/xhemi
# Creates lh.fsaverage_sym.sphere.reg in $subject and $subject/xhemi
Line 64: Line 45:
wget ftp://surfer.nmr.mgh.harvard.edu/pub/data/fsfast-tutorial.subjects.tar.gz foreach subject (subjectlist)
  surfreg --s $subject --t fsaverage_sym --lh
  surfreg --s $subject --t fsaverage_sym --lh --xhemi
end
Line 67: Line 51:


= Organizing the Tutorial (not necessary for the Boston FreeSurfer Course) =

cd to a place on your network where you have enough space to unpack
the tutorial data.
# Create a stack of subjects
Line 74: Line 53:
cd /place/with/space
}}}
Untar the data
{{{
tar xvfz fsfast-tutorial.tar.gz
tar xvfz fsfast-tutorial.subjects.tar.gz
mris_preproc --target fsaverage_sym --hemi lh
  --xhemi --paired-diff \
  --srcsurfreg fsaverage_sym.sphere.reg \
  --meas thickness \
  --out lh.lh-rh.thickness.sm00.mgh \
  --s subj1 --s subj2 ...
Line 82: Line 61:
You will need to set the TUTORIAL_DATA environment variable. In tcsh
or csh
# Smooth
Line 85: Line 63:
setenv TUTORIAL_DATA /place/with/space mris_fwhm --s fsaverage_sym --hemi lh --cortex --smooth-only --fwhm 5\
 --i lh.lh-rh.thickness.sm00.mgh --o lh.lh-rh.thickness.sm05.mgh
Line 88: Line 67:
You will also need to link the FreeSurfer anatomical subjeccts (data
in fsfast-tutorial.subjects) into your $SUBJECTS_DIR.

You should set the FSFAST output format to be compressed NIFTI (nii.gz):
# Analyze
Line 93: Line 69:
setenv FSF_OUTPUT_FORMAT nii.gz mri_glmfit --y lh.lh-rh.thickness.sm05.mgh --glmdir glm.lh.lh-rh.thickness.sm05 \
 --osgm --surf fsaverage_sym lh
Line 96: Line 73:
[[FsFastTutorialV5.1|top]] | [[FsFastTutorialV5.1|previous]]| [[FsFastTutorialV5.1/FsFastDirStruct|next (Directory Structure)]] # View
{{{
tksurfer fsaverage_sym lh inflated -aparc -overlay glm.lh.lh-rh.thickness.sm05/osgm/sig.mgh
}}}

# Correct for multiple comparisons
{{{
mri_glmfit-sim --glmdir glm.lh.lh-rh.thickness.sm05 \
   --cwpvalthresh .5 --cache 2 abs
}}}

== Build Your Own Atlas ==

# Create xhemi subject (don't reg, a few minutes to finish)
{{{
foreach subject (subjectlist)
  xhemireg --s $subject
end
}}}

# Reg to existing sym atlas
# Note: if you want test how symmetrical the atlas is use --lhrh
# (but it takes twice as long)
{{{
foreach subject (subjectlist)
  surfreg --s $subject --t fsaverage_sym --lh
  surfreg --s $subject --t fsaverage_sym --xhemi --lh
end
}}}

# Make first iteration (<5min)
{{{
make_average_subject --out myatlas.i1 \
  --surf-reg fsaverage_sym.sphere.reg \
  --subjects subjectlist \
  --xhemi \
  --no-vol --template-only
}}}
  
# Reg to first iteration
# Note: if you want test the symmetry, use --lhrh
{{{
foreach subject (subjectlist)
  surfreg --s $subject --t myatlas.i1 --lh
  surfreg --s $subject --t myatlas.i1 --xhemi --lh
end
}}}

# Make second iteration (<5min)
{{{
make_average_subject --out myatlas.i2 \
  --surf-reg myatlas.i1.sphere.reg \
  --subjects subjectlist \
  --xhemi \
  --no-vol --template-only
}}}
  
# Reg to second iteration. Note: if you want test the symmetry, use --lhrh
{{{
foreach subject (subjectlist)
  surfreg --s $subject --t myatlas.i2 --lh
  surfreg --s $subject --t myatlas.i2 --xhemi --lh
end
}}}

# Make final iteration (1-2 hours)
{{{
 make_average_subject --out myatlas.i3 \
  --surf-reg myatlas.i2.sphere.reg \
  --subjects subjectlist \
  --xhemi --hemi lh
}}}

1. Surface-based Interhemispheric Registration

Those using this procedure should site the following paper: Greve, Douglas N., Lise Van der Haegen, Qing Cai, Steven Stufflebeam, Mert R. Sabuncu, Bruce Fischl, and Marc Bysbaert. "A surface-based analysis of language lateralization and cortical asymmetry." (2013). Journal of Cognitive Neuroscience. In press.

1.1. Installation

Note: you only need to do this installation if you have version 5.1 or lower

Download these files

ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/surfreg
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/xhemireg
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mris_preproc
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/fsaverage_sym.tar.gz
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mult-comp-cor.tar.gz
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mri_convert.{linux,mac}
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.1.0/xhemi/mri_vol2vol.{linux,mac}

Copy surfreg, xhemireg, mris_preproc into $FREESURFER_HOME/bin Copy mri_convert.{linux,mac} into $FREESURFER_HOME/bin/mri_convert Copy mri_vol2vol.{linux,mac} into $FREESURFER_HOME/bin/mri_vol2vol

# Untar fsaverage_sym.tar.gz into your $SUBJECTS_DIR cd $SUBJECTS_DIR tar xvfz fsaverage_sym.tar.gz

# Untar mult-comp-cor.tar.gz into $FREESURFER_HOME/average cd $FREESURFER_HOME/average tar xvfz mult-comp-cor.tar.gz

# Copy mris_preproc into $FREESURFER_HOME/bin after making a backup To apply an existing atlas (eg, fsaverage_sym) to an anatomical analysis

1.2. Apply an existing atlas (fsaverage_sym)

# Reg to atlas (1-2 hours per subject) # Creates $subject/xhemi # Creates lh.fsaverage_sym.sphere.reg in $subject and $subject/xhemi

foreach subject (subjectlist)
  surfreg --s $subject --t fsaverage_sym --lh
  surfreg --s $subject --t fsaverage_sym --lh --xhemi
end

# Create a stack of subjects

mris_preproc --target fsaverage_sym --hemi lh 
  --xhemi --paired-diff \
  --srcsurfreg fsaverage_sym.sphere.reg \
  --meas thickness \
  --out lh.lh-rh.thickness.sm00.mgh \
  --s subj1 --s subj2 ...

# Smooth

mris_fwhm --s fsaverage_sym --hemi lh --cortex --smooth-only --fwhm 5\
 --i lh.lh-rh.thickness.sm00.mgh --o lh.lh-rh.thickness.sm05.mgh

# Analyze

mri_glmfit --y lh.lh-rh.thickness.sm05.mgh --glmdir glm.lh.lh-rh.thickness.sm05 \
 --osgm --surf fsaverage_sym lh 

# View

tksurfer fsaverage_sym lh inflated -aparc -overlay glm.lh.lh-rh.thickness.sm05/osgm/sig.mgh

# Correct for multiple comparisons

mri_glmfit-sim --glmdir glm.lh.lh-rh.thickness.sm05 \
   --cwpvalthresh .5 --cache 2 abs

1.3. Build Your Own Atlas

# Create xhemi subject (don't reg, a few minutes to finish)

foreach subject (subjectlist)
  xhemireg --s $subject
end

# Reg to existing sym atlas # Note: if you want test how symmetrical the atlas is use --lhrh # (but it takes twice as long)

foreach subject (subjectlist)
  surfreg --s $subject --t fsaverage_sym --lh
  surfreg --s $subject --t fsaverage_sym --xhemi --lh
end

# Make first iteration (<5min)

make_average_subject --out myatlas.i1 \
  --surf-reg fsaverage_sym.sphere.reg \
  --subjects subjectlist \
  --xhemi \
  --no-vol --template-only 

# Reg to first iteration # Note: if you want test the symmetry, use --lhrh

foreach subject (subjectlist)
  surfreg --s $subject --t myatlas.i1 --lh
  surfreg --s $subject --t myatlas.i1 --xhemi --lh
end

# Make second iteration (<5min)

make_average_subject --out myatlas.i2 \
  --surf-reg myatlas.i1.sphere.reg \
  --subjects subjectlist \
  --xhemi \
  --no-vol --template-only 

# Reg to second iteration. Note: if you want test the symmetry, use --lhrh

foreach subject (subjectlist)
  surfreg --s $subject --t myatlas.i2 --lh
  surfreg --s $subject --t myatlas.i2 --xhemi --lh
end

# Make final iteration (1-2 hours)

 make_average_subject --out myatlas.i3 \
  --surf-reg myatlas.i2.sphere.reg \
  --subjects subjectlist \
  --xhemi --hemi lh

Xhemi (last edited 2025-06-03 10:54:09 by DougGreve)