tedana: TE Dependent ANAlysis¶
The tedana
package is part of the ME-ICA pipeline, performing TE-dependent
analysis of multi-echo functional magnetic resonance imaging (fMRI) data.
Citations¶
When using tedana, please include the following citations:
Kundu, P., Inati, S.J., Evans, J.W., Luh, W.M. & Bandettini, P.A. (2011). Differentiating BOLD and non-BOLD signals in fMRI time series using multi-echo EPI. NeuroImage, 60, 1759-1770.
License Information¶
tedana is licensed under GNU Lesser General Public License version 2.1. All trademarks referenced herein are property of their respective holders.
Copyright © 2011-2017, Prantik Kundu. All rights reserved.
Introduction¶
tedana
works by decomposing multi-echo BOLD data via PCA and ICA.
These components are then analyzed to determine whether they are TE-dependent
or -independent. TE-dependent components are classified as BOLD, while
TE-independent components are classified as non-BOLD, and are discarded as part
of data cleaning.
Derivatives¶
medn
- ‘Denoised’ BOLD time series after: basic preprocessing, T2* weighted averaging of echoes (i.e. ‘optimal combination’), ICA denoising. Use this dataset for task analysis and resting state time series correlation analysis.
tsoc
- ‘Raw’ BOLD time series dataset after: basic preprocessing and T2* weighted averaging of echoes (i.e. ‘optimal combination’). ‘Standard’ denoising or task analyses can be assessed on this dataset (e.g. motion regression, physio correction, scrubbing, etc.) for comparison to ME-ICA denoising.
*mefc
- Component maps (in units of delta S) of accepted BOLD ICA components. Use this dataset for ME-ICR seed-based connectivity analysis.
mefl
- Component maps (in units of delta S) of ALL ICA components.
ctab
- Table of component Kappa, Rho, and variance explained values, plus listing of component classifications.
Installation¶
We recommend running containerized versions of tedana
to avoid dependency issues.
The Docker Engine appropriate for your system (i.e., linux, Mac OSX, or
Windows) is required to access and run the container.
It is also possible to run a local or “bare-metal” tedana
if your system
has AFNI and python 2.7 or 3.4+ installed.
With a local python installation, we recommend using the Anaconda or
Miniconda package manager, as these allow for the creation of
virtual environments.
Containerized versions¶
To access a containerized version of tedana
simply pull the latest Docker image.
This can be accomplished with the following command:
docker pull emdupre/meica-docker:0.0.3
Local installation¶
Local installation requires the following dependencies:
- Python 2.7 or 3.4+
- AFNI
You can clone the latest version of tedana
directly from GitHub.
To do so, git clone https://github.com/me-ica/tedana.git
.
API¶
tedana.model
: Modeling TE-dependence¶
tedana.model |
|
tedana.model.fit_decay (data, tes, mask, …) |
Fit voxel-wise monoexponential decay models to data |
tedana.model.fit_decay_ts (data, mask, tes, …) |
Fit voxel- and timepoint-wise monoexponential decay models to data |
tedana.model.fitmodels_direct (catd, mmix, …) |
Fit models directly. |
tedana.model.make_optcom (data, t2s, tes, …) |
Optimally combine BOLD data across TEs. |
tedana.model.monoexponential |
Functions to estimate S0 and T2* from multi-echo data. |
tedana.model.fit |
Fit models. |
tedana.model.combine |
Functions to optimally combine data across echoes. |
tedana.decomposition
: Data decomposition¶
tedana.decomposition |
|
tedana.decomposition.tedpca (catd, OCcatd, …) |
Use principal components analysis (PCA) to identify and remove thermal noise from multi-echo data. |
tedana.decomposition.tedica (n_components, …) |
Performs ICA on dd and returns mixing matrix |
tedana.decomposition._utils |
Utility functions for tedana decomposition |
tedana.selection
: Component selection¶
tedana.selection |
|
tedana.selection.selcomps (seldict, mmix, …) |
Labels components in mmix |
tedana.selection._utils |
Utility functions for tedana.selection |
tedana.workflows
: Common workflows¶
tedana.workflows |
|
tedana.workflows.tedana (data, tes[, mixm, …]) |
Run the “canonical” TE-Dependent ANAlysis workflow. |
tedana.workflows.t2smap (data, tes[, …]) |
Estimate T2 and S0, and optimally combine data across TEs. |
tedana.utils
: Utility functions¶
tedana.utils |
|
tedana.utils.io |
Functions to handle file input/output |
tedana.utils.utils |
Utilities for tedana package |
Contributing to tedana¶
This document explains how to set up a development environment for contributing to tedana and code style conventions we follow within the project. For a more general guide to the tedana development, please see our contributing guide.
Development in docker is encouraged, for the sake of consistency and portability.
By default, work should be built off of emdupre/meica-docker:0.0.3
(see the Installation guide for grabbing the docker image).
Style Guide¶
Code¶
Docstrings should follow numpydoc convention. We encourage extensive documentation.
The code itself should follow PEP8 convention as much as possible, with at most about 500 lines of code (not including docstrings) per script.
Pull Requests¶
We encourage the use of standardized tags for categorizing pull requests. When opening a pull request, please use one of the following prefixes:
- [ENH] for enhancements
- [FIX] for bug fixes
- [TST] for new or updated tests
- [DOC] for new or updated documentation
- [STY] for stylistic changes
- [RF] for refactoring existing code
Pull requests should be submitted early and often! If your pull request is not yet ready to be merged, please also include the [WIP] prefix. This tells the development team that your pull request is a “work-in-progress”, and that you plan to continue working on it.
Usage¶
tedana minimally requires:
- acquired echo times (in milliseconds), and
- functional datasets equal to the number of acquired echoes.
But you can supply many other options, viewable with tedana -h
.
Command line options¶
Run tedana¶
usage: tedana [-h] -d FILE [FILE ...] -e TE [TE ...] [--mix FILE]
[--ctab FILE] [--manacc MANACC] [--kdaw KDAW] [--rdaw RDAW]
[--conv CONV] [--sourceTEs STE] [--combmode {t2s,ste}]
[--initcost {tanh,pow3,gaus,skew}]
[--finalcost {tanh,pow3,gaus,skew}] [--denoiseTEs] [--strict]
[--no_gscontrol] [--stabilize] [--fout] [--filecsdata]
[--label LABEL] [--seed FIXED_SEED]
Named Arguments¶
-d | Multi-echo dataset for analysis. May be a single file with spatially concatenated data or a set of echo-specific files, in the same order as the TEs are listed in the -e argument. |
-e | Echo times (in ms). E.g., 15.0 39.0 63.0 |
--mix | File containing mixing matrix. If not provided, ME-PCA & ME-ICA is done. |
--ctab | File containing a component table from which to extract pre-computed classifications. |
--manacc | Comma separated list of manually accepted components |
--kdaw | Dimensionality augmentation weight (Kappa). Default=10. -1 for low-dimensional ICA Default: 10.0 |
--rdaw | Dimensionality augmentation weight (Rho). Default=1. -1 for low-dimensional ICA Default: 1.0 |
--conv | Convergence limit. Default 2.5e-5 Default: 2.5e-5 |
--sourceTEs | Source TEs for models. E.g., 0 for all, -1 for opt. com., and 1,2 for just TEs 1 and 2. Default=-1. Default: -1 |
--combmode | Possible choices: t2s, ste Combination scheme for TEs: t2s (Posse 1999, default), ste (Poser) Default: “t2s” |
--initcost | Possible choices: tanh, pow3, gaus, skew Initial cost function for ICA. Default: “tanh” |
--finalcost | Possible choices: tanh, pow3, gaus, skew Final cost function for ICA. Same options as initcost. Default: “tanh” |
--denoiseTEs | Denoise each TE dataset separately. Default: False |
--strict | Ignore low-variance ambiguous components Default: False |
--no_gscontrol | Disable global signal regression. Default: True |
--stabilize | Stabilize convergence by reducing dimensionality, for low quality data Default: False |
--fout | Output TE-dependence Kappa/Rho SPMs Default: False |
--filecsdata | Save component selection data Default: False |
--label | Label for output directory. |
--seed | Seeded value for ICA, for reproducibility. Default: 42 |
Run t2smap¶
usage: t2smap [-h] -d FILE [FILE ...] -e TE [TE ...] [--combmode {t2s,ste}]
[--label LABEL]
Named Arguments¶
-d | Multi-echo dataset for analysis. May be a single file with spatially concatenated data or a set of echo-specific files, in the same order as the TEs are listed in the -e argument. |
-e | Echo times (in ms). E.g., 15.0 39.0 63.0 |
--combmode | Possible choices: t2s, ste Combination scheme for TEs: t2s (Posse 1999, default), ste (Poser) Default: “t2s” |
--label | Label for output directory. |