Installation¶
Installation from PyPI¶
The forgi package is compatible with python 2 and 3. It is available on PyPI at
https://pypi.org/project/forgi/
You can install it using:
pip install --upgrade forgi
To install all optional dependencies, use:
pip install --upgrade forgi[all]
Installing from Source¶
The source code for the forgi package can be found at github: https://github.com/ViennaRNA/forgi
We recommend using pip to install the directory instead of invoking setup.py directly:
pip install --upgrade path/to/forgi/directory
Optional, external dependencies (require manual installation)¶
Vienna RNA package¶
We provide a wrapper for RNAplot: forgi.visual.mplotlib.plot_rna.
This function imports the Vienna RNA package python bindings and
visualizes the 2D layout calculated by the Vienna RNA package
using matplotlib.
The Vienna RNA package is available at https://www.tbi.univie.ac.at/RNA/
Either MC-Annotate or DSSR¶
To convert PDB files into CoarseGrainRNA objects, forgi has to detect the
secondary structure from the 3D coordinates. While forgi contains a built-in
fallback heuristic for base-pair detection, we strongly recommend that you
install either MC-Annotate or DSSR, if you want to work with PDB files.
In contrast to MC-Annotate, DSSR can handle MMCIF files as well.
MC-Annotate is available at http://major.iric.ca/MajorLabEn/MC-Tools.html
DSSR is available at http://home.x3dna.org/
To choose, which of the two programs you want to use (if both are installed),
run forgi_config.py from a terminal.
Alternatively, you can use the commandline option --pdb-annotation-tool DSSR or
--pdb-annotation-tool MC-Annotate when you run scripts. This corresponds to
passing annotation_tool="DSSR" or annotation_tool="MC-Annotate" to the
function forgi.load_rna.
PyMol¶
The visualize_rna.py script requires an installation of
PyMol (https://pymol.org/) to work.
Automatically installed dependencies¶
Some standard python packages are required. They get installed automatically if you use pip to install the package:
- numpy + scipy + pandas
- the future package
- networkx
- biopython
- appdirs
Further more logging_exceptions is required, which we published separately on Pypi
Additional dependencies¶
The additional dependencies are automatically installed, if you specify an extra
when you use pip install. To install all optional dependencies, use
pip install forgi[all].
The following optional dependencies exist:
- matplotlib (
pip install forgi[forgi.visual]; needed forforgi.threedee.visual,forgi.visualandforgi.projection) - beautifulsoap4 (
pip install forgi[pdbechem]; needed for fetching informations about modified residues in pdb files) - cython (
pip install forgi[development]; Usually not needed, forgi comes with the C-code generated by cython.)