Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sklearn-ica
Browse files Browse the repository at this point in the history
  • Loading branch information
emdupre committed Nov 9, 2018
2 parents 44ef0fa + 87cb2e2 commit 380f549
Show file tree
Hide file tree
Showing 82 changed files with 7,129 additions and 2,062 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tedana/_version.py export-subst
7 changes: 7 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
template: |
## Release Notes
## Changes
$CHANGES
3 changes: 2 additions & 1 deletion .pytest_cache/v/cache/lastfailed
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"tedana/tests/test_t2smap.py::test_outputs": true
"tedana/tests/test_t2smap.py::test_outputs": true,
"tedana/tests/test_tedana.py::test_outputs": true
}
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ sudo: false

python:
- 3.6
- 3.7-dev

matrix:
include:
Expand All @@ -18,9 +19,11 @@ before_install:
- pip install --upgrade virtualenv
- if [ "${STYLE}" == "1" ]; then
pip install "flake8<3.0" flake8-putty;
else
pip install pytest;
fi
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage coveralls codecov pytest pytest-cov;
pip install coverage coveralls codecov pytest-cov;
fi

script:
Expand All @@ -30,6 +33,8 @@ script:
else
if [ "${COVERAGE}" == "1" ]; then
TEST_ARGS="--cov-report term-missing --cov=tedana";
else
TEST_ARGS="";
fi
py.test --ignore=tedana/tests/test_tedana.py ${TEST_ARGS} tedana;
fi
Expand Down
40 changes: 40 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"creators": [
{
"name": "DuPre, Elizabeth",
"affiliation": "Montreal Neurological Institute, McGill University",
"orcid": "0000-0003-1358-196X"
},
{
"name": "Salo, Taylor",
"affiliation": "Florida International University",
"orcid": "0000-0001-9813-3167"
},
{
"name": "Markello, Ross",
"affiliation": "Montreal Neurological Institute, McGill University",
"orcid": "0000-0003-1057-1336"
},
{
"name": "Kundu, Prantik",
"affiliation": "Mount Sinai Hospital",
"orcid": "0000-0001-9367-3068"
},
{
"name": "Whitaker, Kirstie",
"affiliation": "Alan Turing Institute; Cambridge University",
"orcid": "0000-0001-8498-4059"
},
{
"name": "Handwerker, Dan",
"affiliation": "National Institutes of Health",
"orcid": "0000-0001-7261-4042"
}
],
"keywords": [
"neuroimaging",
"fMRI"
],
"license": "lgpl-2.1",
"upload_type": "software"
}
File renamed without changes.
711 changes: 437 additions & 274 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include tedana/_version.py
81 changes: 47 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,76 @@
# tedana
# tedana: TE Dependent ANAlysis

`TE`-`de`pendent `ana`lysis (_tedana_) is a Python module for denoising multi-echo functional magnetic resonance imaging (fMRI) data.
The ``tedana`` package is part of the ME-ICA pipeline, performing TE-dependent
analysis of multi-echo functional magnetic resonance imaging (fMRI) data.
``TE``-``de``pendent ``ana``lysis (``tedana``) is a Python module for denoising
multi-echo functional magnetic resonance imaging (fMRI) data.

[![Latest Version](https://img.shields.io/pypi/v/tedana.svg)](https://pypi.python.org/pypi/tedana/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tedana.svg)](https://pypi.python.org/pypi/tedana/)
[![DOI](https://zenodo.org/badge/110845855.svg)](https://zenodo.org/badge/latestdoi/110845855)
[![License](https://img.shields.io/badge/License-LGPL%202.0-blue.svg)](https://opensource.org/licenses/LGPL-2.1)
[![CircleCI](https://circleci.com/gh/ME-ICA/tedana.svg?style=shield)](https://circleci.com/gh/ME-ICA/tedana)
[![Documentation Status](https://readthedocs.org/projects/tedana/badge/?version=latest)](http://tedana.readthedocs.io/en/latest/?badge=latest)
[![Codecov](https://codecov.io/gh/me-ica/tedana/branch/master/graph/badge.svg)](https://codecov.io/gh/me-ica/tedana)
[![License](https://img.shields.io/badge/License-LGPL%202.0-blue.svg)](https://opensource.org/licenses/LGPL-2.1)
[![Join the chat at https://gitter.im/ME-ICA/tedana](https://badges.gitter.im/ME-ICA/tedana.svg)](https://gitter.im/ME-ICA/tedana?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![DOI](https://zenodo.org/badge/110845855.svg)](https://zenodo.org/badge/latestdoi/110845855)

![](https://user-images.githubusercontent.com/7406227/40031156-57b7cbb8-57bc-11e8-8c51-5b29f2e86a48.png)


## About

`tedana` originally came about as a part of the [`ME-ICA`](https://github.com/me-ica/me-ica) pipeline.
The ME-ICA pipeline orignially performed both pre-processing and TE-dependent analysis of multi-echo fMRI data; however, `tedana` now assumes that you're working with data which has been previously preprocessed.
If you're in need of a pre-processing pipeline, we recommend [`fmriprep`](https://github.com/poldracklab/fmriprep/) which has been tested for compatibility with multi-echo fMRI data and `tedana`.

### Why Multi-Echo?

Multi-echo fMRI data is obtained by acquiring multiple TEs (commonly called [echo times](http://mriquestions.com/tr-and-te.html)) for each MRI volume during data collection.
While fMRI signal contains important neural information (termed the blood oxygen-level dependent, or [BOLD signal](http://www.fil.ion.ucl.ac.uk/spm/course/slides10-zurich/Kerstin_BOLD.pdf)), it also contains "noise" (termed non-BOLD signal) caused by things like participant motion and changes in breathing.
Because the BOLD signal is known to decay at a set rate, collecting multiple echos allows us to assess whether components of the fMRI signal are BOLD- or non-BOLD.
For a comprehensive review, see [Kundu et al. (2017), _NeuroImage_](https://paperpile.com/shared/eH3PPu).

In `tedana`, we take the time series from all the collected TEs, combine them, and decompose the resulting data into components that can be classified as BOLD or non-BOLD. This is performed in a series of steps including:
``tedana`` originally came about as a part of the [ME-ICA](https://github.com/me-ica/me-ica) pipeline.
The ME-ICA pipeline originally performed both pre-processing and TE-dependent
analysis of multi-echo fMRI data; however, ``tedana`` now assumes that you're
working with data which has been previously preprocessed.

* Principal components analysis
* Independent components analysis
* Component classification
![http://tedana.readthedocs.io/](https://user-images.githubusercontent.com/7406227/40031156-57b7cbb8-57bc-11e8-8c51-5b29f2e86a48.png)

More information and documentation can be found at https://tedana.readthedocs.io/.

## Installation

You'll need to set up a working development environment to use `tedana`.
To set up a local environment, the following packages will need to be installed:
To set up a local environment, you will need Python >=3.6 and the following packages will need to be installed:

mdp
nilearn
nibabel>=2.1.0
numpy
scikit-learn
scipy
[mdp](https://pypi.org/project/MDP/)
[numpy](http://www.numpy.org/)
[scikit-learn](http://scikit-learn.org/stable/)
[scipy](https://www.scipy.org/)
[nilearn](https://nilearn.github.io/)
[nibabel>=2.1.0](http://nipy.org/nibabel/)

You can then install `tedana` with

```bash
pip install tedana
```

### Creating a miniconda environment for use with `tedana`
In using `tedana`, you can optionally configure [a conda environment](https://conda.io/docs/user-guide/tasks/manage-environments.html).

We recommend using [miniconda3](https://conda.io/miniconda.html).
After installation, you can use the following commands to create an environment for `tedana`:

```bash
conda create -n ENVIRONMENT_NAME python=3 pip mdp numpy scikit-learn scipy nilearn nibabel
source activate ENVIRONMENT_NAME
pip install tedana
```

`tedana` will then be available in your path.
This will also allow any previously existing tedana installations to remain untouched.

To exit this conda environment, use

```bash
source deactivate
```

## Getting involved

We :yellow_heart: new contributors !
We :yellow_heart: new contributors!
To get started, check out [our contributing guidelines](https://github.com/ME-ICA/tedana/blob/master/CONTRIBUTING.md).

Want to learn more about our plans for developing `tedana` ?
Have a question, comment, or suggestion ?
Open or comment on one of [our issues](https://github.com/ME-ICA/tedana/issues) !
Want to learn more about our plans for developing ``tedana``?
Have a question, comment, or suggestion?
Open or comment on one of [our issues](https://github.com/ME-ICA/tedana/issues)!

We ask that all contributions to `tedana` respect our [code of conduct](https://github.com/ME-ICA/tedana/blob/master/Code_of_Conduct.md).
We ask that all contributions to ``tedana`` respect our [code of conduct](https://github.com/ME-ICA/tedana/blob/master/CODE_OF_CONDUCT.md).
Binary file added docs/_static/01_echo_timeseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/02_echo_value_distributions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/03_adaptive_mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/04_echo_log_value_distributions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/05_loglinear_regression.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/06_monoexponential_decay_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/11_pca_component_timeseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/12_pca_whitened_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/13_ica_component_timeseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/15_denoised_data_timeseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/16_t1c_denoised_data_timeseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
557 changes: 557 additions & 0 deletions docs/_static/optimal_combination_workflow_plots.ipynb

Large diffs are not rendered by default.

Binary file added docs/_static/tedana-poster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/tedana-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
449 changes: 449 additions & 0 deletions docs/_static/tedana_workflow_plots.ipynb

Large diffs are not rendered by default.

115 changes: 102 additions & 13 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
API
===

:mod:`tedana.workflows`: Common workflows
--------------------------------------------------

.. automodule:: tedana.workflows
:no-members:
:no-inherited-members:

.. autosummary:: tedana.workflows
:template: function.rst
:toctree: generated/

tedana.workflows.tedana_workflow
tedana.workflows.t2smap_workflow

.. currentmodule:: tedana

.. _calibration_ref:


:mod:`tedana.model`: Modeling TE-dependence
--------------------------------------------------

Expand All @@ -12,16 +31,11 @@ API
:toctree: generated/
:template: function.rst

tedana.model.fit_decay
tedana.model.fit_decay_ts
tedana.model.fitmodels_direct
tedana.model.make_optcom

:template: module.rst

tedana.model.monoexponential
tedana.model.fit
tedana.model.combine

.. currentmodule:: tedana

Expand Down Expand Up @@ -51,6 +65,51 @@ API
.. _calibration_ref:


:mod:`tedana.combine`: Combine time series
--------------------------------------------------

.. automodule:: tedana.combine
:no-members:
:no-inherited-members:

.. autosummary:: tedana.combine
:toctree: generated/
:template: function.rst

tedana.combine.make_optcom

:template: module.rst

tedana.combine

.. currentmodule:: tedana

.. _calibration_ref:


:mod:`tedana.decay`: Signal decay
--------------------------------------------------

.. automodule:: tedana.decay
:no-members:
:no-inherited-members:

.. autosummary:: tedana.decay
:toctree: generated/
:template: function.rst

tedana.decay.fit_decay
tedana.decay.fit_decay_ts

:template: module.rst

tedana.decay

.. currentmodule:: tedana

.. _calibration_ref:


:mod:`tedana.selection`: Component selection
--------------------------------------------------

Expand All @@ -73,24 +132,40 @@ API
.. _calibration_ref:


:mod:`tedana.workflows`: Common workflows
:mod:`tedana.io`: Reading and writing data
--------------------------------------------------

.. automodule:: tedana.workflows
.. automodule:: tedana.io
:no-members:
:no-inherited-members:

.. autosummary:: tedana.workflows
:template: function.rst
.. autosummary:: tedana.io
:toctree: generated/

tedana.workflows.tedana
tedana.workflows.t2smap
:template: function.rst

tedana.io.split_ts

tedana.io.ctabsel
tedana.io.filewrite
tedana.io.gscontrol_mmix
tedana.io.load_data
tedana.io.new_nii_like
tedana.io.write_split_ts
tedana.io.writect
tedana.io.writefeats
tedana.io.writeresults
tedana.io.writeresults_echoes

:template: module.rst

tedana.io

.. currentmodule:: tedana

.. _calibration_ref:


:mod:`tedana.utils`: Utility functions
--------------------------------------------------

Expand All @@ -100,10 +175,24 @@ API

.. autosummary:: tedana.utils
:toctree: generated/

:template: function.rst

tedana.utils.andb
tedana.utils.dice
tedana.utils.fitgaussian
tedana.utils.gaussian
tedana.utils.get_dtype
tedana.utils.getfbounds
tedana.utils.load_image
tedana.utils.make_adaptive_mask
tedana.utils.make_min_mask
tedana.utils.moments
tedana.utils.unmask

:template: module.rst

tedana.utils.io
tedana.utils.utils
tedana.utils

.. currentmodule:: tedana

Expand Down
Loading

0 comments on commit 380f549

Please sign in to comment.