FEAT 0 Practical

This practical leads you through a basic subject-level analysis and group-level analysis using FEAT. The purpose of this practical is to familiarize the user with the FEAT GUI, FEAT outputs, and a simple analysis pipeline. Therefore, the experimental design and data analysis are relatively straightforward. This should allow you to focus on the fundamental analysis pipeline, without getting bogged down with more complex datasets and experimental designs.

For both the subject-level and group-level analyses, you will be modelling the mean response to visual stimuli. You should come away from this practical feeling comfortable with FEAT, because the next three FEAT practicals will go into more depth and more complex designs. Throughout this practical, have the FEAT User Guide open, and briefly read the relevant section on each topic covered in this practical to get further infomation and to help if you get stuck. To make the most of this practical, make sure to discuss these topics with the other students around you, and don't hesitate to ask the tutors for help.

Contents:

Subject-level analysis
Preprocessing and GLM analysis of single-subject functional data using first-level FEAT.
Group-level analysis
Group-level GLM analysis using higher-level FEAT.

Subject-level analysis

Data

cd ~/fsl_course_data/feat0/subject

In this section, you will set up a basic first-level design to model a single condition relative to baseline. This was a block design, which included 12 lots of 30-second blocks of colour images containing landscapes or animals. The subject was asked to indicate whether each image contained an animal and to try and remember the image. The blocks alternate with periods of rest.

The first thing you will want to do is navigate to the subject's directory (sub-001) and LOOK AT THE DATA! The subfolders in this directory contains the following images:

As the file naming suggests, some of the image preparation steps have already been done for you, i.e. the structural image and field map magnitude image have been brain extracted, the field map phase image has been converted to units of rad/s and also brain extracted. The brain extraction was carried out using BET and field map preparation using fsl_prepare_fieldmap.

Take a quick look at these images using fsleyes to check that they are OK. For example, are there any unexpected artefacts? Are the brain orientation labels correct? You can also check an image's header information to ensure that your scan parameters are correct using fslinfo (or fslhd for a more extensive information list). You should always look at your data and check these parameters to make sure that your data are in the condition/orientation/dimensions you expect. Use the commands:

fsleyes sub-001/func/sub-001_task-animals_bold.nii.gz &
fslinfo sub-001/func/sub-001_task-animals_bold.nii.gz
Using the image header information for the three image types (structural, field map, functional), what is the correct order of increasing spatial resolution i.e. decreasing voxel size?
Incorrect! The field map has larger voxels than the functional.
Incorrect! The structural image should always have better resolution than the functional and field map images.
Correct! The field map has a voxel volume of 42.875 mm3, the functional has a voxel volume of 27 mm3, and the structural has a voxel volume of 1 mm3.

FEAT pipeline

Before beginning the first-level analysis, take a look at the flow chart below. You will cover each of these areas in turn. Keep your eye on this diagram as you progress in order to keep the big picture in mind.

First level analysis flowchart

Open FEAT using the FSL GUI, or through the terminal by typing:

Feat & (or Feat_gui & if you are using a Mac)

To set up the first-level analysis, you need to enter the necessary information into each tab of the FEAT GUI. When you open FEAT you will see a series of tabs: Misc, Data, Pre-stats, Registration, Stats, and Post-stats. You can leave the settings in the Misc tab at their defaults. In all other tabs you will need to enter the relevant information as described below. If you get stuck, scroll your mouse over the different parameters for a help box explaining your options in more detail, or ask a tutor.

Data

The Data tab is used to set your inputs and scan parameters for the rest of the analysis. Load sub-001/func/sub-001_task-animals_bold.nii.gz as your input data. FEAT determines the Total volumes and TR parameters from the header files, hence the importance of making sure those contain correct information.

Insert your output directory name, for example sub-001/my_1stLevel.feat (note that if you leave this field blank, it will automatically call the output directory using the input filename, in this case FUNCT.feat)

There are no volumes to delete for this analysis as the scanner has already done that in this case (which is common for many scanners). Setting the correct High Pass Filter cut-off can be tricky for some designs. We will look at this more closely in the next practical, for now please set this value to 100 seconds.

Pre-stats

The Pre-stats tab is used to perform preprocessing. Select B0 unwarping, loading the input file fmap/sub-001_rads1.nii.gz for the fieldmap image and fmap/sub-01_magnitude1_brain.nii.gz for the magnitude image. Some of the Pre-stats options will be determined when you load your input files, others you should select. Set the unwarp direction to -y and leave the % signal loss threshold at the default. Correct parameters for EPI TE and effective EPI echo spacing can be found in fmap/sub-001_params.txt.

  1. Why might you want to input an Alternative reference image? answer

  2. Information regarding the slice order and slice timing can be obtained from your scan's DICOM images using dcm2niix, a DICOM-to-NIFTI converter. You can get dcm2niix here
  3. Why is signal loss information entered in the B0 unwarping section? answer

  4. Intensity normalization is off by default, but grand mean scaling is automatically carried out behind the scenes. Why is Grand mean scaling necessary? answer

Looking ahead: MELODIC ICA data exploration is an "Advanced" artefact removal approach, so will not be covered in this practical. It will be covered in FEAT 3 Practical.

Registration

The registration tab is used to estimate the transformations for spatial normalization i.e. for aligning the functional scan with the subject's anatomical scan and/or with a standard template. Select BBR for the main structural image and load your anat/sub-001_T1w_brain.nii.gz file. Normally, in a 2-step registration you should turn on the Nonlinear registration to register to standard space. However, only for the purpose of this practical (to save time), leave Nonlinear OFF.

Stats

The Stats tab is where the GLM design matrix is set up. For this practical, leave these settings at default and change only your design matrix. It is easiest to do this by using the Full model setup option and specifying the EVs using the 3 column format option (see FEAT User Guide for details) under Basic shape. Use the timing text file as input; timing of the stimuli events is recorded in the func/sub-001_task_animals_events.txt file already organised into the appropriate format. You should get into the practice of naming your EVs in a logical way so that later when you refer back to your design you know what you have done. You can leave the rest of the EVs tab at default settings. Note Add temporal derivative is selected; this is the FEAT default alternative to slice timing correction. We will consider the role of the temporal derivative in more detail in the next practical

Why does the temporal filtering option appear in the design matrix setup, when we already selected it in the Pre-stats tab? answer

You should now move to the Contrasts & F-tests tab. Your contrasts of interest at this level have to do with the experimental design within an individual. Remember that fMRI is all about contrasting signals in different conditions in order to isolate some mechanism of interest. Today we have a single condition with 12 blocks of images. For the purposes of this practical, we are interested in the signal change of these stimuli relative to baseline. We are interested in both the positive and negative averages for these blocks. Therefore please set up two t contrasts and enter a 1 for EV1 in contrast 1 and a -1 for EV1 in contrast 2. Now press Done. You should see a visual representation of your model. Other options on the Stats tab are left as they are.

Once the Stats tab is filled in, press Go. (You can leave the Post-stats tab at default, and we will come to it while your FEAT analysis is running.)

While you wait, have a think about these questions and discuss them with your neighbour...

What type of registration is used by MCFLIRT?
Why is Slice timing correction off?
Why do we often use a small amount of spatial smoothing?
What types of artefacts does high pass filtering remove?
What effect does BET brain extraction have on your image?

Looking ahead: (i) Adding Standard Motion Parameters or Standard + Extended Motion Parameters, (ii) Voxelwise Confound List, and (iii) Add additional confound EVs are three "Advanced" artefact removal approach, so will not be covered in this practical. They will be covered in FEAT 3 Practical, along with ICA denoising.

Post-stats

The Post-stats tab is where you specify the statistical thresholds that are used. In brief, FEAT is fitting a GLM to each voxel independently. Given that there are thousands of voxels this leads to a problem called the multiple comparisons problem, which will be covered in detail later in the course.

For now, what you should know is performing thousands of t-tests will result in many false positives i.e. voxels labelled active when in fact they were not. Clicking on the button in the Thresholding section will display Voxel and Cluster options for multiple comparisons correction. These options will be covered in more detail later in the course, for now you can leave the FEAT default settings as they are.

The Rendering section details how the summary images are produced by FEAT, and can be left at default. Leave Create time series plots selected, as these plots are worth having a look at.

Results

Hopefully your FEAT analysis has now finished! If it is not already open, you can inspect the report by typing:

firefox sub-001/my_1stLevel.feat/report.html &
or
open sub-001/my_1stLevel.feat/report.html &

Look at the results presented in the different tabs, in parallel with the options you set in the FEAT GUI to better understand what has been done in which part.

Look at the results of the statistical analysis in the Post-stats tab and try to understand what each figure and plot mean.

Also, for each tab you will find an Analysis methods section with a detailed description of the methods. This information can be very useful for reporting the technical details of your experiment in the methods section of a report/paper: acquisition protocol, preprocessing and registration, and 1st level statistical methods.

Looking ahead: In FEAT 1 Practical, you will learn how to explore your results more thoroughly using the FEATQueary tool.


Group-level analysis

Data

cd ~/fsl_course_data/feat0/group

In this section, you will set up a basic higher-level design to model the group average response greater than baseline. The group consists of 20 subjects, each presented with the same 12 lots of 30-second blocks of visual stimuli as in the subject-level analysis above. The first-level analysis for each subject has already been run for you, and only the first-level FEAT directories have been provided.

FEAT pipeline

We now want to combine the single subject results into a group analysis. Before beginning the higher-level analysis, take a look at the flow chart below to see how the first-level analysis results feed into the higher-level analysis.

first_and_second_level_flowchart.png

Setting up FEAT to run a higher-level analysis is much like you do at the first-level. Open the FEAT GUI, and change the First-level analysis button to Higher-level analysis. You will see a series of tabs: Misc, Data, Stats, and Post-stats. The purpose of each tab is the same as in first-level analysis, and again, you can leave the settings in the Misc tab at their defaults.

Data

The Data tab is used to set your inputs. Leave the first button as Inputs are lower-level FEAT directories; the outputs of first-level FEAT are organised and named in a standardized way, so higher-level FEAT knows which files to load from lower-level FEAT directories.

Entering the FEAT directories one at a time is time consuming and prone to human error, so learning a bit of Bash scripting is highly recommended. To get the full path length to each of the 20 inputs, copy and paste the following command into your terminal:

for i in sub-0*
do echo `pwd`/${i}/1stLevel.feat
done

You can enter this list in one go into FEAT using copy-and-paste: hit the Paste button, click in the paste field, and press ctrl+y to paste. Notice how FEAT finds both of our lower-level COPE images, and gives us the option of running a group analysis on either or both. Leave both selected, and insert your output directory name, for example my_2ndLevel.gfeat.

Stats

The Stats tab is where the GLM design matrix is set up. The pre-run higher-level FEAT analysis provided was run with Mixed effects: FLAME 1+2 and Use automatic outlier de-weighting on. Using these features significantly increases analysis run-time, so DO NOT select them for this practical. Leave the first button as Mixed effects: FLAME 1 and second button Use automatic outlier de-weighting deselected. If these options are unfamiliar to you, don't worry, they will be explained in a future podcast. You can compare your results with those provided to see the effect these options have.

If you're not sure why a column of ones in your GLM should be a Mean EV, then watch this Jeanette Mumford podcast in your own time, for a further discussion (13 min youtube video).

When setting up your GLM in Full model setup, set EV1 to a column of ones. This EV gives you the mean. You can leave the Contrasts & F-tests at default settings. Once your model design is set up and the Stats tab is filled in press Go. (You can leave the Post-stats tab as default, and we will come to it while your FEAT analysis is running.)

While you wait, have a think about these questions and discuss them with your neighbour...

What between-subject nuisance EVs might be useful to include in your design matrix? These are variables of no interest that you want to control for in your analysis.
In a first-level design each entry in an EV corresponds to a timepoint. What does each entry in an EV correspond to in a group-level analyis?

Post-stats

Exactly as in first-level analysis, the Post-stats tab is where you specify the statistical thresholds to be used in your analysis. For now, please leave these on the defaults. You will learn more about the different options in the coming weeks.

Results

Open the report.html page from this example group average analysis in a web-browser. Firstly:

FEAT reports are useful for visualising what you have done in one easy place, but in order to really understand what is going on, you need to open the activation results for your contrasts of interest in FSLeyes.

The following is a brief explanation of the FEAT file and folder organisation, to help you quickly find the images you'll want to look at in this practical. Inputs for your group GLM come from each subject's 1stLevel.feat/reg_standard directory. These input files (in italics below) are output into the 2ndLevel.gfeat group analysis output directory, very confusingly using the subject-level naming system e.g. using names such as example_func and filtered_func_data for non-functional images. These file names are as follows:

mean_func:
concatenated and averaged to make mean_func, cope1.feat/mean_func, cope2.feat/mean_func
reg/highres:
concatenated and averaged to make bg_image, cope1.feat/example_func, cope2.feat/example_func
stats/cope1:
concatenated to make cope1.feat/filtered_func_data
stats/cope2:
concatenated to make cope2.feat/filtered_func_data
stats/varcope1:
concatenated to make cope1.feat/var_filtered_func_data
stats/varcope2:
concatenated to make cope2.feat/var_filtered_func_data

The most relevant group analysis output files for this practical are as follows (for cope1 contrast):

cope:
cope1.feat/stats/cope1
variance of copes:
cope1.feat/stats/varcope1
t-statistic:
cope1.feat/stats/tstat1
z-statistic:
cope1.feat/stats/zstat1
significant clusters:
cope1.feat/cluster_mask_zstat1
zstats in clusters:
cope1.feat/thresh_zstat1

For more information on the FEAT output files, read the FEAT User Guide.

To look at your significant activations in FSLeyes, change directory into your group-level analysis directory (e.g. my_2ndLevel.gfeat), and load the background image and the masked zstat images for each contrast:

fsleyes bg_image.nii.gz cope1.feat/thresh_zstat1.nii.gz cope2.feat/thresh_zstat1.nii.gz

Colour the cope1 zstats Red-Yellow (increases in activity) and the cope2 zstats Blue-Light blue (decreases in activity)

Add the Atlas panel and select Harvard-Oxford Cortical Structural Atlas and Harvard-Oxford Subcortical Structural Altas (Settings, Ortho View 1, Atlas Panel).

Can you broadly describe the networks of brain regions that show significant increases in activity and significant decreases in activity, compared to baseline, at the group level?

Looking ahead: As with the first-level analysis output, you can explore your higher-level analysis ouput more thoroughly with the FEATQueary tool.

Now you are hopefully familiar with FEAT and how to do a basic, yet complete, subject-level and group-level analysis. In the following FEAT practicals, you will learn how to do a more thorough cleanup of your functional data, how to set up more complex experimental designs, and how to explore FEAT outputs more closely. Plenty to look forward to!


The End.