sample_non_redundant#

RNAdist.sampling.ed_sampling.sample_non_redundant(sequence: str, nr_samples: int, md=None)#

Samples structures for a sequence non-redundantly

Draws nr_samples structures and calculates the expected distance for all nucleotide pairs based on these. It might not reach 100% partition function coverage.

Parameters:
  • sequence (str) – RNA sequence as a string

  • nr_samples (int) – How many samples should be drawn

  • md (RNA.md) – ViennaRNA model details (Will automatically set uniq_ML to 1)

Returns:

N x N matrix

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

Return type:

np.ndarray