bpp-popgen3
3.0.0
|
The MultiAlleleMonolocusGenotype class. More...
#include <Bpp/PopGen/MultiAlleleMonolocusGenotype.h>
Public Member Functions | |
MultiAlleleMonolocusGenotype (std::vector< size_t > alleleIndex) | |
Build a monolocus genotype containing many alleles. More... | |
MultiAlleleMonolocusGenotype (const MultiAlleleMonolocusGenotype &mmg) | |
Copy constructor. More... | |
virtual | ~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 override |
Get the alleles' index. More... | |
The Clonable interface: | |
MultiAlleleMonolocusGenotype * | clone () const override |
Private Attributes | |
std::vector< size_t > | alleleIndex_ |
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 28 of file MultiAlleleMonolocusGenotype.h.
MultiAlleleMonolocusGenotype::MultiAlleleMonolocusGenotype | ( | std::vector< size_t > | alleleIndex | ) |
Build a monolocus genotype containing many alleles.
Definition at line 12 of file MultiAlleleMonolocusGenotype.cpp.
References alleleIndex_.
Referenced by clone().
MultiAlleleMonolocusGenotype::MultiAlleleMonolocusGenotype | ( | const MultiAlleleMonolocusGenotype & | mmg | ) |
Copy constructor.
Definition at line 20 of file MultiAlleleMonolocusGenotype.cpp.
References alleleIndex_, and getAlleleIndex().
|
virtual |
Destroy the MultiAlleleMonolocusGenotype.
Definition at line 30 of file MultiAlleleMonolocusGenotype.cpp.
References alleleIndex_.
|
inlineoverridevirtual |
Implements bpp::MonolocusGenotypeInterface.
Definition at line 84 of file MultiAlleleMonolocusGenotype.h.
References MultiAlleleMonolocusGenotype().
|
inlineoverridevirtual |
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::MonolocusGenotypeInterface.
Definition at line 72 of file MultiAlleleMonolocusGenotype.h.
References alleleIndex_.
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 52 of file MultiAlleleMonolocusGenotype.cpp.
References alleleIndex_.
MultiAlleleMonolocusGenotype & MultiAlleleMonolocusGenotype::operator= | ( | const MultiAlleleMonolocusGenotype & | mmg | ) |
The affectation operator.
Definition at line 37 of file MultiAlleleMonolocusGenotype.cpp.
References alleleIndex_, and getAlleleIndex().
bool MultiAlleleMonolocusGenotype::operator== | ( | const MultiAlleleMonolocusGenotype & | mmg | ) | const |
The == operator.
Definition at line 46 of file MultiAlleleMonolocusGenotype.cpp.
References alleleIndex_, and getAlleleIndex().
|
private |
Definition at line 32 of file MultiAlleleMonolocusGenotype.h.
Referenced by getAlleleIndex(), isHomozygous(), MultiAlleleMonolocusGenotype(), operator=(), operator==(), and ~MultiAlleleMonolocusGenotype().