Get Started#
The ViennaRNA Package comes with a variety of executable programs
and scripts as well as a C-library that provides access to our
implemented algorithms. Moreover, the C-library is wrapped to
scripting languages such as Perl 5 and Python.
Note
The latest stable release is Version 2.7.2
Download#
Installing from sourcecode is the recommended way to get most out of the ViennaRNA Package.
For best portability the ViennaRNA package uses the GNU tools autoconf, automake,
and libtool and can thus be compiled and installed on almost every computer platform.
ViennaRNA Package - Source Code v2.7.2src
See Installing from Source for instructions to install the source code package.
For your convenience, we also provide precompiled binary packages for several Linux distributions and installer executables for Windows and MacOS X.
See Installing Pre-compiled Packages for instructions to install the binary packages.
ViennaRNA Package - Core v2.7.2-1amd64
ViennaRNA Package - Perl 5 bindings v2.7.2-1amd64
ViennaRNA Package - Python 3 bindings v2.7.2-1amd64
ViennaRNA Package - Core v2.7.2-1amd64
ViennaRNA Package - Perl 5 bindings v2.7.2-1amd64
ViennaRNA Package - Python 3 bindings v2.7.2-1amd64
ViennaRNA Package - Core v2.7.2-1amd64
ViennaRNA Package - Perl 5 bindings v2.7.2-1amd64
ViennaRNA Package - Python 3 bindings v2.7.2-1amd64
ViennaRNA Package - Core v2.7.2-1amd64
ViennaRNA Package - Perl 5 bindings v2.7.2-1amd64
ViennaRNA Package - Python 3 bindings v2.7.2-1amd64
ViennaRNA Package - Windows Installer v2.7.2x86_64
ViennaRNA Package - Windows Installer v2.7.2i686
Warning
The Windows installer will not change the PATH variable of your system. In order to omit the path to the binaries while using the programs of the ViennaRNA Package, please add the path of your ViennaRNA Package installation directory to your PATH variable manually.
Tip
The Windows installer doesn’t include python bindings for RNAlib! However, they can be manually installed from PyPI.
ViennaRNA Package - MacOS X Installer v2.7.2x86_64
ViennaRNA Package - MacOS X Installer v2.7.2arm64
Note
Two installers for Mac OS X are available here, one for x86_64 Intel CPUs (x86_64) that should work out of the box for all x86_64 based Macs, and a second (arm64) that runs on newer ARM-based Macs (M1-M3).
Tip
The installers include Python bindings for the Python versions that ship with the respective MacOS X. If you require Python bindings for any other Python version, please install them separately, e.g. from PyPI.
Here we list all versions of the ViennaRNA Package that contain special features which have not been included into the main release yet:
Preliminary version with CUDA (Nvidia GPU) support for RNAfold
ViennaRNA Package v2.3.0cuda Source Code v2.3.0cudasrc
Configure with
./configure NVCC_PATH=/path/to/cuda/bin NVCC_SAMPLES=/path/to/cuda/samples CUDA_SMS="35 50 61"
where
CUDA_SMSis a string specifying the CUDA compute capabilities. Here we include support for for Tesla K20, GTX745, and GTX 1060. You can check the appropriate CUDA compute capability for your GPU here: https://developer.nvidia.com/cuda-gpus. Simply use the compute level as displayed at the NVIDIA web site and multiply it by 10 to get a nice and clean integer number forCUDA_SMS. To find out the correct path to NVCC a simplewhich nvccshould suffice.For all CUDA related environment variables, check the output of
./configure --help
Some answers to frequently asked questions can be found at W. Langdons CUDA RNAfold website.
Preliminary version implementing RNA/DNA hybrid support
Installing from Source#
The instructions below are for installing the ViennaRNA package from source code.
Tip
Read the Customizing the Build Process section before you install our software if you intend to deviate from the default setup.
Usually you’ll just download the latest source tarball,
unpack it and run configure and make:
tar -zxvf ViennaRNA-2.7.2.tar.gz
cd ViennaRNA-2.7.2
./configure
make
sudo make install
You can also get the latest source code from our git repository hosted at github:
git clone https://github.com/ViennaRNA/ViennaRNA.git
Usually, there is no need to (re-)build the documentation, it is already part of the source code tarball! However, if you compile from a freshly cloned git repository or you’ve changed any of the source code, building the documentation is probably required.
To succeed with the compilation a few maintainer tools are required:
doxygen(to extract the API documentation)sphinx-build(to compile the manual)pdflatex(to compile a PDF version of the manual)sphinx-multiprojectmyst-parsersphinx-copybuttonsphinxcontrib-bibtexpydata-sphinx-themesphinx-design
If all the above tools are available, compilation of the documentation should succeed without any further problems
Our source code allows for building a stand-alone Python interface.
For that, we provide the necessary packaging files
pyproject.toml, setup.cfg, setup.py and MANIFEST.in.
They are created by our autoconf toolchain after a successful
run of ./configure. Particular default compile-time features may be
(de-)activated by setting the corresponding boolean flags in
setup.cfg. Running
python -m build
will then create a source distribution (sdist) and a binary
package (wheel) in the dist/ directory. These files can be
easily installed via Python’s pip.
Installing Pre-compiled Packages#
To install the pre-compiled Linux packages that we provide in the Download section above, simply download the corresponding files and use the installer program of your linux distribution.
Some examples to install the core programs and the Python 3 interface are shown below.
sudo pacman -U viennarna-2.7.2-1-x86_64.pkg.tar.zst python-rna-2.7.2-1-x86_64.pkg.tar.zst
sudo apt install viennarna-2.7.2-1_amd64.deb python3-rna-2.7.2-1_amd64.deb
sudo dnf install viennarna-2.7.2-1.x86_64.rpm python3-rna-2.7.2-1.x86_64.rpm
Simply download the latest MacOS X installer for your architecture from the download section above and run it. It will guide you through the installation process
Simply download the latest Windows installer for your architecture from the download section above and run it. It will guide you through the installation process
Pixi is a modern and extremely fast alternative to conda. It is based on the conda packages
and environment.
First install pixi
and then set-up the bioconda channel:
pixi config set default-channels '["conda-forge", "bioconda"]'
After these steps, you can install the ViennaRNA bioconda package either globally
pixi global install viennarna
or locally in any workspace/environment:
pixi add viennarna
See the pixi documentation for further information on
how to get started and use pixi for your own workspace(s).
The ViennaRNA Package is also available for the conda or mamba package
manager. The only requirement is to set up the bioconda
channels
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strict
and then you can easily install the viennarna bioconda package through
conda install viennarna
The Python 3 interface for the ViennaRNA Package library is
available at PyPI and can
be installed independently using Python’s pip:
python -m pip install viennarna
An unofficial interface of the ViennaRNA Package for the Julia Programming Language exists at JuliaHub.
Customizing the Build Process#
The ViennaRNA Package includes additional executable programs such as
RNAforester,Kinfold,Kinwalker,RNAlocmin, andRNAxplorer.
Furthermore, we include several features in our C-library that may be activated by default, or have to be explicitly turned on at configure-time. Below we list a selection of the available configure options that affect the features included in all executable programs, the RNAlib C-library, and the corresponding scripting language interface(s).
Streaming SIMD Extension#
Since version 2.3.5 our sources contain code that implements a faster
multibranch loop decomposition in global MFE predictions, as used e.g.
in RNAfold. This implementation makes use of modern processors
streaming SIMD extension (SSE) that provide the capability to execute
particular instructions on multiple data simultaneously (SIMD - single
instruction multiple data, thanks to W. B. Langdon for providing the
modified code). Consequently, the time required to assess the minimum of
all multibranch loop decompositions is reduced up to about one half
compared to the runtime of the original implementation. This feature is
enabled by default since version 2.4.11 and a dispatcher ensures that
the correct implementation will be selected at runtime. If for any
reason you want to disable this feature at compile-time use the following:
./configure --disable-simd
Scripting Language Interfaces#
The ViennaRNA Package comes with scripting language interfaces for Perl 5,
Python (provided by SWIG), that allow one to
use the implemented algorithms directly without the need of calling an
executable program. The necessary requirements are determined at
configure-time and particular languages may be deactivated automatically
if the requirements are not met.
You may switch-off particular languages by passing the
--without-perl and/or --without-python configure options, e.g.:
./configure --without-perl
will turn-off building the Perl 5 interface.
Tip
Disabling the scripting language support all-together can be accomplished using the following switch:
./configure --without-swig
Cluster Analysis#
The programs AnalyseSeqs and AnalyseDists offer some cluster analysis
tools (split decomposition, statistical geometry, neighbor joining, Ward’s method)
for sequences and distance data. To also build these programs add --with-cluster
to your configure options.
Kinfold#
The kinfold program can be used to simulate the folding dynamics of an RNA
molecule, and is compiled by default. Use the --without-kinfold option to
skip compilation and installation of Kinfold.
RNAforester#
The RNAforester program is used for comparing secondary structures using tree
alignment. Similar to kinfold, use the --without-forester option to skip
compilation and installation of RNAforester.
Kinwalker#
The kinwalker algorithm performs co-transcriptional folding of RNAs, starting at
a user specified structure (default: open chain) and ending at the minimum free
energy structure. Compilation and installation of this program is deactivated by
default. Use the --with-kinwalker option to enable building and installation
of kinwalker.
RNAlocmin#
The RNAlocmin program is part of the Basin Hopping Graph Framework and reads
secondary structures and searches for local minima by performing a gradient walk
from each of those structures. It then outputs an energetically sorted list of
local minima with their energies and number of hits to particular minimum, which
corresponds to a size of a gradient basin. Additional output consists of barrier
trees and Arhenius rates to compute various kinetic aspects. Compilation and
installation of this program is activated by default. Use the --without-rnalocmin
option to disable building and installation of RNAlocmin.
RNAxplorer#
The RNAxplorer is a multitool, that offers different methods to explore RNA
energy landscapes. In default mode it takes an RNA sequence as input and produces
a sample of RNA secondary structures. The repellant sampling heuristic used in
default mode iteratively penalizes base pairs of local minima of structures that
have been seen too often. This results in a diverse sample set with the most
important low free energy structures.
Compilation and installation of this program is activated by default. Note, that
this tool depends on the LAPACK library. Use the --without-rnaxplorer
option to disable building and installation of RNAxplorer.
Link Time Optimization#
To increase the performance of our implementations, the ViennaRNA Package tries to make use of the Link Time Optimization (LTO) feature of modern C-compilers. If you are experiencing any troubles at make-time or run-time, or the configure script for some reason detects that your compiler supports this feature although it doesn’t, you can deactivate it using the flag:
./configure --disable-lto
Note, that gcc before version 5 is known to produce unreliable LTO code,
especially in combination with SIMD.
We therefore recommend using a more recent compiler (GCC 5 or above) or to turn off
one of the two features, LTO or SIMD optimized code.
OpenMP#
To enable concurrent computation of our implementations and in some cases parallelization of the algorithms we make use of the OpenMP API. This interface is well understood by most modern compilers. However, in some cases it might be necessary to deactivate OpenMP support and therefore transform RNAlib into a C-library that is not entirely thread-safe. To do so, add the following configure option:
./configure --disable-openmp
POSIX threads#
To enable concurrent computation of multiple input data in RNAfold, and for our
implementation of the concurrent unordered insert, ordered output flush data structure
vrna_ostream_t we make use of POSIX threads (pthread). This should be
supported on all modern platforms and usually does not pose any problems. Unfortunately,
we use a threadpool implementation that is not compatible with Microsoft Windows yet.
Thus, POSIX thread support can not be activated for Windows builds until we have
fixed this problem. If you want to compile RNAfold and RNAlib without POSIX threads
support for any other reasons, add the following configure option:
./configure --disable-pthreads
SVM Z-score filter#
By default, RNALfold that comes with the ViennaRNA Package allows for Z-score
filtering of its predicted results using a Support Vector Machine (SVM) provided
by the LIBSVM library. However, this
library is statically linked to our own RNAlib. If this introduces any problems for
your own third-party programs that link against RNAlib, you can safely switch off
the Z-scoring implementation using:
./configure --without-svm
GNU Scientific Library#
The program RNApvmin computes a pseudo-energy perturbation vector that aims
to minimize the discrepancy of predicted, and observed pairing probabilities. For
that purpose it implements several methods to solve the optimization problem. Many
of them are provided by the GNU Scientific Library (GSL),
which is why the RNApvmin program, and the RNAlib C-library are required to
be linked against libgsl. If this introduces any problems in your own third-party
programs that link against RNAlib, you can turn off a larger portion of available
minimizers in RNApvmin and linking against libgsl all-together, using:
./configure --without-gsl
Multiple-precision Floating-Point Computations#
Our Non-redundant Boltzmann Sampling implementation uses
multi-precision floating-point computations provided by the
GNU MPFR library by default. This requires linking against
libmpfr and libgmp. You can switch off this feature using:
./configure --disable-mpfr
Universal binaries#
If you intend to build the ViennaRNA for Mac OS X such that it runs on both, x86_64
and the arm64 (Apple Silicon Processors) architectures, you need to build a
so-called universal binary. Note, however, that to accomplish this task, you might
need to deactivate any third-party library dependency as in most cases, only one
architecture will be available at link time. This includes the Perl 5 and Python
interfaces but might also concern also MPFR
and GSL support, possibly even more.
In order to compile and link the programs, library, and scripting language interfaces
of the ViennaRNA Package for multiple architectures, we’ve added a new configure switch
that sets up the required changes automatically:
./configure --enable-universal-binary
Note
With link time optimization turned on, MacOS X’s default compiler (llvm/clang)
generates an intermediary binary format that can not easily be combined into a
multi-architecture library. Therefore, the --enable-universal-binary switch
turns off Link Time Optimization!
Disable C11/C++11 features#
By default, we use C11/C++11 features in our implementations. This mainly accounts for unnamed unions/structs within RNAlib. The configure script automatically detects whether or not your compiler understands these features. In case you are using an older compiler, these features will be deactivated by setting a specific pre-processor directive. If for some reason you want to deactivate C11/C++11 features despite the capabilities of your compiler, use the following configure option:
./configure --disable-c11
Deprecated symbols#
Since version 2.2 we are in the process of transforming the API of our RNAlib. Hence, several symbols are marked as deprecated whenever they have been replaced by the new API. By default, deprecation warnings at compile time are deactivated. If you want to get your terminal spammed by tons of deprecation warnings, enable them using:
./configure --enable-warn-deprecated
Single precision#
Calculation of partition functions (via RNAfold -p) uses double precision
floats by default, to avoid overflow errors on longer sequences. If your machine
has little memory and you don’t plan to fold sequences over 1,000 bases in
length you can compile the package to do the computations in single precision by
running:
./configure --enable-floatpf
Warning
Using this option is discouraged and not necessary on most modern computers.
Help#
For a complete list of all ./configure options and important environment variables,
type:
./configure --help
For more general information on the build process see the INSTALL file.
Build your own Binary Package from SourceCode#
If you don’t find a precompiled package for your linux distribution, or in case
you just want to create a binary package by yourself, have a look into the packaging/
directory of our source tarball. It includes a list of some configuration files that
we use for package generation:
For RPM based distributions, we use
this SPEC file, originally written for Fedora, but meanwhile extended to work for at least the Linux distributions we provide binary packages ourselves.Our binary package for ArchLinux was generated using
this PKGBUILD file, which is also part of theviennarnasource package available through the ArchLinux User Repository (AUR).The configuration files for our binary Debian and Ubuntu packages are included in the source tarball within the
packaging/debiandirectory.Finally, for our MacOS X package, we make use of the
pkgbuild,productbuild, andhditoolcommandline tools. The corresponding configuration files are included in our tarball in the directorypackaging/macosx. For simplicity, you can instruct theautotoolstoolchain to automatically build the installer disk image by adding the following configure switch:./configure --enable-macosx-installer
This creates a file
packaging/macosx/ViennaRNA-2.7.2-MacOSX.dmg.
Our binary packages in the above section are mainly build using the openSUSE Build Service, while the Windows Installer is created using the MinGW cross-compiler and the NSIS install system. The MacOS X installer is build on github via github actions.