FIASCO

Frequently Asked Questions

Anyone who has used FIASCO knows that it provokes many questions. This list of answers will grow over time.

Table of Contents

  1. How should I cite FIASCO or the things that come with it?
  2. What does Nelder-Mead convergence failed! mean?
  3. What does smooth_detrend.csh do, and how should I use it?
  4. How do I read a series of files with names like I.001, I.002, etc. into Fiasco?
  5. I have fMRI data for the same subject before and after treatment. How do I find the effects of treatment on activation?
  6. When I convert a Pgh MRI dataset to AFNI format, afni won't let me set Taliarach markers for it.
  7. What group analysis methods does Fiasco provide?
  8. What should I do when the logfile ends with "All known methods for skull stripping have failed"?

How should I cite FIASCO or the things that come with it?

The algorithms in FIASCO and its included packages are described in a number of technical references, and it is good policy to cite these references in publications which rely on these codes. Some relevant references are:

What does Nelder-Mead convergence failed! mean?

When you get that warning message, it means that estireg was unable to get a good alignment of some particular slice to the 'standard' version of that slice. This can happen if a slice is particularly blurry, for example. FIASCO copes with this sort of thing by marking the particular slice missing.

If a *lot* of these failures happen, though, something more serious has gone wrong. One of the most common causes of this is having the data in xytz order when you think it's in xyzt order. (Smartreader shouldn't make this mistake, but if you're reading files as raw data rather than DICOM files or such it can happen). If you think you are seeing a lot of nelder-mead failures, see if you have a GrandMean image in the print or ps directory, and have a look at it. Do the pictures look like brains? Do the different slices look like, well, different slices? If not, some problem is happening before estireg ever gets the images.

What does smooth_detrend.csh do, and how should I use it?

smooth_detrend is essentially a high-pass filter. It smooths the input voxel time series with a Gaussian smoother, the bandwidth of which is 1/F_SMDETREND_DNM of the total time series length. The default value of F_SMDETREND_DNM is 8, so if you have an 800-image time series the smoother bandwidth would be 100. By subtracting the smoothed form from the input time series we eliminate variations which are slower than that bandwidth while preserving variations which are faster- presumably including the BOLD response. We've found that this method works well for datasets which are acquired as single continuous acquisitions, but we've had some trouble with multi-acquisition datasets (which your group doesn't use). If you were doing an experiment with about 8 or fewer blocks you would probably want to pick a smaller value for F_SMDETREND_DNM to avoid eliminating the response to your stimuli.

How do I read a series of files with names like I.001, I.002, etc. into Fiasco?

There are two levels to the answer. You can get smartreader to read image files with a command like:
smartreader -input 'I.###' -multi -out whatever -verbose
This will cause it to suck in all of the files with names matching that pattern and produce a output files whatever.mri and whatever.dat that contain all of the images. It will even do its best to make them into a proper time series of volumes.

What you probably want, though, is to read in all the I.nnn files in a series of directories with names like "001", "021", and so on, and discard the first image (set of slices) of every group because it's the guide image and not useful data. There is a special script to do that, convert_ifiles.py . Just go to the directory which contains "001", "021", etc., and give the command "convert_ifiles.py" . You'll get a Pgh MRI file out, which you can then read directly into Fiasco.

I have fMRI data for the same subject before and after treatment. How do I find the effects of treatment on activation?

One approach is to do a 2-by-2 comparison with the experimental conditions making up the columns and the before/after treatment making up the rows, then look for the interaction effect. To do this in Fiasco, follow these steps:
  1. Set up directories so that you have a directory for a given subject and test, and 2 subdirectories for the before and after categories. For example, you might have directories like:
    subject7_reading
       /      \
    before   after
    
    if that makes sense. You'll run the standard Fiasco runs for the two cases of the reading test in the 'before' and 'after' subdirectories of subject7_reading. Your other 2 pairs of experiments on subject 7 will go in completely separate directories.
  2. Put your Fiasco .local.csh files for the 'before' and 'after' experiments in the appropriate subdirectories.
  3. Here's the interesting part: modify the split file information in both your epi.local.csh files so that they define *all 4* conditions, not just the 2 which occur in this run. For example, instead of:
    1 bynumimages
    Condition
    
    Language 0
    Fixation 0
    NA       2
    Fixation 10
    Language 10
    Fixation 10
    Language 10
    
    you would have:
    2 bynumimages
    Condition when
    
    Language   before 0
    Fixation   before 0
    Language   after 0
    Fixation   after 0
    NA NA      2
    Fixation   before 10
    Language   before 10
    Fixation   before 10
    Language   before 10
    
    and similarly for 'after'. Notice that I've set up a time shift using 'NA' conditions to help deal with the BOLD response time lag.
  4. Run the 'before' and 'after' Fiascos separately. Fiasco will grumble slightly about not having any instances of the 'before' conditions in the 'after' run and vice versa, but there's no real problem.
  5. In the top directory, which I've called subject7_reading do:
      cp before/fiasco.local.csh .
      cp before/epi.local.csh .
      merge_detrend.csh before after
    
    (It doesn't really matter whether you use the 'before' or 'after' versions of the .local.csh files, but you must copy one of them). The merge_detrend.csh script will crunch away for a while, and eventually produce the new directories 'in' and 'merged':
         subject7_reading
        /      /    \    \
    before   after   in   merged
    

    The 'in' directory is not interesting. 'merged' looks like a standard Fiasco directory. In 'merged/in' you will find a file called 'split' which contains the presented conditions for the union of the 'before' and 'after' runs. in 'merged/conditions' you'll see that there are 4 conditions in the overall experiment, just as there should be.

    The merged/stat and merged/print directories contain statistics for the joint runs. In particular, see merged/print/Fmaps_Condi_when_f.mri for a masked Fmap showing the interaction between the language/fixation contrast and the before/after contrast.

When I convert a Pgh MRI dataset to AFNI format, afni won't let me set Taliarach markers for it.

The interactive program afni is finicky about the datasets for which it will allow Taliarach markers to be set. Here are some of the known causes of this problem:

What group analysis methods does Fiasco provide?

Let's assume that you have data from several multiple subjects in one or more groups, and you want to examine differences within and between the groups. For obvious reasons, this is called group analysis. To use the Fiasco tools described below you must have the data in normalized form,in Pgh MRI files. Typically you would convert the files to AFNI format using "pghtoafni", Talairach them in AFNI, and then convert them back to Pgh MRI format using "smartreader". The Fiasco script "normalization.csh" automates this process. Note that you'll need the 'counts' data associated with your statistics in normalized form as well; "normalization.csh" takes care of that.

Given these files, there are two general approaches to group analysis: One can perform ANOVAs, or one can combine Tmaps. The Fiasco script "testingroup.csh" performs a voxel-wise in-group ANOVA using a mixed effects model, and "groupcompare.csh" performs a voxel-wise mixed-effects ANOVA for two groups with two conditions per group.

Tmaps can be combined using "combine.csh". This script implements Fisher's and Stouffer's methods for combining T scores; we recommend Stouffer's method for general use. The output Pmap can be converted to a Zmap using mri_rpn_math if desired. "combine.csh" expects each input Pgh MRI Tmap file to include its appropriate "counts1" and "counts2" information. "mri_copy_chunk" can be used to copy that information into place if necessary.

What should I do when the logfile ends with "All known methods for skull stripping have failed"?

(Thanks to Kate Dunfee for the outline of this answer)

This generally happens in the coregistration step, when FIASCO is trying to build skull-stripped versions of the anatomical images for alignment with the functional data. FIASCO uses some automatic tools from AFNI to strip the skull, and sometimes they fail. One possible cause is that the AFNI executable 3dIntracranial is not in your PATH. If it isn't, add the appropriate directory to your PATH and run "FIASCO coreg_only".

If 3dIntracranial is in your path, it probably just failed to find the correct values for skull stripping. You can force it to use appropriate values as follows:

  1. Look at the last 25 lines of the run (tail out/logfile will do it) and locate the temp directory where the strippedStruct is located. It will look something like ${F_TEMP}/tmp_strip_skull_#. Go there.
  2. Open afni and switch anatomy to "struct".
  3. Click on define function and refer to where it says Anat = # towards the bottom. Open an axial view and click on the brain in several spots, and the skull in several places to get a sense of what minimun and maximum values might get rid of the skull, but not the brain. NOTE: often a min_val 500 and max_val 1000 will work.
  4. Quit afni, and type the following command line from the tmp directory:
    3dIntracranial -anat struct+orig -prefix outfile -min_val (#) -max_val (#)
    
  5. Go into afni once again and switch the anatomy to the outfile you've just made. Scroll through the axial view to see if you've removed the entire skull, and no chunks of brain are missing. If you were unsuccessful, return to the temp directory, remove the outfile you made, and repeat steps 4 & 5 using different min and max values. This will often take some trial and error.
  6. Use smartreader to copy the stripped file into your run directory, with the command:
    smartreader -i outfile+orig.HEAD -out yourFIASCOrundirectory/anat/stripped_axial
    
    NOTE: It might be stripped_inplane instead of stripped_axial. See your out/logfile to figure out which. Process is the same for both.
  7. Run 'FIASCO coreg_only', or Update your spiral.steps.csh file to skip directly to coregistration.csh and rerun your FIASCO steps.

Joel Welling
Last modified: Wed Jan 14 14:41:39 EST 2004
Fiasco is a toolkit for analysis of functional brain images developed at the CMU Department of Statistics. See the Fiasco Home Page for more information.
fiasco@stat.cmu.edu