A library for working with phylogenetic and population genetic data.
v0.27.0
BalanceSettings Struct Reference

#include <genesis/tree/mass_tree/balances.hpp>

Detailed Description

Settings to calculate balances and the Phylogenetic ILR Transform.

The class stores settings for different parts of the balances calculation:

  • The taxon weights used in soft thresholding are described in Section "Soft thresholding through weighting taxa" of [1]. See there for details. We implement the weights p as described there, offering different ways to assess the central tendency of counts and to measure the norm of their relative abundances. These two terms (BalanceSettings::tendency and BalanceSettings::norm) are multiplied to get the weight for a taxon. By default, the geometric mean times the euclidean norm are used as weights.
  • To avoid zero counts in the taxon masses, two ways of adding pseudo-counts are offered: Either a constant is added to all taxon masses, or just to the ones that are zero (BalanceSettings::pseudo_count_summand_all and BalanceSettings::pseudo_count_summand_zeros).

[1] J. D. Silverman, A. D. Washburne, S. Mukherjee, and L. A. David, "A phylogenetic transform enhances analysis of compositional microbiota data," Elife, vol. 6, p. e21887, Feb. 2017. https://elifesciences.org/articles/21887

See also
phylogenetic_ilr_transform().

Definition at line 76 of file balances.hpp.

Public Types

enum  WeightNorm {
  kNone, kManhattan, kEuclidean, kMaximum,
  kAitchison
}
 
enum  WeightTendency { kNone, kMedian, kArithmeticMean, kGeometricMean }
 

Public Attributes

WeightNorm norm = WeightNorm::kEuclidean
 Set the term for the norm of relative abundances for calculating the taxon weights. More...
 
double pseudo_count_summand_all = 1.0
 Set the constant that is added to all taxon masses to avoid zero counts. More...
 
double pseudo_count_summand_zeros = 0.0
 Set the constant that is added to taxon masses that are zero, to avoid zero counts. More...
 
WeightTendency tendency = WeightTendency::kGeometricMean
 Set the term for asssing the central tendency of taxon masses for calculating the taxon weights. More...
 

Member Enumeration Documentation

◆ WeightNorm

enum WeightNorm
strong
Enumerator
kNone 

Use no norm, that is, use 1.0 for this term.

kManhattan 

Use the Manhattan norm of the relative abundances of the taxon.

See also
manhattan_norm()
kEuclidean 

Use the Euclidean norm of the relative abundances of the taxon.

See also
euclidean_norm()
kMaximum 

Use the Maximum norm of the relative abundances of the taxon.

See also
maximum_norm()
kAitchison 

Use the Aitchison norm of the relative abundances of the taxon.

See also
aitchison_norm()

Definition at line 104 of file balances.hpp.

◆ WeightTendency

enum WeightTendency
strong
Enumerator
kNone 

Use no tendency, that is, use 1.0 for this term.

kMedian 

Use the median of the taxon masses.

See also
median()
kArithmeticMean 

Use the arithmetic mean of the taxon masses.

See also
arithmetic_mean()
kGeometricMean 

Use the geometric mean of the taxon masses.

See also
geometric_mean()

Definition at line 78 of file balances.hpp.

Member Data Documentation

◆ norm

Set the term for the norm of relative abundances for calculating the taxon weights.

Definition at line 145 of file balances.hpp.

◆ pseudo_count_summand_all

double pseudo_count_summand_all = 1.0

Set the constant that is added to all taxon masses to avoid zero counts.

Definition at line 150 of file balances.hpp.

◆ pseudo_count_summand_zeros

double pseudo_count_summand_zeros = 0.0

Set the constant that is added to taxon masses that are zero, to avoid zero counts.

Definition at line 155 of file balances.hpp.

◆ tendency

Set the term for asssing the central tendency of taxon masses for calculating the taxon weights.

Definition at line 140 of file balances.hpp.


The documentation for this struct was generated from the following file: