bpp-seq
2.2.0
|
The VectorSiteContainer class. More...
#include <Bpp/Seq/Container/VectorSiteContainer.h>
Public Member Functions | |
VectorSiteContainer (const std::vector< const Site *> &vs, const Alphabet *alpha, bool checkPositions=true) throw (Exception) | |
Build a new container from a set of sites. More... | |
VectorSiteContainer (size_t size, const Alphabet *alpha) | |
Build a new empty container with specified size. More... | |
VectorSiteContainer (const std::vector< std::string > &names, const Alphabet *alpha) | |
Build a new empty container with specified sequence names. More... | |
VectorSiteContainer (const Alphabet *alpha) | |
Build a new empty container. More... | |
VectorSiteContainer (const VectorSiteContainer &vsc) | |
VectorSiteContainer (const SiteContainer &sc) | |
VectorSiteContainer (const OrderedSequenceContainer &osc) | |
VectorSiteContainer (const SequenceContainer &sc) | |
VectorSiteContainer & | operator= (const VectorSiteContainer &vsc) |
VectorSiteContainer & | operator= (const SiteContainer &sc) |
VectorSiteContainer & | operator= (const OrderedSequenceContainer &osc) |
VectorSiteContainer & | operator= (const SequenceContainer &sc) |
virtual | ~VectorSiteContainer () |
void | addSequence (const Sequence &sequence, bool checkName=true) throw (Exception) |
Add a sequence to the container. More... | |
void | addSequence (const Sequence &sequence, size_t sequenceIndex, bool checkName=true) throw (Exception) |
void | setSequence (const std::string &name, const Sequence &sequence, bool checkName) throw (Exception) |
Replace a sequence in the container. More... | |
void | setSequence (size_t sequenceIndex, const Sequence &sequence, bool checkName) throw (Exception) |
Replace a sequence in the container. More... | |
The Clonable interface. | |
VectorSiteContainer * | clone () const |
The SiteContainer interface implementation: | |
const Site & | getSite (size_t siteIndex) const throw (IndexOutOfBoundsException) |
Get a site from the container. More... | |
void | setSite (size_t siteIndex, const Site &site, bool checkPosition=true) throw (Exception) |
Set a site in the container. More... | |
Site * | removeSite (size_t siteIndex) throw (IndexOutOfBoundsException) |
Remove a site from the container. More... | |
void | deleteSite (size_t siteIndex) throw (IndexOutOfBoundsException) |
Delete a site in the container. More... | |
void | deleteSites (size_t siteIndex, size_t length) throw (IndexOutOfBoundsException) |
Delete a continuous range of sites in the container. More... | |
void | addSite (const Site &site, bool checkPosition=true) throw (Exception) |
Add a site in the container. More... | |
void | addSite (const Site &site, int position, bool checkPosition=true) throw (Exception) |
Add a site in the container. More... | |
void | addSite (const Site &site, size_t siteIndex, bool checkPosition=true) throw (Exception) |
Add a site in the container. More... | |
void | addSite (const Site &site, size_t siteIndex, int position, bool checkPosition=true) throw (Exception) |
Add a site in the container. More... | |
size_t | getNumberOfSites () const |
Get the number of sites in the container. More... | |
void | reindexSites () |
Set all positions attributes. More... | |
Vint | getSitePositions () const |
Get all position attributes of sites. More... | |
The SequenceContainer interface. | |
void | setComments (size_t sequenceIndex, const Comments &comments) throw (IndexOutOfBoundsException) |
Set the comments of a particular sequence. More... | |
const Sequence & | getSequence (size_t sequenceIndex) const throw (IndexOutOfBoundsException) |
Retrieve a sequence object from the container. More... | |
const Sequence & | getSequence (const std::string &name) const throw (SequenceNotFoundException) |
Retrieve a sequence object from the container. More... | |
bool | hasSequence (const std::string &name) const |
Check if a sequence with a given name is present in the container. More... | |
size_t | getSequencePosition (const std::string &name) const throw (SequenceNotFoundException) |
Get the position of a sequence in sequence container from its name. More... | |
Sequence * | removeSequence (size_t sequenceIndex) throw (IndexOutOfBoundsException) |
Extract (and remove) a sequence from the container. More... | |
Sequence * | removeSequence (const std::string &name) throw (SequenceNotFoundException) |
Extract (and remove) a sequence from the container. More... | |
void | deleteSequence (size_t sequenceIndex) throw (IndexOutOfBoundsException) |
Delete a sequence of the container. More... | |
void | deleteSequence (const std::string &name) throw (SequenceNotFoundException) |
Delete a sequence of the container. More... | |
size_t | getNumberOfSequences () const |
Get the number of sequences in the container. More... | |
std::vector< std::string > | getSequencesNames () const |
Get all the names of the sequences in the container. More... | |
void | setSequencesNames (const std::vector< std::string > &names, bool checkNames=true) throw (Exception) |
Set all sequence names. More... | |
void | clear () |
Delete all sequences in the container. More... | |
VectorSiteContainer * | createEmptyContainer () const |
Return a copy of this container, but with no sequence inside. More... | |
int & | valueAt (const std::string &sequenceName, size_t elementIndex) throw (SequenceNotFoundException, IndexOutOfBoundsException) |
Element access function. More... | |
const int & | valueAt (const std::string &sequenceName, size_t elementIndex) const throw (SequenceNotFoundException, IndexOutOfBoundsException) |
Element access function. More... | |
int & | operator() (const std::string &sequenceName, size_t elementIndex) |
Element access operator. More... | |
const int & | operator() (const std::string &sequenceName, size_t elementIndex) const |
Element access operator. More... | |
int & | valueAt (size_t sequenceIndex, size_t elementIndex) throw (IndexOutOfBoundsException) |
Element access operator. More... | |
const int & | valueAt (size_t sequenceIndex, size_t elementIndex) const throw (IndexOutOfBoundsException) |
Element access operator. More... | |
int & | operator() (size_t sequenceIndex, size_t elementIndex) |
Element access operator. More... | |
const int & | operator() (size_t sequenceIndex, size_t elementIndex) const |
Element access operator. More... | |
From the SequenceContainer interface | |
const Alphabet * | getAlphabet () const |
Get sequence container's alphabet. More... | |
const std::vector< int > & | getContent (const std::string &name) const throw (SequenceNotFoundException) |
Get the content of a sequence. More... | |
std::string | toString (const std::string &name) const throw (SequenceNotFoundException) |
Convert a particular sequence to a string. More... | |
const Comments & | getComments (const std::string &name) const throw (SequenceNotFoundException) |
Get comments of a particular sequence. More... | |
void | setComments (const std::string &name, const Comments &comments) throw (SequenceNotFoundException) |
Set the comments of a particular sequence. More... | |
const Comments & | getGeneralComments () const |
Get the comments of this container. More... | |
void | setGeneralComments (const Comments &comments) |
Set the comments of this container. More... | |
void | deleteGeneralComments () |
Delete the comments associated to this container. More... | |
From the OrderedSequenceContainer interface | |
virtual const std::vector< int > & | getContent (size_t sequenceIndex) const throw (IndexOutOfBoundsException) |
Get the content of a sequence. More... | |
virtual std::string | toString (size_t sequenceIndex) const throw (IndexOutOfBoundsException) |
Convert a particular sequence to a string. More... | |
virtual const Comments & | getComments (size_t sequenceIndex) const throw (IndexOutOfBoundsException) |
Get comments of a particular sequence. More... | |
virtual const std::string & | getName (size_t sequenceIndex) const throw (IndexOutOfBoundsException) |
Get the name of a particular sequence. More... | |
Protected Member Functions | |
void | realloc (size_t n) |
Protected Attributes | |
std::vector< Site * > | sites_ |
std::vector< std::string > | names_ |
std::vector< Comments * > | comments_ |
std::vector< Sequence * > | sequences_ |
The VectorSiteContainer class.
Sites are stored in a std::vector of pointers. Site access is hence in , and sequence access in
, where
is the number of sites in the container.
See AlignedSequenceContainer for an alternative implementation.
Definition at line 68 of file VectorSiteContainer.h.
VectorSiteContainer::VectorSiteContainer | ( | const std::vector< const Site *> & | vs, |
const Alphabet * | alpha, | ||
bool | checkPositions = true |
||
) | |||
throw | ( | Exception | |
) |
Build a new container from a set of sites.
vs | A std::vector of sites. |
alpha | The common alphabet for all sites. |
checkPositions | Check for the redundancy of site position tag. This may turn to be very time consuming! |
Exception | If sites differ in size or in alphabet. |
Class constructors:
Definition at line 52 of file VectorSiteContainer.cpp.
Referenced by clone(), and createEmptyContainer().
VectorSiteContainer::VectorSiteContainer | ( | size_t | size, |
const Alphabet * | alpha | ||
) |
Build a new empty container with specified size.
size | Number of sequences in the container. |
alpha | The alphabet for this container. |
Definition at line 85 of file VectorSiteContainer.cpp.
VectorSiteContainer::VectorSiteContainer | ( | const std::vector< std::string > & | names, |
const Alphabet * | alpha | ||
) |
Build a new empty container with specified sequence names.
names | Sequence names. This will set the number of sequences in the container. |
alpha | The alphabet for this container. |
Definition at line 102 of file VectorSiteContainer.cpp.
VectorSiteContainer::VectorSiteContainer | ( | const Alphabet * | alpha | ) |
Build a new empty container.
alpha | The alphabet for this container. |
Definition at line 119 of file VectorSiteContainer.cpp.
VectorSiteContainer::VectorSiteContainer | ( | const VectorSiteContainer & | vsc | ) |
Definition at line 129 of file VectorSiteContainer.cpp.
References addSite(), comments_, bpp::AbstractSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), and getSite().
VectorSiteContainer::VectorSiteContainer | ( | const SiteContainer & | sc | ) |
Definition at line 150 of file VectorSiteContainer.cpp.
References addSite(), comments_, bpp::OrderedSequenceContainer::getComments(), bpp::OrderedSequenceContainer::getNumberOfSequences(), bpp::SiteContainer::getNumberOfSites(), and bpp::SiteContainer::getSite().
VectorSiteContainer::VectorSiteContainer | ( | const OrderedSequenceContainer & | osc | ) |
Definition at line 171 of file VectorSiteContainer.cpp.
References addSequence(), bpp::OrderedSequenceContainer::getNumberOfSequences(), bpp::OrderedSequenceContainer::getSequence(), and reindexSites().
VectorSiteContainer::VectorSiteContainer | ( | const SequenceContainer & | sc | ) |
Definition at line 187 of file VectorSiteContainer.cpp.
References addSequence(), bpp::SequenceContainer::getSequence(), bpp::SequenceContainer::getSequencesNames(), and reindexSites().
|
inlinevirtual |
Definition at line 122 of file VectorSiteContainer.h.
References clear().
|
virtual |
Add a sequence to the container.
sequence | The sequence to add. |
checkName | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
Exception | Any other kind of exception, if the name of the sequence is already used, are whatever else depending on the implementation. |
Implements bpp::SequenceContainer.
Definition at line 690 of file VectorSiteContainer.cpp.
Referenced by bpp::SequenceApplicationTools::getSiteContainer(), operator=(), and VectorSiteContainer().
void VectorSiteContainer::addSequence | ( | const Sequence & | sequence, |
size_t | sequenceIndex, | ||
bool | checkName = true |
||
) | |||
throw | ( | Exception | |
) |
Definition at line 730 of file VectorSiteContainer.cpp.
|
virtual |
Add a site in the container.
site | The site to add. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 363 of file VectorSiteContainer.cpp.
Referenced by bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::getSitesWithoutGaps(), operator=(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::SiteContainerTools::sampleSites(), and VectorSiteContainer().
|
virtual |
Add a site in the container.
site | The site to add. |
position | The new position of the site, to superseed the one in 'site'. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 392 of file VectorSiteContainer.cpp.
References bpp::Site::setPosition().
|
virtual |
Add a site in the container.
site | The site to add. |
siteIndex | The position where to insert the site. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 421 of file VectorSiteContainer.cpp.
|
virtual |
Add a site in the container.
site | The site to add. |
siteIndex | The position where to insert the site. |
position | The new position of the site, to superseed the one in 'site'. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 454 of file VectorSiteContainer.cpp.
References bpp::Site::setPosition().
|
virtual |
Delete all sequences in the container.
Implements bpp::SequenceContainer.
Definition at line 769 of file VectorSiteContainer.cpp.
References comments_, names_, sequences_, and sites_.
Referenced by operator=(), realloc(), and ~VectorSiteContainer().
|
inlinevirtual |
Implements bpp::SiteContainer.
Definition at line 130 of file VectorSiteContainer.h.
References VectorSiteContainer().
|
virtual |
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.
Implements bpp::SequenceContainer.
Definition at line 854 of file VectorSiteContainer.cpp.
References bpp::AbstractSequenceContainer::getAlphabet(), bpp::AbstractSequenceContainer::getGeneralComments(), bpp::AbstractSequenceContainer::setGeneralComments(), and VectorSiteContainer().
|
inlinevirtualinherited |
Delete the comments associated to this container.
Implements bpp::SequenceContainer.
Definition at line 150 of file AbstractSequenceContainer.h.
References bpp::AbstractSequenceContainer::comments_.
|
virtual |
Delete a sequence of the container.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 660 of file VectorSiteContainer.cpp.
|
virtual |
Delete a sequence of the container.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 681 of file VectorSiteContainer.cpp.
|
virtual |
Delete a site in the container.
siteIndex | The position of the site in the container. |
IndexOutOfBoundsException | If the specified site does not exists. |
Implements bpp::SiteContainer.
Definition at line 340 of file VectorSiteContainer.cpp.
|
virtual |
Delete a continuous range of sites in the container.
siteIndex | The position of the first site in the container. |
length | The length of the region to delete, starting at pposition siteIndex. |
IndexOutOfBoundsException | If the specified range is not valid. |
Implements bpp::SiteContainer.
Definition at line 350 of file VectorSiteContainer.cpp.
|
inlinevirtualinherited |
Get sequence container's alphabet.
Implements bpp::SequenceContainer.
Definition at line 123 of file AbstractSequenceContainer.h.
References bpp::AbstractSequenceContainer::alphabet_.
Referenced by bpp::MapSequenceContainer::createEmptyContainer(), createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), and realloc().
|
inlinevirtualinherited |
Get comments of a particular sequence.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 134 of file AbstractSequenceContainer.h.
References bpp::Sequence::getComments(), and bpp::OrderedSequenceContainer::getSequence().
Referenced by bpp::CompressedVectorSiteContainer::CompressedVectorSiteContainer(), operator=(), bpp::CompressedVectorSiteContainer::operator=(), and VectorSiteContainer().
|
inlinevirtualinherited |
Get comments of a particular sequence.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 177 of file AbstractSequenceContainer.h.
References bpp::Sequence::getComments(), and bpp::OrderedSequenceContainer::getSequence().
|
inlinevirtualinherited |
Get the content of a sequence.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 124 of file AbstractSequenceContainer.h.
References bpp::SymbolList::getContent(), and bpp::OrderedSequenceContainer::getSequence().
Referenced by bpp::SequenceContainerTools::getCodonPosition().
|
inlinevirtualinherited |
Get the content of a sequence.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 167 of file AbstractSequenceContainer.h.
References bpp::SymbolList::getContent(), and bpp::OrderedSequenceContainer::getSequence().
|
inlinevirtualinherited |
Get the comments of this container.
Implements bpp::SequenceContainer.
Definition at line 140 of file AbstractSequenceContainer.h.
References bpp::AbstractSequenceContainer::comments_.
Referenced by bpp::MapSequenceContainer::createEmptyContainer(), createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), and bpp::CompressedVectorSiteContainer::createEmptyContainer().
|
inlinevirtualinherited |
Get the name of a particular sequence.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 162 of file AbstractSequenceContainer.h.
References bpp::Sequence::getName(), and bpp::OrderedSequenceContainer::getSequence().
Referenced by bpp::VectorSequenceContainer::getSequencesNames(), and bpp::VectorSequenceContainer::hasSequence().
|
inlinevirtual |
Get the number of sequences in the container.
Implements bpp::OrderedSequenceContainer.
Definition at line 176 of file VectorSiteContainer.h.
References names_.
Referenced by bpp::SequenceApplicationTools::getSiteContainer(), operator=(), valueAt(), and VectorSiteContainer().
|
virtual |
Get the number of sites in the container.
Implements bpp::SiteContainer.
Definition at line 487 of file VectorSiteContainer.cpp.
References sites_.
Referenced by bpp::SequenceApplicationTools::getSiteContainer(), operator=(), valueAt(), and VectorSiteContainer().
|
virtual |
Retrieve a sequence object from the container.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 517 of file VectorSiteContainer.cpp.
Referenced by bpp::SequenceApplicationTools::getSiteContainer().
|
virtual |
Retrieve a sequence object from the container.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 537 of file VectorSiteContainer.cpp.
|
virtual |
Get the position of a sequence in sequence container from its name.
name | The name of the sequence. |
SequenceNotFoundException | If no sequence with name 'name' could be found. |
Implements bpp::OrderedSequenceContainer.
Definition at line 559 of file VectorSiteContainer.cpp.
Referenced by operator()(), and valueAt().
|
virtual |
Get all the names of the sequences in the container.
Implements bpp::OrderedSequenceContainer.
Definition at line 813 of file VectorSiteContainer.cpp.
References names_.
Referenced by operator=().
|
virtual |
Get a site from the container.
siteIndex | The position of the site in the container. |
IndexOutOfBoundsException | If the specified site does not exists. |
Implements bpp::SiteContainer.
Definition at line 290 of file VectorSiteContainer.cpp.
Referenced by operator=(), and VectorSiteContainer().
|
virtual |
Get all position attributes of sites.
Implements bpp::SiteContainer.
Definition at line 505 of file VectorSiteContainer.cpp.
References sites_.
|
virtual |
Check if a sequence with a given name is present in the container.
name | The name of the sequence. |
Implements bpp::SequenceContainer.
Definition at line 546 of file VectorSiteContainer.cpp.
References names_.
|
inlinevirtual |
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!
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
Implements bpp::SequenceContainer.
Definition at line 196 of file VectorSiteContainer.h.
References getSequencePosition(), and sites_.
|
inlinevirtual |
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!
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
Implements bpp::SequenceContainer.
Definition at line 200 of file VectorSiteContainer.h.
References getSequencePosition(), and sites_.
|
inlinevirtual |
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!
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 217 of file VectorSiteContainer.h.
References sites_.
|
inlinevirtual |
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!
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 221 of file VectorSiteContainer.h.
References sites_.
VectorSiteContainer & VectorSiteContainer::operator= | ( | const VectorSiteContainer & | vsc | ) |
Definition at line 204 of file VectorSiteContainer.cpp.
References addSite(), clear(), comments_, bpp::AbstractSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), getSequencesNames(), getSite(), names_, bpp::AbstractSequenceContainer::operator=(), sequences_, and setSequencesNames().
VectorSiteContainer & VectorSiteContainer::operator= | ( | const SiteContainer & | sc | ) |
Definition at line 230 of file VectorSiteContainer.cpp.
References addSite(), clear(), comments_, bpp::OrderedSequenceContainer::getComments(), bpp::OrderedSequenceContainer::getNumberOfSequences(), bpp::SiteContainer::getNumberOfSites(), bpp::OrderedSequenceContainer::getSequencesNames(), bpp::SiteContainer::getSite(), names_, bpp::AbstractSequenceContainer::operator=(), sequences_, and setSequencesNames().
VectorSiteContainer & VectorSiteContainer::operator= | ( | const OrderedSequenceContainer & | osc | ) |
Definition at line 256 of file VectorSiteContainer.cpp.
References addSequence(), clear(), bpp::OrderedSequenceContainer::getNumberOfSequences(), bpp::OrderedSequenceContainer::getSequence(), bpp::AbstractSequenceContainer::operator=(), and reindexSites().
VectorSiteContainer & VectorSiteContainer::operator= | ( | const SequenceContainer & | sc | ) |
Definition at line 273 of file VectorSiteContainer.cpp.
References addSequence(), clear(), bpp::SequenceContainer::getSequence(), bpp::SequenceContainer::getSequencesNames(), bpp::AbstractSequenceContainer::operator=(), and reindexSites().
|
protected |
Definition at line 800 of file VectorSiteContainer.cpp.
References clear(), bpp::AbstractSequenceContainer::getAlphabet(), reindexSites(), and sites_.
|
virtual |
Set all positions attributes.
Implements bpp::SiteContainer.
Definition at line 494 of file VectorSiteContainer.cpp.
References sites_.
Referenced by bpp::SequenceApplicationTools::getSiteContainer(), operator=(), realloc(), and VectorSiteContainer().
|
virtual |
Extract (and remove) a sequence from the container.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 625 of file VectorSiteContainer.cpp.
References bpp::SymbolList::deleteElement().
|
virtual |
Extract (and remove) a sequence from the container.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 651 of file VectorSiteContainer.cpp.
|
virtual |
Remove a site from the container.
The site is not deleted, a pointer toward it is returned.
siteIndex | The position of the site in the container. |
IndexOutOfBoundsException | If the specified site does not exists. |
Implements bpp::SiteContainer.
Definition at line 329 of file VectorSiteContainer.cpp.
|
virtualinherited |
Set the comments of a particular sequence.
name | The name of the sequence. |
comments | The comments to set to sequence with name 'name'. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Reimplemented in bpp::VectorSequenceContainer.
Definition at line 48 of file AbstractSequenceContainer.cpp.
Referenced by bpp::VectorSequenceContainer::setComments().
|
virtual |
Set the comments of a particular sequence.
sequenceIndex | The position of the sequence. |
comments | The comments to set to sequence with position 'i'. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::AbstractSequenceContainer.
Definition at line 847 of file VectorSiteContainer.cpp.
|
inlinevirtualinherited |
Set the comments of this container.
comments | The comments to be associated to this container. |
Implements bpp::SequenceContainer.
Definition at line 145 of file AbstractSequenceContainer.h.
References bpp::AbstractSequenceContainer::comments_.
Referenced by bpp::AlignedSequenceContainer::createEmptyContainer(), bpp::MapSequenceContainer::createEmptyContainer(), createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::SiteContainerTools::getSelectedSites(), and bpp::VectorSequenceContainer::VectorSequenceContainer().
|
virtual |
Replace a sequence in the container.
name | The name of the sequence. |
sequence | The sequence to add. |
checkName | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Exception | Any other kind of exception, if the name of the sequence is already used, are whatever else depending on the implementation. |
Implements bpp::OrderedSequenceContainer.
Definition at line 572 of file VectorSiteContainer.cpp.
|
virtual |
Replace a sequence in the container.
sequenceIndex | The position of the sequence. |
sequence | The sequence to add. |
checkName | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Exception | Any other kind of exception. |
Implements bpp::OrderedSequenceContainer.
Definition at line 581 of file VectorSiteContainer.cpp.
|
virtual |
Set all sequence names.
names | A vector of strings with all sequence names. Its size must be strictly equal to the the size of the container (the number of sequences). |
checkNames | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
Exception | If there are redundant names in the input vector. |
Implements bpp::OrderedSequenceContainer.
Definition at line 820 of file VectorSiteContainer.cpp.
Referenced by bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::getSitesWithoutGaps(), operator=(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), and bpp::SiteContainerTools::resolveDottedAlignment().
|
virtual |
Set a site in the container.
siteIndex | The position of the site in the container. |
site | The site to set. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 299 of file VectorSiteContainer.cpp.
|
inlinevirtualinherited |
Convert a particular sequence to a string.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 129 of file AbstractSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence(), and bpp::SymbolList::toString().
|
inlinevirtualinherited |
Convert a particular sequence to a string.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::OrderedSequenceContainer.
Definition at line 172 of file AbstractSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence(), and bpp::SymbolList::toString().
|
inlinevirtual |
Element access function.
Allows direct access to the data stored in the container.
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
SequenceNotFoundException | If no corresponding sequence is found in the container. |
IndexOutOfBoundsException | If the element position is not valid. |
Implements bpp::OrderedSequenceContainer.
Definition at line 186 of file VectorSiteContainer.h.
References getNumberOfSites(), getSequencePosition(), and sites_.
|
inlinevirtual |
Element access function.
Allows direct access to the data stored in the container.
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
SequenceNotFoundException | If no corresponding sequence is found in the container. |
IndexOutOfBoundsException | If the element position is not valid. |
Implements bpp::OrderedSequenceContainer.
Definition at line 191 of file VectorSiteContainer.h.
References getNumberOfSites(), getSequencePosition(), and sites_.
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container.
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
IndexOutOfBoundsException | If a position is not valid. |
Implements bpp::OrderedSequenceContainer.
Definition at line 205 of file VectorSiteContainer.h.
References getNumberOfSequences(), getNumberOfSites(), and sites_.
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container.
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
IndexOutOfBoundsException | If a position is not valid. |
Implements bpp::OrderedSequenceContainer.
Definition at line 211 of file VectorSiteContainer.h.
References getNumberOfSequences(), getNumberOfSites(), and sites_.
|
protected |
Definition at line 77 of file VectorSiteContainer.h.
Referenced by clear(), operator=(), and VectorSiteContainer().
|
protected |
Definition at line 76 of file VectorSiteContainer.h.
Referenced by clear(), getNumberOfSequences(), getSequencesNames(), hasSequence(), operator=(), and VectorSiteContainer().
|
mutableprotected |
Definition at line 78 of file VectorSiteContainer.h.
Referenced by clear(), and operator=().
|
protected |
Definition at line 75 of file VectorSiteContainer.h.
Referenced by clear(), getNumberOfSites(), getSitePositions(), operator()(), realloc(), reindexSites(), and valueAt().