CofoldedAlignment#
- class biotite.application_v2.viennarna.CofoldedAlignment(alignments: list[Alignment], dot_bracket: str, free_energy: float | None = None, covariance_energy: float | None = None, spans: list[tuple[int, int]] | None = None)[source]#
Bases:
objectThe predicted consensus secondary structure of a complex of multiple ribonucleic acid alignments.
- Attributes:
- alignmentslist of Alignment
The alignments the complex is composed of.
- dot_bracketstr
The consensus secondary structure in dot-bracket notation with strands separated by
&, indexed by alignment column.- free_energyfloat, optional
The free energy (kcal/mol) of the complex.
- covariance_energyfloat, optional
The energy (kcal/mol) of the covariance term, if reported separately by the software.
- spanslist of tuple (int, int), optional
If the
dot_bracketdescribes only local parts of the alignments, the(start, stop)range (0-based, exclusive stop) of alignment columns each segment occupies.Nonemeans each segment spans all columns.
- base_pairs() ndarray[tuple[N, C4], dtype[integer]]#
Get the consensus base pairs in alignment-column coordinates.
- Returns:
- base_pairsndarray, shape=(n,4), dtype=int
Each row is
(strand_i, col_i, strand_j, col_j)with the columns referring to the respective alignment.
- base_pairs_of(sequence_index: int) ndarray[tuple[N, C4], dtype[integer]]#
Get the consensus base pairs projected onto one sequence of each alignment.
The same sequence_index is applied to every alignment. Base pairs where either column is a gap in the selected sequence are omitted.
- Parameters:
- sequence_indexint
The index of the sequence, applied to every alignment.
- Returns:
- base_pairsndarray, shape=(n,4), dtype=int
Each row is
(strand_i, pos_i, strand_j, pos_j)with the positions given in the ungapped numbering of the selected sequence of each alignment.
- classmethod from_single(single: FoldedAlignment) CofoldedAlignment#
Create a
CofoldedAlignmentfrom a single-alignmentFoldedAlignment.- Parameters:
- singleFoldedAlignment
The single-alignment structure.
- Returns:
- cofoldedCofoldedAlignment
The equivalent complex containing a single alignment.