![]() |
Quetzal-CoaTL
The Coalescence Template Library
|
#include <quetzal/coalescence/policies/distance_to_parent.hpp>
Policy class for coalescing gene copies into a Newick formula.
Policy class for coalescing gene copies into a Newick formula, computing distances (in generations) to parent nodes.
Space | coordinate type |
Time | time type |
Classes | |
class | cell_type |
struct | treatment |
Treatment to operate on a DFS on the tree to compute branches length. More... | |
Public Types | |
using | coord_type = Space |
using | time_type = Time |
using | tree_type = quetzal::coalescence::container::Tree< cell_type > |
using | forest_type = quetzal::coalescence::container::Forest< coord_type, tree_type > |
Public Member Functions | |
void | ancestral_Wright_Fisher_N (unsigned int value) |
Set the size of the putative ancestral Wright-Fisher population preceding the spatial history. | |
unsigned int | ancestral_Wright_Fisher_N () const |
Get the size of the putative ancestral Wright-Fisher population preceding the spatial history. | |
template<typename Generator > | |
tree_type | find_mrca (forest_type const &forest, time_type const &first_time, Generator &gen) const |
Coalesce the given forest into a discrete time Wright-Fisher model. | |
Static Public Member Functions | |
static auto | make_forest (std::map< coord_type, unsigned int > const &sample_counts, time_type const &sampling_time) |
Make a forest respecting the policy from a geographic sample. | |
static auto | branch () |
Get the functor interface required to branch a parent node to a child node. | |
static auto | init () |
Get the functor interface required to initialize a node. | |
static std::string | treat (tree_type &tree) |
Visit the whole tree and builds its Newick formula. | |
using quetzal::coalescence::newick_with_distance_to_parent< Space, Time >::coord_type = Space |
Geographic coordinate type
using quetzal::coalescence::newick_with_distance_to_parent< Space, Time >::forest_type = quetzal::coalescence::container::Forest<coord_type, tree_type> |
The type used to represent a spatial forest of genealogies
using quetzal::coalescence::newick_with_distance_to_parent< Space, Time >::time_type = Time |
Time type
using quetzal::coalescence::newick_with_distance_to_parent< Space, Time >::tree_type = quetzal::coalescence::container::Tree<cell_type> |
The type used to represent a genealogy
|
inline |
Get the size of the putative ancestral Wright-Fisher population preceding the spatial history.
|
inline |
Set the size of the putative ancestral Wright-Fisher population preceding the spatial history.
value | The Wright-Fisher population size |
|
inlinestatic |
Get the functor interface required to branch a parent node to a child node.
|
inline |
Coalesce the given forest into a discrete time Wright-Fisher model.
Generator | The type of random generator. |
forest | The forest to coalesce. |
first_time | The time at which coalescence begins |
gen | The random generator |
|
inlinestatic |
Get the functor interface required to initialize a node.
|
inlinestatic |
Make a forest respecting the policy from a geographic sample.
sample_counts | A map giving for each deme the number of sampled gene copies |
sampling_time | At what time the gene copies are sampled. |
|
inlinestatic |
Visit the whole tree and builds its Newick formula.
tree | The tree to visit. |