bpp-phyl
2.2.0
|
Utilitary methods to compute site patterns. More...
#include <Bpp/Phyl/PatternTools.h>
Static Public Member Functions | |
static SiteContainer * | getSequenceSubset (const SiteContainer &sequenceSet, const Node &node) throw (Exception) |
Extract the sequences corresponding to a given subtree. More... | |
static SiteContainer * | getSequenceSubset (const SiteContainer &sequenceSet, const std::vector< std::string > &names) throw (Exception) |
Extract the sequences corresponding to a given set of names. More... | |
static SiteContainer * | shrinkSiteSet (const SiteContainer &sequenceSet) throw (Exception) |
Compress a site container by removing duplicated sites. More... | |
static Vint | getIndexes (const SiteContainer &sequences1, const SiteContainer &sequences2) |
Look for the occurence of each site in sequences1 in sequences2 and send the position of the first occurence, or -1 if not found. More... | |
Utilitary methods to compute site patterns.
Theses methods are mainly designed to save computation in likelihood and parsimony methods.
Definition at line 63 of file PatternTools.h.
|
static |
Look for the occurence of each site in sequences1 in sequences2 and send the position of the first occurence, or -1 if not found.
sequences1 | First container. |
sequences2 | Second container. |
Definition at line 109 of file PatternTools.cpp.
|
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 occured. |
Definition at line 59 of file PatternTools.cpp.
References bpp::TreeTemplateTools::getLeaves().
Referenced by bpp::AbstractTreeParsimonyScore::init_(), bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns(), bpp::DRHomogeneousTreeLikelihood::setData(), bpp::DRNonHomogeneousTreeLikelihood::setData(), bpp::RHomogeneousTreeLikelihood::setData(), bpp::RNonHomogeneousTreeLikelihood::setData(), and bpp::TwoTreeLikelihood::TwoTreeLikelihood().
|
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 occured. |
Definition at line 74 of file PatternTools.cpp.
|
static |
Compress a site container by removing duplicated sites.
sequenceSet | The container to look in. |
Exception | if an error occured. |
Definition at line 88 of file PatternTools.cpp.