|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_POPULATION_FUNCTION_FST_CATHEDRAL_H_
2 #define GENESIS_POPULATION_FUNCTION_FST_CATHEDRAL_H_
61 namespace population {
78 Entry(
size_t pos_,
double pi_w_,
double pi_b_,
double pi_t_ )
122 : fst_estimator_( fst_estimator )
157 size_t value_count_ = 0;
184 FstPoolProcessor& processor,
186 std::vector<std::string>
const& sample_names = std::vector<std::string>{},
187 std::shared_ptr<genesis::sequence::SequenceDict>
const& sequence_dict = nullptr
203 FstPoolProcessor& processor,
205 std::vector<std::string>
const& sample_names = std::vector<std::string>{},
206 std::shared_ptr<genesis::sequence::SequenceDict>
const& sequence_dict = nullptr
221 return compute_cathedral_matrix<FstCathedralPlotRecord, FstCathedralAccumulator>(
222 parameters, record, accu
238 FstCathedralPlotRecord
const& record
244 #endif // include guard
void compute_fst_cathedral_matrix(CathedralPlotParameters const ¶meters, FstCathedralPlotRecord &record)
Compute the matrix of values that represents the cathedral plot for FST.
Compensated summation algorithmm, such as Kahan, Neumaier, and Klein summation.
std::vector< Entry > entries
std::vector< FstCathedralPlotRecord > compute_fst_cathedral_records_for_chromosome(VariantInputStream::Iterator &iterator, FstPoolProcessor &processor, FstPoolCalculatorUnbiased::Estimator fst_estimator, std::vector< std::string > const &sample_names, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
Compute the components of per-position FST data for all pairs of samples in the given processor,...
Entry(size_t pos_, double pi_w_, double pi_b_, double pi_t_)
void dissipate(FstCathedralPlotRecord::Entry const &entry)
std::string sample_name_2
Store a Json value of any kind.
genesis::utils::JsonDocument fst_cathedral_plot_record_to_json_document(FstCathedralPlotRecord const &record)
Get a user-readable description of the data of a FstCathedralPlotRecord as a JsonDocument.
FstCathedralAccumulator(FstPoolCalculatorUnbiased::Estimator fst_estimator)
void accumulate(FstCathedralPlotRecord::Entry const &entry)
Collection of the data used for making for a cathedral plot.
FstCathedralAccumulator & operator=(FstCathedralAccumulator const &)=default
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Accumulate the partial pi values for a given window to produce a cathedral plot.
FstPoolCalculatorUnbiased::Estimator fst_estimator
utils::GenericInputStream< Variant, VariantInputStreamData > VariantInputStream
Iterate Variants, using a variety of input file formats.
std::string sample_name_1
~FstCathedralAccumulator()=default
Data for making one FST cathedral plot, that is, one pair of samples and one chromosome.
Plot parameters to make a cathedral plot.
std::vector< FstCathedralPlotRecord > compute_fst_cathedral_records(VariantInputStream &iterator, FstPoolProcessor &processor, FstPoolCalculatorUnbiased::Estimator fst_estimator, std::vector< std::string > const &sample_names, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
Compute the components of per-position FST data for all pairs of samples in the given processor,...