Analyzing the Data

To describe the steps in fMRI data analysis, we will consider a hypothetical session performed on subject John Blank on Oct. 19, 2003 at eleven o'clock in the morning. The session consisted of:

After the experiment the data were transferred to the fMRI node (i.e. /data/transfer/minc/).

Finding the Transferred Images

After the data transfer is finished, you can find the images saved as MINC files on /data/transfer/minc on the BIC servers. If would like more information on the MINC image format, please refer to the Minc Documentation on the Wikibooks website. For our hypothetical session, we would find the following directory:
Inside this directory you should find the minc files named similarly:


You may have many MINC images in your transfer directory and it may be difficult to determine which imaging sequence the files correspond to. Rest assured that the protocol information is always described in the MINC header. You can run the following command for a quick listing of the protocol name for each of your image files:

~mferre/bin/lsminc <input_files>


Finding the analysis software

For our analysis we will be using fmristat. You can find more information about fmristat, as well a worked out example showing exactly how to use it, on Dr. Keith Worsley's fmristat webpage.
 

You can access the fmristat software directly in MATLAB if you are logged into a BIC machine. It is not necessary to add any path to your MATLAB environment - simply type 'matlab' at the command line to start the program.

You will only need a basic understanding of Matlab to run fmristat. There are many online guides and tutorials for Matlab. The official Mathworks documentation site may be a good starting point.


Setting up a Working Directory

You should first set up a subdirectory for analysis of the session on  /data/fmri/analysis/ or on one of the /data/scratch/ disks (/data/scratch/scratch1 or /data/scratch/scratch2). If you don't have write access to the /data/fmri/analysis/ directory, you may e-mail our System Administrators at the following address:  BIC Admin e-mail graphic   to give you permission to write in that directory. Copy the data over from /data/transfer/minc and make a separate directory for the dynamic data that will be used during the analysis. For example,

mkdir /data/fmri/analysis/yourname

mkdir /data/fmri/analysis/yourname/blank_john

cd /data/fmri/analysis/yourname/blank_john

cp /data/transfer/minc/blank_john_20031019_111740 .


Note: The /data/fmri/analysis sub-directories are erased every week on Sunday.

Preprocessing the Data

Before proceeding with the analysis, it is a good idea to motion correct and low pass filter your functional data.

During dynamic data acquisition the subject may execute slight, transient head movements due to breathing, swallowing, or whatever functional task the subject was asked to perform. Their head position may also drift over a longer time scale. Such motion can cause false intensity changes in the dynamic data which can either obscure or mimic true activation induced signal changes. We can correct the data, if the movements are less than 1 mm or 1 degree, by registering all image frames in each dynamic file to one single target in that run. Frames with movements larger than 1mm or 1 degree may have to be excluded from the analysis - more information on this topic in the subsequent section on fmrilm.

Preprocessing is performed using the program fmr_preprocess, which also low-pass filters, or blurs, the dynamic data (blurring is the default but it can be disabled). Low-pass filtering increases the signal-to-noise ratio of the data, increases the tolerance of the subsequent analysis steps to residual motion in the scans, and minimizes resampling artifacts.

We would preprocess each dynamic run one at a time, by going to the directory /data/fmri/analysis/yourname/john_blank/dynamic and typing the command 'fmr_preprocess' on the Unix command line, followed by the list of options you want to process and the file name. You can write for example:

fmr_preprocess  -fwhm 6 -target 3 blank_john_20031019_111740_3_mri.mnc.gz

This will blur your image with a 6 mm FWHM Gaussian filter and align all the frames to the third frame in the first run. The new files that are created have the suffix  `_MC'  (for Motion Corrected).
For example:


Note that the output files are not compressed, so they don't have the .gz extension. Make sure you have enough space in the directory where the motion-corrected images will be written.

All 120 time frames in both scanning runs will be registered by default to the third frame in the respective run. Each time frame will also, by default, be blurred with a 6 mm FWHM Gaussian kernel. If you would like use a different blurring value, you just have to change the -fwhm parameter in the call to fmr_preprocess. If you would like to register your frames to a different target frame, simply specify the target number in the -target option.






Previous Next Back to table of contents