Skip to content

Installation Steps

timpx edited this page Nov 13, 2019 · 15 revisions

The pipeline was tested on a Debian wheezy 64 bits, gcc version 4.6.3. The pipeline will not work on Windows or Mac OS. To check your version of linux:

uname -a
Linux bobby 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux

Python

NumPy and MatPlotLib are required, and easily installed on Debian like systems with

sudo apt-get install python-numpy python-matplotlib

It may be easier to download Continuum's Anaconda, you can install it by doing:

wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
bash Anaconda-4.4.0-Linux-x86.sh

FSL

You can download FSL on the neurodebian repository. For the most recent Ubuntu release, 14.10, this package is already available, skip to step 2.

  1. Add the NeuroDebian repositories to your source list

    wget -O- http://neuro.debian.net/lists/jessie.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
    sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
    sudo apt-get update

    Then update your package list

  2. Install the FSL 5.0 core package and fsl-first-data package

    sudo apt-get install fsl-5.0-core fsl-first-data
  3. Add FSL to your bashrc

printf  "\nFSLDIR=/usr/share/fsl/5.0/\n. ${FSLDIR}/etc/fslconf/fsl.sh\nPATH=${FSLDIR}/bin:${PATH}\nexport FSLDIR PATH\n" >> ~/.bashrc

Freesurfer

Download freesurfer Stable 6.0 for Linux x64:

$ wget ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
$ sudo mv freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz /usr/local
$ cd /usr/local
$ sudo tar xzvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
$ sudo touch freesurfer/license.txt

You will have to register, you will get a license key by mail. You have to copy this license key in the license.txt file created above.

Then configure your paths, replace the path_to_subjects_dir by the one you want:

SUBJECTS_DIR=/path_to_subjects_dir/
mkdir -p "$SUBJECTS_DIR"
echo export SUBJECTS_DIR=$SUBJECTS_DIR":\$PATH >> ~/.bashrc
echo export FREESURFER_HOME=/usr/local/freesurfer:\$PATH >> ~/.bashrc
ehco source $FREESURFER_HOME/SetUpFreeSurfer.sh >> ~/.bashrc

Finally check that everything is configured correctly :

. ~/.bashrc
-------- freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0 --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /usr/local/freesurfer
FSFAST_HOME       /usr/local/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /Work/Processed_data/freesurfer
MNI_DIR           /usr/local/freesurfer/mni
FSL_DIR           /usr/share/fsl/5.0

More info about freesurfer installation

MRtrix 3

  1. Installation

    You will need the following libraries:

    sudo apt-get install g++ libgsl0-dev zlib1g-dev libqt4-dev libgl1-mesa-dev

    Clone mrtrix 3 git repository:

    git clone https://github.com/jdtournier/mrtrix3.git

    Configure the mrtrix install

    cd mrtrix3
    ./configure

    Build the binaries

    ./build
  2. Set up MRtrix3:

    Create an MRtrix configuration file:

    echo "NumberOfThreads: #" > ~/.mrtrix.conf

    Replace the '#' with the number of threads your CPU supports.

    Set your PATH in the shell startup file and the path to the scripts of MRtrix3:

    echo export PATH=$(pwd)/scripts:$(pwd)/bin:\$PATH >> ~/.bashrc

    Close the terminal and start another one to ensure the startup file is read (or just type 'bash')

    Type mrview to check that everything works

    Additional informations can be found on mrtrix3 github page

MNE

You need first to register in MNE website, then download the package.

tar xzvf MNE-2.7.0-3106-Linux-x86_64.tar.gz
mv MNE-2.7.0-3106-Linux-x86_64 ~
echo export MNE_ROOT=~/MNE-2.7.0-3106-Linux-x86_64 >> ~/.bashrc
echo source $MNE_ROOT/bin/mne_setup_sh >> ~/.bashrc
. ~/.bashrc

SCRIPTS

Download SCRIPTS and go into it

git clone https://github.com/timpx/scripts
cd scripts

If when executing SCRIPTS you get the following error:

./remesher/cmdremesher/cmdremesher: error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory

you just need to add a link to the relevant library:

find /usr -name libgsl.so*
sudo ln -s /usr/lib/x86_64-linux-gnu/libgsl.so.23.0.0 /usr/lib/x86_64-linux-gnu/libgsl.so.0

(Your specific number of version my change depending on the result of the find command.)

You are now good to go!

Clone this wiki locally