bpp-phyl3
3.0.0
|
Utilitary methods to compute site patterns. More...
#include <Bpp/Phyl/PatternTools.h>
Static Public Member Functions | |
template<class N , class E , class I > | |
static std::unique_ptr< AlignmentDataInterface > | getSequenceSubset (const AlignmentDataInterface &sequenceSet, const std::shared_ptr< N > node, const AssociationTreeGraphImplObserver< N, E, I > &tree) |
Extract the sequences corresponding to a given subtree. More... | |
template<class N , class E , class I > | |
static std::unique_ptr< SiteContainerInterface > | getSequenceSubset (const SiteContainerInterface &sequenceSet, const std::shared_ptr< N > node, const AssociationTreeGraphImplObserver< N, E, I > &tree) |
Extract the sequences corresponding to a given subtree. More... | |
template<class N , class E , class I > | |
static std::unique_ptr< ProbabilisticSiteContainerInterface > | getSequenceSubset (const ProbabilisticSiteContainerInterface &sequenceSet, const std::shared_ptr< N > node, const AssociationTreeGraphImplObserver< N, E, I > &tree) |
Extract the sequences corresponding to a given subtree. More... | |
static std::unique_ptr< AlignmentDataInterface > | getSequenceSubset (const AlignmentDataInterface &sequenceSet, const Node &node) |
Extract the sequences corresponding to a given subtree. More... | |
static std::unique_ptr< SiteContainerInterface > | getSequenceSubset (const SiteContainerInterface &sequenceSet, const Node &node) |
Extract the sequences corresponding to a given subtree. More... | |
static std::unique_ptr< ProbabilisticSiteContainerInterface > | getSequenceSubset (const ProbabilisticSiteContainerInterface &sequenceSet, const Node &node) |
Extract the sequences corresponding to a given subtree. More... | |
static std::unique_ptr< AlignmentDataInterface > | getSequenceSubset (const AlignmentDataInterface &sequenceSet, const std::vector< std::string > &names) |
Extract the sequences corresponding to a given set of names. More... | |
static std::unique_ptr< SiteContainerInterface > | getSequenceSubset (const SiteContainerInterface &sequenceSet, const std::vector< std::string > &names) |
Extract the sequences in a SiteContainer corresponding to a given set of names. More... | |
static std::unique_ptr< ProbabilisticSiteContainerInterface > | getSequenceSubset (const ProbabilisticSiteContainerInterface &sequenceSet, const std::vector< std::string > &names) |
Extract the sequences in a ProbabilisticSiteContainer corresponding to a given set of names. More... | |
static std::unique_ptr< AlignmentDataInterface > | shrinkSiteSet (const AlignmentDataInterface &siteSet) |
Compress a site container by removing duplicated sites. More... | |
static std::unique_ptr< SiteContainerInterface > | shrinkSiteSet (const SiteContainerInterface &siteSet) |
Compress a site container by removing duplicated sites. More... | |
static std::unique_ptr< ProbabilisticSiteContainerInterface > | shrinkSiteSet (const ProbabilisticSiteContainerInterface &siteSet) |
Compress a site container by removing duplicated sites. More... | |
static Vint | getIndexes (const AlignmentDataInterface &sequences1, const AlignmentDataInterface &sequences2) |
Look for the occurrence of each site in sequences1 in sequences2 and send the position of the first occurrence, or -1 if not found. More... | |
Utilitary methods to compute site patterns.
These methods are mainly designed to save computation in likelihood and parsimony methods.
Definition at line 31 of file PatternTools.h.
|
static |
Look for the occurrence of each site in sequences1 in sequences2 and send the position of the first occurrence, or -1 if not found.
sequences1 | First container. |
sequences2 | Second container. |
Definition at line 263 of file PatternTools.cpp.
References bpp::SiteTools::areSymbolListsIdentical(), and bpp::TemplateAlignmentDataInterface< class >::getNumberOfSites().
|
static |
Extract the sequences corresponding to a given subtree.
sequenceSet | The container to look in. |
node | The root node of the subtree to check. |
Exception | if an error occurred. |
Definition at line 20 of file PatternTools.cpp.
|
inlinestatic |
Extract the sequences corresponding to a given subtree.
sequenceSet | The container to look in. |
node | The root node of the subtree to check. |
tree | The tree owing the node. |
Exception | if an error occurred. |
Definition at line 44 of file PatternTools.h.
Referenced by bpp::AbstractTreeParsimonyScore::init_(), bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns(), bpp::DRNonHomogeneousTreeLikelihood::setData(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::RNonHomogeneousTreeLikelihood::setData(), and bpp::DRHomogeneousTreeLikelihood::setData().
|
static |
Extract the sequences corresponding to a given set of names.
sequenceSet | The container to look in. |
names | The names of the sequences to look for. |
Exception | if an error occurred. |
Definition at line 115 of file PatternTools.cpp.
References bpp::TemplateAlignmentDataInterface< class >::getAlphabet().
|
static |
Extract the sequences corresponding to a given subtree.
sequenceSet | The container to look in. |
node | The root node of the subtree to check. |
Exception | if an error occurred. |
Definition at line 78 of file PatternTools.cpp.
References bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::ApplicationTools::displayWarning(), bpp::TemplateSiteContainerInterface< class, class, class >::getAlphabet(), bpp::TreeTemplateTools::getLeaves(), bpp::TemplateSiteContainerInterface< class, class, class >::getNumberOfSites(), bpp::TemplateSiteContainerInterface< class, class, class >::getSiteCoordinates(), and bpp::TemplateSiteContainerInterface< class, class, class >::sequence().
|
inlinestatic |
Extract the sequences corresponding to a given subtree.
sequenceSet | The container to look in. |
node | The root node of the subtree to check. |
tree | The tree owing the node. |
Exception | if an error occurred. |
Definition at line 122 of file PatternTools.h.
References bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::ApplicationTools::displayWarning(), bpp::TemplateSiteContainerInterface< class, class, class >::getAlphabet(), bpp::AssociationTreeGraphImplObserver< class, class, class >::getLeavesUnderNode(), bpp::TemplateSiteContainerInterface< class, class, class >::getNumberOfSites(), bpp::TemplateSiteContainerInterface< class, class, class >::getSiteCoordinates(), and bpp::TemplateSiteContainerInterface< class, class, class >::sequence().
|
static |
Extract the sequences in a ProbabilisticSiteContainer corresponding to a given set of names.
sequenceSet | The container to look in. |
names | The names of the sequences to look for. |
Exception | if an error occurred. |
Definition at line 162 of file PatternTools.cpp.
References bpp::TemplateSiteContainerInterface< class, class, class >::getAlphabet(), bpp::TemplateSiteContainerInterface< class, class, class >::getSiteCoordinates(), bpp::TemplateSiteContainerInterface< class, class, class >::hasSequence(), and bpp::TemplateSiteContainerInterface< class, class, class >::sequence().
|
static |
Extract the sequences corresponding to a given subtree.
sequenceSet | The container to look in. |
node | The root node of the subtree to check. |
Exception | if an error occurred. |
Definition at line 43 of file PatternTools.cpp.
References bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::ApplicationTools::displayWarning(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getAlphabet(), bpp::TreeTemplateTools::getLeaves(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getNumberOfSites(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getSiteCoordinates(), and TemplateSiteContainerInterface< Site, Sequence, std::string >::sequence().
|
inlinestatic |
Extract the sequences corresponding to a given subtree.
sequenceSet | The container to look in. |
node | The root node of the subtree to check. |
tree | The tree owing the node. |
Exception | if an error occurred. |
Definition at line 76 of file PatternTools.h.
References bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::ApplicationTools::displayWarning(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getAlphabet(), bpp::AssociationTreeGraphImplObserver< class, class, class >::getLeavesUnderNode(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getNumberOfSites(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getSiteCoordinates(), and TemplateSiteContainerInterface< Site, Sequence, std::string >::sequence().
|
static |
Extract the sequences in a SiteContainer corresponding to a given set of names.
sequenceSet | The container to look in. |
names | The names of the sequences to look for. |
Exception | if an error occurred. |
Definition at line 141 of file PatternTools.cpp.
References TemplateSiteContainerInterface< Site, Sequence, std::string >::getAlphabet(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getSiteCoordinates(), TemplateSiteContainerInterface< Site, Sequence, std::string >::hasSequence(), and TemplateSiteContainerInterface< Site, Sequence, std::string >::sequence().
|
static |
Compress a site container by removing duplicated sites.
siteSet | The container to look in. |
Exception | if an error occurred. |
Definition at line 185 of file PatternTools.cpp.
|
static |
Compress a site container by removing duplicated sites.
siteSet | The container to look in. |
Exception | if an error occurred. |
Definition at line 234 of file PatternTools.cpp.
References bpp::SiteTools::areSymbolListsIdentical(), bpp::TemplateSiteContainerInterface< class, class, class >::getAlphabet(), bpp::TemplateSiteContainerInterface< class, class, class >::getNumberOfSites(), bpp::TemplateSiteContainerInterface< class, class, class >::getSequenceNames(), and bpp::TemplateSiteContainerInterface< class, class, class >::site().
|
static |
Compress a site container by removing duplicated sites.
siteSet | The container to look in. |
Exception | if an error occurred. |
Definition at line 207 of file PatternTools.cpp.
References bpp::SiteTools::areSymbolListsIdentical(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getAlphabet(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getNumberOfSites(), TemplateSiteContainerInterface< Site, Sequence, std::string >::getSequenceNames(), and TemplateSiteContainerInterface< Site, Sequence, std::string >::site().