sampled_distance_from_fasta#

RNAdist.fasta_wrappers.sampled_distance_from_fasta(fasta: str, md_config: Dict[str, Any], num_threads: int = 1, nr_samples: int = 1000, redundant: bool = True)#

Calculates the averaged distance matrix for every sequence in a fasta file using probabilistic backtracking

Parameters:
  • fasta (str) – Path to a fasta file

  • md_config (Dict[str, Any]) – A dictionary containing keys and values to set up the ViennaRNA Model details

  • num_threads (int) – number of parallel processes to use

  • nr_samples (int) – How many samples to average the distance

  • redundant (bool) – Whether to sample redundant or non-redundant

Returns:

Dictionary of Numpy arrays of shape |S| x |S| with S being the nucleotide sequence. The sequence identifier is the dict key and the expected distance matrices are the values

Return type:

Dict[str, np.ndarray]