Advanced FEAT lab
From NITP Summer Course Wiki
Advanced Single Subject Analysis with FEAT
Adapted from: Parametric design practical from FSL
FEAT 2 Tutorial
This page is the first part of the second FEAT practical. It leads you through some of the more advanced usage and concepts in FEAT.
Contrasts in Parametric Designs We can use contrasts in FEAT to investigate different levels of stimulation. In the following example we have 3 different stimulation heights: low, medium and high, and we want to know if there is a linear or quadratic trend relating stimulation strength to response strength in different areas of the brain.
Launch FSL by double clicking the NITP Environment file on the Dock as before.
- We will be using data stored in the folder fsl_course_data/fmri/art2
- Load in the FMRI data artdatamultistims.nii.gz (note that because the data has only 3 slices a pop-up appears to notify you that the default settings in FEAT have been changed - this does not concern us as are going to turn off pre-stats and registration in this analysis).
- Again this dataset has already been preprocessed, so change Full analysis to Stats + Post-stats.
- Now setup the experimental design. The experimental design is as follows.
- There are 3 EVs (one for each stimulation level) and all are boxcar designs with ON time of 20 seconds and OFF of 60 seconds, but with different phases:
EV1: low stimulation, phase 60 seconds EV2: medium stimulation, phase 40 seconds EV3: high stimulation, phase 20 seconds
- Next, setup three contrasts to look for the three different stimulations separately:
[1 0 0], [0 1 0], [0 0 1].
- We now need to setup the appropriate contrasts to allow us to investigate the trends. To look for a linear trend, add the two contrasts:
[1 0 -1], [-1 0 1]
- To look for a quadratic trend, use the two contrasts:
[0.5 -1 0.5], [-0.5 1 -0.5]
It can be tricky to input these decimal values, as the FEAT program is fickle about input into these boxes. Try first entering the 5, and then the decimal point, or entering 1.5 and then use the arrows to adjust.
- Give all the contrasts suitable titles and press Done.
- Turn off all registration by selecting the Registration tab and making sure that the radio buttons on the left are all deselected.
- Now press go; wait for it to finish and view the results. Identify which areas of the brain have the different types of trend AND in which directions.
Model Assessment
It is a good idea to look at the data to ensure that your model is correct and behaving as you would expect. One method for verifying this is to examine the residuals of your model. Remember that if your model is correct, then the residuals should be distributed as random noise, with no systematic patterns present. If there are patterns in the residuals after you have run your model, then that indicates that either your regressors are somehow incorrect, or there are other sources of variation in the observed data that your model has not accounted (i.e. missing regressors).
A quick and powerful way to examine the residuals is to use the FSL tool MELODIC. MELODIC performs model-free analysis of a data time-series using ICA. You will learn about the details of MELODIC next week, but for now you only need know that it will extract any signals that are present in the data without having to specify a design matrix in advance. By running MELODIC on the residual volumes, we can see if there seem to be any 'functionally significant' patterns in the data that our model failed to detect.
Run the basic boxcar analysis on the av dataset again (you can load the design.fsf file from your previous analysis), but this time remove the second regressor so that the auditory stimulation doesn't get modeled. Run the analysis, and you should get a new .feat directory (FSL adds '+' signs by default, so that old analyses don't get overwritten).
Now we can run MELODIC on the residuals of both our 'complete' and 'incomplete' analyses and compare the differences.
Because of how MELODIC works, we cannot run the analysis on the raw residual timecourse (it needs the timeseries data to have a non-zero mean, and residuals will necessarily have a mean of zero), so we will have to transform the data.
Go to a Terminal window (you may need to go to the top 'Applications' menu and select 'Terminal' to create a new one if your current terminal is running FSL) and change your directory to be where you ran your first 'correct' analysis (using the 'cd' command). After you're there, cd again into the 'stats' directory. If you type the command 'ls' it should list the contents of that folder, which should include a res4d.nii.gz file. Those are the residuals. To make the data have a non-zero mean, we can add a constant to the voxels that have data. The easiest way to do this is to use the mask volume that FSL has already calculated to do your first-level analysis. Enter the following at the command line:
fslmaths ../mask -mul 1000 mask1000
This makes a new volume with a value of 1000 for every place there is data, and zero in all other places. Then we add that to our residuals by typing the following:
fslmaths res4d -add mask1000 res4d_1000
This command makes a new residual timeseries with each volume now having a mean of 1000 instead of zero at all points where there is data.
After doing this transform, we can run MELODIC on the new dataset. Click the MELODIC ICA button from the FSL program window. MELODIC is organized in a similar fashion to FEAT, so it should be straightforward to use. First select our newly created dataset on the Data tab.
Because this is a statistical map that has already been processed with FEAT, we need to turn off a number of settings. Under Pre-Stats, turn off BET and MCFLIRT, set the smoothing to zero, and turn off the highpass filter. You can also turn off all registration in the Registration tab. Under the Stats tab, go ahead and unselect 'Automatic dimensionality estimation', and set the number of components to 5. If there's real signal in the residuals after running the model and it's important enough to consider revising the model, it should show up in the first few components. Press Go.
After the model has run, the webpage showing the output will display the maps of each of the 5 components, sorted based on how much of the variance in the data that the component explains. Inspect these visually for anything that appears 'suspicious'.
Now cd into the other 'incomplete' FEAT analysis directory where the auditory regressor was missing and follow this exact procedure again. Visually compare the MELODIC output of this new analysis to the MELODIC output from the 'correct' model.
