3D Deconvolve

3dDECONVOLVE

  • PURPOSE: 3dDeconvolve allows us to create statistically significant maps of activations within the brain

    (or wherever else you might be collecting functional data). The most common type of analysis that is performed with 3dDeconvolve is the simple regression analysis. A simple regression analysis is a way of applying a reference function, or a one's and zero's file (1 for stimulus onset, and 0 for no stimulus) to our functional data in order to see if changes in the BOLD response correlate with our stimulus paradigm. Many fMRI researchers like to convolve their reference files with an hrf using the "waver" command (a Waver how to section will be coming shortly).

    Another form of analysis that can be performed with 3dDeconvolve is a glm (general linear model). This will take a little more time to explain so for now, I'll just keep it simple. Below is an example of a script for 3dDeconvolve along with an explanation of all of the subcommands used.

  • USAGE: Following is an explanation of the Syntax my lab typically uses for "3dDeconvolve". To run this

    script on your data you need to put the command into a text file that is executable, and then put it in the directory you would like to use it in. Just for your information this was for an experiment imaging the cervical spinal cord where we had two conditions, Noxious heat on (A), and noxious heat off(B).

        3dDeconvolve \
          -input fxnl_dataset+orig \
          -polort 1 \
          -mask roi_mask_1.25+orig \
          -censor initials_censor.1D \
          -num_stimts 1 \
          -stim_file 1 ones_zeros.1D -stim_label "ones_zeros" \
          -stim_maxlag 1 3 \
          -tout -rout -fout -bucket analyzed_data
  • the "-input fxnl_dataset+orig" command specifies on which fxnl dataset the analyses will be performed. The input dataset should always have been preprocessed before this step (For preprocessing steps, see ?AfniPreprocessing.
  • the "-polort 1" command removes any linear trend in the data. A linear trend is caused by either buildup of deoxygenated blood downstream from our region of interest, or it can be caused be external factors like a subjects head sinking into the pillow over time, or drifting to one side, etc. These are things that can't really be controlled. You can also do a 2nd order detrend by replacing the one with a 2, but if you want no detrending at all, then you must place a 0. Leaving the subcommand out will cause the default to be chosen which is "1".
  • The "-mask roi_mask_1.25+orig" is a masking option. In the cervical spine we're only interested in the cord itself and not the neck, so this is a useful tool for eliminating voxels that are activated outside of our region of interest. Within the brain, this could also be useful and allow you to eliminate voxels outside of either your ROI or the skull. Obviously the ROI will need to be drawn prior to this point and that can be accomplished using one of the AFNI Gui plugins called ?Draw Dataset. Basically the mask places a value of 1 for your Region of interests and a value of 0 for other regions. When this option is applied, only the regions specified as non zero numbers will be analyzed by 3dDeconvolve
  • The censor.1D file is another text file with a column of ones and zeros. In this case the ones refer to all of the timepoints within that dataset you want analyzed, and the 0's refer to the timepoints that may either have some wierd artifact or spike in the signal that wasn't modifiable, and that you want ignored while still keeping the appropriate reading frame for the timeseries. Our lab uses the "-censor censor.1D" option because the GE scanner always has some wierd things going on during the first couple of functional image acquisitions. The values are always off, so we don't want to use those timepoints. But just to drive the point home, this command is used so as not to mess up our onset vectors. You just input a normal ones and zeros for you onsetfile and AFni will do the rest.
  • the "-num_stimts 1" commands specifies how many stimulus/onset files we have. For a simple regression analysis you should almost always have one, except in the case you want to regress your data against the 6 motion parameters to make sure you don't have any movement activation correlated with your stimulus (which is a big problem for pain studies. I'll try and add a link for this later.
  • the "-stim_file 1 onsetfile.1D" specifies what file number your onsetfile/reference function is. Again, for a simple regression analysis this should be one unless you have the 6 motion parameters included. it is (in this case 1, which is all we have) and what the name of the file is ("onsetfile.1D").
  • The "-stim_label" just gives the output of your analysis a label in the afni gui.
  • The "-stim_maxlag 1 3" tells the 3dDeconvolve command to look at multiple lag shifts for our reference function, to see if in fact our subject(s) HRF response followed the typical 5-8 seconds to peak, or if there was a different response. Essentially this allows you to capture the peak response for each individual subject. One side note for this command is that when it's used for a simple regression analysis, the creators of afni suggest you use the "-fout" subcommand along with it so you can use the Full F-statistic in your analysis (see afni website for more on this). As far as syntax is concerned, the "1" refers to the reference file, and the 3 refers to the number of lags you want calculated. There is also a "-stim_minlag" command you can use with the same syntax, that allows you to choose what you want the first shift to be. So for an analysis that you want shifted between 2 & 3 lags, the command line would read "-stim_minlag 1 2" and "-stim_maxlag 1 4".
  • the "-tout -rout -fout" specify what statistics we want calculated. Typically I use the -tout and -fout. "-tout" gives you a fit coefficient for each lag along with the corresponding t-statistic, and the "-fout" gives you a fit coefficient for each lag along with the corresponding f-statistic.
  • the "-bucket analyzed_data" is the name of the output file that contains the activation maps.