21 #ifndef EGGLIB_NUCLEOTIDEDIVERSITY_HPP
22 #define EGGLIB_NUCLEOTIDEDIVERSITY_HPP
25 #include "BaseDiversity.hpp"
155 bool allowMultipleMutations=
false,
156 double minimumExploitableData=1.,
157 unsigned int ignoreFrequency=0,
159 bool useZeroAsAncestral=
false
166 unsigned int S()
const;
169 unsigned int So()
const;
172 unsigned int eta()
const;
175 double nseff()
const;
178 unsigned int lseff()
const;
184 unsigned int lseffo()
const;
187 unsigned int npop()
const;
190 unsigned int popLabel(
unsigned int popIndex)
const;
205 double pop_Pi(
unsigned int popIndex);
257 unsigned int CommonAlleles(
unsigned int pop1,
unsigned int pop2);
260 unsigned int SharedAlleles(
unsigned int pop1,
unsigned int pop2);
326 void outgroupDiversity();
329 void differentiation();
332 void triConfigurations();
337 bool b_analysisSites;
347 bool b_outgroupDiversity;
355 bool b_differentiation;
357 unsigned int *v_pairwiseFixedDifferences;
358 unsigned int *v_pairwiseCommonAlleles;
359 unsigned int *v_pairwiseSharedAlleles;
360 unsigned int *v_popPolymorphic;
361 unsigned int *v_popSpecific;
362 unsigned int *v_popSpecificDerived;
363 unsigned int v_countFixedDifferences;
364 unsigned int v_countCommonAlleles;
365 unsigned int v_countSharedAlleles;
366 unsigned int v_countSpecificAlleles;
367 unsigned int v_countSpecificDerivedAlleles;
370 bool b_triConfigurations;
372 unsigned int *v_triConfigurations;
unsigned int Polymorphisms(unsigned int pop)
Number of polymorphisms in a given population (unsecure)
Definition: NucleotideDiversity.cpp:582
unsigned int triConfiguration(unsigned int index)
Number falling into one of the possible site configurations.
Definition: NucleotideDiversity.cpp:648
std::vector< unsigned int > polymorphic_positions() const
Builds and returns the vector of positions of all polymorphic sites.
Definition: NucleotideDiversity.cpp:656
Base class of diversity classes.
Definition: BaseDiversity.hpp:60
double thetaH()
Fay and Wu estimator of theta.
Definition: NucleotideDiversity.cpp:544
unsigned int popLabel(unsigned int popIndex) const
Label of the population with given index (unsecure)
Definition: NucleotideDiversity.cpp:491
std::vector< unsigned int > singleton_positions() const
Builds and returns the vector of positions of all singleton sites.
Definition: NucleotideDiversity.cpp:661
unsigned int lseffo() const
Number of orientable sites.
Definition: NucleotideDiversity.cpp:481
virtual ~NucleotideDiversity()
Destroys an object.
Definition: NucleotideDiversity.cpp:37
unsigned int SpecificAlleles()
Number of sites with at least one allele specific to one population.
Definition: NucleotideDiversity.cpp:572
double Pi()
Nucleotide diversity.
Definition: NucleotideDiversity.cpp:501
double average_Pi()
Average of Pi over populations.
Definition: NucleotideDiversity.cpp:511
unsigned int FixedDifferences()
Number of sites with at least one fixed difference.
Definition: NucleotideDiversity.cpp:557
unsigned int lseff() const
Number of sites effectively used.
Definition: NucleotideDiversity.cpp:471
unsigned int So() const
Number of polymorphic orientable sites.
Definition: NucleotideDiversity.cpp:456
double pop_Pi(unsigned int popIndex)
Pi of a given population (unsecure)
Definition: NucleotideDiversity.cpp:516
double thetaW()
Watterson estimator of theta.
Definition: NucleotideDiversity.cpp:506
double Z()
Standardized H.
Definition: NucleotideDiversity.cpp:534
double D()
Tajima's D.
Definition: NucleotideDiversity.cpp:521
double E()
Zeng et al.'s E.
Definition: NucleotideDiversity.cpp:539
unsigned int npop() const
Number of detected populations.
Definition: NucleotideDiversity.cpp:486
NucleotideDiversity(const NucleotideDiversity &source)
This class cannot be copied.
Definition: NucleotideDiversity.hpp:310
virtual void load(CharMatrix &data, bool allowMultipleMutations=false, double minimumExploitableData=1., unsigned int ignoreFrequency=0, std::string characterMapping=dnaMapping, bool useZeroAsAncestral=false)
Identifies polymorphic sites and computes basis statistics.
Definition: NucleotideDiversity.cpp:114
double nseffo() const
Average of number of sequences effectively used at orientable sites.
Definition: NucleotideDiversity.cpp:476
double H()
Fay and Wu's H.
Definition: NucleotideDiversity.cpp:529
NucleotideDiversity()
Builds an object.
Definition: NucleotideDiversity.cpp:32
unsigned int S() const
Number of polymorphic sites.
Definition: NucleotideDiversity.cpp:451
NucleotideDiversity & operator=(const NucleotideDiversity &source)
This class cannot be copied.
Definition: NucleotideDiversity.hpp:316
unsigned int CommonAlleles()
Number of sites with at least one allele shared among at least two populations.
Definition: NucleotideDiversity.cpp:562
unsigned int eta() const
Minimum number of mutations.
Definition: NucleotideDiversity.cpp:461
double thetaL()
Zeng et al. estimator of theta.
Definition: NucleotideDiversity.cpp:549
static const std::string dnaMapping
Predefined mapping string for DNA data.
Definition: BaseDiversity.hpp:98
double nseff() const
Average of per-site number of sequences effectively used.
Definition: NucleotideDiversity.cpp:466
Performs analyzes of population genetics.
Definition: NucleotideDiversity.hpp:86
Interface for classes usable as a square matrix of characters.
Definition: CharMatrix.hpp:31
unsigned int SharedAlleles()
Number of sites with at least one non-fixed allele shared among at least two populations.
Definition: NucleotideDiversity.cpp:567
unsigned int SpecificDerivedAlleles()
Number of sites with at least one derived allele specific to one population.
Definition: NucleotideDiversity.cpp:577