RNAStructProbs#
- class RNAdist.dp.viennarna_helpers.RNAStructProbs(fc: RNA.fold_compound, array: numpy.ndarray)#
Class that acts like a dictionary to store structural probabilities as a np.array
An instance of this class is returned if you use the
RNAdist.dp.viennarna_helpers.RNAStructProbs.calc_struct_probs()
function.- Parameters:
fc (str) – The viennaRNA fold compound the structural probabilities belong to
array (np.ndarray) – numpy array of shape (4, fc.length) storing structural probabilities
It is possbible to access the different structural probabilities the following way:
>>> sprobs: RNAStructProbs = calc_struct_probs(fc) >>> sprobs["exterior"] >>> sprobs["hairpin"] >>> sprobs["interior"] >>> sprobs["multiloop"]
- __init__(fc: RNA.fold_compound, array: numpy.ndarray)#
Methods
__init__
(fc, array)