41 #ifndef _ALIGNEDSEQUENCECONTAINER_H_ 42 #define _ALIGNEDSEQUENCECONTAINER_H_ 48 #include <Bpp/Exceptions.h> 159 const Site&
getSite(
size_t siteIndex)
const throw (IndexOutOfBoundsException);
160 void setSite(
size_t siteIndex,
const Site& site,
bool checkPosition =
true) throw (Exception);
161 Site *
removeSite(
size_t siteIndex) throw (IndexOutOfBoundsException);
162 void deleteSite(
size_t siteIndex) throw (IndexOutOfBoundsException);
163 void deleteSites(
size_t siteIndex,
size_t length) throw (IndexOutOfBoundsException, Exception);
164 void addSite(const
Site& site,
bool checkPosition = true) throw (Exception);
165 void addSite(const
Site& site,
int position,
bool checkPosition = true) throw (Exception);
166 void addSite(const
Site& site,
size_t siteIndex,
bool checkPosition = true) throw (Exception);
167 void addSite(const
Site& site,
size_t siteIndex,
int position,
bool checkPosition = true) throw (Exception);
180 void setSequence(
const std::string& name,
const Sequence& sequence,
bool checkName =
true) throw (Exception);
181 void setSequence(
size_t sequenceIndex, const
Sequence& sequence,
bool checkName = true) throw (Exception);
184 void addSequence(const
Sequence& sequence,
size_t sequenceIndex,
bool checkName = true) throw (Exception);
201 #endif // _ALIGNEDSEQUENCECONTAINER_H_ Vint getSitePositions() const
Get all position attributes of sites.
const Site & getSite(size_t siteIndex) const
Get a site from the container.
AlignedSequenceContainer * clone() const
void addSite(const Site &site, bool checkPosition=true)
Add a site in the container.
virtual ~AlignedSequenceContainer()
The SiteContainer interface.
The OrderedSequenceContainer interface.
Aligned sequences container.
This alphabet is used to deal NumericAlphabet.
void deleteSite(size_t siteIndex)
Delete a site in the container.
bool checkSize_(const Sequence &sequence)
Check sequence's size before insertion in sequence container.
The VectorSequenceContainer class.
void deleteSites(size_t siteIndex, size_t length)
Delete a continuous range of sites in the container.
size_t getNumberOfSites() const
Get the number of sites in the container.
AlignedSequenceContainer & operator=(const AlignedSequenceContainer &asc)
std::vector< int > positions_
void setSequence(const std::string &name, const Sequence &sequence, bool checkName=true)
Replace a sequence in the container.
AlignedSequenceContainer(const AlignedSequenceContainer &asc)
Copy constructor.
void clear()
Delete all sequences in the container.
void setSite(size_t siteIndex, const Site &site, bool checkPosition=true)
Set a site in the container.
void addSequence(const Sequence &sequence, bool checkName=true)
Add a sequence at the end of the container.
Site * removeSite(size_t siteIndex)
Remove a site from the container.
AlignedSequenceContainer(const SiteContainer &sc)
Convert any SiteContainer object into a AlignedSequenceContainer object.
AlignedSequenceContainer * createEmptyContainer() const
Return a copy of this container, but with no sequence inside.
AlignedSequenceContainer(const Alphabet *alpha)
Build a new empty container with the specified alphabet.
std::vector< Site * > sites_
void reindexSites()
Set all positions attributes.
Exception thrown when a sequence is not align with others.