Skip to content

getting started

Neil Horner edited this page Sep 2, 2020 · 46 revisions

Requirements

  • A fairly modern PC with a good amount of RAM (16/32GB +).
  • Linux installed on it or a Windows PC.
  • Python3.6+
  • It should work on Mac, but it's not been tested.

Ubuntu installation instructions

Tested on 18.04LTS and 20.04LTS

1) Installation method 1 (recommended) Install LAMA via pip

Install pip, if needed.

$ sudo apt install python3-pip

Install LAMA via pip

$ pip3 install lama_phenotype_detection --user
$ source ~/.profile  # To make sure the script directory ~/.local/bin is in the PATH

if ~/.profile does not exist on your system, do:

export PATH=$HOME/.local/bin:$PATH  # This can also be added to ~/.bashrc

2) Installation method 2 Clone the git repository

$ git clone https://github.com/mpi2/LAMA.git

Install Python dependencies listed in Pipfile (you can use pipenv for this)

Give executable permission to the scripts, and add lama_phenotype_detection to your PATH

$ chmod -R u+x scripts/ utilities/

Install LAMA dependencies

R For statistical analysis.

elastix For doing the registrations.

elastix can be installed via apt in Ubuntu 18.04, However it appears to be compiled without support for a metric needed for inversion of images, so download the binaries from github.

The following will install R and and elastix (Paste into a terminal)

# Install pip
sudo apt update

# Install R
sudo apt install r-base

#  Install elastix and add update PATH and LI_LIBRARY_PATH for it.
wget https://github.com/SuperElastix/elastix/releases/download/4.9.0/elastix-4.9.0-linux.tar.bz2
mkdir ~/elastix
tar xjf elastix-4.9.0-linux.tar.bz2 -C ~/elastix

home=~/
echo -e "\n# paths added by my LAMA installation" >> ~/.bashrc
echo "export LD_LIBRARY_PATH="$home"elastix/lib:$home/.local/bin:\$LD_LIBRARY_PATH" >> ~/.bashrc
echo "export PATH="$home"elastix/bin:\$PATH" >> ~/.bashrc

source ~/.bashrc

Check that elastix is installed

source ~/.bashrc
elastix

If installed correclty you will get a message like: Use "elastix --help" for information about elastix-usage.

Check that R is installed

$ R
R version 3.4.4 (2018-03-15) -- "Someone to Lean On" ...

Check that LAMA is installed correctly

$ lama_reg
usage: The LAMA registration pipeline [-h] -c CONFIG ...

Installation issues

pyradiomics may need to be installed separately using pip3 install pyradiomics seeissue#1:

Thanks to @Dorky-Lever for provinding This modified script, which provides an example how how to get the walkthroughs working on using qsub on the National Computing Infrastructure (NCI) computing cluster.

Windows installation

Install dependencies

Aanaconda 3.6+

https://www.anaconda.com/distribution/

R

https://cran.r-project.org/bin/windows/base/

elastix

Download and unzip elastix from here: https://github.com/SuperElastix/elastix/releases/download/4.9.0/elastix-4.9.0-win64.zip

Add elastix to your path:

  • Control panel > Advanced > Environment Variables
  • Select User variables > Path, then edit
  • Then browse for the folder containing the elastix binaries to add it to the path

Install LAMA

open the Anaconda Prompt

pip install lama_phenotype_detection

Next steps

  • Take a look at the LAMA workflow to see how to run phenotype detection pipeline
  • Run the walkthroughs on some real data to get a feel of how the pipeline works.