Printable Version
Editable Version

fMRI Data Analysis Tutorial: for Afni.



# In this tutorial, the sample E file is E17239, the P file P01024,

# the subject name Pl09. Unix prompts are highlighted in bold.

# Comments are preceded by the # sign.
 
 
 
 

# =============================================

# Pre-analysis stuff: for Windows.

# =============================================
 
 

# Now you should be in sol4, where I analyze data.

# First thing’s first. Get out of the dumb C shell and into the friendly TC shell.

# And then set up the X-Forwarding so you can see afni.
 
 

# =============================================

# Pre-analysis stuff: for Linux.

# =============================================
 
 

# secure shell to Sol4.
 
 

# =============================================

# Pre-analysis stuff: On your own computer.

# =============================================
 
 

Nothing. You should know what to do. :)
 
 

# ============================================

# Section 1: Making directories to store data

# ============================================
 
 

# =================================================

# Section 2: Data Transfer

# =================================================
 
 

# Now we get the data, which is behind the UMC firewall, so we have to go through a

# proxy, mrisun.
 
 

# Make a directory to store your files.
 
 

# Now ftp to Sol3, where the files are stored, and get them.
 
 

# When you have all files in mrisun, go to Sol4, put the P file into run1,

# E files into Anatomy, and delete the files from mrisun.
 
 

#Now you should be back in Sol4 and ready for the next stage.
 
 
 
 

# ====================================================

# Section 3: Reconstructing the Functional Images

# ====================================================
 
 

# Now push back the directory stacks.
 
 

# ====================================================

# Section 3a: Anatomical bricks (Can be done at same time as reconstruction)

# ====================================================
 
 

# Sorry, but you need to do this for each series. Maybe one day it’ll change.
 
 

# Now you’re in the to3d program will open a window on the desktop.
 
 

# The following may change, as sometimes data will be acquired in a strange way,

# so keep an eye on the alignment.
 
 

# ====================================================

# Section 4: Constructing Functional bricks

# ====================================================
 
 

# 177 = number of reps; 23 = number of slices; 3000 = TR.
 
 

# Now you’re in the to3d program will open a window on the desktop.
 
 

# The following may change, as sometimes data will be acquired in a strange way,

# so keep an eye on the alignment.
 
 

# ====================================================

# Section 5: Reregistering images.

# ====================================================
 
 

# If you are reregistering a run to another run (e.g., run2 to run1), use this:
 
 


 
 

# ==============================================================

# Section 6: Normalizing images (unnecessary if have only 1 run.

# ==============================================================

# Creative bshort files: fgs always = 1; nas = # anat slices; nfs = # func slices.
 
 

# Normalizing images, bshorts -> bfloats: nslices = # anat slices.
 
 

# Making bfloats into afni bricks: need to change 3Df:0:0:64:64:??? to match # of

# functional images.
 
 


 
 

# ===================================================================

# All done with registration and normalization. Ready to analayze!!!

# ===================================================================