bpp-seq  2.4.0
bpp::SiteContainer Class Referenceabstract

The SiteContainer interface. More...

#include <Bpp/Seq/Container/SiteContainer.h>

+ Inheritance diagram for bpp::SiteContainer:
+ Collaboration diagram for bpp::SiteContainer:

Public Member Functions

 SiteContainer ()
 
virtual ~SiteContainer ()
 
SiteContainerclone () const =0
 
virtual const SitegetSite (size_t siteIndex) const =0
 Get a site from the container. More...
 
virtual void setSite (size_t siteIndex, const Site &site, bool checkPosition)=0
 Set a site in the container. More...
 
virtual void addSite (const Site &site, bool checkPosition)=0
 Add a site in the container. More...
 
virtual void addSite (const Site &site, int position, bool checkPosition)=0
 Add a site in the container. More...
 
virtual void addSite (const Site &site, size_t siteIndex, bool checkPosition)=0
 Add a site in the container. More...
 
virtual void addSite (const Site &site, size_t siteIndex, int position, bool checkPosition)=0
 Add a site in the container. More...
 
virtual SiteremoveSite (size_t siteIndex)=0
 Remove a site from the container. More...
 
virtual void deleteSite (size_t siteIndex)=0
 Delete a site in the container. More...
 
virtual void deleteSites (size_t siteIndex, size_t length)=0
 Delete a continuous range of sites in the container. More...
 
virtual size_t getNumberOfSites () const =0
 Get the number of sites in the container. More...
 
virtual void reindexSites ()=0
 Set all positions attributes. More...
 
virtual Vint getSitePositions () const =0
 Get all position attributes of sites. More...
 
virtual std::string toString (size_t sequenceIndex) const =0
 Convert a particular sequence to a string. More...
 
virtual const SequencegetSequence (size_t sequenceIndex) const =0
 Retrieve a sequence object from the container. More...
 
virtual void setSequence (size_t sequenceIndex, const Sequence &sequence, bool checkName)=0
 Replace a sequence in the container. More...
 
virtual SequenceremoveSequence (size_t sequenceIndex)=0
 Extract (and remove) a sequence from the container. More...
 
virtual void deleteSequence (size_t sequenceIndex)=0
 Delete a sequence of the container. More...
 
virtual const std::string & getName (size_t sequenceIndex) const =0
 Get the name of a particular sequence. More...
 
virtual const CommentsgetComments (size_t sequenceIndex) const =0
 Get comments of a particular sequence. More...
 
virtual void setComments (size_t sequenceIndex, const Comments &comments)=0
 Set the comments of a particular sequence. More...
 
virtual size_t getSequencePosition (const std::string &name) const =0
 Get the position of a sequence in sequence container from its name. More...
 
virtual const AlphabetgetAlphabet () const =0
 Get sequence container's alphabet. More...
 
virtual bool hasSequence (const std::string &name) const =0
 Check if a sequence with a given name is present in the container. More...
 
virtual void addSequence (const Sequence &sequence, bool checkName)=0
 Add a sequence to the container. More...
 
virtual const CommentsgetGeneralComments () const =0
 Get the comments of this container. More...
 
virtual void setGeneralComments (const Comments &comments)=0
 Set the comments of this container. More...
 
virtual void deleteGeneralComments ()=0
 Delete the comments associated to this container. More...
 
virtual void clear ()=0
 Delete all sequences in the container. More...
 
virtual SequenceContainercreateEmptyContainer () const =0
 Return a copy of this container, but with no sequence inside. More...
 
SequenceContainer methods.
virtual std::string toString (const std::string &name) const =0
 Convert a particular sequence to a string. More...
 
virtual const SequencegetSequence (const std::string &name) const =0
 Retrieve a sequence object from the container. More...
 
virtual void setSequence (const std::string &name, const Sequence &sequence, bool checkName)=0
 Replace a sequence in the container. More...
 
virtual SequenceremoveSequence (const std::string &name)=0
 Extract (and remove) a sequence from the container. More...
 
virtual void deleteSequence (const std::string &name)=0
 Delete a sequence of the container. More...
 
virtual const CommentsgetComments (const std::string &name) const =0
 Get comments of a particular sequence. More...
 
virtual void setComments (const std::string &name, const Comments &comments)=0
 Set the comments of a particular sequence. More...
 
virtual size_t getNumberOfSequences () const =0
 Get the number of sequences in the container. More...
 
virtual std::vector< std::string > getSequencesNames () const =0
 Get all the names of the sequences in the container. More...
 
virtual void setSequencesNames (const std::vector< std::string > &names, bool checkNames)=0
 Set all sequence names. More...
 
Provide direct access to sequences content.
Warning
These operators allow you to modifiy the content of the sequences. No checking is performed for your modifications, so use with care, or consider using the setContent() methods.
virtual int & valueAt (const std::string &sequenceName, size_t elementIndex)=0
 Element access function. More...
 
virtual const int & valueAt (const std::string &sequenceName, size_t elementIndex) const =0
 Element access function. More...
 
virtual int & valueAt (size_t sequenceIndex, size_t elementIndex)=0
 Element access operator. More...
 
virtual const int & valueAt (size_t sequenceIndex, size_t elementIndex) const =0
 Element access operator. More...
 
virtual int & operator() (size_t sequenceIndex, size_t elementIndex)=0
 Element access operator. More...
 
virtual const int & operator() (size_t sequenceIndex, size_t elementIndex) const =0
 Element access operator. More...
 
Provide direct access to sequences content.
Warning
These operators allow you to modifiy the content of the sequences. No checking is performed for your modifications, so use with care, or consider using the setContent() methods.
virtual int & operator() (const std::string &sequenceName, size_t elementIndex)=0
 Element access operator. More...
 
virtual const int & operator() (const std::string &sequenceName, size_t elementIndex) const =0
 Element access operator. More...
 

Detailed Description

The SiteContainer interface.

Container implementing the SiteContainer interface deal with aligned sequences. This interface provides methods to retrieve, add or set sites in the alignment. As for SequenceContainers, the maintenance of Sites is up to the container. All site objects are cloned befored being added and retrieved. All sites stored are deleted in the destructor of the container or after having called the deleteSite() method.

Definition at line 63 of file SiteContainer.h.

Constructor & Destructor Documentation

bpp::SiteContainer::SiteContainer ( )
inline

Definition at line 67 of file SiteContainer.h.

virtual bpp::SiteContainer::~SiteContainer ( )
inlinevirtual

Member Function Documentation

virtual void bpp::SequenceContainer::addSequence ( const Sequence sequence,
bool  checkName 
)
pure virtualinherited
virtual void bpp::SiteContainer::addSite ( const Site site,
bool  checkPosition 
)
pure virtual

Add a site in the container.

Parameters
siteThe site to add.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::SiteContainerTools::merge(), and ~SiteContainer().

virtual void bpp::SiteContainer::addSite ( const Site site,
int  position,
bool  checkPosition 
)
pure virtual

Add a site in the container.

Parameters
siteThe site to add.
positionThe new position of the site, to superseed the one in 'site'.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::SiteContainer::addSite ( const Site site,
size_t  siteIndex,
bool  checkPosition 
)
pure virtual

Add a site in the container.

Parameters
siteThe site to add.
siteIndexThe position where to insert the site.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::SiteContainer::addSite ( const Site site,
size_t  siteIndex,
int  position,
bool  checkPosition 
)
pure virtual

Add a site in the container.

Parameters
siteThe site to add.
siteIndexThe position where to insert the site.
positionThe new position of the site, to superseed the one in 'site'.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::SequenceContainer::clear ( )
pure virtualinherited
SiteContainer* bpp::SiteContainer::clone ( ) const
pure virtual
virtual SequenceContainer* bpp::SequenceContainer::createEmptyContainer ( ) const
pure virtualinherited

Return a copy of this container, but with no sequence inside.

This method creates a new SequenceContainer objet. The class of this container depends on the derivative class.

Returns
A new empty container, with the same alphabet as this one.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, bpp::MapSequenceContainer, and bpp::AlignedSequenceContainer.

Referenced by bpp::SequenceContainer::~SequenceContainer().

virtual void bpp::SequenceContainer::deleteGeneralComments ( )
pure virtualinherited

Delete the comments associated to this container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::SequenceContainer::~SequenceContainer().

virtual void bpp::OrderedSequenceContainer::deleteSequence ( size_t  sequenceIndex)
pure virtualinherited

Delete a sequence of the container.

Parameters
sequenceIndexThe position of the sequence.
Exceptions
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::SequenceContainerTools::keepOnlySelectedSequences(), and bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual void bpp::OrderedSequenceContainer::deleteSequence ( const std::string &  name)
pure virtualinherited

Delete a sequence of the container.

Parameters
nameThe name of the sequence.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual void bpp::SiteContainer::deleteSite ( size_t  siteIndex)
pure virtual
virtual void bpp::SiteContainer::deleteSites ( size_t  siteIndex,
size_t  length 
)
pure virtual

Delete a continuous range of sites in the container.

Parameters
siteIndexThe position of the first site in the container.
lengthThe length of the region to delete, starting at pposition siteIndex.
Exceptions
IndexOutOfBoundsExceptionIf the specified range is not valid.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), and ~SiteContainer().

virtual const Alphabet* bpp::SequenceContainer::getAlphabet ( ) const
pure virtualinherited

Get sequence container's alphabet.

Returns
The alphabet associated to this container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::DCSE::appendAlignmentFromStream(), bpp::Clustal::appendAlignmentFromStream(), bpp::NexusIOSequence::appendAlignmentFromStream(), bpp::GenBank::appendSequencesFromStream(), bpp::Fasta::appendSequencesFromStream(), bpp::Mase::appendSequencesFromStream(), bpp::SiteContainerTools::changeGapsToUnknownCharacters(), bpp::SiteContainerTools::changeUnresolvedCharactersToGaps(), bpp::SequenceContainerTools::convertAlphabet(), bpp::SequenceContainerTools::getCodonPosition(), bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getConsensus(), bpp::SequenceContainerTools::getFrequencies(), bpp::SiteContainerTools::getSelectedPositions(), bpp::MaseTools::getSelectedSequences(), bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::getSequencePositions(), bpp::SequenceApplicationTools::getSitesToAnalyse(), bpp::SiteContainerTools::getSitesWithoutGaps(), bpp::SequenceContainerTools::merge(), bpp::SiteContainerTools::merge(), bpp::AbstractSequenceContainer::operator=(), bpp::Phylip::readInterleaved(), bpp::Phylip::readSequential(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::SiteContainerTools::sampleSites(), bpp::Phylip::writeInterleaved(), bpp::Phylip::writeSequential(), and bpp::SequenceContainer::~SequenceContainer().

virtual const Comments& bpp::OrderedSequenceContainer::getComments ( size_t  sequenceIndex) const
pure virtualinherited

Get comments of a particular sequence.

Parameters
sequenceIndexThe position of the sequence.
Returns
The comments associated to sequence at position 'sequenceIndex'.
Exceptions
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::CompressedVectorSiteContainer::CompressedVectorSiteContainer(), bpp::VectorSiteContainer::operator=(), bpp::CompressedVectorSiteContainer::operator=(), bpp::VectorSiteContainer::VectorSiteContainer(), and bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual const Comments& bpp::OrderedSequenceContainer::getComments ( const std::string &  name) const
pure virtualinherited

Get comments of a particular sequence.

Parameters
nameThe name of the sequence.
Returns
The comments associated to sequence with name 'name'.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::AbstractSequenceContainer.

virtual const std::string& bpp::OrderedSequenceContainer::getName ( size_t  sequenceIndex) const
pure virtualinherited

Get the name of a particular sequence.

Parameters
sequenceIndexThe position of the sequence.
Returns
The name of the sequence at position 'sequenceIndex'.
Exceptions
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual const Sequence& bpp::OrderedSequenceContainer::getSequence ( const std::string &  name) const
pure virtualinherited

Retrieve a sequence object from the container.

Parameters
nameThe name of the sequence.
Returns
A reference toward the Sequence with corresponding name.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual size_t bpp::OrderedSequenceContainer::getSequencePosition ( const std::string &  name) const
pure virtualinherited

Get the position of a sequence in sequence container from its name.

Parameters
nameThe name of the sequence.
Returns
The position of the sequence with name 'name', if it exists.
Exceptions
SequenceNotFoundExceptionIf no sequence with name 'name' could be found.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual Vint bpp::SiteContainer::getSitePositions ( ) const
pure virtual

Get all position attributes of sites.

Returns
A vector with all site positions.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::AlignedSequenceContainer::operator=(), and ~SiteContainer().

virtual bool bpp::SequenceContainer::hasSequence ( const std::string &  name) const
pure virtualinherited

Check if a sequence with a given name is present in the container.

Parameters
nameThe name of the sequence.
Returns
True if a sequence with the given name is present in the container.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

Referenced by bpp::SequenceContainerTools::getSelectedSequences(), and bpp::SequenceContainer::~SequenceContainer().

virtual int& bpp::OrderedSequenceContainer::operator() ( size_t  sequenceIndex,
size_t  elementIndex 
)
pure virtualinherited

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual const int& bpp::OrderedSequenceContainer::operator() ( size_t  sequenceIndex,
size_t  elementIndex 
) const
pure virtualinherited

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual int& bpp::SequenceContainer::operator() ( const std::string &  sequenceName,
size_t  elementIndex 
)
pure virtualinherited

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

Referenced by bpp::SequenceContainer::~SequenceContainer().

virtual const int& bpp::SequenceContainer::operator() ( const std::string &  sequenceName,
size_t  elementIndex 
) const
pure virtualinherited

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual void bpp::SiteContainer::reindexSites ( )
pure virtual

Set all positions attributes.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by ~SiteContainer().

virtual Sequence* bpp::OrderedSequenceContainer::removeSequence ( size_t  sequenceIndex)
pure virtualinherited

Extract (and remove) a sequence from the container.

Parameters
sequenceIndexThe position of the sequence.
Exceptions
IndexOutOfBoundsExceptionIf the name does not match any sequence in the container.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual Sequence* bpp::OrderedSequenceContainer::removeSequence ( const std::string &  name)
pure virtualinherited

Extract (and remove) a sequence from the container.

Parameters
nameThe name of the sequence.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual Site* bpp::SiteContainer::removeSite ( size_t  siteIndex)
pure virtual

Remove a site from the container.

The site is not deleted, a pointer toward it is returned.

Parameters
siteIndexThe position of the site in the container.
Returns
A pointer toward site i in the alignment.
Exceptions
IndexOutOfBoundsExceptionIf the specified site does not exists.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by ~SiteContainer().

virtual void bpp::OrderedSequenceContainer::setComments ( size_t  sequenceIndex,
const Comments comments 
)
pure virtualinherited

Set the comments of a particular sequence.

Parameters
sequenceIndexThe position of the sequence.
commentsThe comments to set to sequence with position 'i'.
Exceptions
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::AbstractSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual void bpp::OrderedSequenceContainer::setComments ( const std::string &  name,
const Comments comments 
)
pure virtualinherited

Set the comments of a particular sequence.

Parameters
nameThe name of the sequence.
commentsThe comments to set to sequence with name 'name'.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::VectorSequenceContainer, and bpp::AbstractSequenceContainer.

virtual void bpp::SequenceContainer::setGeneralComments ( const Comments comments)
pure virtualinherited

Set the comments of this container.

Parameters
commentsThe comments to be associated to this container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::Clustal::appendAlignmentFromStream(), bpp::Fasta::appendSequencesFromStream(), bpp::Mase::appendSequencesFromStream(), and bpp::SequenceContainer::~SequenceContainer().

virtual void bpp::OrderedSequenceContainer::setSequence ( size_t  sequenceIndex,
const Sequence sequence,
bool  checkName 
)
pure virtualinherited

Replace a sequence in the container.

Parameters
sequenceIndexThe position of the sequence.
sequenceThe sequence to add.
checkNameTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.
ExceptionAny other kind of exception.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, bpp::MapSequenceContainer, and bpp::AlignedSequenceContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual void bpp::OrderedSequenceContainer::setSequence ( const std::string &  name,
const Sequence sequence,
bool  checkName 
)
pure virtualinherited

Replace a sequence in the container.

Parameters
nameThe name of the sequence.
sequenceThe sequence to add.
checkNameTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.
ExceptionAny other kind of exception, if the name of the sequence is already used, are whatever else depending on the implementation.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSiteContainer, bpp::AlignedSequenceContainer, bpp::MapSequenceContainer, and bpp::VectorSequenceContainer.

virtual void bpp::OrderedSequenceContainer::setSequencesNames ( const std::vector< std::string > &  names,
bool  checkNames 
)
pure virtualinherited

Set all sequence names.

Parameters
namesA vector of strings with all sequence names. Its size must be strictly equal to the the size of the container (the number of sequences).
checkNamesTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions
ExceptionIf there are redundant names in the input vector.

Implements bpp::SequenceContainer.

Implemented in bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, and bpp::VectorSiteContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual void bpp::SiteContainer::setSite ( size_t  siteIndex,
const Site site,
bool  checkPosition 
)
pure virtual

Set a site in the container.

Parameters
siteIndexThe position of the site in the container.
siteThe site to set.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by ~SiteContainer().

virtual std::string bpp::OrderedSequenceContainer::toString ( size_t  sequenceIndex) const
pure virtualinherited

Convert a particular sequence to a string.

Parameters
sequenceIndexThe position of the sequence.
Returns
A string describing the content of the sequence.
Exceptions
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual std::string bpp::OrderedSequenceContainer::toString ( const std::string &  name) const
pure virtualinherited

Convert a particular sequence to a string.

Parameters
nameThe name of the sequence.
Returns
A string describing the content of the sequence.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::AbstractSequenceContainer.

virtual int& bpp::OrderedSequenceContainer::valueAt ( const std::string &  sequenceName,
size_t  elementIndex 
)
pure virtualinherited

Element access function.

Allows direct access to the data stored in the container.

Parameters
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.
Exceptions
SequenceNotFoundExceptionIf no corresponding sequence is found in the container.
IndexOutOfBoundsExceptionIf the element position is not valid.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

Referenced by bpp::OrderedSequenceContainer::~OrderedSequenceContainer().

virtual const int& bpp::OrderedSequenceContainer::valueAt ( const std::string &  sequenceName,
size_t  elementIndex 
) const
pure virtualinherited

Element access function.

Allows direct access to the data stored in the container.

Parameters
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.
Exceptions
SequenceNotFoundExceptionIf no corresponding sequence is found in the container.
IndexOutOfBoundsExceptionIf the element position is not valid.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual int& bpp::OrderedSequenceContainer::valueAt ( size_t  sequenceIndex,
size_t  elementIndex 
)
pure virtualinherited

Element access operator.

Allows direct access to the data stored in the container.

Parameters
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.
Exceptions
IndexOutOfBoundsExceptionIf a position is not valid.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual const int& bpp::OrderedSequenceContainer::valueAt ( size_t  sequenceIndex,
size_t  elementIndex 
) const
pure virtualinherited

Element access operator.

Allows direct access to the data stored in the container.

Parameters
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.
Exceptions
IndexOutOfBoundsExceptionIf a position is not valid.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.


The documentation for this class was generated from the following file: