PyBioShell Installation

PyBioShell is a set of Python bindings to BioShell library. It allows use of BioShell classes like any other Python modules. The closest tool similar by functionality is Biopython, which however is partially written in Python.

The easiest option to get PyBioShell on your machine is to download precombiled library, available for the following Python versions. Click on an appropriate link below:

or type this command in your terminal:

curl -O http://bioshell.pl/downloads/bioshell/Python37/pybioshell.so

You also need data/ directory, which contains files necessary to run BioShell. Download data.tar.gz , uncompress it and put it somewhere BioShell will be able to find it, see here for details.

Remember to add path with pybioshell.so to your shell variables e.g.

export PYTHONPATH="$PYTHONPATH:$HOME/bioshell/bin"

or add this variable to your ~/.bashrc:

echo 'export PYTHONPATH="$PYTHONPATH:$HOME/bioshell/bin" ' >> ~/.bashrc

Remember also to add data/ directory to your shell variables. Look here for details.

Another way is to compile it from sources, following the steps given below. The procedure assumes your bioshell repository is located in src.git/bioshell/ and binder in src.git/binder/; these paths are arbitrary but the commands must be adjusted accordingly.

0. Prequisities

In order to compile binder, you need to have Ninja building tool (website) and cmake. You will also need python headers, available from python-dev package or similar (e.g. python3.5-dev). On Ubuntu Linux you can install them with apt-get:

sudo apt-get install ninja-build  cmake python-dev

The use of clang compiler is advised. Try to get clang-6.0 or newer (see this link)

1. Clone and compile binder

To clone binder from its github repository:

git clone https://github.com/RosettaCommons/binder
cd binder
python3 ./build.py -j 4

where the last command actually builds binder using four CPU cores for that. Note, that binder uses more than 1GB of disc space and its compilation may take a few hours.

2. Build PyBioShell

Open scripts/build_pybioshell.py file and edit variables, adapting it to your system. In particular, you most likely have to fix clang++ version (LINKER_CMD variable) as well as the path where the binder executable is located (BINDER_PATH variable) Make a directory build_bindings in the main BioShell directory, i.e in the directory where pybioshell.config is located. Choose your Python version and run the compilation as follow:

python3 build_pybioshell.py -v 3.5

You should find your compiled version in bin/pybioshell.so. If you have any problems with compilation, please do not hesitate to contact us.