|
bpp-phyl3 3.0.0
|
Galtier's 2001 covarion model. More...
#include <Bpp/Phyl/Model/G2001.h>
Inheritance diagram for bpp::G2001:
Collaboration diagram for bpp::G2001:Public Member Functions | |
| G2001 (std::unique_ptr< ReversibleSubstitutionModelInterface > model, std::unique_ptr< DiscreteDistributionInterface > rDist, double nu=1., bool normalizeRateChanges=false) | |
| Build a new G2001 substitution model. More... | |
| G2001 (const G2001 &model) | |
| G2001 & | operator= (const G2001 &model) |
| virtual | ~G2001 () |
| G2001 * | clone () const override |
| std::string | getName () const override |
| Get the name of the model. More... | |
| void | fireParameterChanged (const ParameterList ¶meters) override |
| Re-definition of the super-class method to update the rate distribution too. More... | |
| const DiscreteDistributionInterface & | rateDistribution () const |
| void | setNamespace (const std::string &prefix) override |
| double | getRate () const override |
| Get the rate. More... | |
| void | setRate (double rate) override |
| Set the rate of the model (must be positive). More... | |
| void | addRateParameter () override |
| const Alphabet & | alphabet () const override |
| std::shared_ptr< const Alphabet > | getAlphabet () const override |
| size_t | getNumberOfStates () const override |
| Get the number of states. More... | |
| const StateMapInterface & | stateMap () const override |
| std::shared_ptr< const StateMapInterface > | getStateMap () const override |
| const std::vector< int > & | getAlphabetStates () const override |
| std::string | getAlphabetStateAsChar (size_t index) const override |
| int | getAlphabetStateAsInt (size_t index) const override |
| std::vector< size_t > | getModelStates (int code) const override |
| Get the state in the model corresponding to a particular state in the alphabet. More... | |
| std::vector< size_t > | getModelStates (const std::string &code) const override |
| Get the state in the model corresponding to a particular state in the alphabet. More... | |
| const Vdouble & | getFrequencies () const override |
| const Matrix< double > & | exchangeabilityMatrix () const override |
| const Matrix< double > & | generator () const override |
| const Matrix< double > & | getPij_t (double t) const override |
| const Matrix< double > & | getdPij_dt (double t) const override |
| const Matrix< double > & | getd2Pij_dt2 (double t) const override |
| const Vdouble & | getEigenValues () const override |
| const Vdouble & | getIEigenValues () const override |
| bool | isDiagonalizable () const override |
| bool | isNonSingular () const override |
| const Matrix< double > & | getRowLeftEigenVectors () const override |
| const Matrix< double > & | getColumnRightEigenVectors () const override |
| double | freq (size_t i) const override |
| double | Sij (size_t i, size_t j) const override |
| double | Qij (size_t i, size_t j) const override |
| A method for computing all necessary matrices. More... | |
| double | Pij_t (size_t i, size_t j, double t) const override |
| double | dPij_dt (size_t i, size_t j, double t) const override |
| double | d2Pij_dt2 (size_t i, size_t j, double t) const override |
| double | getInitValue (size_t i, int state) const override |
| void | setFreqFromData (const SequenceDataInterface &data, double pseudoCount=0) override |
| Set equilibrium frequencies equal to the frequencies estimated from the data. More... | |
| void | setFreq (std::map< int, double > &frequencies) override |
| Set equilibrium frequencies. More... | |
| const FrequencySetInterface & | frequencySet () const override |
| const ReversibleSubstitutionModelInterface & | nestedModel () const |
| size_t | getRate (size_t i) const |
| Get the rate category corresponding to a particular state in the compound model. More... | |
| bool | isScalable () const override |
| returns if model is scalable More... | |
| void | setScalable (bool scalable) override |
| sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalization for example. More... | |
| void | normalize () override |
| Normalize the generator. More... | |
| void | setDiagonal () override |
| set the diagonal of the generator such that sum on each line equals 0. More... | |
| double | getScale () const override |
| Get the scalar product of diagonal elements of the generator and the frequencies vector. If the generator is normalized, then scale=1. Otherwise each element must be multiplied by 1/scale. More... | |
| void | setScale (double scale) override |
| Multiplies the current generator by the given scale. More... | |
| void | enableEigenDecomposition (bool yn) override |
| Set if eigenValues and Vectors must be computed. More... | |
| bool | enableEigenDecomposition () override |
| Tell if eigenValues and Vectors must be computed. More... | |
| bool | computeFrequencies () const override |
| void | computeFrequencies (bool yn) override |
| Set if equilibrium frequencies should be computed. More... | |
| virtual const Eigen::VectorXd & | Lik_t (const Eigen::VectorXd &values, double t) const =0 |
| const Eigen::VectorXd & | Lik_t (const Eigen::VectorXd &values, double t) const override |
| virtual const Eigen::VectorXd & | dLik_dt (const Eigen::VectorXd &values, double t) const =0 |
| const Eigen::VectorXd & | dLik_dt (const Eigen::VectorXd &values, double t) const override |
| virtual const Eigen::VectorXd & | d2Lik_dt2 (const Eigen::VectorXd &values, double t) const =0 |
| const Eigen::VectorXd & | d2Lik_dt2 (const Eigen::VectorXd &values, double t) const override |
| virtual size_t | getNumberOfIndependentParameters () const=0 |
| size_t | getNumberOfIndependentParameters () const |
| virtual void | aliasParameters (const std::string &p1, const std::string &p2)=0 |
| virtual void | aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)=0 |
| void | aliasParameters (const std::string &p1, const std::string &p2) |
| void | aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose) |
| virtual void | unaliasParameters (const std::string &p1, const std::string &p2)=0 |
| void | unaliasParameters (const std::string &p1, const std::string &p2) |
| virtual const ParameterList & | getIndependentParameters () const=0 |
| const ParameterList & | getIndependentParameters () const |
| virtual std::vector< std::string > | getAlias (const std::string &name) const=0 |
| virtual std::vector< std::string > | getAlias (const std::string &name) const |
| virtual std::map< std::string, std::string > | getAliases () const=0 |
| virtual std::map< std::string, std::string > | getAliases () const |
| virtual bool | hasParameter (const std::string &name) const=0 |
| bool | hasParameter (const std::string &name) const override |
| virtual const ParameterList & | getParameters () const=0 |
| const ParameterList & | getParameters () const override |
| virtual const Parameter & | parameter (const std::string &name) const=0 |
| const Parameter & | parameter (const std::string &name) const override |
| virtual double | getParameterValue (const std::string &name) const=0 |
| double | getParameterValue (const std::string &name) const override |
| virtual void | setAllParametersValues (const ParameterList ¶meters)=0 |
| void | setAllParametersValues (const ParameterList ¶meters) override |
| virtual void | setParameterValue (const std::string &name, double value)=0 |
| void | setParameterValue (const std::string &name, double value) override |
| virtual void | setParametersValues (const ParameterList ¶meters)=0 |
| void | setParametersValues (const ParameterList ¶meters) override |
| virtual bool | matchParametersValues (const ParameterList ¶meters)=0 |
| bool | matchParametersValues (const ParameterList ¶meters) override |
| virtual void | removeConstraint (const std::string &name)=0 |
| void | removeConstraint (const std::string &name) override |
| virtual void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0 |
| void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override |
| virtual size_t | getNumberOfParameters () const=0 |
| size_t | getNumberOfParameters () const override |
| virtual std::string | getNamespace () const=0 |
| std::string | getNamespace () const override |
| virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const=0 |
| std::string | getParameterNameWithoutNamespace (const std::string &name) const override |
| bool | hasIndependentParameter (const std::string &name) const |
| ParameterList | getAliasedParameters (const ParameterList &pl) const |
| ParameterList | getFromParameters (const ParameterList &pl) const |
| std::string | getFrom (const std::string &name) const |
| const std::shared_ptr< Parameter > & | getParameter (const std::string &name) const |
Protected Member Functions | |
| void | updateRatesModel_ () override |
| Update the rates vector, generator and equilibrium frequencies. More... | |
| virtual void | updateMatrices_ () |
| Vdouble & | getFrequencies_ () override |
| virtual ParameterList & | getParameters_ ()=0 |
| ParameterList & | getParameters_ () override |
| const std::shared_ptr< Parameter > & | getParameter (size_t i) const |
| std::shared_ptr< Parameter > & | getParameter (size_t i) |
| void | addParameter_ (Parameter *parameter) |
| void | addParameters_ (const ParameterList ¶meters) |
| void | shareParameter_ (const std::shared_ptr< Parameter > ¶meter) |
| void | shareParameters_ (const ParameterList ¶meters) |
| void | includeParameters_ (const ParameterList ¶meters) |
| void | deleteParameter_ (size_t index) |
| void | deleteParameter_ (std::string &name) |
| void | deleteParameters_ (const std::vector< std::string > &names) |
| void | resetParameters_ () |
| Parameter & | getParameter_ (const std::string &name) |
| Parameter & | getParameter_ (size_t index) |
| const Parameter & | getParameter_ (size_t index) const |
| Parameter & | getParameterWithNamespace_ (const std::string &name) |
| const Parameter & | getParameterWithNamespace_ (const std::string &name) const |
Protected Attributes | |
| std::unique_ptr< ReversibleSubstitutionModelInterface > | model_ |
| std::shared_ptr< const MarkovModulatedStateMap > | stateMap_ |
| size_t | nbStates_ |
| size_t | nbRates_ |
| RowMatrix< double > | ratesGenerator_ |
| RowMatrix< double > | generator_ |
| The generator matrix | |
| RowMatrix< double > | exchangeability_ |
| The exchangeability matrix | |
| RowMatrix< double > | leftEigenVectors_ |
| The | |
| RowMatrix< double > | rightEigenVectors_ |
| The | |
| Vdouble | eigenValues_ |
| The vector of real parts of eigen values. More... | |
| Vdouble | iEigenValues_ |
| The vector of imaginary parts of the eigen values (zero in case of reversible pmodel). More... | |
| bool | eigenDecompose_ |
| Tell if the eigen decomposition should be performed. More... | |
| bool | compFreq_ |
| Tell if the equilibrium frequencies should be computed from the generator. More... | |
| RowMatrix< double > | pijt_ |
| These ones are for bookkeeping: More... | |
| RowMatrix< double > | dpijt_ |
| RowMatrix< double > | d2pijt_ |
| Vdouble | freq_ |
| The vector of equilibrium frequencies. More... | |
| bool | normalizeRateChanges_ |
| std::string | nestedPrefix_ |
Rate generator. | |
These variables must be initialized in the constructor of the derived class. | |
| RowMatrix< double > | rates_ |
| RowMatrix< double > | ratesExchangeability_ |
| Vdouble | ratesFreq_ |
Private Attributes | |
| std::unique_ptr< DiscreteDistributionInterface > | rDist_ |
| std::string | nestedRatePrefix_ |
| ParameterList | independentParameters_ |
| std::map< std::string, std::shared_ptr< AliasParameterListener > > | aliasListenersRegister_ |
| ParameterList | parameters_ |
| std::string | prefix_ |
| Eigen::VectorXd | lik_ |
Galtier's 2001 covarion model.
This model is a subclass of the so-called Markov-modulated substitution models, with an intra-model autocorrelation rate, of parameter
. The original version uses a discrete
distribution for rates, but you can use it with virtually any rate distribution.
Galtier N., Maximum-likelihood phylogenetic analysis under a covarion-like model (2001). Molecular Biology and Evolution, 18:866-73.
|
inline |
Build a new G2001 substitution model.
| model | The substitution model to use. May be of any alphabet type. |
| rDist | The discrete distribution for rates. The class will own the DiscreteDistribution object, which will be deleted together with this instance. |
| nu | The rate matrix parameter. |
| normalizeRateChanges | Tell if the rate transition matrix should be normalized. |
Definition at line 46 of file G2001.h.
References bpp::AbstractParameterAliasable::addParameter_(), bpp::AbstractParameterAliasable::addParameters_(), bpp::AbstractParameterAliasable::getNamespace(), bpp::MarkovModulatedSubstitutionModel::nbRates_, nestedRatePrefix_, bpp::Parameter::R_PLUS, bpp::MarkovModulatedSubstitutionModel::ratesFreq_, rDist_, bpp::MarkovModulatedSubstitutionModel::updateMatrices_(), and updateRatesModel_().
Referenced by clone().
|
inlineoverridevirtual |
Implements bpp::BranchModelInterface.
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Definition at line 177 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_.
|
inlineoverridevirtual |
Implements bpp::MarkovModulatedSubstitutionModel.
Definition at line 79 of file G2001.h.
References G2001().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 299 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::compFreq_.
|
inlineoverridevirtualinherited |
Set if equilibrium frequencies should be computed.
Implements bpp::TransitionModelInterface.
Definition at line 301 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::compFreq_.
|
pure virtualinherited |
Implements bpp::BranchModelInterface.
Implemented in bpp::AbstractLkTransitionModel.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 64 of file AbstractSubstitutionModel.h.
References bpp::TransitionModelInterface::getd2Pij_dt2(), and bpp::AbstractLkTransitionModel::lik_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 222 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::getd2Pij_dt2().
|
pure virtualinherited |
Implements bpp::BranchModelInterface.
Implemented in bpp::AbstractLkTransitionModel.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 47 of file AbstractSubstitutionModel.h.
References bpp::TransitionModelInterface::getdPij_dt(), and bpp::AbstractLkTransitionModel::lik_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 221 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::getdPij_dt().
|
inlineoverridevirtualinherited |
Tell if eigenValues and Vectors must be computed.
Implements bpp::SubstitutionModelInterface.
Definition at line 297 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::eigenDecompose_.
|
inlineoverridevirtualinherited |
Set if eigenValues and Vectors must be computed.
Implements bpp::SubstitutionModelInterface.
Definition at line 295 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::eigenDecompose_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 199 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::exchangeability_.
|
inlineoverridevirtual |
Re-definition of the super-class method to update the rate distribution too.
| parameters | The parameters that have been modified. |
Reimplemented from bpp::MarkovModulatedSubstitutionModel.
Definition at line 89 of file G2001.h.
References bpp::MarkovModulatedSubstitutionModel::fireParameterChanged(), and rDist_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 216 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::freq_.
|
inlineoverridevirtualinherited |
| Exception | if no FrequenceSet is associated to this model. |
Implements bpp::BranchModelInterface.
Definition at line 238 of file MarkovModulatedSubstitutionModel.h.
|
inlineoverridevirtualinherited |
See Kosiol and Goldman (2005), Molecular Biology And Evolution 22(2) 193-9.
Implements bpp::SubstitutionModelInterface.
Definition at line 201 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::generator_.
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Definition at line 179 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_.
Referenced by bpp::MarkovModulatedSubstitutionModel::getInitValue().
|
inlineoverridevirtualinherited |
| index | The model state. |
Implements bpp::BranchModelInterface.
Definition at line 189 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
|
inlineoverridevirtualinherited |
| index | The model state. |
Implements bpp::BranchModelInterface.
Definition at line 191 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
Referenced by bpp::MarkovModulatedSubstitutionModel::getInitValue().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Definition at line 187 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 214 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::rightEigenVectors_.
|
overridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 177 of file MarkovModulatedSubstitutionModel.cpp.
References bpp::MarkovModulatedSubstitutionModel::d2pijt_, bpp::MarkovModulatedSubstitutionModel::eigenValues_, bpp::VectorTools::exp(), bpp::MarkovModulatedSubstitutionModel::leftEigenVectors_, bpp::MatrixTools::mult(), bpp::MarkovModulatedSubstitutionModel::rightEigenVectors_, and bpp::VectorTools::sqr().
Referenced by bpp::MarkovModulatedSubstitutionModel::d2Pij_dt2().
|
overridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 171 of file MarkovModulatedSubstitutionModel.cpp.
References bpp::MarkovModulatedSubstitutionModel::dpijt_, bpp::MarkovModulatedSubstitutionModel::eigenValues_, bpp::VectorTools::exp(), bpp::MarkovModulatedSubstitutionModel::leftEigenVectors_, bpp::MatrixTools::mult(), and bpp::MarkovModulatedSubstitutionModel::rightEigenVectors_.
Referenced by bpp::MarkovModulatedSubstitutionModel::dPij_dt().
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 207 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::eigenValues_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 197 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::freq_.
|
inlineoverrideprotectedvirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 329 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::freq_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 208 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::iEigenValues_.
|
overridevirtualinherited |
This method is used to initialize likelihoods in recursions. It typically sends 1 if i = state, 0 otherwise, where i is one of the possible states of the alphabet allowed in the model and state is the observed state in the considered sequence/site.
| i | the index of the state in the model. |
| state | An observed state in the sequence/site. |
| IndexOutOfBoundsException | if array position is out of range. |
| BadIntException | if states are not allowed in the associated alphabet. |
Implements bpp::BranchModelInterface.
Definition at line 185 of file MarkovModulatedSubstitutionModel.cpp.
References bpp::MarkovModulatedSubstitutionModel::getAlphabet(), bpp::MarkovModulatedSubstitutionModel::getAlphabetStateAsInt(), bpp::MarkovModulatedSubstitutionModel::model_, bpp::MarkovModulatedSubstitutionModel::nbRates_, and bpp::MarkovModulatedSubstitutionModel::nbStates_.
|
inlineoverridevirtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
| code | The alphabet state to check. |
Implements bpp::BranchModelInterface.
Definition at line 195 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
|
inlineoverridevirtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
| code | The alphabet state to check. |
Implements bpp::BranchModelInterface.
Definition at line 193 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
|
inlineoverridevirtual |
|
inlineoverridevirtualinherited |
Get the number of states.
For most models, this equals the size of the alphabet.
Implements bpp::BranchModelInterface.
Definition at line 181 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
Referenced by bpp::MarkovModulatedSubstitutionModel::setDiagonal().
|
overridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 162 of file MarkovModulatedSubstitutionModel.cpp.
References bpp::MarkovModulatedSubstitutionModel::eigenValues_, bpp::VectorTools::exp(), bpp::MarkovModulatedSubstitutionModel::leftEigenVectors_, bpp::MatrixTools::mult(), bpp::MarkovModulatedSubstitutionModel::nbRates_, bpp::MarkovModulatedSubstitutionModel::nbStates_, bpp::MarkovModulatedSubstitutionModel::pijt_, and bpp::MarkovModulatedSubstitutionModel::rightEigenVectors_.
Referenced by bpp::MarkovModulatedSubstitutionModel::Pij_t().
|
inlineoverridevirtual |
|
inlineinherited |
Get the rate category corresponding to a particular state in the compound model.
| i | The state. |
Definition at line 255 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::nbStates_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 213 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::leftEigenVectors_.
|
inlineoverridevirtualinherited |
Get the scalar product of diagonal elements of the generator and the frequencies vector. If the generator is normalized, then scale=1. Otherwise each element must be multiplied by 1/scale.
Implements bpp::SubstitutionModelInterface.
Definition at line 282 of file MarkovModulatedSubstitutionModel.h.
References bpp::MatrixTools::diag(), bpp::MarkovModulatedSubstitutionModel::freq_, and bpp::MarkovModulatedSubstitutionModel::generator_.
Referenced by bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Definition at line 185 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 210 of file MarkovModulatedSubstitutionModel.h.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 211 of file MarkovModulatedSubstitutionModel.h.
|
inlineoverridevirtualinherited |
returns if model is scalable
Implements bpp::SubstitutionModelInterface.
Definition at line 264 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_.
Referenced by bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
pure virtualinherited |
This method is used to compute likelihoods in recursions. It computes the probability of a vector given a start state.
| values | An vector of states on the site. |
| t | the branch length |
Implements bpp::BranchModelInterface.
Implemented in bpp::AbstractLkTransitionModel.
|
inlineoverridevirtualinherited |
This method is used to compute likelihoods in recursions. It computes the probability of a vector given a start state.
| values | An vector of states on the site. |
| t | the branch length |
Implements bpp::TransitionModelInterface.
Definition at line 30 of file AbstractSubstitutionModel.h.
References bpp::TransitionModelInterface::getPij_t(), and bpp::AbstractLkTransitionModel::lik_.
|
inlineinherited |
Definition at line 243 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_.
Referenced by bpp::BppOSubstitutionModelFormat::write().
|
inlineoverridevirtualinherited |
Normalize the generator.
Implements bpp::SubstitutionModelInterface.
Definition at line 274 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_, and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
Definition at line 69 of file G2001.h.
References nestedRatePrefix_, bpp::MarkovModulatedSubstitutionModel::operator=(), and rDist_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 220 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::getPij_t().
|
inlineoverridevirtualinherited |
A method for computing all necessary matrices.
Implements bpp::SubstitutionModelInterface.
Definition at line 218 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::generator_.
|
inline |
Definition at line 98 of file G2001.h.
References rDist_.
Referenced by bpp::BppOSubstitutionModelFormat::write().
|
overridevirtualinherited |
set the diagonal of the generator such that sum on each line equals 0.
Implements bpp::SubstitutionModelInterface.
Definition at line 144 of file MarkovModulatedSubstitutionModel.cpp.
References bpp::MarkovModulatedSubstitutionModel::generator_, bpp::MarkovModulatedSubstitutionModel::getNumberOfStates(), and RowMatrix< double >::getRow().
|
inlineoverridevirtualinherited |
Set equilibrium frequencies.
| frequencies | The map of the frequencies to use. |
Implements bpp::TransitionModelInterface.
Definition at line 232 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_, and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
inlineoverridevirtualinherited |
Set equilibrium frequencies equal to the frequencies estimated from the data.
| data | The sequences to use. |
| pseudoCount | A quantity
|
Implements bpp::TransitionModelInterface.
Definition at line 226 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_, and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
inlineoverridevirtual |
Reimplemented from bpp::AbstractParameterAliasable.
Definition at line 100 of file G2001.h.
References nestedRatePrefix_, rDist_, and bpp::MarkovModulatedSubstitutionModel::setNamespace().
|
inlineoverridevirtual |
Set the rate of the model (must be positive).
| rate | must be positive. |
Implements bpp::BranchModelInterface.
|
inlineoverridevirtualinherited |
sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalization for example.
Implements bpp::SubstitutionModelInterface.
Definition at line 269 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_.
|
inlineoverridevirtualinherited |
Multiplies the current generator by the given scale.
| scale | the scale by which the generator is multiplied. |
Implements bpp::SubstitutionModelInterface.
Definition at line 289 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::model_, and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
Referenced by bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
inlineoverridevirtualinherited |
By definition Sij(i,j) = Sij(j,i).
Implements bpp::SubstitutionModelInterface.
Definition at line 217 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::exchangeability_.
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Definition at line 183 of file MarkovModulatedSubstitutionModel.h.
References bpp::MarkovModulatedSubstitutionModel::stateMap_.
|
protectedvirtualinherited |
Definition at line 74 of file MarkovModulatedSubstitutionModel.cpp.
References bpp::MatrixTools::add(), bpp::MarkovModulatedSubstitutionModel::d2pijt_, bpp::MatrixTools::diag(), bpp::MarkovModulatedSubstitutionModel::dpijt_, bpp::MarkovModulatedSubstitutionModel::eigenValues_, bpp::MarkovModulatedSubstitutionModel::exchangeability_, bpp::MarkovModulatedSubstitutionModel::freq_, bpp::MarkovModulatedSubstitutionModel::generator_, RowMatrix< double >::getNumberOfColumns(), bpp::EigenValue< class >::getRealEigenValues(), bpp::MarkovModulatedSubstitutionModel::getScale(), bpp::EigenValue< class >::getV(), bpp::MarkovModulatedSubstitutionModel::iEigenValues_, bpp::MatrixTools::inv(), bpp::MarkovModulatedSubstitutionModel::isScalable(), bpp::MatrixTools::kroneckerMult(), bpp::VectorTools::kroneckerMult(), bpp::MarkovModulatedSubstitutionModel::leftEigenVectors_, bpp::MarkovModulatedSubstitutionModel::model_, bpp::MatrixTools::mult(), bpp::MarkovModulatedSubstitutionModel::nbRates_, bpp::MarkovModulatedSubstitutionModel::nbStates_, bpp::MarkovModulatedSubstitutionModel::normalizeRateChanges_, bpp::MarkovModulatedSubstitutionModel::pijt_, bpp::MarkovModulatedSubstitutionModel::rates_, bpp::MarkovModulatedSubstitutionModel::ratesExchangeability_, bpp::MarkovModulatedSubstitutionModel::ratesFreq_, bpp::MarkovModulatedSubstitutionModel::ratesGenerator_, RowMatrix< double >::resize(), bpp::MarkovModulatedSubstitutionModel::rightEigenVectors_, bpp::MatrixTools::scale(), and bpp::MarkovModulatedSubstitutionModel::setScale().
Referenced by bpp::MarkovModulatedSubstitutionModel::fireParameterChanged(), G2001(), bpp::MarkovModulatedSubstitutionModel::normalize(), bpp::MarkovModulatedSubstitutionModel::setFreq(), bpp::MarkovModulatedSubstitutionModel::setFreqFromData(), bpp::MarkovModulatedSubstitutionModel::setScale(), and bpp::TS98::TS98().
|
inlineoverrideprotectedvirtual |
Update the rates vector, generator and equilibrium frequencies.
This method must be implemented by the derived class. It is called by the fireParameterChanged() method.
Implements bpp::MarkovModulatedSubstitutionModel.
Definition at line 115 of file G2001.h.
References bpp::AbstractParameterAliasable::getParameterValue(), bpp::MarkovModulatedSubstitutionModel::nbRates_, bpp::MarkovModulatedSubstitutionModel::rates_, bpp::MarkovModulatedSubstitutionModel::ratesExchangeability_, and rDist_.
Referenced by G2001().
|
protectedinherited |
Tell if the equilibrium frequencies should be computed from the generator.
Definition at line 110 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::computeFrequencies(), and bpp::MarkovModulatedSubstitutionModel::operator=().
|
mutableprotectedinherited |
Definition at line 117 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getd2Pij_dt2(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
mutableprotectedinherited |
Definition at line 116 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getdPij_dt(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
Tell if the eigen decomposition should be performed.
Definition at line 103 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::enableEigenDecomposition(), and bpp::MarkovModulatedSubstitutionModel::operator=().
|
protectedinherited |
The vector of real parts of eigen values.
Definition at line 92 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getd2Pij_dt2(), bpp::MarkovModulatedSubstitutionModel::getdPij_dt(), bpp::MarkovModulatedSubstitutionModel::getEigenValues(), bpp::MarkovModulatedSubstitutionModel::getPij_t(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
The exchangeability matrix
of the model.
Definition at line 77 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::exchangeabilityMatrix(), bpp::MarkovModulatedSubstitutionModel::operator=(), bpp::MarkovModulatedSubstitutionModel::Sij(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
The vector of equilibrium frequencies.
Definition at line 122 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::freq(), bpp::MarkovModulatedSubstitutionModel::getFrequencies(), bpp::MarkovModulatedSubstitutionModel::getFrequencies_(), bpp::MarkovModulatedSubstitutionModel::getScale(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
The generator matrix
of the model.
Definition at line 72 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::generator(), bpp::MarkovModulatedSubstitutionModel::getScale(), bpp::MarkovModulatedSubstitutionModel::operator=(), bpp::MarkovModulatedSubstitutionModel::Qij(), bpp::MarkovModulatedSubstitutionModel::setDiagonal(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
The vector of imaginary parts of the eigen values (zero in case of reversible pmodel).
Definition at line 98 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getIEigenValues(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
The
matrix made of left eigen vectors (by row).
Definition at line 82 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getd2Pij_dt2(), bpp::MarkovModulatedSubstitutionModel::getdPij_dt(), bpp::MarkovModulatedSubstitutionModel::getPij_t(), bpp::MarkovModulatedSubstitutionModel::getRowLeftEigenVectors(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
mutableprivateinherited |
Definition at line 23 of file AbstractSubstitutionModel.h.
Referenced by bpp::AbstractLkTransitionModel::d2Lik_dt2(), bpp::AbstractLkTransitionModel::dLik_dt(), and bpp::AbstractLkTransitionModel::Lik_t().
|
protectedinherited |
Definition at line 52 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::alphabet(), bpp::MarkovModulatedSubstitutionModel::fireParameterChanged(), bpp::MarkovModulatedSubstitutionModel::getAlphabet(), bpp::MarkovModulatedSubstitutionModel::getInitValue(), bpp::MarkovModulatedSubstitutionModel::getRate(), bpp::MarkovModulatedSubstitutionModel::isScalable(), bpp::MarkovModulatedSubstitutionModel::MarkovModulatedSubstitutionModel(), bpp::MarkovModulatedSubstitutionModel::nestedModel(), bpp::MarkovModulatedSubstitutionModel::normalize(), bpp::MarkovModulatedSubstitutionModel::operator=(), bpp::MarkovModulatedSubstitutionModel::setFreq(), bpp::MarkovModulatedSubstitutionModel::setFreqFromData(), bpp::MarkovModulatedSubstitutionModel::setNamespace(), bpp::MarkovModulatedSubstitutionModel::setRate(), bpp::MarkovModulatedSubstitutionModel::setScalable(), bpp::MarkovModulatedSubstitutionModel::setScale(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
Definition at line 55 of file MarkovModulatedSubstitutionModel.h.
Referenced by G2001(), bpp::MarkovModulatedSubstitutionModel::getInitValue(), bpp::MarkovModulatedSubstitutionModel::getPij_t(), bpp::MarkovModulatedSubstitutionModel::operator=(), bpp::MarkovModulatedSubstitutionModel::updateMatrices_(), and updateRatesModel_().
|
protectedinherited |
Definition at line 54 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getInitValue(), bpp::MarkovModulatedSubstitutionModel::getPij_t(), bpp::MarkovModulatedSubstitutionModel::getRate(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
|
private |
Definition at line 34 of file G2001.h.
Referenced by G2001(), operator=(), and setNamespace().
|
protectedinherited |
Definition at line 124 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
mutableprotectedinherited |
These ones are for bookkeeping:
Definition at line 115 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getPij_t(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
Definition at line 63 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::operator=(), bpp::MarkovModulatedSubstitutionModel::updateMatrices_(), updateRatesModel_(), and bpp::TS98::updateRatesModel_().
|
protectedinherited |
Definition at line 64 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::operator=(), bpp::MarkovModulatedSubstitutionModel::updateMatrices_(), updateRatesModel_(), and bpp::TS98::updateRatesModel_().
|
protectedinherited |
Definition at line 65 of file MarkovModulatedSubstitutionModel.h.
Referenced by G2001(), bpp::MarkovModulatedSubstitutionModel::operator=(), bpp::MarkovModulatedSubstitutionModel::updateMatrices_(), and bpp::TS98::updateRatesModel_().
|
protectedinherited |
Definition at line 67 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
private |
Definition at line 32 of file G2001.h.
Referenced by fireParameterChanged(), G2001(), operator=(), rateDistribution(), setNamespace(), and updateRatesModel_().
|
protectedinherited |
The
matrix made of right eigen vectors (by column).
Definition at line 87 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getColumnRightEigenVectors(), bpp::MarkovModulatedSubstitutionModel::getd2Pij_dt2(), bpp::MarkovModulatedSubstitutionModel::getdPij_dt(), bpp::MarkovModulatedSubstitutionModel::getPij_t(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices_().
|
protectedinherited |
Definition at line 53 of file MarkovModulatedSubstitutionModel.h.
Referenced by bpp::MarkovModulatedSubstitutionModel::getAlphabetStateAsChar(), bpp::MarkovModulatedSubstitutionModel::getAlphabetStateAsInt(), bpp::MarkovModulatedSubstitutionModel::getAlphabetStates(), bpp::MarkovModulatedSubstitutionModel::getModelStates(), bpp::MarkovModulatedSubstitutionModel::getNumberOfStates(), bpp::MarkovModulatedSubstitutionModel::getStateMap(), bpp::MarkovModulatedSubstitutionModel::operator=(), and bpp::MarkovModulatedSubstitutionModel::stateMap().