bpp-popgen
3.0.0
|
The MultiAlleleMonolocusGenotype class. More...
#include <Bpp/PopGen/MultiAlleleMonolocusGenotype.h>
Public Member Functions | |
MultiAlleleMonolocusGenotype (std::vector< size_t > allele_index) | |
Build a monolocus genotype containing many alleles. More... | |
MultiAlleleMonolocusGenotype (const MultiAlleleMonolocusGenotype &mmg) | |
Copy constructor. More... | |
~MultiAlleleMonolocusGenotype () | |
Destroy the MultiAlleleMonolocusGenotype. More... | |
MultiAlleleMonolocusGenotype & | operator= (const MultiAlleleMonolocusGenotype &mmg) |
The affectation operator. More... | |
bool | operator== (const MultiAlleleMonolocusGenotype &mmg) const |
The == operator. More... | |
bool | isHomozygous () const |
Test the homozygozity of the locus (i.e. all allele are identical). More... | |
The MonolocusGenotype interface: | |
std::vector< size_t > | getAlleleIndex () const |
Get the alleles' index. More... | |
The Clonable interface: | |
MultiAlleleMonolocusGenotype * | clone () const |
Private Attributes | |
std::vector< size_t > | allele_index_ |
The MultiAlleleMonolocusGenotype class.
This class is intended to handle monolocus genotype with many alleles like polyploid loci or loci obtained by trace file without cutoff on peaks or other filter.
Definition at line 62 of file MultiAlleleMonolocusGenotype.h.
MultiAlleleMonolocusGenotype::MultiAlleleMonolocusGenotype | ( | std::vector< size_t > | allele_index | ) |
Build a monolocus genotype containing many alleles.
Definition at line 47 of file MultiAlleleMonolocusGenotype.cpp.
References allele_index_.
Referenced by clone().
MultiAlleleMonolocusGenotype::MultiAlleleMonolocusGenotype | ( | const MultiAlleleMonolocusGenotype & | mmg | ) |
Copy constructor.
Definition at line 55 of file MultiAlleleMonolocusGenotype.cpp.
References allele_index_, and getAlleleIndex().
MultiAlleleMonolocusGenotype::~MultiAlleleMonolocusGenotype | ( | ) |
Destroy the MultiAlleleMonolocusGenotype.
Definition at line 65 of file MultiAlleleMonolocusGenotype.cpp.
References allele_index_.
|
virtual |
Implements bpp::Clonable.
Definition at line 102 of file MultiAlleleMonolocusGenotype.cpp.
References MultiAlleleMonolocusGenotype().
|
virtual |
Get the alleles' index.
The alleles' index are the position of the AlleleInfo in a LocusInfo object. If no LocusInfo is used, the index are just numbers to identify the alleles.
The size of the vector corresponds to the number of alleles at this locus.
Implements bpp::MonolocusGenotype.
Definition at line 97 of file MultiAlleleMonolocusGenotype.cpp.
References allele_index_.
Referenced by MultiAlleleMonolocusGenotype(), operator=(), and operator==().
bool MultiAlleleMonolocusGenotype::isHomozygous | ( | ) | const |
Test the homozygozity of the locus (i.e. all allele are identical).
Definition at line 87 of file MultiAlleleMonolocusGenotype.cpp.
References allele_index_.
MultiAlleleMonolocusGenotype & MultiAlleleMonolocusGenotype::operator= | ( | const MultiAlleleMonolocusGenotype & | mmg | ) |
The affectation operator.
Definition at line 72 of file MultiAlleleMonolocusGenotype.cpp.
References allele_index_, and getAlleleIndex().
bool MultiAlleleMonolocusGenotype::operator== | ( | const MultiAlleleMonolocusGenotype & | mmg | ) | const |
The == operator.
Definition at line 81 of file MultiAlleleMonolocusGenotype.cpp.
References allele_index_, and getAlleleIndex().
|
private |
Definition at line 66 of file MultiAlleleMonolocusGenotype.h.
Referenced by getAlleleIndex(), isHomozygous(), MultiAlleleMonolocusGenotype(), operator=(), operator==(), and ~MultiAlleleMonolocusGenotype().