Getting started (Linux)

Check your python version

First, open a terminal.

easYPipe needs at least Python 3.6.

You may already have Python installed – you can check which version by doing:

$ python --version

If the version is < 3.0, do:

$ python3 --version

If that fails or Python 3 version is <3.6, install a version of Python >= 3.6 using the package manager of your distribution. For example for Ubuntu 18.04:

Installing add-apt-repository (if add-apt-repository command not found):

$ su
# apt update
# install software-properties-common

Then:

$ su
# add-apt-repository ppa:deadsnakes/ppa
# apt update
# apt-get install python3.7

If you encounter difficulties, see supported versions for this repository … maybe it’s time to upgrade your operating system !!

If you’ve updated you Python version from 3.5 to 3.6, you can change default Python 3 to Python 3.6:

# update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
# update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2

Check that Python 3 has been correctly installed:

$ python3 --version
Python 3.6

To swap between versions of Python, run the following:

# update-alternatives --config python3

Check if pip is installed

pip is a package management tool for Python.

Check if pip3 is installed:

$ which pip3

If that fails, install pip3 using the package manager of your distribution. For example for Ubuntu:

$ su
# apt-get install python3-pip

Check if pip3 is linked to Python >= 3.6:

$ pip3 --version
pip 21.0.1 from /home/username/.local/lib/python3.6/site-packages/pip (python 3.6)

If it’s not the case, you can try:

$ wget https://bootstrap.pypa.io/get-pip.py
$ su
# python3 get-pip.py
then check:
$ pip3 --version

Software requirements

easYPipe is a pipeline that requires other software.

Phenix

You need Phenix [1] installed and to modify PHENIX_PATH value in config.py file accordingly.

Example for PHENIX_PATH in config.py:

PHENIX_PATH = "/usr/local/phenix-1.18.2-3874/"

Open Babel

Open Babel [2] is a chemical toolbox needed for ligands.

Example for BABEL_PATH in config.py:

BABEL_PATH =  "/usr/local/OPENBABEL/openbabel-2-4-1/build/bin/"

Important

paths to these software have to be modified in config.py file accordingly to your installation (see next step)

Download and install easypipe package

Download the zip archive that should look like easypipe-1.4.8.tar.gz.

Go where is the archive and unzip:

$ tar -xvzf easypipe-1.4.8.tar.gz

Go to folder easypipe-1.4.8:

$ cd easypipe-1.4.8

Modify (open in a text editor) config.py file (in easypipe-1.4.8 folder), in particular ‘Software used by modules’ part since nothing will work without links to software.

Warning

config.py file modifications have to be done before installation !! If you want to modify it afterwards, just launch installation again.

Then install:

$ su
# python setup.py install # if your default python version is >=3.6
or
# python3 setup.py install # if your python3 version is >=3.6
or
# python3.6 setup.py install # if your python3 version is linked to python3.5

If you’ve updated you Python version from 3.5 to 3.6, you may encountered some dependecies and conflict problems. Read carefully the error messages. These commands can help you:

$ su
# apt-get install libffi-dev

# pip3 uninstall PyNaCl
# pip3 install PyNaCl

# pip3 install setuptools_rust

# cd /usr/lib/python3/dist-packages
# sudo ln -s apt_pkg.cpython-{35m,36m}-x86_64-linux-gnu.so

Check easypipe installation

You can test if installation is successfull doing:

$ easypipe.py -h

If you get no error but the help message, easypipe installation is successfull.

If you’ve updated you Python version from 3.5 to 3.6, you may encountered the following error:

$ PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/easypipe-1.4.8-py3.6.egg/EGG-INFO/requires.txt'

In this case, this command should help:

$ cd /usr/local/lib/python3.6/dist-packages/easypipe-1.4.8-py3.6.egg/EGG-INFO/
$ su
# chmod a+r requires.txt

In the way, if you have 3.8 Python version (in Ubuntu 20.04 for example), you may encountered the following error:

$ PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/easypipe-1.4.8-py3.8.egg/EGG-INFO/requires.txt'

In this case, this command should help:

$ cd /usr/local/lib/python3.8/dist-packages/easypipe-1.4.8-py3.8.egg/EGG-INFO/
$ su
# chmod a+r requires.txt

Uninstall easypipe package

To uninstall easypipe package properly, do:

$ su
# pip3 uninstall easypipe
or
# python3 -m pip uninstall easypipe
or
# python3.6 -m pip uninstall easypipe

If you have such an error message: “Can’t uninstall ‘easypipe’. No files were found to uninstall.”, try again after changing working directory (not in easypipe package directory), it should work.

Note

‘pip3 freeze’ lists the names of all python packages installed.

References