22 #include "../GeneralExceptions.h"
298 size_t individualPosition,
318 size_t sequencePosition,
319 std::unique_ptr<Sequence>& sequence);
329 size_t individualPosition,
330 const std::string& sequence_name)
const;
340 size_t individualPosition,
341 size_t sequencePosition)
const;
384 size_t individualPosition,
385 const std::string& sequence_name)
const;
440 size_t individualPosition,
441 size_t locusPosition,
453 size_t individualPosition,
454 size_t locusPosition,
455 const std::vector<size_t>& alleleKeys);
466 size_t individualPosition,
467 size_t locusPosition,
468 const std::vector<std::string>& alleleId,
479 size_t individualPosition,
480 size_t locusPosition)
const;
490 std::shared_ptr<const Alphabet>
getAlphabet()
const;
size_t getGroupSizeForSequence(size_t sequencePosition) const
Get the number of individual that have a sequence at the specified position.
const Sequence & getIndividualSequenceAtPosition(size_t individualPosition, size_t sequencePosition) const
Get a sequence of an Individual.
Group(const Group &group)
Copy constructor.
void deleteIndividualSequenceAtPosition(size_t individualPosition, size_t sequencePosition)
Delete a sequence of an Individual.
void deleteIndividualSequenceByName(size_t individualPosition, const std::string &sequence_name)
Delete a sequence of an Individual.
void setIndividualSexAtPosition(size_t individualPosition, const unsigned short sex)
Set the sex of an Individual.
std::vector< std::string > getIndividualSequencesNames(size_t individualPosition) const
Get the sequences' names from an Individual.
void deleteIndividualGenotype(size_t individualPosition)
Delete the genotype of an Individual.
size_t getGroupSizeForLocus(size_t locusPosition) const
Get the number of individual that have a data at the specified locus.
size_t getGroupId() const
Get the id of the Group.
void clear()
Clear the Group.
Group * clone() const override
const Date & getIndividualDateAtPosition(size_t individualPosition) const
Get the date of an Individual.
void addIndividual(const Individual &ind)
Add an Individual.
const Individual & getIndividualById(const std::string &individualId) const
Get a reference to an Individual.
const Point2D< double > & getIndividualCoordAtPosition(size_t individualPosition) const
Get the coordinates of an Individual.
virtual ~Group()=default
Destroy a Group.
size_t getIndividualSequencePosition(size_t individualPosition, const std::string &sequence_name) const
Get the position of a sequence in an Individual.
void setIndividualDateAtPosition(size_t individualPosition, const Date &date)
Set the date of an Individual.
bool hasIndividualSequences(size_t individualPosition) const
Tell if the Individual has some sequences.
std::unique_ptr< Individual > removeIndividualById(const std::string &individualId)
Remove an Individual from the Group.
void setIndividualMonolocusGenotypeByAlleleId(size_t individualPosition, size_t locusPosition, const std::vector< std::string > &alleleId, const LocusInfo &locusInfo)
Set a MonolocusGenotype of an Individual.
bool hasSequenceData() const
Tell if at least one individual has at least one sequence.
size_t getIndividualNumberOfSequences(size_t individualPosition) const
Get the number of sequences in an Individual.
std::shared_ptr< const Alphabet > getAlphabet() const
Get the alphabet used for the sequences.
void setIndividualSequences(size_t individualPosition, const SequenceContainerInterface &sc)
Set all the sequences by copying an OrderedSequenceContainer.
void addIndividualSequenceAtPosition(size_t individualPosition, size_t sequencePosition, std::unique_ptr< Sequence > &sequence)
Add a sequence to an Individual.
size_t getNumberOfIndividuals() const
Get the number of Individual in the Group.
void setIndividualCoordAtPosition(size_t individualPosition, const Point2D< double > &coord)
Set the coordinates of an Individual.
size_t getMaxNumberOfSequences() const
Get the maximum number of sequence.
Group & operator=(const Group &group)
The assignation operator =.
void initIndividualGenotype(size_t individualPosition, size_t loci_number)
Initialize the genotype of an Individual.
unsigned short getIndividualSexAtPosition(size_t individualPosition) const
Get the sex of an Individual.
bool hasIndividualGenotype(size_t individualPosition) const
Tell if an Individual has a genotype.
void setIndividualMonolocusGenotypeByAlleleKey(size_t individualPosition, size_t locusPosition, const std::vector< size_t > &alleleKeys)
Set a MonolocusGenotype of an Individual.
size_t getIndividualPosition(const std::string &individualId) const
Get the position of an Individual.
Group(const Group &group, size_t groupId)
A duplication constructor with new Group Id.
std::unique_ptr< Individual > removeIndividualAtPosition(size_t individualPosition)
Remove an Individual from the Group.
void deleteIndividualById(const std::string &individualId)
Delete an Individual from the Group.
std::shared_ptr< const Locality< double > > getIndividualLocalityAtPosition(size_t individualPosition) const
Get the locality of an Individual.
const Individual & getIndividualAtPosition(size_t individualPosition) const
Get a reference to an Individual by its position.
Group(size_t groupId)
Build a void new Group.
void setIndividualLocalityAtPosition(size_t individualPosition, std::shared_ptr< const Locality< double >> locality)
Set the locality of an Individual.
void setGroupId(size_t groupId)
Set the id of the Group.
void setGroupName(const std::string &groupName)
Set the name of the Group.
const MonolocusGenotypeInterface & getIndividualMonolocusGenotype(size_t individualPosition, size_t locusPosition) const
Get a MonolocusGenotype of an Individual.
void addEmptyIndividual(const std::string &individualId)
Add an empty Individual to the Group.
void setIndividualGenotype(size_t individualPosition, const MultilocusGenotype &genotype)
Set the genotype of an Individual.
const std::string & getGroupName() const
Get the name of the Group.
const Sequence & getIndividualSequenceByName(size_t individualPosition, const std::string &sequence_name) const
Get a sequence of an Individual.
void setIndividualMonolocusGenotype(size_t individualPosition, size_t locusPosition, const MonolocusGenotypeInterface &monogen)
Set a MonolocusGenotype of an Individual.
std::vector< std::unique_ptr< Individual > > individuals_
void deleteIndividualAtPosition(size_t individualPosition)
Delete an Individual from the Group.
The MonolocusGenotype virtual class.
The MultilocusGenotype class.