MFE_calculator ============== .. py:module:: MFE_calculator Attributes ---------- .. autoapisummary:: MFE_calculator._PAIRS Classes ------- .. autoapisummary:: MFE_calculator.RNAFolder MFE_calculator.RNAFolderBase MFE_calculator.RNAFolderBase2 MFE_calculator.RNASolution MFE_calculator.RNASolutionBase MFE_calculator.RNASolutionBase2 Module Contents --------------- .. py:class:: RNAFolder(loop_min=0, energies=None) Bases: :py:obj:`RNAFolderBase2` An RNA folding algorithm and parameters An instance holds all the configuration necessary to solve an RNA folding problem. Note that energies are the free-energy (a more negative value for the more favourable pairings). .. py:method:: solve(rna) .. py:class:: RNAFolderBase(loop_min=0, energies=None) An RNA folding algorithm and parameters An instance holds all the configuration necessary to solve an RNA folding problem. Note that energies are the free-energy (a more negative value for the more favourable pairings). .. py:attribute:: MAX_BULGE :value: 20 .. py:attribute:: MAX_HAIRPIN :value: 20 .. py:attribute:: MAX_INTERNAL :value: 20 .. py:method:: _helix_lookups(energies) :staticmethod: Create look-up tables for free energy in helices .. py:method:: _interpolated_table(energies, size, key, fmt = '02d') :staticmethod: Read values key01, key02, ... to array interpolating missing values. We use this to encode e.g. the hairpin loop energies in a table we can use incrementally during minimisation. .. py:method:: _loop_lookups(energies) :staticmethod: Create look-up tables for loop free energy in loops .. py:method:: _special_lookups(energies, dflt=None) :staticmethod: Get misc special free energy parameters .. py:attribute:: lmin :value: 0 .. py:attribute:: non_pairing :value: None .. py:method:: print_hairpin_fe(n) .. py:method:: print_stack_fe(rp, sp) .. py:method:: print_term_fe(rp, an, bn) .. py:class:: RNAFolderBase2(loop_min=0, energies=None) Bases: :py:obj:`RNAFolderBase` An RNA folding algorithm and parameters An instance holds all the configuration necessary to solve an RNA folding problem. Note that energies are the free-energy (a more negative value for the more favourable pairings). .. py:method:: closed_energy(soln, i, j) Minimum energy and mode of [i, j] closed by pairing (i,j). If the pair is forbidden (not AU, CG, GC, GU, UA or UG) the method returns the self.non_pairing energy (normally math.inf), and the returned mode is -1. Otherwise, the method compares the minimum energy obtained by pairing (i,j) across [i+1, j-1] considered as open and closed, and returns the lower energy and mode (0=open, 1=closed). .. py:method:: open_energy(soln, i, j) Minimum energy of [i, j] without pairing (i,j). The method seeks a lowest energy for [i,j], considering j unpaired or paired with any interior nucleotide k, where i1: multiloop, while in case 1 the differences between the ends of the proposed closing and those of the single base pair distinguish amongst bulges, interior and muylti-branch loops. A single branch does not signify helix continuation, since that is a closed structure. .. py:method:: get_arrays() Get references to the K, U and V arrays .. py:data:: _PAIRS :value: ('AU', 'CG', 'GC', 'GU', 'UA', 'UG')