|
A library for working with phylogenetic and population genetic data.
v0.27.0
|
|
Go to the documentation of this file.
39 namespace population {
47 unsigned char min_phred_score
52 size_t total_count = 0;
53 size_t skip_count = 0;
55 for(
size_t i = 0; i < sample.
read_bases.size(); ++i ) {
103 throw std::runtime_error(
104 "Malformed pileup sample: Invalid allele character " +
118 assert( skip_count + total_count == sample.
read_bases.size() );
127 auto const base_count =
132 !( base_count == 0 && result.
d_count + skip_count == 1 )
135 throw std::runtime_error(
137 ") does not match the number of bases found in the sample (" +
147 unsigned char min_phred_score
157 for(
size_t i = 0; i < record.
samples.size(); ++i ) {
174 if( sorted[1].count > 0 ) {
size_t d_count
Count of all deleted (*) nucleotides that are present in the sample.
Variant convert_to_variant(SimplePileupReader::Record const &record, unsigned char min_phred_score)
size_t t_count
Count of all T nucleotides that are present in the sample.
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.
size_t read_coverage
Total count of reads covering this position.
std::string to_string(GenomeLocus const &locus)
constexpr char to_upper(char c) noexcept
Return the upper case version of a letter, ASCII-only.
size_t n_count
Count of all N (undetermined/any) nucleotides that are present in the sample.
One sample in a pileup line/record.
Single line/record from a pileup file.
BaseCounts convert_to_base_counts(SimplePileupReader::Sample const &sample, unsigned char min_phred_score)
std::vector< BaseCounts > samples
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.
std::string read_bases
All bases (expect for indels) of the reads that cover the given position.
One set of nucleotide base counts, for example for a given sample that represents a pool of sequenced...
SortedBaseCounts sorted_base_counts(BaseCounts const &sample)
Return the order of base counts (nucleotides), largest one first.
std::string char_to_hex(char c, bool full)
Return the name and hex representation of a char.
std::vector< Sample > samples
std::vector< unsigned char > phred_scores
Phread-scaled scores of the bases as given in read_bases.