24 #include "../MultilocusGenotype.h"
25 #include "../GeneralExceptions.h"
45 std::unique_ptr<Point2D<double>>
coord_;
76 const unsigned short sex);
103 void setId(
const std::string&
id);
117 void setSex(
const unsigned short sex);
159 void setCoord(
const double x,
const double y);
182 void setX(
const double x);
192 void setY(
const double y);
225 std::shared_ptr<const Locality<double>>
getLocality()
const;
254 void addSequence(
size_t sequenceKey, std::unique_ptr<Sequence>& sequence);
426 size_t locusPosition,
427 const std::vector<size_t> alleleKeys);
437 size_t locusPosition,
438 const std::vector<std::string> alleleId,
double getY() const
Get the Y coordinate of the Individual.
const MonolocusGenotypeInterface & getMonolocusGenotype(size_t locusPosition)
Get a MonolocusGenotype.
bool hasCoord() const
Tell if this Individual has coordinates.
std::shared_ptr< const Alphabet > getSequenceAlphabet() const
Return the alphabet of the sequences.
size_t getNumberOfSequences() const
Get the number of sequences.
bool hasSequences() const
Tell if the Individual has some sequences.
virtual ~Individual()
Destroy an Individual.
std::vector< std::string > getSequenceNames() const
Get the sequence names.
const Sequence & sequenceByName(const std::string &sequenceName) const
Get a sequence from its name.
Individual()
Build a void new Individual.
unsigned short getSex() const
Get the sex of the Individual.
const Locality< double > & locality() const
Get the locality of the Individual.
void setSex(const unsigned short sex)
Set the sex of the Individual.
std::unique_ptr< Date > date_
size_t getSequencePosition(const std::string &sequenceKey) const
Get the position of a sequence.
size_t countNonMissingLoci() const
Count the number of non missing MonolocusGenotype.
void addSequence(size_t sequenceKey, std::unique_ptr< Sequence > &sequence)
Add a sequence to the Individual.
void setGenotype(const MultilocusGenotype &genotype)
Set a genotype.
void setMonolocusGenotype(size_t locusPosition, const MonolocusGenotypeInterface &monogen)
Set a MonolocusGenotype.
void deleteSequenceAtPosition(size_t sequencePosition)
Delete a sequence.
const std::string & getId() const
Get the id of the Individual.
std::unique_ptr< VectorSequenceContainer > sequences_
void setCoord(const Point2D< double > &coord)
Set the coordinates of the Individual.
void setY(const double y)
Set the Y coordinate of th Individual.
std::shared_ptr< const Locality< double > > getLocality() const
Get the locality of the Individual.
void setId(const std::string &id)
Set the id of the Individual.
void setLocality(std::shared_ptr< const Locality< double >> locality)
Set the locality of the Individual.
bool hasGenotype() const
Tell if the Individual has a MultilocusGenotype.
Individual & operator=(const Individual &ind)
The Individual copy operator.
void deleteSequenceByName(const std::string &sequenceName)
Delete a sequence.
void setMonolocusGenotypeByAlleleKey(size_t locusPosition, const std::vector< size_t > alleleKeys)
Set a MonolocusGenotype.
void setDate(const Date &date)
Set the date of the Individual.
void initGenotype(size_t lociNumber)
Init the genotype.
const MultilocusGenotype & getGenotype() const
Get the genotype.
bool hasLocality() const
Tell if this Individual has a locality.
std::vector< size_t > getSequencePositions() const
Get the sequences' positions.
bool hasSequenceAtPosition(size_t position) const
Tell if the Individual has a sequence at a given position.
size_t countHomozygousLoci() const
Count the number of homozygous MonolocusGenotype.
void setX(const double x)
Set the X coordinate of the Individual.
const Point2D< double > & coord() const
Get the coordinates of the Induvidual.
bool hasDate() const
Tell if this Individual has a date.
const SequenceContainerInterface & sequences() const
Get a reference to the sequence container.
std::unique_ptr< Point2D< double > > coord_
const Sequence & sequenceAtPosition(size_t sequencePosition) const
Get a sequence by its position.
void deleteGenotype()
Delete the genotype of the individual.
std::unique_ptr< MultilocusGenotype > genotype_
std::shared_ptr< const Locality< double > > locality_
void setMonolocusGenotypeByAlleleId(size_t locusPosition, const std::vector< std::string > alleleId, const LocusInfo &locusInfo)
Set a MonolocusGenotype.
size_t countHeterozygousLoci() const
Count the number of heterozygous MonolocusGenotype.
double getX() const
Get the X coordinate of the Individual.
const Date & date() const
Get the date of the Individual.
void setSequences(const SequenceContainerInterface &sc)
Set all the sequences with a SequenceContainer. The container will be copied.
const Alphabet & sequenceAlphabet() const
Return the alphabet of the sequences.
The MonolocusGenotype virtual class.
The MultilocusGenotype class.
TemplateVectorSequenceContainer< Sequence > VectorSequenceContainer