35 std::vector<std::unique_ptr<AlleleInfo>>
alleles_;
The AlleleInfo interface.
AlleleInfo * clone() const =0
static unsigned int UNKNOWN
std::vector< std::unique_ptr< AlleleInfo > > alleles_
void clear()
Delete all alleles from the locus.
virtual ~LocusInfo()=default
Destroy the LocusInfo.
unsigned int getPloidy() const
Get the ploidy of the locus.
size_t getNumberOfAlleles() const
Get the number of alleles at this locus.
unsigned int getAlleleInfoKey(const std::string &id) const
Get the position of an AlleleInfo.
LocusInfo(const std::string &name, const unsigned int ploidy=DIPLOID)
Build a new LocusInfo object.
static unsigned int DIPLOID
LocusInfo & operator=(const LocusInfo &locusInfo)
LocusInfo * clone() const override
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.
const std::string & getName() const
Get the name of the locus.
LocusInfo(const LocusInfo &locusInfo)
Copy constructor.