A library for working with phylogenetic and population genetic data.
v0.27.0
sequence/functions/stats.cpp File Reference

Go to the source code of this file.

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::sequence
 

Functions

std::map< char, double > base_frequencies (Sequence const &seq, std::string const &plain_chars)
 Get the base frequencies of the sites in a Sequence given the base chars. More...
 
std::map< char, double > base_frequencies (SequenceSet const &set, std::string const &plain_chars)
 Get the base frequencies of the sites in a SequenceSet given the base chars. More...
 
static std::map< char, double > base_frequencies_accumulator (std::map< char, size_t > const &sitehistogram, std::string const &plain_chars)
 Local helper function that turns a site histogram into base frequencies. More...
 
size_t count_chars (SequenceSet const &set, std::string const &chars)
 Count the number of occurrences of the given chars within the sites of the SequenceSet. More...
 
size_t gap_site_count (SiteCounts const &counts)
 
double gapyness (SequenceSet const &set, std::string const &gap_chars)
 Return the "gapyness" of the Sequences, i.e., the proportion of gap chars and other completely undetermined chars to the total length of all sequences. More...
 
std::map< char, size_t > site_histogram (Sequence const &seq)
 Get a histogram of the occurrences of particular sites, given a Sequence. More...
 
std::map< char, size_t > site_histogram (SequenceSet const &set)
 Get a histogram of the occurrences of particular sites, given a SequenceSet. More...