20 #ifndef EGGLIB_HFSTATISTICS_HPP
21 #define EGGLIB_HFSTATISTICS_HPP
70 void reserve(
unsigned int numberOfIndividuals);
109 unsigned int alleleValue(
unsigned int alleleIndex);
113 unsigned int allele(
unsigned int individualIndex)
const;
180 unsigned int d_reserved;
181 unsigned int d_numberOfGenotypes;
182 unsigned int *d_genotypes;
183 unsigned int *d_populationLabels;
189 void processPopulations();
190 void processAlleles();
191 unsigned int getPopulationIndex(
unsigned int)
const;
192 unsigned int getAlleleIndex(
unsigned int)
const;
193 unsigned int s_numberOfAlleles;
194 unsigned int *s_alleleValueMapping;
195 unsigned int s_numberOfPopulations;
196 unsigned int *s_populationLabelMapping;
197 unsigned int *s_populationFrequencies;
198 unsigned int *s_alleleFrequenciesTotal;
199 unsigned int **s_alleleFrequenciesPerPopulation;
HFStatistics()
Constructor.
Definition: HFStatistics.cpp:97
unsigned int alleleFrequencyTotal(unsigned int alleleIndex)
Absolute total allele frequency.
Definition: HFStatistics.cpp:436
unsigned int populationLabel(unsigned int populationIndex)
Label of a population.
Definition: HFStatistics.cpp:424
unsigned int alleleFrequencyPerPopulation(unsigned int populationIndex, unsigned int alleleIndex)
Absolute allele frequency in a population.
Definition: HFStatistics.cpp:442
virtual ~HFStatistics()
Destructor.
Definition: HFStatistics.cpp:104
unsigned int alleleValue(unsigned int alleleIndex)
Value of an allele.
Definition: HFStatistics.cpp:430
double T1()
Between-population component of variance.
Definition: HFStatistics.cpp:461
unsigned int numberOfGenotypes() const
Number of loaded genotypes.
Definition: HFStatistics.cpp:408
unsigned int populationFrequency(unsigned int populationIndex)
Sample size of a population.
Definition: HFStatistics.cpp:448
unsigned int numberOfPopulations()
Number of populations.
Definition: HFStatistics.cpp:412
double theta()
Weir-Cockerham theta-statistic.
Definition: HFStatistics.cpp:456
void reserve(unsigned int numberOfIndividuals)
Reserve sufficient memory for a given number of individuals.
Definition: HFStatistics.cpp:113
unsigned int individualLabel(unsigned int individualIndex) const
Population label of a given individual (no checking)
Definition: HFStatistics.cpp:401
unsigned int allele(unsigned int individualIndex) const
Allele of a given individual (no checking)
Definition: HFStatistics.cpp:397
Computes Fst and Fit from haploid data.
Definition: HFStatistics.hpp:45
void loadIndividual(unsigned int genotype, unsigned int populationLabel)
Loads the data for one individual.
Definition: HFStatistics.cpp:132
double T2()
Total variance.
Definition: HFStatistics.cpp:466
unsigned int numberOfAlleles()
Number of alleles.
Definition: HFStatistics.cpp:418