SystematicsAnalysis.hpp

TODO.

Functions

template<typename systematics_t>
Ptr<typename systematics_t::taxon_t> FindDominant(systematics_t &s)
Template Parameters:

systematics_t – The type of the systematics manager containing the phylogeny to analyze.

Parameters:

s – the systematics manager to search in. Must have more than 0 active taxa.

Returns:

the taxon with the highest fitness out of any active taxon in the given systematics manager.

template<typename taxon_t>
int LineageLength(Ptr<taxon_t> taxon)

Returns the total number of ancestor taxa in taxon ‘s lineage. Requires that taxon is a member of a systematics manager that has ancestor storing turned on

template<typename taxon_t>
int CountMutSteps(Ptr<taxon_t> taxon, std::string type = "substitution")

Returns the total number of times a mutation of type type occurred along taxon ‘s lineage. (Different from CountMuts in that CountMuts sums them whereas CountMutSteps would count two simultaneous mutations of the same type as one event) Assumes each taxon has a struct containing an unordered map with keys that are strings indicating types of mutations and keys that are numbers indicating the number of that type of mutation that occurred to make this taxon from the parent.

Parameters:
  • type – string corresponding to a type of mutation. Must be in the mut_counts dictionary (i.e. the dictionary passed in when datastruct::mut_landscape_info::RecordMutation was called)

  • taxon – a pointer to a taxon to count mutation steps for. Must have a DATA_TYPE that supports mutation tracking (e.g. mut_landscape_info)

template<typename taxon_t>
int CountMutSteps(Ptr<taxon_t> taxon, vector<std::string> types)

Returns the total number of times a mutation of the types types that along the given taxon ‘s lineage. (Different from CountMuts in that CountMuts sums them whereas CountMutSteps would count two simultaneous mutations of the same type as one event)

template<typename taxon_t>
int CountMuts(Ptr<taxon_t> taxon, std::string type = "substitution")

Returns the total number of mutations of type type that occurred along taxon ‘s lineage.

template<typename taxon_t>
int CountMuts(Ptr<taxon_t> taxon, vector<std::string> types)

Returns the total number of mutations of the types in types that occurred along the given taxon ‘s lineage.

template<typename taxon_t>
int CountDeleteriousSteps(Ptr<taxon_t> taxon)

Returns the total number of deleterious mutational steps that occurred along the given taxon’s lineage. (a change from parent to child taxon counts as a single step, regardless of the number of mutations that happened at that time point)

template<typename taxon_t>
int CountPhenotypeChanges(Ptr<taxon_t> taxon)

Returns the total number of changes in phenotype that occurred along the given taxon’s lineage.

template<typename taxon_t>
int CountUniquePhenotypes(Ptr<taxon_t> taxon)

Returns the total number of unique phenotypes that occurred along the given taxon’s lineage.