MULTI-ECHO INDEPENDENT COMPONENTS ANALYSIS (ME-ICA)

0. INTRODUCTION

	Multi-Echo Independent Components Analysis (ME-ICA) is a method for fMRI analysis and denoising based on the T2* decay of BOLD signals, as measured using multi-echo fMRI. ME-ICA decomposes multi-echo fMRI datasets into independent components (ICs) using FastICA, then categorizes ICs as BOLD or noise using their BOLD and non-BOLD weightings (measured as Kappa and Rho values, respectively). Removing non-BOLD weighted components robustly denoises data for motion, physiology and scanner artifacts, in a simple and physically principled way. For more information, see

	Kundu, P., Inati, S.J., Evans, J.W., Luh, W.M. & Bandettini, P.A. Differentiating BOLD and non-BOLD signals in fMRI time series using multi-echo EPI. NeuroImage (2011).

1. USAGE

	ME-ICA is run with the command line program meica.py. At minimum, this program requires multi-echo data stored as a set of 4D datasets (one per echo time, TE), and the TEs in units of milliseconds. Detailed usage information is provided by meica.py -h. A simple usage involving an anatomical image would be as follows: 

	meica.py -d "rest30_e[2,1,3,4].nii.gz" -a mprage.nii.gz  -e 12,28,44,60 -f 3 --tlrc=TT_N27+tlrc --tpattern=alt+z --prefix=rest30

	Arguments:

		-d "rest30_e[2,1,3,4].nii.gz"		
			specifies 4 datasets with the same name except for a variation in number specifying the TE ordering
			N.B.  The dataset to be used in realignment and coregistration is specified first (generally the one with highest contrast)
		-a mprage.nii.gz
			specifies an anatomical MPRAGE dataset, with skull 
		-e 12,28,44,60
			TEs, in order, in units of milliseconds
		-f 3
			Smoothing with 3mm FWHM Gaussian kernel
		--tlrc=TT_N27+tlrc
			After realignment and coregistration, align all data to the TT_N27+tlrc Talairiach template (provided by AFNI), optional
		--tpattern=alt+z
			Explicitly specify slime-timing order, for datasets without this info in header (for example, for datasets created from Siemens Mosaic DICOMS)
			**N.B. Correct slice timing information is VERY important for this analysis!**
		--prefix=rest30
			Prefix for output files
			
	This will produce 6 output files:

		mprage_ns.nii.gz
			Skullstripped anatomical in native space
		mprage_ns_at.nii.gz
			Skullstripped anatomical in Talairach space
		rest30_medn.nii.gz 
			Denoised time series, after T2* weighted combination of TEs (Talairach space)
		rest30_mefc.nii.gz 
			Maps of ICA components, in units of signal (Talairach space)
		rest30_tsoc.nii.gz
			T2* weighted combination of TEs (not denoised)
		rest30_ctab.txt
			Table of components, with Kappa,Rho, and variance measures

	Denoised time series may be used for task fMRI analysis or seed-based functional connectivity analysis. Hint: try computing seed-based Pearson correlation using the rest30_mefc.nii.gz dataset,  then compute statistical significance using the standard Fisher Z-transform with the number of components as the degrees of freedom. This is already implemented in AFNI InstaCorr.

	More information on implementation, usage and applications is to come! Stay tuned!
 
2. REQUIREMENTS
   -Linux or Mac OS X (>=10.6 recommended)
   -AFNI (most recent versions include ME-ICA)
   -Python (>=2.6, installed by default on supported platforms)
   -Numpy (>=1.5)

To check if requirements are met, run
 
   meica.py 

This will check AFNI, Python, and Numpy versions and report missing dependencies. If all dependencies are OK, then ME-ICA is ready to run. If dependencies are not met, check with your system administrator. Additional help regarding dependencies is provided below.


-------------------Additional installation help-------------------

A. INSTALLING NUMPY
On Mac OS X (for system Python):
   -Point browser to http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-py2.7-python.org-macosx10.6.dmg/download
   -Download and install

On Linux:
   -Option 1: Try using apt-get (Ubuntu, Debian) or yum (CentOS, Fedora, RedHat) or related package managers to install an x86_64 version of Numpy.
       If the Numpy version installed by the package manager is too old (as indicated by meica.py), then try
   -Option 2: 
       1. Search package directories for a -development- version of the ATLAS package, for example
          sudo yum search atlas |grep dev |grep x86_64       (CentOS, Fedora, RedHat) 
	                    or
          sudo apt-cache search atlas |grep dev 		(Ubuntu, Debian)
       2. Install using 'sudo yum install atlas-xyz' or 'sudo apt-get install atlas-xyz'
       3. Run
          sudo easy_install -U numpy

B. INSTALLING GSL 
If FSL FAST is not available, then AFNI's 3dSeg program can be used for gray-matter weighted anatomical-functional coregistration. On Linux machines, 3dSeg may require a download of libgsl. Try
	sudo apt-get install libgsl0ldbl		(Ubuntu, Debian etc.)
	                    or
	yum search gsl |grep x86_64       (CentOS, etc.) 
	           +
	sudo yum install gsl-xyz
