Egglib 2.1.11
C++ library reference manual
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BppDiversity Class Reference

Computes diversity statistics using third-party library Bio++. More...

#include <BppDiversity.hpp>

Public Member Functions

 BppDiversity ()
 Builds an object. More...
 
virtual ~BppDiversity ()
 Destroys an object. More...
 
void load (Align &align, unsigned int dataType=1)
 Performs polymorphism analysis using Bio++ tools. More...
 
bool hasOutgroup () const
 true if an ougroup was available
 
unsigned int S () const
 Number of polymorphic sites.
 
unsigned int Sinf () const
 Number of parsimony informative sites.
 
unsigned int Ssin () const
 Number of singleton sites.
 
unsigned int eta () const
 Minimal number of mutations.
 
unsigned int Sext () const
 Mutations on external branches (if an outgroup was used)
 
double He () const
 Heterozygosity.
 
double He2 () const
 Squared heterozygosity.
 
double tW () const
 Watterson theta.
 
double T83 () const
 Tajima theta.
 
unsigned int K () const
 Number of haplotypes.
 
double H () const
 Haplotypic diversity.
 
unsigned int Ti () const
 Number of transitions.
 
unsigned int Tv () const
 Number of transversions.
 
double TiTv () const
 Transition/transversion ratio.
 
unsigned int nstop () const
 Number of codon sites with a stop codon (if coding)
 
unsigned int ncodon1mut () const
 Number of codon sites with one change (if coding)
 
unsigned int nsyn () const
 Number of codon sites with a synonymous change (if coding)
 
double tWS () const
 Synonymous Watterson theta (if coding)
 
double tWNS () const
 Non-synonymous Watterson theta (if coding)
 
double PiS () const
 Synonymous Pi (if coding)
 
double PiNS () const
 Non-synonymous Pi (if coding)
 
double Ssites () const
 Average number of synonymous sites (if coding)
 
double NSsites () const
 Average number of non-synonymous sites (if coding)
 
unsigned int SS () const
 Aynonymous polymorphic sites (if coding)
 
unsigned int SNS () const
 Non-synonymous polymorphic sites (if coding)
 
const std::vector< unsigned int > & MK () const
 McDonald-Kreitman test table, as a vector (if coding + outgroup)
 
double NI () const
 Neutrality index (if coding + outgroup)
 
double D () const
 Tajima's D.
 
double Deta () const
 Tajima's D computed with eta instead of S.
 
double Dfl () const
 Fu and Li's D (if an outgroup was used)
 
double Dflstar () const
 Fu and Li's D*.
 
double F () const
 Fu's F (if an outgroup was used)
 
double Fstar () const
 Fu's F*.
 
double rhoH () const
 Hudson's estimator of rho (recombination rate)
 

Protected Member Functions

void reset ()
 
void computeSingle (bpp::AlignedSequenceContainer &align)
 
void computeDouble (bpp::AlignedSequenceContainer &ingroup, bpp::AlignedSequenceContainer &outgroup)
 

Protected Attributes

bpp::DNA dna
 
bpp::GeneticCode * p_code
 
bpp::StandardGeneticCode * p_code4
 
bpp::VertebrateMitochondrialGeneticCode * p_code5
 
bpp::InvertebrateMitochondrialGeneticCode * p_code6
 
bpp::EchinodermMitochondrialGeneticCode * p_code7
 
unsigned int v_Ss
 
unsigned int v_Sinf
 
unsigned int v_Ssin
 
unsigned int v_eta
 
unsigned int v_Sext
 
double v_He
 
double v_He2
 
double v_tW
 
double v_T83
 
unsigned int v_K
 
double v_H
 
unsigned int v_Ti
 
unsigned int v_Tv
 
double v_TiTv
 
unsigned int v_nstop
 
unsigned int v_ncodon1mut
 
unsigned int v_nsyn
 
double v_tWS
 
double v_tWNS
 
double v_PiS
 
double v_PiNS
 
double v_Ssites
 
double v_NSsites
 
unsigned int v_SS
 
unsigned int v_SNS
 
std::vector< unsigned int > v_MK
 
double v_NI
 
double v_D
 
double v_Deta
 
double v_Dfl
 
double v_Dflstar
 
double v_F
 
double v_Fstar
 
double v_rhoH
 
bool b_loaded
 
bool b_outgroup
 
bool b_coding
 

Detailed Description

Computes diversity statistics using third-party library Bio++.

Uses the PopGen library of Bio++ and computes statistics of diversity.

Constructor & Destructor Documentation

Builds an object.

~BppDiversity ( )
virtual

Destroys an object.

Member Function Documentation

void load ( Align align,
unsigned int  dataType = 1 
)

Performs polymorphism analysis using Bio++ tools.

Automatically computes statistics. Some statistics require the presence of outgroup sequences (with group labels 999) in the passed object, and some statistics are computed only if the data type is >=4. (Some both.) Calling this method clears all previous data in the instance (including if less statistics can be computed with the new alignment compared with the previous one).

Parameters
alignan alignment object (Align class). The presence of outgroup sequences will be automatically detected based on the group member of the passed object. Only label 999 will be considered and use as outgroup for statistics were it is useful. If several outgroups are used, they will all be passed to C++ tools.
dataTypean integer what kind of data must be analyzed:
  • 1 for DNA
  • 2 for RNA
  • 3 for protein sequences
  • 4 for standard codons
  • 5 for vertebrate mitochondrial codons
  • 6 for invertebrate mitochondrial codons
  • 7 for echinoderm mitochondrial codons
Other values will result in an exception.

The documentation for this class was generated from the following files:

Hosted by 
Get EggLib at SourceForge.net. Fast, secure and Free Open Source software downloads