GLM control file (fMRI)

A GLM control file is the "top level" that defines the GLM to be used for analysis.


The first several lines describe options to used in the analysis, such as the number of terms describing baseline signal drift, the conditions to be tested, the hemodynamic impulse response model, as so on.  Required options include a list of "conditions", which specify statistical tests and also parameter estimation for output.


After the key-word delimited top section of the file, use the keyword "runs” (or “files”, with or without “:”) to denote that subsequent lines in the file should be interpreted as runs.


Following the "runs:" line, all subsequent lines are interpreted as containing either 2 or 3 entries. The first 2 entries are required and are the name of the 4-dimensional data file and a file that specifies the stimuli for that run. Optionally, one may also include a table file that has entries for each time point and contains things (eye position, blood pressure, etc) that can only be entered explicitly in this way.


   An example GLM control file follows:


              time-model GLM           # define the format of the file to follow

              baseline-terms 3           # include 3 terms in baseline polynomial
              IRF IRON-rat                # use an IRF appropriate for IRON fMRI in rats

              convolve-table 3 4        # convolve table events “3” and “4” with the IRF

              conditions 1 2 12 1-2    # see conditions page in documentation
              runs:                             # this indicates that following lines will list runs
              ../010/data.nii ../010/stim.glm  ../010/table.dat   # data file and GLM description are mandatory, table is optional
              ../011/data.nii ../011/stim.glm  ../011/table.dat
              ../012/data.nii ../012/stim.glm  ../012/table.dat


The following keywords are defined for use in the GLM control file above the “runs:” line.


    Keyword                     argument        default value           purpose

    time-model                  GLM/glm/fMRI-GLM

    baseline-terms            [integer] (0-4)        3                       baseline polynomial

    notify                            none                                              verbose output

    multiple-comparisons  [integer # of resels]                        corrected p-values on output

    normalize-BOLD        none (default = no normalization)   equalize average signal values across runs

    IRF                             built-in IRF or file name                  describe the hemodynamic IRF

    conditions                   a list of conditions                          GLM determines these values & errors

    convolve-table            [list of events]                                 convolve table events with IRF

    drift-correct                 [order] [list of events]                      default drift correction is baseline-terms; overwrite this way for specified events

    output-format              [type]                   NIFTI                   use “jip” or “nifti” output files

    frequency-filter           [low]  [high]                                      pre-GLM frequency band for filtering data

    residue-filter               [low]  [high]                                      post-GLM frequency band for filtering data; used with “-r” option

    AR                               [auto-regression order]  0               this feature currently is broken: don’t use it without verifying a fix!

    runs/files                     none                                                separates the file into options (above) and files (below)

Joseph B. Mandeville, Athinoula A. Martinos Center for Biomedical Imaging at MGH/MIT/Harvard