Skip to content
Tim Rittman edited this page May 19, 2021 · 32 revisions

Maybrain

Maybrain is a Python package for analysing and visualising brain connectome and related data.

Table of Contents

Dependencies

To run Maybrain you will need a Python 3.6 installation or higher, and several other packages on which parts of the code depend. The following are required for analysis:

The following is required for plotting functions:

The following provides some extra functionality for input of certain data types:

If you are not familiar with Python, or you don't want to manually install and deal with each package separately, it is recommended that you install a pre-packaged version that will include most of the above, for example Anaconda. Installation for each package can be found on the individual websites, but if you want to use Anaconda you will find instructions in the next section.

Installation

General process

To install, simply run setup.py through pip:

$ pip install .

Using Anaconda/Miniconda

You should create a new environment:

$ conda create --name maybrain python
$ source activate maybrain

After this, you will be able to install networkx, nibabel, matplotlib and nilearn:

(maybrain) $ conda install networkx
(maybrain) $ conda install -c conda-forge nibabel
(maybrain) $ conda install matplotlib
(maybrain) $ conda install -c conda-forge nilearn

Note that nibabel and nilearn are not officially available in Anaconda, so it is necessary another channel/source (conda-forge)

After all these steps, and still with maybrain activated, you can install maybrain through pip using the setup.py provided:

(maybrain) $ pip install .

Installation of bctpy is also easy, by just cloning from the official repository:

(maybrain) $ git clone https://github.com/aestrivex/bctpy.git
(maybrain) $ cd bctpy
(maybrain) $ pip install .

Mayavi has compatibility and installation issues. Thus, the maybrain's module which deals with Mayavvi is not imported automatically. In the specific case of Anaconda, if you want to install mayavi you have to downgrade pyqt. However, that will mean that matplotlib 2.1 also needs to be downgraded to 1.5. If you find a better solution than this, please let us know.

(maybrain) $ conda install -c menpo mayavi
(maybrain) $ conda install pyqt

Documentation

Besides this wiki page itself, we have a directory with jupyter notebooks for you to try for yourself while learning to use Maybrain.

Contributing

The authors are happy for developers to extend, customise, improve or simply to create an issue. We will create an innovative and meaningful hall of fame for anyone contributing a bug-fix and promise to buy you a beer (or acceptable non-alcoholic alternative) when we meet.

Submitting a Pull Request

  1. Fork it.
  2. Create a branch (git checkout -b my_maybrain)
  3. Commit your changes (git commit -am "Added message type")
  4. Push to the branch (git push origin my_maybrain)
  5. Open a Pull Request
  6. Enjoy a refreshing beverage and wait

Published Papers

License

Maybrain is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.