|
A library for working with phylogenetic and population genetic data.
v0.27.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_POPULATION_FUNCTIONS_FUNCTIONS_H_
2 #define GENESIS_POPULATION_FUNCTIONS_FUNCTIONS_H_
44 namespace population {
153 size_t min_coverage = 0,
154 size_t max_coverage = 0,
155 size_t min_count = 0,
156 bool tolerate_deletions =
false
206 Variant const& variant,
bool reference_first
246 BaseCounts
merge( BaseCounts
const& p1, BaseCounts
const& p2 );
251 BaseCounts
merge( std::vector<BaseCounts>
const& p );
266 std::pair<char, double>
consensus( BaseCounts
const& sample );
277 std::pair<char, double>
consensus( BaseCounts
const& sample, BaseCountsStatus
const&
status );
312 std::ostream&
operator<<( std::ostream& os, BaseCounts
const& bs );
317 #endif // include guard
char guess_reference_base(Variant const &variant)
Guess the reference base of a Variant.
size_t get_base_count(BaseCounts const &bc, char base)
Get the count for a base given as a char.
Ordered array of base counts for the four nucleotides.
size_t t_count
Count of all T nucleotides that are present in the sample.
bool is_biallelic
Is the Sample biallelic?
size_t g_count
Count of all G nucleotides that are present in the sample.
size_t a_count
Count of all A nucleotides that are present in the sample.
std::pair< SortedBaseCounts, SortedBaseCounts > sorted_average_base_counts(BaseCounts const &sample_a, BaseCounts const &sample_b)
Return the sorted base counts of both input samples, orderd by the average frequencies of the nucleot...
std::ostream & operator<<(std::ostream &os, BaseCounts const &bs)
Output stream operator for BaseCounts instances.
size_t total_nucleotide_sum(Variant const &variant)
Count of the pure nucleotide bases at this position, that is, the sum of all A, C,...
std::pair< char, double > consensus(BaseCounts const &sample)
Consensus character for a BaseCounts, and its confidence.
bool is_snp
Does the Sample have two or more alleles?
size_t nucleotide_sum(BaseCounts const &sample)
Count of the pure nucleotide bases at this position, that is, the sum of all A, C,...
BaseCounts merge(BaseCounts const &p1, BaseCounts const &p2)
Merge the counts of two BaseCountss.
A single variant at a position in a chromosome, along with BaseCounts for a set of samples.
size_t c_count
Count of all C nucleotides that are present in the sample.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
char guess_alternative_base(Variant const &variant, bool force)
Guess the alternative base of a Variant.
BaseCountsStatus status(BaseCounts const &sample, size_t min_coverage, size_t max_coverage, size_t min_count, bool tolerate_deletions)
Compute a simple status with useful properties from the counts of a BaseCounts.
One set of nucleotide base counts, for example for a given sample that represents a pool of sequenced...
BaseCounts total_base_counts(Variant const &variant)
Get the summed up total base counts of a Variant.
SortedBaseCounts sorted_base_counts(BaseCounts const &sample)
Return the order of base counts (nucleotides), largest one first.
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).
bool is_ignored
Is the Sample ignored due to high deletions count?
bool is_covered
Is the Sample covered by enough reads/nucleotides?