FoldApp#

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

Bases: LocalApp

A handle to ViennaRNA’s RNAfold software.

Parameters:
pathstr, optional

Path of the RNAfold binary.

Examples

>>> sequence = NucleotideSequence("CGACGTAGATGCTAGCTGACTCGATGC")
>>> result = FoldApp().run(sequence).result()
>>> print(result.free_energy)
-1.3
>>> print(result.dot_bracket)
(((.((((.......)).)))))....
>>> print(result.base_pairs())
[[ 0 22]
 [ 1 21]
 [ 2 20]
 [ 4 19]
 [ 5 18]
 [ 6 16]
 [ 7 15]]
run(sequence: NucleotideSequence, temperature: float = 37, pairs: Any = None, paired: Any = None, unpaired: Any = None, downstream: Any = None, upstream: Any = None, enforce: bool = False, **kwargs: Any) → CommandSetup[FoldedRNA]#

Compute the minimum free energy secondary structure.

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.

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 FoldedRNA

A handle to the running computation.