Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update documentation #411

Merged
merged 9 commits into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 28 additions & 53 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mriqc: image quality metrics for quality assessment of MRI
==========================================================

This pipeline is developed by `the Poldrack Lab at Stanford University
MRIQC is developed by `the Poldrack Lab at Stanford University
<https://poldracklab.stanford.edu>`_ for use at the `Center for Reproducible
Neuroscience (CRN) <http://reproducibility.stanford.edu>`_, as well as
for open-source software distribution.
Expand All @@ -16,7 +16,7 @@ for open-source software distribution.
.. image:: https://api.codacy.com/project/badge/grade/fbb12f660141411a89ba1ae5bf873717
:target: https://www.codacy.com/app/code_3/mriqc

.. image:: https://coveralls.io/repos/github/poldracklab/mriqc/badge.svg?branch=master
.. image:: https://coveralls.io/repos/github/poldracklab/mriqc/badge.svg?branch=master
:target: https://coveralls.io/github/poldracklab/mriqc?branch=master

.. image:: https://codecov.io/gh/poldracklab/mriqc/branch/master/graph/badge.svg
Expand All @@ -42,62 +42,37 @@ for open-source software distribution.
About
-----

The package provides a series of image processing workflows to extract and
compute a series of NR (no-reference), IQMs (image quality metrics) to be
used in QAPs (quality assessment protocols) for MRI (magnetic resonance imaging).

This open-source neuroimaging data processing tool is being developed as a
part of the MRI image analysis and reproducibility platform offered by
MRIQC extracts no-reference IQMs (image quality metrics) from
structural (T1w and T2w) and functional MRI (magnetic resonance imaging)
data.

MRIQC is an open-source project, developed under the following
software engineering principles:

1. Modularity and integrability: MRIQC implements a
nipype workflow to integrate modular sub-workflows that rely upon third
party software toolboxes such as FSL, ANTs and AFNI.
2. Minimal preprocessing: the workflow described before should be as minimal
as possible to estimate the IQMs on the original data or their minimally processed
derivatives.
3. Interoperability and standards: MRIQC follows the the brain imaging data structure
(BIDS), and it adopts the BIDS-App standard.
4. Reliability and robustness: the software undergoes frequent vetting sprints
by testing its robustness against data variability (acquisition parameters,
physiological differences, etc.) using images from the OpenfMRI resource.
Reliability is checked and maintained with the use of a continuous
integration service.


MRIQC is part of the MRI image analysis and reproducibility platform offered by
the CRN. This pipeline derives from, and is heavily influenced by, the
`PCP Quality Assessment Protocol <http://preprocessed-connectomes-project.github.io/quality-assessment-protocol>`_.

This tool extracts a series of IQMs from structural and functional MRI data.
It is also scheduled to add diffusion MRI to the target imaging families.


External Dependencies
---------------------

``mriqc`` is implemented using ``nipype``, but it requires some other neuroimaging
software tools:

- `FSL <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/>`_.
- The N4ITK bias correction tool released with `ANTs <http://stnava.github.io/ANTs/>`_.
- `AFNI <https://afni.nimh.nih.gov/>`_.

These tools must be installed and their binaries available in the
system's ``$PATH``.


Installation
------------

The ``mriqc`` is packaged and available through the PyPi repository.
Therefore, the easiest way to install the tool is: ::

pip install mriqc



Execution and the BIDS format
-----------------------------

The ``mriqc`` workflow takes as principal input the path of the dataset
that is to be processed.
The only requirement to the input dataset is that it has a valid `BIDS (Brain
Imaging Data Structure) <http://bids.neuroimaging.io/>`_ format.
This can be easily checked online using the
`BIDS Validator <http://incf.github.io/bids-validator/>`_.

Example command line: ::

mriqc -i ~/Data/bids_dataset -o out/ -w work/


Support and communication
-------------------------

The documentation of this project is found here: http://mriqc.readthedocs.org/en/latest/.
The documentation of this project is found here: http://mriqc.readthedocs.org/.

If you have a problem or would like to ask a question about how to use ``mriqc``,
please submit a question to NeuroStars.org with an ``mriqc`` tag.
Expand All @@ -106,7 +81,7 @@ NeuroStars.org is a platform similar to StackOverflow but dedicated to neuroinfo
All previous ``mriqc`` questions are available here:
http://neurostars.org/t/mriqc/

To participate in the ``mriqc`` development-related discussions please use the
To participate in the ``mriqc`` development-related discussions please use the
following mailing list: http://mail.python.org/mailman/listinfo/neuroimaging
Please add *[mriqc]* to the subject line when posting on the mailing list.

Expand All @@ -132,5 +107,5 @@ the ``mriqc`` distribution.
All trademarks referenced herein are property of their respective
holders.

Copyright (c) 2015-2016, the mriqc developers and the CRN.
Copyright (c) 2015-2017, the mriqc developers and the CRN.
All rights reserved.
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ general:
branches:
ignore:
- gh-pages # ignore gh-pages
- doc/* # ignore all doc-related branches

# deployment:
# codecov:
Expand Down
6 changes: 6 additions & 0 deletions docs/source/about.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

Introduction
============

.. include:: ../../README.rst
:start-line: 44
47 changes: 11 additions & 36 deletions docs/source/classifier.rst
Original file line number Diff line number Diff line change
@@ -1,42 +1,17 @@
The MRIQC classifier for T1w images
===================================

MRIQC is shipped with a random-forests classifier, using the combination of the
`ABIDE <http://fcon_1000.projects.nitrc.org/indi/abide/>`_ and
`DS030 <https://openfmri.org/dataset/ds000030/>`_ datasets as training sample.


To predict the quality labels (0="accept", 1="reject") on a features table
computed by ``mriqc`` with the default classifier, the command line
is as follows:

::

mriqc_clf --load-classifier -X aMRIQC.csv -o mypredictions.csv


where ``aMRIQC.csv`` is the file generated by the ``group`` level run of
``mriqc``.
.. _classifier:

Custom classifiers can be fitted using the same ``mriqc_clf`` tool in fitting
mode:

::

mriqc_clf --train aMRIQC_train.csv labels.csv --log-file fit_clf.log --save-classifier myclassifier.pklz

where ``aMRIQC_train.csv`` contains the IQMs calculated by ``mriqc`` and ``labels.csv`` contains
the matching ratings assigned by an expert.
The labels can be numerical (``-1``= exclude, ``0``= doubtful, ``1`` = accept) or textual ("bad", "fail" can be
used for exclude; "may be" or "maybe" for doubtful and "ok", "good" for accept).

The trained classifier can be then used for prediction on unseen data with
the command at the top, indicating now which classifier should be used:
===================================
The MRIQC classifier for T1w images
===================================

::
.. automodule:: mriqc.classifier
:members:
:undoc-members:
:show-inheritance:

mriqc_clf --load-classifier myclassifier.pklz -X aMRIQC.csv -o mypredictions.csv

Contents
--------

Predictions are stored as a CSV file, containing the BIDS identifiers as
indexing columns and the predicted quality label under the ``prediction`` column.
- py:module:`~mriqc.classifier.cv`
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'mriqc.sphinxext.plot_workflow',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
Expand Down
8 changes: 8 additions & 0 deletions docs/source/cv/helpers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

.. _crossvalidation:


.. automodule:: mriqc.classifier.cv
:members:
:undoc-members:
:show-inheritance:
9 changes: 9 additions & 0 deletions docs/source/cv/sklearn_ext.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


.. _sklearn_ext:


.. automodule:: mriqc.classifier.sklearn_extension
:members:
:undoc-members:
:show-inheritance:
11 changes: 8 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@ Welcome to mriqc's documentation!
=================================

.. include:: ../../README.rst

:start-line: 3
:end-line: 39

Contents
========

.. toctree::
:maxdepth: 3
:maxdepth: 2

userguide
about
install
running
measures
docker
classifier
reports
workflows


Indices and tables
Expand Down
22 changes: 22 additions & 0 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Installation
------------

We have included ``mriqc`` in the PyPi resource ::

pip install mriqc


Execution system dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you are using a linux distribution with `neurodebian <http://neuro.debian.net/>`_, installation
should be as easy as::

sudo apt-get fsl afni ants
sudo ln -sf /usr/lib/ants/N4BiasFieldCorrection /usr/local/bin/

After installation, make sure that all the necessary binaries are added to the ``$PATH`` environment
variable, for the profile used run ``mriqc``.

Otherwise, you can follow each software installation guide: `FSL <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation>`_, `AFNI <https://afni.nimh.nih.gov/afni/doc/howto/0>`_, and `ANTs <http://stnava.github.io/ANTs/>`_.
11 changes: 11 additions & 0 deletions docs/source/iqms/bold.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

.. _bold:


IQMs for functional images
--------------------------

.. automodule:: mriqc.qc.functional
:members:
:undoc-members:
:show-inheritance:
11 changes: 11 additions & 0 deletions docs/source/iqms/t1w.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

.. _t1w:


IQMs for structural images
--------------------------

.. automodule:: mriqc.qc.anatomical
:members:
:undoc-members:
:show-inheritance:
Loading