sample_pthreshold#
- RNAdist.sampling.ed_sampling.sample_pthreshold(sequence, cutoff: float = 0.99, md=None)#
Samples structures for a sequence non-redundantly
Draws structures (
S) via non redundant sampling from the ensemble of Structures (ES) until the probability mass of structures reachescutoffFurther calculates the expected distance (ED) for all nucleotide pairs based on the following formula, whereDspecifies the distance on a given structureSandP(s)is the corresponding probability.\[ED_{i, j} = \sum_{S \in SE} P(S) × D_{i, j}\]- Parameters:
sequence (str) – RNA sequence as a string
cutoff (float) – Probability cutoff. If sum of probability of samples structures reaches this sampling stops
md (RNA.md) – ViennaRNA model details (Will automatically set uniq_ML to 1 and pf_smooth to 0)
- Returns:
N x Nmatrixcontaining approximated expected distances from nucleotide
itojatmatrix[i][j]
- Return type:
np.ndarray