A toolkit for working with phylogenetic data.
v0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
taxonomy/functions/entropy.cpp File Reference
#include "genesis/taxonomy/functions/entropy.hpp"
#include "genesis/taxonomy/formats/taxopath_generator.hpp"
#include "genesis/taxonomy/functions/taxonomy.hpp"
#include "genesis/taxonomy/iterator/preorder.hpp"
#include "genesis/taxonomy/iterator/levelorder.hpp"
#include "genesis/taxonomy/taxon.hpp"
#include "genesis/taxonomy/taxonomy.hpp"
#include "genesis/utils/core/logging.hpp"
#include "genesis/utils/math/common.hpp"
#include "genesis/utils/text/style.hpp"
#include <assert.h>
#include <algorithm>
#include <functional>
#include <limits>
#include <numeric>
#include <map>
#include <stdexcept>

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::taxonomy
 

Functions

size_t count_taxa_with_prune_status (Taxonomy const &taxonomy, EntropyTaxonData::PruneStatus status)
 Return the number of Taxa that have a certain prune status. More...
 
void expand_small_subtaxonomies (Taxonomy &taxonomy, size_t min_subtaxonomy_size)
 Expand the leaves of a pruned Taxonomy if their sub-taxonomies are smaller than the given threshold. More...
 
std::string print_pruned_taxonomy (Taxonomy const &taxonomy)
 Print a Taxonomy, highlighting those Taxa that are the pruning border, i.e., where we cut off the sub-taxa, and print their entropies next to them. More...
 
void prune_by_entropy (Taxonomy &taxonomy, size_t target_taxonomy_size, PruneByEntropySettings settings={})
 Prune a Taxonomy so that the result (approximately) contains a desired number of "leaf" Taxa, using the entropy of the Taxa as indicator where to prune. More...
 
void remove_pruned_taxonomy_children (Taxonomy &taxonomy)
 Remove the children of all Taxa that are pruned, i.e, that have prune status == kOutside. More...
 
bool validate_pruned_taxonomy (Taxonomy const &taxonomy)
 Validate that the pruning status of a Taxonomy is valid. More...