[FSL] [TitleIndex] [WordIndex

artefact.png


Overview - FMRIB's ICA-based Xnoiseifier - FIX v0.3

FIX attempts to auto-classify ICA components into "good" vs "bad" components, so that the bad components can be removed from the 4D FMRI data. This beta-version of FIX is a set of R, MATLAB and shell scripts and hence requires you to have various other software than just FSL - and for now is not bundled as part of FSL.

FIX is intended to be run on single-session MELODIC ICA output.


Installing FIX

Requirements:

Setup FIX:


Running FIX

To run: use the script "fix" in the FIX directory, e.g.:

/home/steve/fix0.3/fix  YOURFEAT.feat  /home/steve/fix0.3/Standard.RData  20

You need to feed in a full "first-level" (single-session) output directory created by the MELODIC or FEAT GUIs, with full registration run, including using a structural. If using FEAT, you need to have had ICA turned on in the Prestats. For the ICA you should in general use automatic dimensionality estimation.

The 20 refers to the thresholding of good vs bad components, and is generally a sensible default.

It is recommended that you look at the ICA components yourself to check at least a few of your subjects' classifications - look in the file called something like fix4melview_Standard_thr20.txt - the final line lists the components that are considered as noise to be removed (with counting starting at 1 not 0).

When running fix as shown above, you will end up with a cleaned version of the 4D preprocessed FMRI data: filtered_func_data_clean.nii.gz.

If you have a compute cluster you can send the whole command to the cluster by preceding it with something like fsl_sub -q long.q ...  (Although, if you are using fix to train the classifier and run leave-one-out testing, we recommend that you run fix locally, if your local computer is able to submit jobs to your cluster, as it will do this for you, parallelising the LOO, and greatly speeding it up.)

Training data

FIX needs to be trained from multiple datasets that have already had the ICA components classified into "good" and "bad" by hand. We have so far hand-trained 3 different types of data, and the training file from each of these is supplied with FIX. If you want to train FIX yourself, to possibly better optimise it for the kind of data you have, you will need to do this hand classification yourself (at least 10 subjects); alternatively, you can use one of the training *.RData files supplied with FIX.

There are currently three training-dataset-files supplied:

To do your own training, for each FEAT/MELODIC output directory, you will need to create a hand_labels_noise.txt file in the output directory. This text file should contain a single line (or, at least, should have as its final line), a list of the bad components only, with the format (for example): [1, 4, 99, ... 140] - note that the square brackets, and use of commas, is required. Counting starts at 1, not 0.

Once you have created all of the hand label files, you can then train the classifier (creating the training file <Training>.RData) using the -t option:

fix -t <Training> [-l]  <Melodic1.ica> <Melodic2.ica> ...

If you include the -l option after the training output filename, a full leave-one-out test will be run; the results file that gets created at the end has a set of numbers at the end of it that tell you the true-positive-rate (proportion of "good" components correctly labelled) and the false-positive-rate (proportion of "bad" components correctly labelled) for a wide range of thresholds (see higher up in the output file for the list of thresholds tested).

Using new training data

You can now use your new training file to classify components in new datasets...

fix -c <Melodic-output.ica> <Training.RData> <thresh>       
  classify ICA components (<thresh> is in the range 0-100, typically 20)

...and then run the cleanup on the new data...

fix -a <Melodic-output.ica/fix4melview_TRAIN_thr.txt> [-m]
  apply cleanup using artefacts listed in the txt file to data inside the enclosing Melodic directory,
  and optionally remove  motion confounds with -m)

Input files required - in more detail

If you haven't done the full GUI-based MELODIC/FEAT analysis, you will need, in one directory:

  filtered_func_data.nii.gz          preprocessed 4D data
  filtered_func_data.ica             melodic (command-line program) full output directory
  mc/prefiltered_func_data_mcf.par   motion parameters created by mcflirt (in mc subdirectory)
  mask.nii.gz                        valid mask relating to the 4D data
  mean_func.nii.gz                   temporal mean of 4D data
  reg/example_func.nii.gz            example image from 4D data
  reg/highres.nii.gz                 brain-extracted structural
  reg/highres2example_func.mat       FLIRT transform from structural to functional space


CategoryOther CategoryFIX


2012-09-05 11:30