Freesurfer Abridged: Difference between revisions

From CCN Wiki
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
*Note: I am using FS_0184 (semcat) as an example; fill in the parts specific to FS_0184 with the parts specific to your subject
*Note: I am using FS_0184 (semcat) as an example; fill in the parts specific to FS_0184 with the parts specific to your subject


This is an <i>abridged</i> version of the more detailed list provided elsewhere in the wii
This is an <i>abridged</i> version of the more detailed list provided elsewhere in the wiki.


== Structural ==
== Structural ==


*Slicer  
# Slicer  
** In terminal, <code>Slicer &</code>
#* In terminal, <code>Slicer &</code>
** Load data brainmask.nii
#* Load data brainmask.nii
** Save data as brainmask.mgz
#* Save data as brainmask.mgz
** Results: creates brainmask.mgz file
#* Results: creates brainmask.mgz file
* Autorecon 1
# Autorecon 1
** In terminal, <code>autorecon1_SC.sh FS_0184</code>
#* In terminal, <code>autorecon1_SC.sh FS_0184</code>
** Don't bother editing after this step; skip to autorecon 2
#* Don't bother editing after this step; skip to autorecon 2
** Result: populates mri folder (includes "T1.mgz")
#* Result: populates mri folder (includes "T1.mgz")
* Autorecon 2
# Autorecon 2
** In terminal, <code>autorecon2_SC.sh FS_0184</code>
#* In terminal, <code>autorecon2_SC.sh FS_0184</code>
** Editing
#* Editing
*** One terminal, <code>tksurfer FS_0184 lh inflated</code>
#** One terminal, <code>tksurfer FS_0184 lh inflated</code>
*** In another terminal, <code>tkmedit FS_0184 brainmask.mgz -aux T1.mgz -surfs</code>
#** In another terminal, <code>tkmedit FS_0184 brainmask.mgz -aux T1.mgz -surfs</code>
*** Look for any noticable spikes in the tksurfer brain and edit the brainmask (tkmedit). See wiki page for details; this is the most labor intensive part of anatomical so make sure you're doing it right.
#** Look for any noticable spikes in the tksurfer brain and edit the brainmask (tkmedit). See wiki page for details; this is the most labor intensive part of anatomical so make sure you're doing it right.
** Results: creates lh.cortex.label and rh.cortex.label in label folder
#* Results: creates lh.cortex.label and rh.cortex.label in label folder
* Autorecon 3
# Autorecon 3
** In terminal, <code>autorecon3_SC.sh FS_0184</code>
#* In terminal, <code>autorecon3_SC.sh FS_0184</code>
** Editing
#* Editing
*** In terminal, <code>tksurfer -annot aparc FS_0184 lh pial</code>
#** In terminal, <code>tksurfer -annot aparc FS_0184 lh pial</code>
*** If needed, reference <code>tksurfer -annot aparc fsaverage lh pial</code>
#** If needed, reference <code>tksurfer -annot aparc fsaverage lh pial</code>
*** Repeat with right hemi
#** Repeat with right hemi
*** Make sure to EXPORT ANNOTATION! Do not "save overlay!"
#** Make sure to EXPORT ANNOTATION! Do not "save overlay!"
*** Again, be sure to see the autorecon3 page
#** Again, be sure to see the autorecon3 page
**Result: populates label folder (includes "lh.aparc.annot" and "rh.aparc.annot")
#*Result: populates label folder (includes "lh.aparc.annot" and "rh.aparc.annot")


== Functional ==
== Functional ==


# Matlab
# Bold file preparation
#* Semcat processing
#** In terminal, <code> matlab &</code>
#** In matlab, <code>startup_spm12</code>
#** **Check with your local Principle Investigator&trade; or Graduate Work Horse&trade; for more details about Semcat bold files**
#* LDT processing
#** In terminal, <code>matlab &</code>
#** nii_4D_drop_vols('f.nii', [# vols to drop])
#** set_TR(2.047, [1 2 3 4 5 6], 'f.nii')
#** d=datenum('DD-Mmm-YYYY') (e.g. '05-Oct-1997')
#** subj_ID='0183'
#** FSTSExtractor('prefix', 'LDT_', 'subject', subj_ID, 'run', i, 'tr', 2.047, 'volumes_dropped', <initial # drop vols>, 'date', d)
#*** This step must be completed for each f.nii file in each bold folder
#*** IT IS VERY IMPORTANT to look at what volumes to drop. It will likely not be the same for each bold file, unless it is a newer LDT participant. You can find more information [[http://ccnlab.psy.buffalo.edu/wiki/index.php/Freesurfer_BOLD_files]] here.
# Analysis  
# Analysis  
#* cd to subject folder
#* mkanalysis.sh
# Contrasts
# Contrasts
#* cd to subject folder
#* Run <code>mkcontrast.sh</code>
# Pre-processing
# Pre-processing
#* Run <code>preproc-sess -per-run -fwhm 6 -surface self lhrh -fsd bold -s FS_<subj_ID></code>
# Selxavg
# Selxavg
# Sub-parcellation
#* Run <code>selxavg3-sess -s <subjectname> -analysis <analysis path></code>
# Clut
#* Analysis path is where your LDT.?h.sm6 folders are.
# (Optional) Clut and Subparcellation
#* Run <code>clut.sh FS_<subj_ID></code>
#* Run <code>subpar.py FS_<subj_ID></code>
# Blobs
# Blobs
== Timeseries Analysis ==
== Timeseries Analysis ==

Latest revision as of 11:55, 11 May 2022

Setting Up

  • Note: I am using FS_0184 (semcat) as an example; fill in the parts specific to FS_0184 with the parts specific to your subject

This is an abridged version of the more detailed list provided elsewhere in the wiki.

Structural

  1. Slicer
    • In terminal, Slicer &
    • Load data brainmask.nii
    • Save data as brainmask.mgz
    • Results: creates brainmask.mgz file
  2. Autorecon 1
    • In terminal, autorecon1_SC.sh FS_0184
    • Don't bother editing after this step; skip to autorecon 2
    • Result: populates mri folder (includes "T1.mgz")
  3. Autorecon 2
    • In terminal, autorecon2_SC.sh FS_0184
    • Editing
      • One terminal, tksurfer FS_0184 lh inflated
      • In another terminal, tkmedit FS_0184 brainmask.mgz -aux T1.mgz -surfs
      • Look for any noticable spikes in the tksurfer brain and edit the brainmask (tkmedit). See wiki page for details; this is the most labor intensive part of anatomical so make sure you're doing it right.
    • Results: creates lh.cortex.label and rh.cortex.label in label folder
  4. Autorecon 3
    • In terminal, autorecon3_SC.sh FS_0184
    • Editing
      • In terminal, tksurfer -annot aparc FS_0184 lh pial
      • If needed, reference tksurfer -annot aparc fsaverage lh pial
      • Repeat with right hemi
      • Make sure to EXPORT ANNOTATION! Do not "save overlay!"
      • Again, be sure to see the autorecon3 page
    • Result: populates label folder (includes "lh.aparc.annot" and "rh.aparc.annot")

Functional

  1. Bold file preparation
    • Semcat processing
      • In terminal, matlab &
      • In matlab, startup_spm12
      • **Check with your local Principle Investigator™ or Graduate Work Horse™ for more details about Semcat bold files**
    • LDT processing
      • In terminal, matlab &
      • nii_4D_drop_vols('f.nii', [# vols to drop])
      • set_TR(2.047, [1 2 3 4 5 6], 'f.nii')
      • d=datenum('DD-Mmm-YYYY') (e.g. '05-Oct-1997')
      • subj_ID='0183'
      • FSTSExtractor('prefix', 'LDT_', 'subject', subj_ID, 'run', i, 'tr', 2.047, 'volumes_dropped', <initial # drop vols>, 'date', d)
        • This step must be completed for each f.nii file in each bold folder
        • IT IS VERY IMPORTANT to look at what volumes to drop. It will likely not be the same for each bold file, unless it is a newer LDT participant. You can find more information [[1]] here.
  2. Analysis
    • cd to subject folder
    • mkanalysis.sh
  3. Contrasts
    • cd to subject folder
    • Run mkcontrast.sh
  4. Pre-processing
    • Run preproc-sess -per-run -fwhm 6 -surface self lhrh -fsd bold -s FS_<subj_ID>
  5. Selxavg
    • Run selxavg3-sess -s <subjectname> -analysis <analysis path>
    • Analysis path is where your LDT.?h.sm6 folders are.
  6. (Optional) Clut and Subparcellation
    • Run clut.sh FS_<subj_ID>
    • Run subpar.py FS_<subj_ID>
  7. Blobs

Timeseries Analysis