A library for working with phylogenetic and population genetic data.
v0.32.0
SampleCountsFilterNumericalParams Struct Reference

#include <genesis/population/filter/sample_counts_filter_numerical.hpp>

Detailed Description

Filter settings to filter and transform SampleCounts.

These filters act on a single SampleCounts object, using the apply_sample_counts_filter_numerical() functions, or the make_sample_counts_filter_numerical_tagging() functions.

When a filter fails, in addition to reporting this via returning false from the filter function, we also set the SampleCounts::status accordingly to indicate the failure. This way, downstream functions can ignore this sample as being filtered out.

Definition at line 123 of file sample_counts_filter_numerical.hpp.

Public Attributes

size_t deletions_count_limit = 0
 Maximum number of deletions at a position before being filtered out. More...
 
size_t max_count = 0
 Maximum count for each nucleotide to be considered. All counts above are set to zero. More...
 
size_t max_read_depth = 0
 Maximum read depth expected for a SampleCounts to be considered covered. More...
 
size_t min_count = 0
 Minimum count for each nucleotide to be considered. All counts below are set to zero. More...
 
size_t min_read_depth = 0
 Minimum read depth expected for a SampleCounts to be considered covered. More...
 
bool only_biallelic_snps = false
 Filter if the sample does not have exactly two alleles. More...
 
bool only_snps = false
 Filter if the sample does not have two or more alleles. More...
 

Member Data Documentation

◆ deletions_count_limit

size_t deletions_count_limit = 0

Maximum number of deletions at a position before being filtered out.

If this is set to a value greater than 0, and the number of deletions at the position (determined by the SampleCounts::d_count) is equal to or greater than this value, the sample is filtered out by setting its status accordingly.

See also
SampleCountsFilterTag::kAboveDeletionsCountLimit

Definition at line 152 of file sample_counts_filter_numerical.hpp.

◆ max_count

size_t max_count = 0

Maximum count for each nucleotide to be considered. All counts above are set to zero.

This filter merely sets counts to zero, but does not effect the filter result.

Definition at line 141 of file sample_counts_filter_numerical.hpp.

◆ max_read_depth

size_t max_read_depth = 0

Maximum read depth expected for a SampleCounts to be considered covered.

If the sum of nucleotide counts (A, C, G, T) in the reads of a sample is greater than the provided value, the SampleCounts is not considered properly covered, and all counts are set to zero.

See also
SampleCountsFilterTag::kAboveMaxReadDepth

Definition at line 174 of file sample_counts_filter_numerical.hpp.

◆ min_count

size_t min_count = 0

Minimum count for each nucleotide to be considered. All counts below are set to zero.

This filter merely sets counts to zero, but does not effect the filter result.

Definition at line 134 of file sample_counts_filter_numerical.hpp.

◆ min_read_depth

size_t min_read_depth = 0

Minimum read depth expected for a SampleCounts to be considered covered.

If the sum of nucleotide counts (A, C, G, T) in the reads of a sample is less than the provided value, the SampleCounts is not considered sufficiently covered, and all counts are set to zero.

See also
SampleCountsFilterTag::kBelowMinReadDepth

Definition at line 163 of file sample_counts_filter_numerical.hpp.

◆ only_biallelic_snps

bool only_biallelic_snps = false

Filter if the sample does not have exactly two alleles.

This is closely related to only_snps, but filters for samples where the number of nucleotide counts above zero is exactly two - that is, if there are only reads of two of A, C, G, T in the sample.

See also
SampleCountsFilterTag::kNotBiallelicSnp

Definition at line 200 of file sample_counts_filter_numerical.hpp.

◆ only_snps

bool only_snps = false

Filter if the sample does not have two or more alleles.

A sample is a SNP if at least two of the A, C, G, T counts (SampleCounts::a_count, SampleCounts::c_count, SampleCounts::g_count, and SampleCounts::t_count ) are above zero, after testing that they are between min_count and max_count and not deleted.

See also
SampleCountsFilterTag::kNotSnp

Definition at line 189 of file sample_counts_filter_numerical.hpp.


The documentation for this struct was generated from the following file: