LalifoldApp#

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

Bases: LocalApp

A handle to ViennaRNA’s RNALalifold software.

Parameters:
pathstr, optional

Path of the RNALalifold binary.

Examples

>>> matrix = SubstitutionMatrix.std_nucleotide_matrix()
>>> alignment = align_multiple(
...     [
...         NucleotideSequence("GGGGAAAACCCC"),
...         NucleotideSequence("GGGGAAAAACCCC"),
...         NucleotideSequence("GGGGGAAAACCCCC"),
...         NucleotideSequence("GGGAAAACCC"),
...     ],
...     matrix,
...     terminal_penalty=False,
... )[0]
>>> print(alignment)
-GGGGAAAACCCC-
-GGGGAAAAACCCC
GGGGGAAAACCCCC
--GGGAAAACCC--
>>> results = LalifoldApp().run(alignment, max_span=30).result()
>>> for result in results:
...     print(result.dot_bracket, result.span, result.free_energy)
.(((.....))). (1, 14) -2.2
.((((....)))). (0, 14) -4.47
>>> print(results[0].base_pairs())
[[ 2 12]
 [ 3 11]
 [ 4 10]]
>>> print(results[0].base_pairs_of(0))
[[ 1 11]
 [ 2 10]
 [ 3  9]]
run(alignment: Alignment, max_span: int = 70, temperature: float = 37, **kwargs: Any) → CommandSetup[list[FoldedAlignment]]#

Compute locally stable consensus secondary structures.

Parameters:
alignmentAlignment

An alignment of RNA sequences.

max_spanint, optional

The maximum allowed span (number of columns) of a base pair.

temperaturefloat, optional

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

**kwargs

Additional command line options.

Returns:
futureFuture of list of FoldedAlignment

A handle to the running computation. Each structure describes a local part of the alignment, given by its FoldedAlignment.span.