Analyzing the Data

To describe the steps in fMRI data analysis, we will consider a hypothetical session performed on subject entered on the scanner as study-subj001 on Oct. 19, 2003 at eleven o'clock in the morning.

Note: Please take note that we now require all scanned participants to have an anonymous codified ID which we'll use to enter on the scanner console. We will not use participant's real names, birthdays or any other identifying information.

Let's say that this session consisted of:

After the experiment the data were transferred to the BIC server.


Finding and Transferring the Data

After your scan, the technicians will transfer your images to the BIC network. If you do not have a BIC login account, you should email the BIC admins to request one.

Once your account is setup, you will need to transfer the images with a software client that supports SFTP connections. On Windows, you can use WinSCP and on both Mac or Windows there is Cyberduck and Filezilla.

After you have the software up and runningon your machine, SFTP connect to login.bic.mni.mcgill.ca on port 22 with your username and password and change to the transfer directory where you will find your images.

You can find the images saved as MINC files on /data/transfer/minc on the BIC servers. For more information on this image format, please refer to the MINC Documentation on Wikibooks .

And for the raw data in DICOM format, check the following directory: /data/transfer/dicom

Inside either of these directories you will find a subfolder with your participant's images. DICOM subfolders are named with the following convention:

dicom-<SUBJECT_ID>_<DATE>_<TIME>


In both locations, the data exists for one week before it's erased.

If there is a problem with your transferred data, please notify the MRI technicians as soon as possible.



For our hypothetical session, we would find the following MINC 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 Temporary Working Directory

The BIC provides a computing platform which includes network disk space that you can use to analyze and store your fMRI data. Your supervisor may wish to purchase BIC network storage space that is maintained by our system administrators. Or you can use temporary space on the BIC network at no charge. This temporary disk space, which you can find in the /data/scratch location on the BIC network is erased on a weekly and monthly basis. You would therefore have to transfer your results to your own disk before it is deleted.

In order to analyse your data will need to first create a directory for your output. You can create a temporary subfodler for yourself in either /data/scratch/scratch1 or /data/scratch/scratch2. Once your scratch subdirectory is created, copy your data over from /data/transfer/minc. For example,

mkdir /data/scratch/scratch1/yourname

mkdir /data/scratch/scratch1/yourname/study_subj001

cd /data/scratch/scratch1/yourname/study_subj001

cp /data/transfer/minc/study_subj001_20031019_111740 .

Note: The /data/scratch directories are erased on a weekly and monthly basis. Please contact the BIC network administrators for more information.


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/scratch/scratch1/yourname/subj001_study/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 study_subj001_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 Back to table of contents Next