This jupyter notebook shows how to install (just the first time) MRtrix3 on Google Colab, keeping it on Google Drive, and how to use it for preprocessing purposes. As one may need to rapidly peek at the data or use directly the terminal, it also shows how to access a Colab instance through SSH. More details available in this post.
Some things to keep in mind:
-
a compiled version of MRtrix3 can be downloaded from this link;
-
if one wants to install ANTs, there is this post by Suyog Jadhav that explains how to do it and provides an already compiled version;
-
if one wants to install FSL, there are three ways:
- using NeuroDebian - this is the fastest way, but has the drawback that so far the most updated version would be FSL 5:
# from inside a notebook !apt-get update !apt-get install neurodebian-archive-keyring !add-apt-repository "deb http://neuro.debian.net/debian bionic main contrib non-free" !apt-get install fsl-core
- installation through the
fslinstaller.py
script - this allows to install a very recent version of FSL, but it can take quite some time, and the disk space required is quite large:
!apt-get install file # required !wget https://fsl.fmrib.ox.ac.uk/fsldownloads/fslinstaller.py !python2 fslinstaller.py
- downloading a precompiled version - this is slightly faster than using the script, but it still requires a large amount of disk space:
!wget https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.4-centos6_64.tar.gz !tar xvzf fsl-6.0.4-centos6_64.tar.gz