A library for working with phylogenetic and population genetic data.
v0.32.0
subsample.cpp File Reference

Go to the source code of this file.

Namespaces

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

Functions

void resample_counts (SampleCounts &sample, size_t target_depth)
 Resample all counts in a SampleCounts sample to a new target_depth. More...
 
void resample_counts (Variant &variant, size_t target_depth)
 Resample all counts in a SampleCounts sample to a new target_depth. More...
 
template<typename Distribution >
void resample_counts_ (SampleCounts &sample, size_t max_depth, Distribution distribution, bool skip_if_below_target_depth)
 Local helper function to avoid code duplication. Takes the distribution (with or without replacement) and performs the resampling of base counts. More...
 
void rescale_counts (SampleCounts &sample, size_t target_depth)
 Transform a SampleCounts sample by re-scaling the base counts (A, C, G, T, as well as N and D) to sum up to max if max_depth is exceeded for the sample. More...
 
void rescale_counts (Variant &variant, size_t target_depth)
 Transform a SampleCounts sample by re-scaling the base counts (A, C, G, T, as well as N and D) to sum up to max if max_depth is exceeded for the sample. More...
 
void rescale_counts_ (SampleCounts &sample, size_t target_depth, bool skip_if_below_target_depth)
 
void subsample_counts_with_replacement (SampleCounts &sample, size_t max_depth)
 Transform a SampleCounts sample by subsampling the nucleotide counts (A, C, G, T, as well as N and D) with replacement to sum up to max if max_depth is exceeded for the sample. More...
 
void subsample_counts_with_replacement (Variant &variant, size_t max_depth)
 Transform a SampleCounts sample by subsampling the nucleotide counts (A, C, G, T, as well as N and D) with replacement to sum up to max if max_depth is exceeded for the sample. More...
 
void subsample_counts_without_replacement (SampleCounts &sample, size_t max_depth)
 Transform a SampleCounts sample by subsampling the nucleotide counts (A, C, G, T, as well as N and D) without replacement to sum up to max if max_depth is exceeded for the sample. More...
 
void subsample_counts_without_replacement (Variant &variant, size_t max_depth)
 Transform a SampleCounts sample by subsampling the nucleotide counts (A, C, G, T, as well as N and D) without replacement to sum up to max if max_depth is exceeded for the sample. More...
 
void subscale_counts (SampleCounts &sample, size_t max_depth)
 Transform a SampleCounts sample by sub-scaling the base counts (A, C, G, T, as well as N and D) to sum up to max_depth if max_depth is exceeded for the sample. More...
 
void subscale_counts (Variant &variant, size_t max_depth)
 Transform a SampleCounts sample by sub-scaling the base counts (A, C, G, T, as well as N and D) to sum up to max_depth if max_depth is exceeded for the sample. More...