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

Base class of diversity classes. More...

#include <BaseDiversity.hpp>

Inheritance diagram for BaseDiversity:
HaplotypeDiversity LinkageDisequilibrium NucleotideDiversity

Public Member Functions

 BaseDiversity ()
 Constructor. More...
 
virtual ~BaseDiversity ()
 Destructor. More...
 
virtual void reserve (unsigned int numberOfSites)
 Reserve sufficient memory for a given number of polymorphic sites. More...
 
const SitePolymorphismget_site (unsigned int index) const
 Gets a site.
 
unsigned int get_position (unsigned int index) const
 Gets a site position.
 
virtual void reset ()
 Clears and re-initializes object.
 

Static Public Attributes

static const std::string dnaMapping = "ACGT MRWSYKBDHVN?-"
 Predefined mapping string for DNA data. More...
 
static const std::string rnaMapping = "ACGU MRWSYKBDHVN?-"
 Predefined mapping string for RNA data. More...
 
static const std::string aaMapping = "GALMFWKQESPVICYHRNDT X-"
 Predefined mapping string for amino acid data. More...
 

Protected Member Functions

virtual void init ()
 
virtual void clear ()
 
void importSites (CharMatrix &data, bool allowMultipleMutations, double minimumExploitableData, unsigned int ignoreFrequency, std::string characterMapping, bool useZeroAsAncestral, bool ignoreOutgroup)
 
void analyzeSite (CharMatrix &data, unsigned int index, double maxMissingData, bool ignoreOutgroup)
 
unsigned int getPopIndex (unsigned int label) const
 

Protected Attributes

SitePolymorphism ** v_sites
 
bool * v_orientables
 
unsigned int * v_sitePositions
 
unsigned int v_reserved
 
unsigned int v_ns
 
unsigned int v_S
 
unsigned int v_So
 
unsigned int v_eta
 
double v_nseff
 
unsigned int v_lseff
 
double v_nseffo
 
unsigned int v_lseffo
 
unsigned int v_npop
 
unsigned int * v_popLabel
 
bool p_allowMultipleMutations
 
double p_minimumExploitableData
 
std::string p_characterMapping
 
unsigned int p_pos_sep_mapping
 
bool p_useZeroAsAncestral
 
unsigned int p_ignoreFrequency
 

Detailed Description

Base class of diversity classes.

Mutualizes the analysis of polymorphic sites through the method importSites() and related accessors.

Constructor & Destructor Documentation

Constructor.

~BaseDiversity ( )
virtual

Destructor.

Member Function Documentation

void reserve ( unsigned int  numberOfSites)
virtual

Reserve sufficient memory for a given number of polymorphic sites.

This method makes importSite function faster when you already know how many polymorphic sites to expect, since the necessary memory will be allocated prior the screening of data. It is possible to use reserve() even if with a number of sites that is not matching what importSites() will find.

Parameters
numberOfSitesa strictly positive integer.

Member Data Documentation

const std::string aaMapping = "GALMFWKQESPVICYHRNDT X-"
static

Predefined mapping string for amino acid data.

const std::string dnaMapping = "ACGT MRWSYKBDHVN?-"
static

Predefined mapping string for DNA data.

const std::string rnaMapping = "ACGU MRWSYKBDHVN?-"
static

Predefined mapping string for RNA data.


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