60 ploidy_(locus_info.getPloidy()),
61 alleles_(vector<
AlleleInfo*>(locus_info.getNumberOfAlleles()))
73 for (
unsigned int i = 0; i <
alleles_.size(); i++)
86 for (
unsigned int i = 0; i <
alleles_.size(); i++)
96 for (
unsigned int i = 0; i <
alleles_.size(); i++)
113 for (
unsigned int i = 0; i <
alleles_.size(); i++)
128 for (
unsigned int i = 0; i <
alleles_.size(); i++)
The AlleleInfo interface.
virtual const std::string & getId() const =0
Get the identitier of the allele.
AlleleInfo * clone() const =0
The AlleleNotFoundException class.
The BadIdentifierException class.
static unsigned int UNKNOWN
LocusInfo(const std::string &name, const unsigned int ploidy=DIPLOID)
Build a new LocusInfo object.
virtual ~LocusInfo()
Destroy the LocusInfo.
size_t getNumberOfAlleles() const
Get the number of alleles at this locus.
void clear()
Delete all alleles from the locus.
unsigned int getAlleleInfoKey(const std::string &id) const
Get the position of an AlleleInfo.
static unsigned int DIPLOID
const AlleleInfo & getAlleleInfoByKey(size_t key) const
Retrieve an AlleleInfo object of the LocusInfo.
static unsigned int HAPLOID
void addAlleleInfo(const AlleleInfo &allele)
Add an AlleleInfo to the LocusInfo.
static unsigned int HAPLODIPLOID
const AlleleInfo & getAlleleInfoById(const std::string &id) const
Retrieve an AlleleInfo object of the LocusInfo.
std::vector< AlleleInfo * > alleles_