Select Page

Brainsuite in Nipype installation guide

Installing BrainSuite’s Nipype interface

Estimated time to read/install: 5 minutes

Requirements

  1. Mac or Linux (We suggest that Windows users install a 64-bit Linux VM)
  2. Python version 2.7
  3. BrainSuite
  4. Other requirements/dependencies will be installed during Nipype installation

Installation

(Additional Nipype installation resources: Nipype Installation, Nipype Beginner’s Guide)

  1. Download and install BrainSuite
  2. Add BrainSuite’s bin directory to your system’s path. (On linux: edit your .bashrc profile, and add the following line, changing the bold text to reflect the path to BrainSuite’s bin directory: export PATH=/home/ubuntu/BrainSuite16a1/bin:$PATH )
  3. To ensure that this step is completed, open a terminal window and run the command bse. If instruction text pops up, this step has been completed.
  4. Install Anaconda. Official instructions found here.
    • Make sure to add anaconda’s bin directory to your system’s path.
    • This can be done by answering yes when prompted to add anaonda to the system’s path during Anaconda installation.
    • Alternatively, edit your .bashrc profile, and add the following line, changing the bold text to reflect the path to Anaconda2’s bin directory: export PATH=/home/user/anaconda2/bin:$PATH
      • Change anaconda2 to anaconda3 if you are using anaconda3
  5. To ensure that the above step is completed, open a terminal window, and run:
    python

    If you have correctly installed Anaconda, you will see “Anaconda” in the header text that is printed out.

  6. Next, we will install Nipype. We wish to install the developer version, which is the latest version of nipype. This can be done with the following commands (Change the path to the anaconda folder, if your anaconda is installed in a different location, or is a different version):
    cd ~/anaconda*/lib/python*/site-packages/
    git clone https://github.com/nipy/nipype.git
    cd nipype
    pip install -r requirements.txt
    python setup.py develop
  7. To test that your installation has worked properly, open up a python session by running
    python

    Then, in the python session, run the following line:

    from nipype.interfaces import brainsuite

    This line will run successfully if you have installed the developer version of Nipype correctly.

  8. (Optional): Finally, we can install graphviz, an optional Nipype dependency using:
    sudo apt-get install graphviz libgraphviz-dev
    If you do not have sudo privileges, skip this step.

BrainSuite’s nipype interface is now ready to be used in python scripts.

Tutorials

You are now ready to move on to our tutorials:

Cortical Surface Extraction

Interactive Tutorial