40 #ifndef _MARGINALANCESTRALSTATESRECONSTRUCTION_H_ 41 #define _MARGINALANCESTRALSTATESRECONSTRUCTION_H_ 43 #include "../AncestralStateReconstruction.h" 47 #include <Bpp/Seq/Alphabet/Alphabet.h> 48 #include <Bpp/Seq/Container/AlignedSequenceContainer.h> 49 #include <Bpp/Seq/Sequence.h> 75 std::vector<double>
r_;
76 std::vector<double>
l_;
81 tree_ (drl->getTree()),
83 nbSites_ (drl->getLikelihoodData()->getNumberOfSites()),
85 nbClasses_ (drl->getLikelihoodData()->getNumberOfClasses()),
86 nbStates_ (drl->getLikelihoodData()->getNumberOfStates()),
88 r_ (drl->getRateDistribution()->getProbabilities()),
89 l_ (drl->getLikelihoodData()->getRootRateSiteLikelihoodArray())
121 #ifndef NO_VIRTUAL_COV 180 #ifndef NO_VIRTUAL_COV 181 AlignedSequenceContainer *
190 std::map<
int, std::vector<size_t> >& ancestors,
191 AlignedSequenceContainer& data)
const;
198 #endif // _MARGINALANCESTRALSTATESRECONSTRUCTION_H_ Likelihood ancestral states reconstruction: marginal method.
std::vector< size_t > getAncestralStatesForNode(int nodeId) const
Get ancestral states for a given node as a vector of int.
Interface for ancestral states reconstruction methods.
std::map< int, std::vector< size_t > > getAllAncestralStates() const
Get all ancestral states for all nodes.
Sequence * getAncestralSequenceForNode(int nodeId) const
Get the ancestral sequence for a given node.
void recursiveMarginalAncestralStates(const Node *node, std::map< int, std::vector< size_t > > &ancestors, AlignedSequenceContainer &data) const
The phylogenetic tree class.
virtual ~MarginalAncestralStateReconstruction()
std::vector< size_t > rootPatternLinks_
AlignedSequenceContainer * getAncestralSequences() const
Get all the ancestral sequences for all nodes.
MarginalAncestralStateReconstruction(const DRTreeLikelihood *drl)
const DRTreeLikelihood * likelihood_
The phylogenetic node class.
MarginalAncestralStateReconstruction(const MarginalAncestralStateReconstruction &masr)
const Alphabet * alphabet_
Interface for double-recursive (DR) implementation of the likelihood computation. ...
MarginalAncestralStateReconstruction * clone() const
MarginalAncestralStateReconstruction & operator=(const MarginalAncestralStateReconstruction &masr)
Sequence * getAncestralSequenceForNode(int nodeId, VVdouble *probs, bool sample) const
Get the ancestral sequence for a given node.
TreeTemplate< Node > tree_
std::vector< size_t > getAncestralStatesForNode(int nodeId, VVdouble &probs, bool sample) const
Get ancestral states for a given node as a vector of int.