Install & Configure

Pip as a developer

You can get rna-tools and install them from the current directory with this pip:

pip install -e git+

This way is better (than pip install rna-tools) if you’re going to do some coding in the tools.

You can even first get rna-tools with git:

git clone

and then do:

$ pip install -e .
Obtaining file:///Users/magnus/work/src/rna-tools

to “install” with pip rna-tools based on a set of links to the current directory.

Test if installed

Test if the package is installed:

$ python -c 'import rna_tools'
# ipython -c 'import' (to test specific tools)

if nothing appears that’s good. If you see this:

$ python -c 'import rna_tools'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named rna_tools

then go to your config file for the shell (~/.zshrc or ~/.bashrc) add add:

PYTHONPATH=<path to rna-tools>/:$PYTHONPATH

so in my case this is:

PYTHONPATH=<path to rna-tools>/home/magnus/src/rna-tools/:$PYTHONPATH


To set up your own configuration, create ~/ in your HOME directory and redefine variables, e.g.:

(py37) [mx] rna-tools$ git:(master) ✗ cat ~/
VARNA_PATH = '/Users/magnus/work/opt/varna'
SIMRNA_DATA_PATH = '/Users/magnus/work/opt/simRNA/SimRNA_64bitIntel_MacOSX_staticLibs/data'
QRNAS_PATH = "/Users/magnus/work/opt/qrnas/"
RCHIE_PATH = "/Users/magnus/work/opt/r-chie/"
RFAM_DB_PATH = "/Users/magnus/work/db/rfam/"
CONTEXTFOLD_PATH = "/Users/magnus/work/opt/ContextFold_1_00/"
DIFF_TOOL = "open -a diffmerge"
RNASTRUCTURE_PATH = "/Users/magnus/work/opt/RNAstructure/6.1/"
ENTRNA_PATH = "/Users/magnus/work/opt/ENTRNA"

All requirements

To get ALL requirements, use pip:

pip install -r docs/requirements.txt

Be default rna-tools will not install all requirements, because some of them are heavy or might cause various problems, so you will be asked to install them when needed. For example, installing matplotlib is not essential for many other tools, python-Levenshtein is only used in one function.

Test all

This is still under active development.

To test (almost) all rna-tools functionality, you can run to see if you got any errors, this should look like:

(py37) [mm] rna-tools$ git:(master)
BlastPDB requires urllib3
- Python: 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)]
- rna-tools: b'py2-78-g3b3dd5f'
- RNA_TOOLS_PATH set to  /home/magnus/work-src/rna-tools/
- See full list of tools <
Seems OK

or for Python 2:

(base) [mm] rna-tools$ git:(master)
- Python: 2.7.16 |Anaconda, Inc.| (default, Mar 14 2019, 16:24:02) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
- rna-tools: py2-78-g3b3dd5f
- RNA_TOOLS_PATH set to  /home/magnus/work-src/rna-tools/
- See full list of tools <
Seems OK

For crude testing you can also use ./ script and then see for errors in output and also check output/ folder to see if there are differences between your output and output committed to GitHub by me.

PyMOL4RNA: adv config

For some extra functions you migth also follow this. Open your ~/.pymolrc and set up following variables as you need:

# rna-tools
EXECUTABLE="/bin/zsh" # set up your shell, usually /bin/bash or /bin/zsh
SOURCE="source ~/.zshrc" # set up the path to the file where you keep your shell variables

CLARNA_RUN="/Users/magnus/work-src/clarna_play/"  # if you want to run set up the path

run ~/work-src/rna-tools/rna_tools/tools/pymol_drawing/
run ~/work-src/rna-tools/rna_tools/tools/rna_filter/

The plugins have been tested with MacPyMOL version Edu.