FoldedRNA#

class biotite.application_v2.viennarna.FoldedRNA(sequence: NucleotideSequence, dot_bracket: str, free_energy: float | None = None, span: tuple[int, int] | None = None)[source]#

Bases: object

The predicted secondary structure of a single ribonucleic acid sequence.

Attributes:
sequenceNucleotideSequence

The folded RNA sequence.

dot_bracketstr

The secondary structure in dot-bracket notation.

free_energyfloat, optional

The free energy (kcal/mol) of the structure.

spantuple (int, int), optional

If the dot_bracket describes only a local part of the sequence, the (start, stop) range (0-based, exclusive stop) the structure occupies in sequence. None means the structure spans the entire sequence.

base_pairs() → ndarray[tuple[N, C2], dtype[integer]]#

Get the base pairs of the structure.

Returns:
base_pairsndarray, shape=(n,2), dtype=int

Each row gives the positions of the two paired bases in sequence.

static from_base_pairs(sequence: NucleotideSequence, base_pairs: ndarray[tuple[N, C2], dtype[integer]], max_pseudoknot_order: int | None = None) → FoldedRNA#

Create a FoldedRNA from a sequence and its base pairs.

Non-canonical base pairs are omitted, as they cannot be represented by the folding energy model.

Parameters:
sequenceNucleotideSequence

The RNA sequence.

base_pairsndarray, shape=(n,2), dtype=int

Each row gives the positions of two paired bases in sequence.

max_pseudoknot_orderint, optional

The maximum pseudoknot order to represent. Base pairs of a higher order are treated as unpaired. By default, all orders are represented.

Returns:
foldedFoldedRNA

The corresponding structure, with unknown free_energy.