|
bpp-popgen
2.2.0
|
The MultilocusGenotype class. More...
#include <Bpp/PopGen/MultilocusGenotype.h>
Collaboration diagram for bpp::MultilocusGenotype:Public Member Functions | |
| MultilocusGenotype (size_t loci_number) throw (BadIntegerException) | |
| Build a MultilocusGenotype linked to an AnalyzedLoci object. More... | |
| MultilocusGenotype (const MultilocusGenotype &genotype) | |
| Copy constructor. More... | |
| ~MultilocusGenotype () | |
| Destroy a MultilocusGenotype. More... | |
| void | setMonolocusGenotype (size_t locus_position, const MonolocusGenotype &monogen) throw (IndexOutOfBoundsException) |
| Set a MonolocusGenotype. More... | |
| void | setMonolocusGenotypeByAlleleKey (size_t locus_position, const std::vector< size_t > &allele_keys) throw (Exception) |
| Set a MonolocusGenotype by allele keys. More... | |
| void | setMonolocusGenotypeByAlleleId (size_t locus_position, const std::vector< std::string > &allele_id, const LocusInfo &locus_info) throw (Exception) |
| Set a MonolocusGenotype by allele id. More... | |
| void | setMonolocusGenotypeAsMissing (size_t locus_position) throw (IndexOutOfBoundsException) |
| Set a MonolocusGenotype as missing data. More... | |
| bool | isMonolocusGenotypeMissing (size_t locus_position) const throw (IndexOutOfBoundsException) |
| Tell if a MonolocusGenotype is a missing data. More... | |
| const MonolocusGenotype & | getMonolocusGenotype (size_t locus_position) const throw (IndexOutOfBoundsException) |
| Get a MonolocusGenotype. More... | |
| size_t | size () const |
| Count the number of loci. More... | |
| size_t | countNonMissingLoci () const |
| Count the number of non missing MonolocusGenotype. More... | |
| size_t | countHomozygousLoci () const |
| Count the number of homozygous MonolocusGenotype. More... | |
| size_t | countHeterozygousLoci () const |
| Count the number of heterozygous MonolocusGenotype. More... | |
Private Attributes | |
| std::vector< MonolocusGenotype * > | loci_ |
The MultilocusGenotype class.
This is a MonolocusGenotype containor.
Definition at line 65 of file MultilocusGenotype.h.
| MultilocusGenotype::MultilocusGenotype | ( | size_t | loci_number | ) | |
| throw | ( | BadIntegerException | |||
| ) | |||||
Build a MultilocusGenotype linked to an AnalyzedLoci object.
| BadIntegerException | if loci_number < 1. |
Definition at line 47 of file MultilocusGenotype.cpp.
| MultilocusGenotype::MultilocusGenotype | ( | const MultilocusGenotype & | genotype | ) |
Copy constructor.
Definition at line 59 of file MultilocusGenotype.cpp.
References getMonolocusGenotype(), isMonolocusGenotypeMissing(), loci_, and size().
| MultilocusGenotype::~MultilocusGenotype | ( | ) |
Destroy a MultilocusGenotype.
Definition at line 72 of file MultilocusGenotype.cpp.
References loci_.
| size_t MultilocusGenotype::countHeterozygousLoci | ( | ) | const |
Count the number of heterozygous MonolocusGenotype.
Definition at line 188 of file MultilocusGenotype.cpp.
References loci_.
| size_t MultilocusGenotype::countHomozygousLoci | ( | ) | const |
Count the number of homozygous MonolocusGenotype.
Definition at line 172 of file MultilocusGenotype.cpp.
References loci_.
| size_t MultilocusGenotype::countNonMissingLoci | ( | ) | const |
Count the number of non missing MonolocusGenotype.
Definition at line 161 of file MultilocusGenotype.cpp.
References loci_.
| const MonolocusGenotype & MultilocusGenotype::getMonolocusGenotype | ( | size_t | locus_position | ) | const |
| throw | ( | IndexOutOfBoundsException | |||
| ) | |||||
Get a MonolocusGenotype.
Definition at line 149 of file MultilocusGenotype.cpp.
Referenced by MultilocusGenotype(), bpp::PolymorphismMultiGContainerTools::permutAlleles(), bpp::PolymorphismMultiGContainerTools::permutIntraGroupAlleles(), bpp::PolymorphismMultiGContainerTools::permutIntraGroupMonoG(), bpp::PolymorphismMultiGContainerTools::permutMonoG(), bpp::DarwinVarSingle::write(), and bpp::PopgenlibIO::write().
| bool MultilocusGenotype::isMonolocusGenotypeMissing | ( | size_t | locus_position | ) | const |
| throw | ( | IndexOutOfBoundsException | |||
| ) | |||||
Tell if a MonolocusGenotype is a missing data.
| IndexOutOfBoundsException | if locus_position excedes the number of loci. |
Definition at line 142 of file MultilocusGenotype.cpp.
Referenced by MultilocusGenotype(), bpp::PolymorphismMultiGContainerTools::permutAlleles(), bpp::PolymorphismMultiGContainerTools::permutIntraGroupAlleles(), bpp::DarwinVarSingle::write(), and bpp::PopgenlibIO::write().
| void MultilocusGenotype::setMonolocusGenotype | ( | size_t | locus_position, |
| const MonolocusGenotype & | monogen | ||
| ) | |||
| throw | ( | IndexOutOfBoundsException | |
| ) | |||
Set a MonolocusGenotype.
Definition at line 83 of file MultilocusGenotype.cpp.
Referenced by bpp::PolymorphismMultiGContainerTools::permutAlleles(), bpp::PolymorphismMultiGContainerTools::permutIntraGroupAlleles(), bpp::PolymorphismMultiGContainerTools::permutIntraGroupMonoG(), and bpp::PolymorphismMultiGContainerTools::permutMonoG().
| void MultilocusGenotype::setMonolocusGenotypeAsMissing | ( | size_t | locus_position | ) | |
| throw | ( | IndexOutOfBoundsException | |||
| ) | |||||
Set a MonolocusGenotype as missing data.
| IndexOutOfBoundsException | if locus_position excedes the number of loci. |
Definition at line 133 of file MultilocusGenotype.cpp.
| void MultilocusGenotype::setMonolocusGenotypeByAlleleId | ( | size_t | locus_position, |
| const std::vector< std::string > & | allele_id, | ||
| const LocusInfo & | locus_info | ||
| ) | |||
| throw | ( | Exception | |
| ) | |||
Set a MonolocusGenotype by allele id.
| IndexOutOfBoundsException | if locus_position excedes the number of loci. |
| AlleleNotFoundException | if at least one of the id is not found in the LocusInfo. |
Definition at line 108 of file MultilocusGenotype.cpp.
References bpp::AlleleNotFoundException::getIdentifier().
| void MultilocusGenotype::setMonolocusGenotypeByAlleleKey | ( | size_t | locus_position, |
| const std::vector< size_t > & | allele_keys | ||
| ) | |||
| throw | ( | Exception | |
| ) | |||
Set a MonolocusGenotype by allele keys.
| IndexOutOfBoundsException | if locus_position excedes the number of loci. |
| Exception | if there is no key in allele_keys. |
Definition at line 93 of file MultilocusGenotype.cpp.
References bpp::MonolocusGenotypeTools::buildMonolocusGenotypeByAlleleKey().
| size_t MultilocusGenotype::size | ( | ) | const |
Count the number of loci.
Return the size of _loci.
Definition at line 156 of file MultilocusGenotype.cpp.
References loci_.
Referenced by MultilocusGenotype(), bpp::DarwinVarSingle::write(), and bpp::PopgenlibIO::write().
|
private |
Definition at line 68 of file MultilocusGenotype.h.
Referenced by countHeterozygousLoci(), countHomozygousLoci(), countNonMissingLoci(), MultilocusGenotype(), size(), and ~MultilocusGenotype().