Difference between revisions of "Software Setup"
Dstrodtman (Talk | contribs) (→pyAFQ) |
Dstrodtman (Talk | contribs) (→Setting up Matlab for AFQ) |
||
Line 30: | Line 30: | ||
edit startup | edit startup | ||
Paste the following code into the new file. | Paste the following code into the new file. | ||
+ | addpath(genpath('~/Documents/MATLAB/spm8/')) | ||
addpath(genpath('~/git/AFQ/')) | addpath(genpath('~/git/AFQ/')) | ||
addpath(genpath('~/git/BrainTools/')) | addpath(genpath('~/git/BrainTools/')) | ||
addpath(genpath('~/git/vistasoft/')) | addpath(genpath('~/git/vistasoft/')) | ||
− | |||
Save the file | Save the file | ||
Revision as of 16:10, 5 July 2016
We rely on a number of different software packages to analyze MRI and MEG data. Here is a growing tally of what we use and where to get it. Most of these tools reside on github and you should definitely use git to clone the repositories rather than download a snapshot of the code.
Contents
Setting up a user account
To add a new user with sudo privileges (userid should be maintained across all systems).
sudo useradd -m -G bde,sudo -s /bin/bash userid
To set user password.
sudo passwd userid
Have new user enter desired password.
Git
All git directories should be maintained together.
mkdir ~/git
Yeatman Lab Tools
cd ~/git git clone https://github.com/yeatmanlab/BrainTools.git
Vistasoft
MATLAB based toolbox, from Brian Wandell's lab at Stanford, that contains many functions we rely on for analyzing diffusion MRI and functional MRI data
cd ~/git git clone https://github.com/vistalab/vistasoft.git
Automated Fiber Quantification
cd ~/git git clone https://github.com/jyeatman/AFQ.git
Setting up Matlab for AFQ
AFQ requires Matlab r2014a, SPM8, Vistasoft, and AFQ. If you wish to use a different version of Matlab for your core coding, do not create a /usr/local/bin file during installation. Instead, after installing r2014a to the default location.
cd /usr/local/bin sudo ln -s /usr/local/MATLAB/R2014a/bin/matlab AFQ-matlab sudo AFQ-matlab
In the Matlab terminal that opens,
cd /usr/local/MATLAB/R2014a/toolbox/local edit startup
Paste the following code into the new file.
addpath(genpath('~/Documents/MATLAB/spm8/')) addpath(genpath('~/git/AFQ/')) addpath(genpath('~/git/BrainTools/')) addpath(genpath('~/git/vistasoft/'))
Save the file
If all the requisite dependencies for AFQ have been installed according the instructions on this wiki, you can now execute
AFQ-matlab
from the terminal in order to launch Matlab r2014a with all the necessary dependencies.
Anaconda
Each user should have anaconda set up to manage their Python packages. Do this before installing nibabel and dipy. Anaconda will manage versions and dependencies for each user separately. Each install will be specific to the user that installs it. Do not install as root, as you will deny yourself privileges to your own directory. You must restart your terminal session after install before using Python or the conda command. See instructions here:
https://www.continuum.io/downloads
nibabel and DIPY
Python based toolbox for dealing with nifti images. While nibabel is on github we suggest installing using pip:
pip install nibabel pip install dipy
pyAFQ
While we are still in the processing of developing a full implementation of AFQ in Python, some of these files are required for running DKI.
cd ~/git git clone https://github.com/yeatmanlab/pyAFQ cd pyAFQ python setup.py develop pip install boto3 gedit ~/.bashrc
Copy the following code (replacing userid) into the file that opens and save.
# Add local bin directory to path export PATH="/home/userid/.local/bin/:$PATH"
Neurodebian repo
The neurodebian project is an incredible resource making it easy to install most of the widely used nueroimaging software packages.
wget -O- http://neuro.debian.net/lists/trusty.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list sudo apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9 sudo apt-get update
FSL, ANTS and other Neurodebian packages
Once you have added the neurodebian repos you can easily install fsl and other packages
sudo apt-get install fsl-5.0-complete sudo apt-get install fsl-5.0-eddy-nonfree sudo apt-get install ants
FSL requires an edit to the .bashrc file
gedit ~/.bashrc
Copy the following into the file that open
# FSL setup . /etc/fsl/5.0/fsl.sh
SPM8
Fill out the form located here in order, making sure to select SPM8. Run this script from the terminal to install.
unzip ~/Downloads/spm8.zip -d ~/Documents/MATLAB/
Psychtoolbox for Matlab
Requires Neurodebian repo to install.
sudo apt-get install matlab-psychtoolbox-3
In order to launch Matlab with Psychtoolbox, use terminal command
ptb3-matlab