Differences between revisions 3 and 4
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
The purpose of this tutorial is to make you familiar with the structure that the data need to be in order to use FS-FAST.You may want to consult the slides from the [[http://surfer.nmr.mgh.harvard.edu/pub/docs/fsfast.april2011.pdf|Intro FSFAST talk]]. The purpose of this tutorial is to make you familiar with the structure that the data need to be in order to use FS-FAST. You may want to consult the slides from the [[http://surfer.nmr.mgh.harvard.edu/pub/docs/fsfast.april2011.pdf|Intro FSFAST talk]].

<<TableOfContents(1)>>

= The Project Directory =
Line 16: Line 20:
This is the Project Directory. You will run most of the FSFAST
commands from the Project Directory. You will see 18 folders with names like "sess09". These are the 18
subjects. There are some other files and folders there but don't worry
about them right now.
Line 17: Line 25:
There will be 18 sessions of data. All of these sessions have been analyzed with the exception of = The 'Session' Folder =

All of these sessions have been analyzed with the exception of
Line 29: Line 39:

== The 'Session' Folder ==
Line 45: Line 53:
== The 'subjectname' File == = The 'subjectname' File =
Line 60: Line 68:
== Functional Subdirectories (FSDs) == = Functional Subdirectories (FSDs) =
Line 74: Line 82:
=== Raw Data === == Raw Data ==
Line 107: Line 115:
=== Paradigm Files === == Paradigm Files ==
Line 140: Line 148:
  * What time was the third Encode presented?
  * What time was the last Neutral Distractor presented?
  * Is this timing for all runs the same?
= Study Questions =

  * What is the difference between the Project Directory and a Session?
  * What gets stored in a Run directory?
  * True or False: the subjectname file goes in the FSD?
  * What does the first column of the paradigm file tell you?
  * How is the functional FreeSurfer analysis linked to the antomical FreeSurfer analysis?
  

top | previous | FSFAST Tutorial Top

Understanding the FS-FAST Directory Structure

The purpose of this tutorial is to make you familiar with the structure that the data need to be in order to use FS-FAST. You may want to consult the slides from the Intro FSFAST talk.

1. The Project Directory

To start, cd into the tutorial directory and type 'ls' to see what's there:

cd $FSFTUTDIR
ls

This is the Project Directory. You will run most of the FSFAST commands from the Project Directory. You will see 18 folders with names like "sess09". These are the 18 subjects. There are some other files and folders there but don't worry about them right now.

2. The 'Session' Folder

All of these sessions have been analyzed with the exception of sess01.noproc. This session is what the directory structure should look like immediately prior to beginning analysis. This includes:

  • Directory structure
  • Raw data
  • subjectname file
  • Paradigm files for each run

The directory structure and raw data are usually created by "unpacking" the data with the FreeSurfer dcmunpack or unpacksdcmdir programs, but it could also be done by hand. The subjectname file and paradigm files must be added manually.

The folder/directory where all the data for a session are stored is called the 'session' or the 'sessid'. There may be more than one session for a given subject (eg, in a longitudinal analysis). Go into the sess01.noproc folder and run 'ls':

cd $FSFTUTDIR/sess01.noproc
ls

You will see see a file called 'subjectname' and two folders called 'bold' and 'rest' (these are "Functional Subdirectories" (FSDs)).

3. The 'subjectname' File

subjectname is a text file with the name of the FreeSurfer subject as found in $SUBJECTS_DIR (ie, the location of the anatomical analysis).

View the contents of the text file (with 'cat', 'more', 'less',
'gedit', or 'emacs') and verify that this subject is in the
$SUBJECTS_DIR.

NOTE: it is important that the anatomical data and the functional data be from the same subject. The contents of the subjectname file is the only link! Make sure that it is right! After preprocessing, this can be checked by examining the quality of the registration (the BBR cost).

4. Functional Subdirectories (FSDs)

The other two directories (bold and rest) are 'functional subdirectories' (FSDs) and contain functional data. If you

ls rest

you will see '001'. If you

ls bold

you will see '001 002 003 004'. Each of these is a 'run' of fMRI data, ie, all the data collected from a start and stop of the scanner.

4.1. Raw Data

Go into the first run of the bold directory:

cd bold/001
ls

You will see 'f.nii.gz wmfir.par workmem.par'. The raw data is stored in f.nii.gz (compressed NIFTI) and is directly converted from the DICOM file; the others are paradigm files. Examine f.nii.gz file with mri_info:

mri_info --dim f.nii.gz
mri_info --res f.nii.gz

The first command results in '64 64 30 142'. This is the dimension of the functional data. Since it is functional, it has 4 dimensions: 3 spatial and one temporal (ie, 64 rows, 64 cols, 30 slices, and 142 time points or TRs or frames).

The second command results in '3.438 3.437 5.000 2000.000'. This is the resolution of the data, ie, each voxel is 3.438mm by 3.437mm by 5.000mm and the TR is 2000ms (2 sec).

View the functional data with:

tkmedit -f f.nii.gz -t f.nii.gz

Click on a point to view the waveform at that point.

4.2. Paradigm Files

The workmem.par and wmfir.par files are paradigm files. They are text files that you create that indicate the stimulus schedule (ie, which stimulus was presented when).

View workmem.par. Each row indicates a stimulus presentation. You will see that each row has 5 columns. The columns are:

  • Stimulus Onset Time (sec)
  • Numeric Stimulus Identifier
  • Stimulus Duration (sec)
  • Weight (usually 1)
  • Text Stimulus Identifier (redundant with Numeric Stimulus Identifier)

The Stimulus Onset Time is the onset relative to the acquisition time of first time point in f.nii.gz. The Numeric and Text Stimulus Identifiers indicate which stimulus was presented. The Stimulus Duration is the amount of time the stimulus was presented. The Weight allows each presentation to have its own weight in a parametric modulation analysis; here each presentation is weighted equally (weight=1).

In this case, there are 5 event types:

  • Encode - encode phase
  • EDistrator - emotional distractor
  • EProbe - probe after emotional distractor
  • NDistrator - neutral distractor
  • NProbe - probe after neutral distractor

Note two things: (1) Not all the time is taken up, and (2) Baseline/Fixation is not explicitly represented. By default, any time not covered by stimulation is assumed to be baseline.

5. Study Questions

  • What is the difference between the Project Directory and a Session?
  • What gets stored in a Run directory?
  • True or False: the subjectname file goes in the FSD?
  • What does the first column of the paradigm file tell you?
  • How is the functional FreeSurfer analysis linked to the antomical FreeSurfer analysis?

FsFastTutorialV5.1/FsFastDirStruct (last edited 2016-09-01 17:55:56 by AllisonMoreau)