• Blog
  • About
  • Publications
  • Videos
  • Workshops
  • CV
  • Contact Me
  • Hall of Fame
Menu

Andy's Brain Blog

Street Address
City, State, Zip
Phone Number
fMRI, Neuroimaging, and More

fmri, neuroimaging, and more

Andy's Brain Blog

  • Blog
  • About
  • Publications
  • Videos
  • Workshops
  • CV
  • Contact Me
  • Hall of Fame

FreeSurfer Workshop, Day #1: Overview and Installation

December 5, 2017 Andrew Jahn
FS_aparc2009.png

This post is for the FreeSurfer Workshop given at Haskins Laboratories on Wednesday, December 6th, at 3:00pm. Here you will find links to the programs that were discussed during the workshop. Workshop attendees can also post comments in the Disqus section below.

FreeSurfer Download:

FreeSurfer can be downloaded from this link: https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall

Prerequisites for installing parallel:

Apple Xcode: https://itunes.apple.com/us/app/xcode/id497799835?mt=12

Homebrew: https://brew.sh/

Follow the instructions on the Homebrew site for installation, then open a terminal and type "brew install parallel." Then go into your directory containing your anatomical images (in NIFTI format) and type the following:

ls *.nii | parallel --jobs 8 recon-all -s {.} -i {} -qcache -3T -all

You may want to set your SUBJECTS_DIR variable to your current working directory with the following command:

In t-shell: setenv SUBJECTS_DIR `pwd`

In bash: export SUBJETS_DIR=`pwd`

Open Science Grid

Join OSG by going here: https://www.opensciencegrid.org/join/

To deidentify fMRI data, convert your DICOM files with dcm2niix: https://github.com/rordenlab/dcm2niix

MRIs can be anonymized with mri_deface: https://surfer.nmr.mgh.harvard.edu/fswiki/mri_deface

Next, get fsurf, OSG's FreeSurfer command: https://support.opensciencegrid.org/support/solutions/articles/12000008488-setting-up-fsurf-on-your-computer

Downloading the sample data

Anatomical data from openfmri.org can be found here: https://openfmri.org/dataset/ds000174/

Running fsurf

Create a text file called "run_fsurf.sh" and use this text:

#!/bin/tcsh

#This script submits each zipped directory structure to fsurf
#You can check the status of the workflow by typing "fsurf list"
#First create the file "subjList.txt" by going into the ds174 directory containing all of the subject directories, and typing the following:
# ls | grep sub* > subjList.txt

foreach subj (`cat subjList.txt`)
cd $subj/ses-BL/anat
fsurf submit --subject=$subj --input=$subj.zip --defaced --deidentified --version 6.0.0 --freesurfer-options='-all -3T -qcache'
cd ../../..
end

 

As the file states, first create a textfile called "subjList.txt" by typing this from the terminal:

ls | grep sub* > subjList.txt

Then run the script using the t-shell:

tcsh run_fsurf.sh

You can check on your workflows on the OSG by typing "fsurf list"

FreeSurfer Tutorials on YouTube

 

This page will be updated with more links and videos; check back soon!

← ROI Analyses in FreeSurferIntroduction to FSLeyes: Playlist and Tutorials →
No results found
Archive
  • September 2024
  • June 2024
  • March 2024
  • January 2024
  • June 2023
  • May 2023
  • April 2023
  • February 2022
  • January 2022
  • January 2021
  • December 2020
  • April 2020
  • December 2018
  • April 2018
  • January 2018
  • December 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • January 2017
  • November 2016
  • August 2016
  • July 2016
  • February 2016
  • January 2016
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • April 2012
  • March 2012

What's on Andy's Brain this month?

Connect with Andy!

Summary Block
This block is invalid. Please check the block settings and try again.
Featured
Aenean eu leo Quam

Powered by Squarespace