IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
Loading...
Searching...
No Matches
IntaRNA C++ API

IntaRNA predicts interactions between two RNA molecules while accounting for the energy needed to make their binding sites accessible and for configurable seed interactions. The command-line tool and the libIntaRNA C++ library share the same prediction machinery.

This reference describes the library in the IntaRNA namespace. For installation, command-line options, examples, and citations, see the IntaRNA user guide. The online API follows the development branch (master); generate the documentation from a release checkout when working with that release.

Finding your way around

Task Starting points
Represent sequences and interaction sites IntaRNA::RnaSequence, IntaRNA::IndexRange, IntaRNA::Interaction
Compute or load accessibility penalties IntaRNA::Accessibility, IntaRNA::AccessibilityVrna, IntaRNA::AccessibilityFromStream
Evaluate interaction energies IntaRNA::InteractionEnergy, IntaRNA::InteractionEnergyVrna
Predict minimum-energy interactions IntaRNA::Predictor, IntaRNA::PredictorMfe, IntaRNA::PredictorMfe2dHeuristic
Work with ensemble-based predictions IntaRNA::PredictorMfeEns, IntaRNA::PredictorMfeEns2d
Specify seeds and helices IntaRNA::SeedConstraint, IntaRNA::SeedHandler, IntaRNA::HelixConstraint, IntaRNA::HelixHandler
Collect predictions or track computations IntaRNA::OutputHandler, IntaRNA::OutputConstraint, IntaRNA::PredictionTracker

Use the Classes menu for the class list and inheritance hierarchy, Files for public headers, or the search box for a particular symbol. Concrete classes document their supported constraints and algorithmic tradeoffs.

How the pieces fit together

  1. Create an IntaRNA::RnaSequence for each RNA and choose an IntaRNA::Accessibility implementation for each sequence. Accessibility describes the energy penalty for making a subsequence available for binding.
  2. Wrap the second sequence's accessibility in IntaRNA::ReverseAccessibility and pass both accessibility objects to an IntaRNA::InteractionEnergy implementation. The reversed view lets the energy model handle antiparallel pairing consistently.
  3. Select a concrete IntaRNA::Predictor and provide the energy model, an IntaRNA::OutputHandler, and any required seed or helix handlers. Calling IntaRNA::Predictor::predict delivers predicted interactions to the output handler; optional IntaRNA::PredictionTracker implementations collect additional information during prediction.

Many constructors retain references to their inputs. Keep those objects alive for the lifetime of the objects using them, and consult constructor documentation for ownership exceptions (including prediction trackers).

Coordinates and energy units

  • Internal sequence positions are zero-based, and IntaRNA::IndexRange uses inclusive bounds. Input/output numbering can differ; use the conversions supplied by IntaRNA::RnaSequence.
  • Sequence 2 is reversed in the energy model. Use IntaRNA::ReverseAccessibility and the energy model's conversion methods when moving between internal coordinates and reported interactions.
  • IntaRNA::E_type stores energies in hundredths of kcal/mol. The conversion macros E_2_Ekcal and Ekcal_2_E in general.h convert between internal values and kcal/mol. Preserve the infinity sentinels and use the comparison helpers in that header; partition-function values use IntaRNA::Z_type.

Using the library

Public headers require C++23. The installed IntaRNA pkg-config package supplies include and linker flags; the consuming project must select its C++ language standard. Follow the library integration guide, including the required Easylogging++ initialization, before calling the library.

To build this reference without compiling IntaRNA, run bash doc/build-api.sh from a source checkout with Doxygen and Graphviz installed, then open doxygen-doc/html/index.html. See the documentation build guide for the Autotools target and publishing setup.