Skip to content

Installation

Leo Kaindl edited this page Aug 20, 2021 · 12 revisions

Installation instructions

The recommended way to install AB12PHYLO is via conda, as it enables easy installation of the widget toolkit for the graphical user interface, GTK.

a) quick installation on Windows

❗ Windows users must use Anaconda.

Install Anaconda from here. Then, start Anaconda Navigator and create a new python environment.



Click the green arrow on the right to open a Terminal in this environment. In this command-line interface, you will see something like (<env>) C:\Users\<your_user_name>>. Now install AB12PHYLO by entering the command:

conda install -c lkndl -c conda-forge -c bioconda ab12phylo

❗ Windows users should manually run ab12phylo-init!

After the installation finishes, please enter the command to download test data and some important non-python tools now:

ab12phylo-init

You can decline downloading BLAST+ as it is not currently fully supported for Windows, but download at least one from RAxML-NG and IQ-Tree 2.
You can now run ab12phylo.

Instead of using Anaconda Navigator, you can also directly start Anaconda Prompt:



and then run one after the other (using ab1 as an example environment name as above)

conda create -n ab1 python
conda activate ab1
conda install -c lkndl -c conda-forge -c bioconda ab12phylo
ab12phylo-init
ab12phylo

b) install to an existing python3 conda environment

conda activate <env>
conda install -c lkndl -c conda-forge -c bioconda ab12phylo

where <env> is your environment. Please do not install to (base)! On linux-64 or osx-64 systems, you can then install a combination of the external tools you would like to use via

conda install -c bioconda mafft clustalo muscle t-coffee "blast>=2.9.0" raxml-ng "gblocks=0.91b" 

Mind that these tools are not available on conda for win-64 as of 14 May 2021, but might be installable otherwise. In general, the only disadvantage of not having a local installation is relying on the EMBL service to create the MSAs, as AB12PHYLO will download a tree inference tool (RAxML-NG or IQ-Tree 2) and BLAST+ when it is first run or if --initialize is passed; and Gblocks executables are packaged in AB12PHYLO.

Instead of always listing the channels to install from via -c <channel>, they can be added to your conda .condarc configuration via

conda config --add channels lkndl
conda config --add channels bioconda
conda config --add channels conda-forge

The following fixes should not be necessary any longer, as --initialize now checks for these issues:

If starting the graphical ab12phylo fails with something like ValueError: Namespace Gtk not available, ModuleNotFoundError: No module named 'gi' or nothing happens at all (on Windows) you are missing PyGObject, the python bindings for GTK3:

conda install -c conda-forge pygobject gtk3  

If all the icons in the GUI are missing, install some:

conda install -c conda-forge adwaita-icon-theme hicolor-icon-theme  

If you get an UnsatisfiableError in conda because of incompatible packages, please use the next approach:

c) tailor a conda environment for AB12PHYLO

You could run conda create -n <env> python=3.x with x==6|7|8|9 and proceed as in a) or download this file for Linux or that file for Windows, then open a terminal or Anaconda Powershell in your download folder and set up the environment specified inside. For Linux:

conda env create -f ab1.yaml

and for windows in Anaconda prompt:

conda env create -f win.yaml

Then install AB12PHYLO:

conda activate ab1
conda install -c lkndl -c conda-forge -c bioconda ab12phylo

d) install via pip from PyPI to your system python

This is a nice way for users of Ubuntu or any Linux with GTK installed per default, but make sure you are definitely not in a conda environment, i.e. there is no (<env>) to the left of your shell prompt like this:

(<env>) foo@bar:~$ conda deactivate
foo@bar:~$ 

Install an MSA tool of your choice by yourself, then AB12PHYLO and all its python3 dependencies via

pip install ab12phylo

If starting ab12phylo fails with No module named 'gi', here are instructions to install PyGObject. Please be careful, python is probably important for your system!

e) build AB12PHYLO from source using git and pip

git clone https://github.com/lkndl/ab12phylo
cd ab12phylo
pip install --upgrade pip
pip install .

Please see a) and c) if something goes wrong.

f) install via pip inside a conda environment

If you are on Linux and would like to install via pip inside your conda <env>, please check which python and which pip is active inside the environment (where you will see (<env>) to the left of your shell prompt, not shown above).

(<env>) foo@bar:~$ which python
/home/foo/anaconda3/envs/<env>/bin/python

(<env>) foo@bar:~$ which pip
/usr/bin/pip

(<env>) foo@bar:~$ which pip3
/home/foo/anaconda3/envs/<env>/bin/pip3

On Windows, use where in CMD or get-command in a PowerShell instead of which.

In the case outlined above, pip points to a version outside your conda installation, so use pip3. If neither points to your conda, re-start your shell and check the environment. Sometimes there is no pip at all, which can be fixed on Linux using your package manager (or sudo apt-get install python3-pip on Ubuntu), or in conda via conda install -c conda-forge pip.

If you see No module named 'gi' make sure to fix that with conda as described in a).

Updating

You can update AB12PHYLO almost the same way you installed it:

conda update -c lkndl ab12phylo
# or
pip install ab12phylo -U

But you will more likely want to update to the newest GitHub version. If you have not done d) before, run

git clone https://github.com/lkndl/ab12phylo
cd ab12phylo

or git pull in the directory in question if you have. Then re-build the newest version with

pip install .