|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_TREE_MASS_TREE_BALANCES_H_
2 #define GENESIS_TREE_MASS_TREE_BALANCES_H_
38 #include <unordered_set>
249 std::vector<MassTree>
const& trees,
264 BalanceSettings settings = {}
276 BalanceData
const& data,
277 std::unordered_set<size_t>
const& numerator_edge_indices,
278 std::unordered_set<size_t>
const& denominator_edge_indices
293 BalanceData
const& data,
294 std::unordered_set<size_t>
const& numerator_edge_indices,
295 std::unordered_set<size_t>
const& denominator_edge_indices,
302 #endif // include guard
@ kGeometricMean
Use the geometric mean of the taxon masses.
std::vector< double > mass_balance(BalanceData const &data, std::unordered_set< size_t > const &numerator_edge_indices, std::unordered_set< size_t > const &denominator_edge_indices)
Calculate the balance of edge masses between two sets of edges.
utils::Matrix< double > edge_masses
The relative per-edge masses per original input Tree.
WeightNorm norm
Set the term for the norm of relative abundances for calculating the taxon weights.
@ kNone
Use no tendency, that is, use 1.0 for this term.
@ kAitchison
Use the Aitchison norm of the relative abundances of the taxon.
Tree MassTree
Alias for a Tree that stores masses on its TreeEdges.
double pseudo_count_summand_all
Set the constant that is added to all taxon masses to avoid zero counts.
@ kMaximum
Use the Maximum norm of the relative abundances of the taxon.
BalanceData mass_balance_data(std::vector< MassTree > const &trees, BalanceSettings settings)
Calculate the data needed to calculate balances on MassTrees.
utils::Matrix< double > raw_edge_masses
The absolute raw per-edge masses per original input Tree.
Data needed to calculate balances.
Settings to calculate balances and the Phylogenetic ILR Transform.
Class for representing phylogenetic trees.
std::vector< double > taxon_weights
The taxon/edge weights calculated from mulitple trees.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
@ kArithmeticMean
Use the arithmetic mean of the taxon masses.
@ kNone
Use no norm, that is, use 1.0 for this term.
double pseudo_count_summand_zeros
Set the constant that is added to taxon masses that are zero, to avoid zero counts.
Tree tree
The Tree on which to calculate balances.
@ kManhattan
Use the Manhattan norm of the relative abundances of the taxon.
@ kEuclidean
Use the Euclidean norm of the relative abundances of the taxon.
WeightTendency tendency
Set the term for asssing the central tendency of taxon masses for calculating the taxon weights.
@ kMedian
Use the median of the taxon masses.