non_redundant_sample_fc#

RNAdist.sampling.ed_sampling.non_redundant_sample_fc(fc: RNA.fold_compound, nr_samples: int = 1, undirected: bool = True)#

Samples structures for a sequence non-redundantly and returns pairwise distances of nucleotides

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.

  • nr_samples (float) – Number of non-redundant structures to draw

  • 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