A library for working with phylogenetic data.
functions/base_counts.hpp File Reference
#include "genesis/population/base_counts.hpp"
#include "genesis/population/formats/simple_pileup_reader.hpp"
#include <iosfwd>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.


struct  BaseCountsStatus


 Container namespace for all symbols of genesis in order to keep them separate when used as a library.


std::pair< char, double > consensus (BaseCounts const &sample)
 Consensus character for a BaseCounts, and its confidence. More...
std::pair< char, double > consensus (BaseCounts const &sample, BaseCountsStatus const &status)
 Consensus character for a BaseCounts, and its confidence. More...
BaseCounts convert_to_base_counts (SimplePileupReader::Sample const &sample, unsigned char min_phred_score)
void filter_min_count (BaseCounts &sample, size_t min_count)
 Filter by minimum count that we need for a type of nucleotide (A, C, G, T) to be considered; set to zero if min_count is not reached. More...
size_t get_base_count (BaseCounts const &bc, char base)
 Get the count for a base given as a char. More...
BaseCounts merge (BaseCounts const &p1, BaseCounts const &p2)
 Merge the counts of two BaseCountss. More...
BaseCounts merge (std::vector< BaseCounts > const &p)
 Merge the counts of a vector BaseCountss. More...
void merge_inplace (BaseCounts &p1, BaseCounts const &p2)
 Merge the counts of two BaseCountss, by adding the counts of the second (p2) to the first (p1). More...
size_t nucleotide_sum (BaseCounts const &sample)
 Count of the pure nucleotide bases at this position, that is, the sum of all A, C, G, and T. More...
std::ostream & operator<< (std::ostream &os, BaseCounts const &bs)
 Output stream operator for BaseCounts instances. More...
BaseCountsStatus status (BaseCounts const &sample, size_t min_coverage=0, size_t max_coverage=0, size_t min_count=0, bool tolerate_deletions=false)
 Compute a simple status with useful properties from the counts of a BaseCounts. More...
std::ostream & to_sync (BaseCounts const &bs, std::ostream &os)
 Output a BaseCounts instance to a stream in the PoPoolation2 sync format. More...