bpp-seq
2.2.0
|
A low memory, yet restricted, version of the VectorSiteContainer class. More...
#include <Bpp/Seq/Container/CompressedVectorSiteContainer.h>
Public Member Functions | |
CompressedVectorSiteContainer (const std::vector< const Site *> &vs, const Alphabet *alpha) throw (Exception) | |
Build a new container from a set of sites. More... | |
CompressedVectorSiteContainer (size_t size, const Alphabet *alpha) | |
Build a new empty container with specified size. More... | |
CompressedVectorSiteContainer (const std::vector< std::string > &names, const Alphabet *alpha) | |
Build a new empty container with specified sequence names. More... | |
CompressedVectorSiteContainer (const Alphabet *alpha) | |
Build a new empty container. More... | |
CompressedVectorSiteContainer (const CompressedVectorSiteContainer &vsc) | |
CompressedVectorSiteContainer (const SiteContainer &sc) | |
CompressedVectorSiteContainer & | operator= (const CompressedVectorSiteContainer &vsc) |
CompressedVectorSiteContainer & | operator= (const SiteContainer &sc) |
virtual | ~CompressedVectorSiteContainer () |
void | addSequence (const Sequence &sequence, bool checkName=true) throw (Exception, NotImplementedException) |
Add a sequence to the container. More... | |
void | addSequence (const Sequence &sequence, size_t sequenceIndex, bool checkName=true) throw (Exception, NotImplementedException) |
void | setSequence (const std::string &name, const Sequence &sequence, bool checkName) throw (Exception, NotImplementedException) |
Replace a sequence in the container. More... | |
void | setSequence (size_t sequenceIndex, const Sequence &sequence, bool checkName) throw (Exception, NotImplementedException) |
Replace a sequence in the container. More... | |
The Clonable interface. | |
CompressedVectorSiteContainer * | 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=false) 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=false) throw (Exception) |
Add a site in the container. More... | |
void | addSite (const Site &site, int position, bool checkPosition=false) throw (Exception) |
Add a site in the container. More... | |
void | addSite (const Site &site, size_t siteIndex, bool checkPosition=false) throw (Exception) |
Add a site in the container. More... | |
void | addSite (const Site &site, size_t siteIndex, int position, bool checkPosition=false) 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, NotImplementedException) |
Extract (and remove) a sequence from the container. More... | |
Sequence * | removeSequence (const std::string &name) throw (SequenceNotFoundException, NotImplementedException) |
Extract (and remove) a sequence from the container. More... | |
void | deleteSequence (size_t sequenceIndex) throw (IndexOutOfBoundsException, NotImplementedException) |
Delete a sequence of the container. More... | |
void | deleteSequence (const std::string &name) throw (SequenceNotFoundException, NotImplementedException) |
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... | |
CompressedVectorSiteContainer * | 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 | |
size_t | getSiteIndex_ (const Site &site) |
Protected Attributes | |
std::vector< Site * > | sites_ |
std::vector< size_t > | index_ |
std::vector< std::string > | names_ |
std::vector< Comments * > | comments_ |
std::vector< Sequence * > | sequences_ |
A low memory, yet restricted, version of the VectorSiteContainer class.
This implementation is very similar to VectorSiteContainer, but identical sites are stored only once, which significantly reduce memory usage in the case of containers where the number of sites is large compared to the number of sequences. site access is as fast as in the standard VectorSiteContainer class, but site addition takes more time, as the new site must be first compared to the existing set. A major restriction of this container is that you can't add or remove sequences. The number of sequences is fixed after the first site has been added.
Definition at line 76 of file CompressedVectorSiteContainer.h.
CompressedVectorSiteContainer::CompressedVectorSiteContainer | ( | const std::vector< const Site *> & | vs, |
const Alphabet * | alpha | ||
) | |||
throw | ( | Exception | |
) |
Build a new container from a set of sites.
vs | A std::vector of sites. |
alpha | The common alphabet for all sites. |
Exception | If sites differ in size or in alphabet. |
Class constructors:
Definition at line 51 of file CompressedVectorSiteContainer.cpp.
Referenced by clone(), and createEmptyContainer().
CompressedVectorSiteContainer::CompressedVectorSiteContainer | ( | 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 83 of file CompressedVectorSiteContainer.cpp.
CompressedVectorSiteContainer::CompressedVectorSiteContainer | ( | 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 101 of file CompressedVectorSiteContainer.cpp.
CompressedVectorSiteContainer::CompressedVectorSiteContainer | ( | const Alphabet * | alpha | ) |
Build a new empty container.
alpha | The alphabet for this container. |
Definition at line 119 of file CompressedVectorSiteContainer.cpp.
CompressedVectorSiteContainer::CompressedVectorSiteContainer | ( | const CompressedVectorSiteContainer & | vsc | ) |
Definition at line 130 of file CompressedVectorSiteContainer.cpp.
References addSite(), comments_, bpp::AbstractSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), getSite(), and sites_.
CompressedVectorSiteContainer::CompressedVectorSiteContainer | ( | const SiteContainer & | sc | ) |
Definition at line 157 of file CompressedVectorSiteContainer.cpp.
References addSite(), comments_, bpp::OrderedSequenceContainer::getComments(), bpp::OrderedSequenceContainer::getNumberOfSequences(), bpp::SiteContainer::getNumberOfSites(), and bpp::SiteContainer::getSite().
|
inlinevirtual |
Definition at line 126 of file CompressedVectorSiteContainer.h.
References clear().
|
inlinevirtual |
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 255 of file CompressedVectorSiteContainer.h.
|
inline |
Definition at line 261 of file CompressedVectorSiteContainer.h.
|
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 368 of file CompressedVectorSiteContainer.cpp.
Referenced by addSite(), CompressedVectorSiteContainer(), and operator=().
|
inlinevirtual |
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 148 of file CompressedVectorSiteContainer.h.
References addSite().
|
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 391 of file CompressedVectorSiteContainer.cpp.
|
inlinevirtual |
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 153 of file CompressedVectorSiteContainer.h.
References addSite().
|
virtual |
Delete all sequences in the container.
Implements bpp::SequenceContainer.
Definition at line 490 of file CompressedVectorSiteContainer.cpp.
References comments_, index_, names_, sequences_, and sites_.
Referenced by operator=(), and ~CompressedVectorSiteContainer().
|
inlinevirtual |
Implements bpp::SiteContainer.
Definition at line 134 of file CompressedVectorSiteContainer.h.
References CompressedVectorSiteContainer().
|
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 566 of file CompressedVectorSiteContainer.cpp.
References CompressedVectorSiteContainer(), bpp::AbstractSequenceContainer::getAlphabet(), bpp::AbstractSequenceContainer::getGeneralComments(), and bpp::AbstractSequenceContainer::setGeneralComments().
|
inlinevirtualinherited |
Delete the comments associated to this container.
Implements bpp::SequenceContainer.
Definition at line 150 of file AbstractSequenceContainer.h.
References bpp::AbstractSequenceContainer::comments_.
|
inlinevirtual |
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 192 of file CompressedVectorSiteContainer.h.
|
inlinevirtual |
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 198 of file CompressedVectorSiteContainer.h.
|
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 327 of file CompressedVectorSiteContainer.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 358 of file CompressedVectorSiteContainer.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(), bpp::VectorSiteContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), createEmptyContainer(), and bpp::VectorSiteContainer::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 CompressedVectorSiteContainer(), bpp::VectorSiteContainer::operator=(), operator=(), and bpp::VectorSiteContainer::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(), bpp::VectorSiteContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), and 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 204 of file CompressedVectorSiteContainer.h.
References names_.
Referenced by CompressedVectorSiteContainer(), operator=(), and valueAt().
|
inlinevirtual |
Get the number of sites in the container.
Implements bpp::SiteContainer.
Definition at line 157 of file CompressedVectorSiteContainer.h.
References index_.
Referenced by CompressedVectorSiteContainer(), getSitePositions(), and valueAt().
|
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 440 of file CompressedVectorSiteContainer.cpp.
|
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 458 of file CompressedVectorSiteContainer.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 478 of file CompressedVectorSiteContainer.cpp.
Referenced by operator()(), and valueAt().
|
virtual |
Get all the names of the sequences in the container.
Implements bpp::OrderedSequenceContainer.
Definition at line 520 of file CompressedVectorSiteContainer.cpp.
References names_.
|
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 230 of file CompressedVectorSiteContainer.cpp.
Referenced by CompressedVectorSiteContainer().
|
protected |
Definition at line 575 of file CompressedVectorSiteContainer.cpp.
References sites_, and bpp::BasicSymbolList::size().
|
virtual |
Get all position attributes of sites.
Implements bpp::SiteContainer.
Definition at line 427 of file CompressedVectorSiteContainer.cpp.
References getNumberOfSites(), index_, and 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 467 of file CompressedVectorSiteContainer.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 224 of file CompressedVectorSiteContainer.h.
References getSequencePosition(), index_, 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 228 of file CompressedVectorSiteContainer.h.
References getSequencePosition(), index_, 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 245 of file CompressedVectorSiteContainer.h.
|
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 249 of file CompressedVectorSiteContainer.h.
CompressedVectorSiteContainer & CompressedVectorSiteContainer::operator= | ( | const CompressedVectorSiteContainer & | vsc | ) |
Definition at line 179 of file CompressedVectorSiteContainer.cpp.
References comments_, bpp::AbstractSequenceContainer::getComments(), getNumberOfSequences(), index_, names_, bpp::AbstractSequenceContainer::operator=(), sequences_, and sites_.
CompressedVectorSiteContainer & CompressedVectorSiteContainer::operator= | ( | const SiteContainer & | sc | ) |
Definition at line 205 of file CompressedVectorSiteContainer.cpp.
References addSite(), clear(), comments_, bpp::OrderedSequenceContainer::getComments(), bpp::OrderedSequenceContainer::getNumberOfSequences(), bpp::SiteContainer::getNumberOfSites(), bpp::OrderedSequenceContainer::getSequencesNames(), bpp::SiteContainer::getSite(), names_, bpp::AbstractSequenceContainer::operator=(), and sequences_.
|
virtual |
Set all positions attributes.
Implements bpp::SiteContainer.
Definition at line 416 of file CompressedVectorSiteContainer.cpp.
References sites_.
|
inlinevirtual |
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 180 of file CompressedVectorSiteContainer.h.
|
inlinevirtual |
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 186 of file CompressedVectorSiteContainer.h.
|
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 316 of file CompressedVectorSiteContainer.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 559 of file CompressedVectorSiteContainer.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(), bpp::VectorSiteContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), createEmptyContainer(), bpp::SiteContainerTools::getSelectedSites(), and bpp::VectorSequenceContainer::VectorSequenceContainer().
|
inlinevirtual |
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 267 of file CompressedVectorSiteContainer.h.
|
inlinevirtual |
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 273 of file CompressedVectorSiteContainer.h.
|
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 532 of file CompressedVectorSiteContainer.cpp.
|
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 239 of file CompressedVectorSiteContainer.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 214 of file CompressedVectorSiteContainer.h.
References getNumberOfSites(), getSequencePosition(), index_, 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 219 of file CompressedVectorSiteContainer.h.
References getNumberOfSites(), getSequencePosition(), index_, 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 233 of file CompressedVectorSiteContainer.h.
References getNumberOfSequences(), getNumberOfSites(), index_, 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 239 of file CompressedVectorSiteContainer.h.
References getNumberOfSequences(), getNumberOfSites(), index_, and sites_.
|
protected |
Definition at line 86 of file CompressedVectorSiteContainer.h.
Referenced by clear(), CompressedVectorSiteContainer(), and operator=().
|
protected |
Definition at line 84 of file CompressedVectorSiteContainer.h.
Referenced by clear(), getNumberOfSites(), getSitePositions(), operator()(), operator=(), and valueAt().
|
protected |
Definition at line 85 of file CompressedVectorSiteContainer.h.
Referenced by clear(), CompressedVectorSiteContainer(), getNumberOfSequences(), getSequencesNames(), hasSequence(), and operator=().
|
mutableprotected |
Definition at line 87 of file CompressedVectorSiteContainer.h.
Referenced by clear(), and operator=().
|
protected |
Definition at line 83 of file CompressedVectorSiteContainer.h.
Referenced by clear(), CompressedVectorSiteContainer(), getSiteIndex_(), getSitePositions(), operator()(), operator=(), reindexSites(), and valueAt().