SuboptApp#

class biotite.application_v2.viennarna.SuboptApp(path: PathLike[str] | str = 'RNAsubopt')[source]#

Bases: LocalApp

A handle to ViennaRNA’s RNAsubopt software.

Parameters:
pathstr, optional

Path of the RNAsubopt binary.

Examples

>>> results = SuboptApp().run(
...     NucleotideSequence("CCGGTGAAACGCTGG"), energy_range=2.0
... ).result()
>>> print(len(results))
3
>>> for result in sorted(results, key=lambda result: result.free_energy):
...     print(result.dot_bracket, result.free_energy)
((((((...)))))) -5.3
(((((.....))))) -3.9
.(((((...))))). -3.5
run(sequence: NucleotideSequence, energy_range: float = 1.0, temperature: float = 37, pairs: Any = None, paired: Any = None, unpaired: Any = None, downstream: Any = None, upstream: Any = None, enforce: bool = False, **kwargs: Any) → CommandSetup[list[FoldedRNA]]#

Compute suboptimal secondary structures.

Constraints of known paired or unpaired bases can be added to the folding algorithm via pairs, paired, unpaired, downstream and upstream.

Parameters:
sequenceNucleotideSequence

The RNA sequence.

energy_rangefloat, optional

All structures with a free energy in this range (kcal/mol) above the minimum free energy are computed.

temperaturefloat, optional

The temperature (°C) to be assumed for the energy parameters.

pairsndarray, shape=(n,2), dtype=int, optional

Positions of constrained base pairs.

pairedndarray, shape=(n,), dtype=int or dtype=bool, optional

Positions of bases that are paired with any other base.

unpairedndarray, shape=(n,), dtype=int or dtype=bool, optional

Positions of bases that are unpaired.

downstreamndarray, shape=(n,), dtype=int or dtype=bool, optional

Positions of bases that are paired with any downstream base.

upstreamndarray, shape=(n,), dtype=int or dtype=bool, optional

Positions of bases that are paired with any upstream base.

enforcebool, optional

If set to true, the given constraints are enforced, i.e. the respective base pairs must form. By default, a constraint only forbids the formation of a base pair that would conflict with this constraint.

**kwargs

Additional command line options.

Returns:
futureFuture of list of FoldedRNA

A handle to the running computation.