5 #ifndef _ANALYZEDLOCI_H_
6 #define _ANALYZEDLOCI_H_
15 #include "../LocusInfo.h"
16 #include "../GeneralExceptions.h"
33 std::vector<std::unique_ptr<LocusInfo>>
loci_;
49 for (
const auto& locus : analyzedLoci.
loci_)
51 loci_[i++].reset(locus->clone());
59 for (
const auto& locus : analyzedLoci.
loci_)
61 loci_[i++].reset(locus->clone());
The AlleleInfo interface.
std::vector< size_t > getNumberOfAlleles() const
Get the number of alleles at each locus.
size_t getNumberOfLoci() const
Get the number of loci.
AnalyzedLoci * clone() const
std::vector< std::unique_ptr< LocusInfo > > loci_
AnalyzedLoci(size_t numberOfLoci)
Build a void AnalyzedLoci with a specific number of loci.
void addAlleleInfoByLocusName(const std::string &locusName, const AlleleInfo &allele)
Add an AlleleInfo to a LocusInfo by LocusInfo name.
const LocusInfo & getLocusInfoByName(const std::string &locusName) const
Get a LocusInfo by name.
virtual ~AnalyzedLoci()=default
Destroy the AnalyzedLoci.
unsigned int getPloidyByLocusName(const std::string &locusName) const
Get the ploidy of a locus by name.
const LocusInfo & getLocusInfoAtPosition(size_t locusPosition) const
Get a LocusInfo by its position.
unsigned int getPloidyByLocusPosition(size_t locusPosition) const
Get the ploidy of a locus by its position.
void addAlleleInfoByLocusPosition(size_t locusosition, const AlleleInfo &allele)
Add an AlleleInfo to a LocusInfo by its position.
AnalyzedLoci(const AnalyzedLoci &analyzedLoci)
Copy constructor.
void setLocusInfo(size_t locusPosition, const LocusInfo &locus)
Set a LocusInfo.
size_t getLocusInfoPosition(const std::string &locusName) const
Get the position of a LocusInfo.
AnalyzedLoci & operator=(const AnalyzedLoci &analyzedLoci)