bpp-popgen3
3.0.0
|
The PolymorphismSequenceContainer class. More...
#include <Bpp/PopGen/PolymorphismSequenceContainer.h>
Public Member Functions | |
PolymorphismSequenceContainer (std::shared_ptr< const Alphabet > alpha) | |
Build a new empty PolymorphismSequenceContainer. More... | |
PolymorphismSequenceContainer (size_t size, std::shared_ptr< const Alphabet > alpha) | |
Build a new empty PolymorphismSequenceContainer of given size. More... | |
PolymorphismSequenceContainer (const std::vector< std::string > &names, std::shared_ptr< const Alphabet > alpha) | |
Build a new empty PolymorphismSequenceContainer with given sequence names. More... | |
PolymorphismSequenceContainer (const SequenceContainerInterface &sc) | |
Build a PolymorphismSequenceContainer by copying data from a SequenceContainer. More... | |
PolymorphismSequenceContainer (const SequenceContainerInterface &sc, bool count) | |
Build a PolymorphismSequenceContainer by copying data from a SequenceContainer. More... | |
PolymorphismSequenceContainer (const PolymorphismSequenceContainer &psc) | |
Copy constructor. More... | |
PolymorphismSequenceContainer & | operator= (const PolymorphismSequenceContainer &psc) |
Operator= : copy operator. More... | |
virtual | ~PolymorphismSequenceContainer () |
Destroy a PolymorphismSequenceContainer. More... | |
PolymorphismSequenceContainer * | clone () const override |
Clone a PolymorphismSequenceContainer. More... | |
std::unique_ptr< Sequence > | removeSequence (size_t sequencePosition) override |
std::unique_ptr< Sequence > | removeSequence (const std::string &sequenceKey) override |
void | deleteSequence (size_t sequencePosition) override |
void | deleteSequence (const std::string &sequenceKey) override |
void | addSequenceWithFrequency (const std::string &sequenceKey, std::unique_ptr< Sequence > &sequence, unsigned int frequency) |
Add a sequence to the container. More... | |
void | insertSequenceWithFrequency (size_t sequencePosition, std::unique_ptr< Sequence > &sequence, const std::string &sequenceKey, unsigned int frequency) |
void | addSequence (const std::string &sequenceKey, std::unique_ptr< Sequence > &sequence) override |
void | insertSequence (size_t sequencePosition, std::unique_ptr< Sequence > &sequence, const std::string &sequenceKey) override |
void | clear () override |
Clear the container of all its sequences. More... | |
size_t | getGroupId (size_t index) const |
Get the group identifier of the sequence. More... | |
size_t | getGroupId (const std::string &name) const |
Get the group identifier of a sequence. More... | |
std::set< size_t > | getAllGroupsIds () const |
Get all the groups identifiers. More... | |
void | setGroupId (size_t index, size_t group_id) |
Set the group identifier of a sequence. More... | |
void | setGroupId (const std::string &name, size_t group_id) |
Set the group identifier of a sequence. More... | |
size_t | getNumberOfGroups () const |
Get the number of groups. More... | |
bool | hasOutgroup () const |
bool | isIngroupMember (size_t index) const |
Tell if the sequence is ingroup by index. More... | |
bool | isIngroupMember (const std::string &name) const |
Tell if a sequence is ingroup by name. More... | |
void | setAsIngroupMember (size_t index) |
Set a sequence as ingroup member by index. More... | |
void | setAsIngroupMember (const std::string &name) |
Set a sequence as ingroup member by name. More... | |
void | setAsOutgroupMember (size_t index) |
Set a sequence as outgroup member by index. More... | |
void | setAsOutgroupMember (const std::string &name) |
Set a sequence as outgroup member by name. More... | |
void | setSequenceCount (size_t index, unsigned int count) |
Set the count of a sequence by index. More... | |
void | setSequenceCount (const std::string &name, unsigned int count) |
Set the count of a sequence by name. More... | |
void | incrementSequenceCount (size_t index) |
Add 1 to the sequence count. More... | |
void | incrementSequenceCount (const std::string &name) |
Add 1 to the sequence count. More... | |
void | decrementSequenceCount (size_t index) |
Removz 1 to the sequence count. More... | |
void | decrementSequenceCount (const std::string &name) |
Remove 1 to the sequence count. More... | |
unsigned int | getSequenceCount (size_t index) const |
Get the count of a sequence by index. More... | |
unsigned int | getSequenceCount (const std::string &name) const |
Get the count of a sequence by name. More... | |
std::unique_ptr< SiteContainerInterface > | toSiteContainer () const |
convert the container to a site container, with sequences dulicated according to their respective frequencies. More... | |
const Alphabet & | alphabet () const override |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
virtual const Comments & | getComments () const=0 |
const Comments & | getComments () const override |
virtual void | setComments (const Comments &comments)=0 |
void | setComments (const Comments &comments) override |
virtual void | clearComments ()=0 |
void | clearComments () override |
const SiteType & | site (size_t sitePosition) const override |
const SiteType & | site (size_t sitePosition) const override |
void | setSite (size_t sitePosition, std::unique_ptr< SiteType > &site, bool checkCoordinate=true) override |
void | setSite (size_t sitePosition, std::unique_ptr< SiteType > &site, bool checkCoordinate=true) override |
std::unique_ptr< SiteType > | removeSite (size_t sitePosition) override |
std::unique_ptr< SiteType > | removeSite (size_t sitePosition) override |
void | deleteSite (size_t sitePosition) override |
void | deleteSite (size_t sitePosition) override |
void | addSite (std::unique_ptr< SiteType > &site, bool checkCoordinate=true) override |
void | addSite (std::unique_ptr< SiteType > &site, size_t sitePosition, bool checkCoordinate=true) override |
void | addSite (std::unique_ptr< SiteType > &site, bool checkCoordinate=true) override |
void | addSite (std::unique_ptr< SiteType > &site, size_t sitePosition, bool checkCoordinate=true) override |
void | deleteSites (size_t sitePosition, size_t length) override |
void | deleteSites (size_t sitePosition, size_t length) override |
size_t | getNumberOfSites () const override |
size_t | getNumberOfSites () const override |
void | reindexSites () override |
void | reindexSites () override |
Vint | getSiteCoordinates () const override |
Vint | getSiteCoordinates () const override |
void | setSiteCoordinates (const Vint &vCoordinates) override |
void | setSiteCoordinates (const Vint &vCoordinates) override |
bool | hasSequence (const std::string &sequenceKey) const override |
bool | hasSequence (const std::string &sequenceKey) const override |
size_t | getSequencePosition (const std::string &sequenceKey) const override |
size_t | getSequencePosition (const std::string &sequenceKey) const override |
const SequenceType & | sequence (const std::string &sequenceKey) const override |
const SequenceType & | sequence (size_t sequencePosition) const override |
const SequenceType & | sequence (const std::string &sequenceKey) const override |
const SequenceType & | sequence (size_t sequencePosition) const override |
size_t | getNumberOfSequences () const override |
size_t | getNumberOfSequences () const override |
std::vector< std::string > | getSequenceKeys () const override |
std::vector< std::string > | getSequenceKeys () const override |
void | setSequenceKeys (const std::vector< std::string > &sequenceKeys) override |
void | setSequenceKeys (const std::vector< std::string > &sequenceKeys) override |
const std::string & | sequenceKey (size_t sequencePosition) const override |
const std::string & | sequenceKey (size_t sequencePosition) const override |
std::vector< std::string > | getSequenceNames () const override |
std::vector< std::string > | getSequenceNames () const override |
void | setSequenceNames (const std::vector< std::string > &names, bool updateKeys) override |
void | setSequenceNames (const std::vector< std::string > &names, bool updateKeys) override |
std::vector< Comments > | getSequenceComments () const override |
std::vector< Comments > | getSequenceComments () const override |
TemplateVectorSiteContainer< SiteType, SequenceType > * | createEmptyContainer () const override |
TemplateVectorSiteContainer< SiteType, SequenceType > * | createEmptyContainer () const override |
const SequenceType::ElementType & | valueAt (const std::string &sequenceKey, size_t sitePosition) const override |
SequenceType::ElementType & | valueAt (const std::string &sequenceKey, size_t sitePosition) override |
const SequenceType::ElementType & | valueAt (size_t sequencePosition, size_t sitePosition) const override |
SequenceType::ElementType & | valueAt (size_t sequencePosition, size_t sitePosition) override |
const SequenceType::ElementType & | valueAt (const std::string &sequenceKey, size_t sitePosition) const override |
SequenceType::ElementType & | valueAt (const std::string &sequenceKey, size_t sitePosition) override |
const SequenceType::ElementType & | valueAt (size_t sequencePosition, size_t sitePosition) const override |
SequenceType::ElementType & | valueAt (size_t sequencePosition, size_t sitePosition) override |
double | getStateValueAt (size_t sitePosition, const std::string &sequenceKey, int state) const override |
double | getStateValueAt (size_t sitePosition, size_t sequencePosition, int state) const override |
double | getStateValueAt (size_t sitePosition, const std::string &sequenceKey, int state) const override |
double | getStateValueAt (size_t sitePosition, size_t sequencePosition, int state) const override |
double | operator() (size_t sitePosition, const std::string &sequenceKey, int state) const override |
double | operator() (size_t sitePosition, size_t sequencePosition, int state) const override |
double | operator() (size_t sitePosition, const std::string &sequenceKey, int state) const override |
double | operator() (size_t sitePosition, size_t sequencePosition, int state) const override |
void | setSequence (const std::string &sequenceKey, std::unique_ptr< SequenceType > &sequence) override |
void | setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequence) override |
void | setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequence, const std::string &sequenceKey) override |
void | setSequence (const std::string &sequenceKey, std::unique_ptr< SequenceType > &sequence) override |
void | setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequence) override |
void | setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequence, const std::string &sequenceKey) override |
void | addSequence (const std::string &sequenceKey, std::unique_ptr< SequenceType > &sequence) override |
void | insertSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequence, const std::string &sequenceKey) override |
Protected Member Functions | |
SiteType & | site_ (size_t sitePosition) |
void | realloc_ (size_t n) |
Protected Attributes | |
VectorPositionedContainer< SiteType > | siteContainer_ |
VectorMappedContainer< SequenceType > | sequenceContainer_ |
std::vector< std::string > | sequenceNames_ |
std::vector< Comments > | sequenceComments_ |
std::shared_ptr< const Alphabet > | alphabet_ |
Comments | comments_ |
Private Attributes | |
std::vector< bool > | ingroup_ |
std::vector< unsigned int > | count_ |
std::vector< size_t > | group_ |
The PolymorphismSequenceContainer class.
This is a VectorSiteContainer with effectif for each sequence. It also has flag for ingroup and outgroup.
Definition at line 66 of file PolymorphismSequenceContainer.h.
|
inline |
Build a new empty PolymorphismSequenceContainer.
Definition at line 79 of file PolymorphismSequenceContainer.h.
Referenced by clone().
|
inline |
Build a new empty PolymorphismSequenceContainer of given size.
Definition at line 89 of file PolymorphismSequenceContainer.h.
|
inline |
Build a new empty PolymorphismSequenceContainer with given sequence names.
Definition at line 99 of file PolymorphismSequenceContainer.h.
|
inline |
Build a PolymorphismSequenceContainer by copying data from a SequenceContainer.
sc | Sequence container to convert. |
Definition at line 111 of file PolymorphismSequenceContainer.h.
PolymorphismSequenceContainer::PolymorphismSequenceContainer | ( | const SequenceContainerInterface & | sc, |
bool | count | ||
) |
Build a PolymorphismSequenceContainer by copying data from a SequenceContainer.
sc | Sequence container to convert. |
count | Tell if identical sequences should be collapsed and counted. If not (the historical behavior), sequences are duplicated and stored with a frequency of 1. |
Definition at line 14 of file PolymorphismSequenceContainer.cpp.
References addSequenceWithFrequency(), bpp::SequenceTools::areSequencesIdentical(), bpp::Sequence::clone(), bpp::TemplateSequenceContainerInterface< class, class >::getNumberOfSequences(), bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), group_, incrementSequenceCount(), ingroup_, bpp::TemplateSequenceContainerInterface< class, class >::sequence(), and bpp::TemplateVectorSiteContainer< class, class >::sequence().
PolymorphismSequenceContainer::PolymorphismSequenceContainer | ( | const PolymorphismSequenceContainer & | psc | ) |
Copy constructor.
Definition at line 51 of file PolymorphismSequenceContainer.cpp.
References count_, getGroupId(), bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), getSequenceCount(), group_, ingroup_, and isIngroupMember().
|
virtual |
Destroy a PolymorphismSequenceContainer.
Class destructor:
Definition at line 88 of file PolymorphismSequenceContainer.cpp.
References clear().
|
inlineoverride |
Definition at line 193 of file PolymorphismSequenceContainer.h.
References addSequenceWithFrequency(), bpp::TemplateVectorSiteContainer< class, class >::sequence(), and bpp::TemplateVectorSiteContainer< class, class >::sequenceKey().
Referenced by bpp::SequenceStatistics::mkTable().
|
inline |
Add a sequence to the container.
AlphabetMismatchException | if the sequence's alphabet doesn't match the container's alphabet. |
SequenceException | if the sequence's size doesn't match the sequence's size of the container. |
SequenceException | if the sequence's name already exists in the container. |
Definition at line 169 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::addSequence(), count_, group_, ingroup_, bpp::TemplateVectorSiteContainer< class, class >::sequence(), and bpp::TemplateVectorSiteContainer< class, class >::sequenceKey().
Referenced by addSequence(), and PolymorphismSequenceContainer().
|
inlineoverridevirtual |
Clear the container of all its sequences.
Reimplemented from bpp::TemplateVectorSiteContainer< class, class >.
Definition at line 208 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::clear(), count_, group_, and ingroup_.
Referenced by ~PolymorphismSequenceContainer().
|
inlineoverridevirtual |
Clone a PolymorphismSequenceContainer.
Reimplemented from bpp::TemplateVectorSiteContainer< class, class >.
Definition at line 147 of file PolymorphismSequenceContainer.h.
References PolymorphismSequenceContainer().
void PolymorphismSequenceContainer::decrementSequenceCount | ( | const std::string & | name | ) |
Remove 1 to the sequence count.
SequenceNotFoundException | if name is not found among the sequences' names. |
BadIntegerException | if count < 1 ... use deleteSequence instead of setting the count to 0. |
Definition at line 286 of file PolymorphismSequenceContainer.cpp.
References decrementSequenceCount(), and bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition().
void PolymorphismSequenceContainer::decrementSequenceCount | ( | size_t | index | ) |
Removz 1 to the sequence count.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
BadIntegerException | if count < 1 ... use deleteSequence instead of setting the count to 0. |
Definition at line 275 of file PolymorphismSequenceContainer.cpp.
References count_, and bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences().
Referenced by decrementSequenceCount().
|
overridevirtual |
Reimplemented from bpp::TemplateVectorSiteContainer< class, class >.
Definition at line 137 of file PolymorphismSequenceContainer.cpp.
References removeSequence().
|
overridevirtual |
Reimplemented from bpp::TemplateVectorSiteContainer< class, class >.
Definition at line 123 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), and removeSequence().
std::set< size_t > PolymorphismSequenceContainer::getAllGroupsIds | ( | ) | const |
Get all the groups identifiers.
Definition at line 151 of file PolymorphismSequenceContainer.cpp.
References group_.
Referenced by bpp::DataSetTools::buildDataSet(), and getNumberOfGroups().
|
inline |
Get the group identifier of a sequence.
SequenceNotFoundException | if name is not found among the sequences' names. |
Definition at line 233 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and group_.
|
inline |
Get the group identifier of the sequence.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
Definition at line 221 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), and group_.
Referenced by bpp::DataSetTools::buildDataSet(), bpp::PolymorphismSequenceContainerTools::extractGroup(), bpp::PolymorphismSequenceContainerTools::get3Prime(), bpp::PolymorphismSequenceContainerTools::get5Prime(), bpp::PolymorphismSequenceContainerTools::getCompleteSites(), bpp::PolymorphismSequenceContainerTools::getIntrons(), bpp::PolymorphismSequenceContainerTools::getNonCodingSites(), bpp::PolymorphismSequenceContainerTools::getNonSynonymousSites(), bpp::PolymorphismSequenceContainerTools::getOnePosition(), bpp::PolymorphismSequenceContainerTools::getSelectedSequences(), bpp::PolymorphismSequenceContainerTools::getSelectedSites(), bpp::PolymorphismSequenceContainerTools::getSitesWithoutGaps(), bpp::PolymorphismSequenceContainerTools::getSynonymousSites(), operator=(), and PolymorphismSequenceContainer().
|
inline |
Get the number of groups.
Definition at line 283 of file PolymorphismSequenceContainer.h.
References getAllGroupsIds().
unsigned int PolymorphismSequenceContainer::getSequenceCount | ( | const std::string & | name | ) | const |
Get the count of a sequence by name.
SequenceNotFoundException | if name is not found among the sequences' names. |
Definition at line 313 of file PolymorphismSequenceContainer.cpp.
References getSequenceCount(), and bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition().
unsigned int PolymorphismSequenceContainer::getSequenceCount | ( | size_t | index | ) | const |
Get the count of a sequence by index.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
Definition at line 304 of file PolymorphismSequenceContainer.cpp.
References count_, and bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences().
Referenced by bpp::DataSetTools::buildDataSet(), bpp::PolymorphismSequenceContainerTools::getCompleteSites(), bpp::PolymorphismSequenceContainerTools::getNonSynonymousSites(), bpp::PolymorphismSequenceContainerTools::getSelectedSequences(), getSequenceCount(), bpp::PolymorphismSequenceContainerTools::getSitesWithoutGaps(), bpp::PolymorphismSequenceContainerTools::getSynonymousSites(), operator=(), PolymorphismSequenceContainer(), and toSiteContainer().
bool PolymorphismSequenceContainer::hasOutgroup | ( | ) | const |
Definition at line 163 of file PolymorphismSequenceContainer.cpp.
References ingroup_.
void PolymorphismSequenceContainer::incrementSequenceCount | ( | const std::string & | name | ) |
Add 1 to the sequence count.
SequenceNotFoundException | if name is not found among the sequences' names. |
Definition at line 261 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and incrementSequenceCount().
void PolymorphismSequenceContainer::incrementSequenceCount | ( | size_t | index | ) |
Add 1 to the sequence count.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
Definition at line 252 of file PolymorphismSequenceContainer.cpp.
References count_, and bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences().
Referenced by incrementSequenceCount(), and PolymorphismSequenceContainer().
|
inlineoverride |
Definition at line 200 of file PolymorphismSequenceContainer.h.
References insertSequenceWithFrequency(), bpp::TemplateVectorSiteContainer< class, class >::sequence(), and bpp::TemplateVectorSiteContainer< class, class >::sequenceKey().
|
inline |
Definition at line 181 of file PolymorphismSequenceContainer.h.
References count_, group_, ingroup_, bpp::TemplateVectorSiteContainer< class, class >::insertSequence(), bpp::TemplateVectorSiteContainer< class, class >::sequence(), and bpp::TemplateVectorSiteContainer< class, class >::sequenceKey().
Referenced by insertSequence().
|
inline |
Tell if a sequence is ingroup by name.
SequenceNotFoundException | if name is not found among the sequences' names. |
Definition at line 310 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and ingroup_.
|
inline |
Tell if the sequence is ingroup by index.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
Definition at line 298 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), and ingroup_.
Referenced by bpp::PolymorphismSequenceContainerTools::extractIngroup(), bpp::PolymorphismSequenceContainerTools::extractOutgroup(), bpp::PolymorphismSequenceContainerTools::get3Prime(), bpp::PolymorphismSequenceContainerTools::get5Prime(), bpp::PolymorphismSequenceContainerTools::getCompleteSites(), bpp::PolymorphismSequenceContainerTools::getIntrons(), bpp::PolymorphismSequenceContainerTools::getNonCodingSites(), bpp::PolymorphismSequenceContainerTools::getNonSynonymousSites(), bpp::PolymorphismSequenceContainerTools::getOnePosition(), bpp::PolymorphismSequenceContainerTools::getSelectedSequences(), bpp::PolymorphismSequenceContainerTools::getSelectedSites(), bpp::PolymorphismSequenceContainerTools::getSitesWithoutGaps(), bpp::PolymorphismSequenceContainerTools::getSynonymousSites(), operator=(), and PolymorphismSequenceContainer().
PolymorphismSequenceContainer & PolymorphismSequenceContainer::operator= | ( | const PolymorphismSequenceContainer & | psc | ) |
Operator= : copy operator.
Definition at line 67 of file PolymorphismSequenceContainer.cpp.
References count_, getGroupId(), bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), getSequenceCount(), group_, ingroup_, isIngroupMember(), and bpp::TemplateVectorSiteContainer< class, class >::operator=().
|
overridevirtual |
Reimplemented from bpp::TemplateVectorSiteContainer< class, class >.
Definition at line 109 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and removeSequence().
|
overridevirtual |
Other methods:
Reimplemented from bpp::TemplateVectorSiteContainer< class, class >.
Definition at line 97 of file PolymorphismSequenceContainer.cpp.
References count_, bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), group_, ingroup_, and bpp::TemplateVectorSiteContainer< class, class >::removeSequence().
Referenced by deleteSequence(), and removeSequence().
void PolymorphismSequenceContainer::setAsIngroupMember | ( | const std::string & | name | ) |
Set a sequence as ingroup member by name.
SequenceNotFoundException | if name is not found among the sequences' names. |
Definition at line 184 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and ingroup_.
void PolymorphismSequenceContainer::setAsIngroupMember | ( | size_t | index | ) |
Set a sequence as ingroup member by index.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
Definition at line 175 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), and ingroup_.
void PolymorphismSequenceContainer::setAsOutgroupMember | ( | const std::string & | name | ) |
Set a sequence as outgroup member by name.
SequenceNotFoundException | if name is not found among the sequences' names. |
Definition at line 208 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and ingroup_.
void PolymorphismSequenceContainer::setAsOutgroupMember | ( | size_t | index | ) |
Set a sequence as outgroup member by index.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
Definition at line 199 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), and ingroup_.
Referenced by bpp::SequenceStatistics::mkTable().
|
inline |
Set the group identifier of a sequence.
SequenceNotFoundException | if name is not found among the sequences' names. |
Definition at line 268 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and group_.
|
inline |
Set the group identifier of a sequence.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
Definition at line 256 of file PolymorphismSequenceContainer.h.
References bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), and group_.
void PolymorphismSequenceContainer::setSequenceCount | ( | const std::string & | name, |
unsigned int | count | ||
) |
Set the count of a sequence by name.
throw | SequenceNotFoundException if name is not found among the sequences' names. |
BadIntegerException | if count < 1 ... use deleteSequence instead of setting the count to 0. |
Definition at line 234 of file PolymorphismSequenceContainer.cpp.
References count(), bpp::TemplateVectorSiteContainer< class, class >::getSequencePosition(), and setSequenceCount().
void PolymorphismSequenceContainer::setSequenceCount | ( | size_t | index, |
unsigned int | count | ||
) |
Set the count of a sequence by index.
IndexOutOfBoundsException | if index exceeds the number of sequences in the container. |
BadIntegerException | if count < 1 ... use deleteSequence instead of setting the count to 0. |
Definition at line 223 of file PolymorphismSequenceContainer.cpp.
References count(), count_, and bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences().
Referenced by setSequenceCount().
unique_ptr< SiteContainerInterface > PolymorphismSequenceContainer::toSiteContainer | ( | ) | const |
convert the container to a site container, with sequences dulicated according to their respective frequencies.
Definition at line 327 of file PolymorphismSequenceContainer.cpp.
References bpp::TemplateVectorSiteContainer< class, class >::getAlphabet(), bpp::TemplateVectorSiteContainer< class, class >::getNumberOfSequences(), getSequenceCount(), bpp::TemplateVectorSiteContainer< class, class >::getSiteCoordinates(), bpp::TemplateVectorSiteContainer< class, class >::sequence(), and bpp::TextTools::toString().
|
private |
Definition at line 71 of file PolymorphismSequenceContainer.h.
Referenced by addSequenceWithFrequency(), clear(), decrementSequenceCount(), getSequenceCount(), incrementSequenceCount(), insertSequenceWithFrequency(), operator=(), PolymorphismSequenceContainer(), removeSequence(), and setSequenceCount().
|
private |
Definition at line 72 of file PolymorphismSequenceContainer.h.
Referenced by addSequenceWithFrequency(), clear(), getAllGroupsIds(), getGroupId(), insertSequenceWithFrequency(), operator=(), PolymorphismSequenceContainer(), removeSequence(), and setGroupId().
|
private |
Definition at line 70 of file PolymorphismSequenceContainer.h.
Referenced by addSequenceWithFrequency(), clear(), hasOutgroup(), insertSequenceWithFrequency(), isIngroupMember(), operator=(), PolymorphismSequenceContainer(), removeSequence(), setAsIngroupMember(), and setAsOutgroupMember().