|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file.
44 namespace population {
53 bool also_n_and_d_counts
62 if( also_n_and_d_counts ) {
71 bool also_n_and_d_counts
73 for(
auto& sample : variant.
samples ) {
81 bool also_n_and_d_counts
84 if( max_count == 0 ) {
95 if( also_n_and_d_counts ) {
104 bool also_n_and_d_counts
106 for(
auto& sample : variant.
samples ) {
242 size_t passed_cnt = 0;
243 for(
auto& sample : variant.
samples ) {
245 sample, params, sample_count_stats
254 if( passed_cnt == 0 ) {
261 if( all_need_pass ) {
262 if( passed_cnt == variant.
samples.size() ) {
272 assert( passed_cnt > 0 );
273 assert( !all_need_pass );
285 variant, params, variant_stats, sample_count_stats, all_need_pass
@ kAboveDeletionsCountLimit
Too many deletions at the position.
void transform_zero_out_by_max_count(SampleCounts &sample, size_t max_count, bool also_n_and_d_counts)
Transform a SampleCounts sample by setting any nucleotide count (A, C, G, T) to zero if max_count is ...
double sum(const Histogram &h)
Filter settings to filter and transform SampleCounts.
One set of nucleotide sample counts, for example for a given sample that represents a pool of sequenc...
size_type a_count
Count of all A nucleotides that are present in the sample.
constexpr size_t nucleotide_sum(SampleCounts const &sample)
Count of the pure nucleotide bases at this position, that is, the sum of all A, C,...
size_t allele_count(SampleCounts const &sample)
Return the number of alleles, that is, of non-zero nucleotide counts of the sample.
FilterStatus status
Status to indicate whether any applied filters failed to pass.
size_type t_count
Count of all T nucleotides that are present in the sample.
size_t min_count
Minimum count for each nucleotide to be considered. All counts below are set to zero.
bool apply_sample_counts_filter_numerical(SampleCounts &sample, SampleCountsFilterNumericalParams const ¶ms, SampleCountsFilterStats &stats)
Filter a given SampleCounts based on the numerical properties of the counts.
@ kAboveMaxReadDepth
Sum of counts across all nucleotide counts is above the max read depth threshold.
size_t max_count
Maximum count for each nucleotide to be considered. All counts above are set to zero.
size_type n_count
Count of all N (undetermined/any) nucleotides that are present in the sample.
size_type c_count
Count of all C nucleotides that are present in the sample.
@ kBelowMinReadDepth
Sum of counts across all nucleotide counts is below the min read depth threshold.
A single variant at a position in a chromosome, along with SampleCounts for a set of samples.
@ kEmpty
Zero nucleotide counts, after zeroing out counts based on the min_count and max_count.
void transform_zero_out_by_min_count(SampleCounts &sample, size_t min_count, bool also_n_and_d_counts)
Transform a SampleCounts sample by setting any nucleotide count (A, C, G, T) to zero if min_count is ...
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
size_t deletions_count_limit
Maximum number of deletions at a position before being filtered out.
@ kNoSamplePassed
None of the SampleCounts of the Variant passed their filters.
@ kNotSnp
Invariant position, not a SNP.
@ kNotAllSamplesPassed
Some of the SampleCounts of the Variant did not pass their filters.
std::vector< SampleCounts > samples
Counts of how many entries with a particular Filter Tag occured in some data.
bool only_biallelic_snps
Filter if the sample does not have exactly two alleles.
size_type d_count
Count of all deleted (*) nucleotides that are present in the sample.
bool only_snps
Filter if the sample does not have two or more alleles.
size_t max_read_depth
Maximum read depth expected for a SampleCounts to be considered covered.
size_t min_read_depth
Minimum read depth expected for a SampleCounts to be considered covered.
@ kNotBiallelicSnp
SNP position, but not biallelic, i.e., has more than one alternative.
size_type g_count
Count of all G nucleotides that are present in the sample.