pthreshold_sample_fc#

RNAdist.sampling.ed_sampling.pthreshold_sample_fc(fc: RNA.fold_compound, threshold: float = 0.99, undirected: bool = True)#

Samples structures for a sequence non-redundantly and returns weighted pairwise nt distances.

Warning

This function might produce nonsense output if the fc is not set up correctly. If you do not know how to do this consider using sample_nr_cpp()

Parameters:
  • fc (RNA.fold_compound) – ViennaRNA fold compound.

  • threshold (float) – Probability cutoff. If sum of probability of samples structures reaches this sampling stops

  • undirected (bool) – Whether to use undirected or directed Graph to calculate distances

Returns:

N x N matrix

containing approximated expected distances from nucleotide i to j at matrix[i][j]

Return type:

np.ndarray