bpp-phyl3
3.0.0
|
The Muse and Gaut (1994) substitution model for codons. More...
#include <Bpp/Phyl/Model/Codon/MG94.h>
Public Member Functions | |
MG94 (std::shared_ptr< const GeneticCode > gc, std::unique_ptr< CodonFrequencySetInterface > codonFreqs) | |
MG94 (const MG94 &mg94) | |
MG94 & | operator= (const MG94 &mg94) |
virtual | ~MG94 () |
MG94 * | clone () const override |
std::string | getName () const override |
Get the name of the model. More... | |
const SubstitutionModelInterface & | substitutionModel () const override |
std::shared_ptr< const GeneticCode > | getGeneticCode () const override |
double | getCodonsMulRate (size_t i, size_t j) const override |
Returns the multiplicative rate specific to two codons specified by their number. The respective generator rate is this rate multiplied by the rate defined by the model defined on nucleotides. More... | |
const CodonFrequencySetInterface & | codonFrequencySet () const override |
bool | hasCodonFrequencySet () const override |
void | setFreq (std::map< int, double > &frequencies) override |
Set equilibrium frequencies. More... | |
std::string | getParNameFromPmodel (const std::string &name) const |
get the name of a parameter from its name in a submodel More... | |
std::string | getPmodelParName (const std::string &name) const |
get the name of a parameter in the submodel from its apparent name More... | |
const FrequencySetInterface & | frequencySet () const override |
const BranchModelInterface & | model () const override |
bool | hasIndependentParameter (const std::string &name) const |
const ParameterList & | getIndependentParameters () const |
size_t | getNumberOfIndependentParameters () const |
void | aliasParameters (const std::string &p1, const std::string &p2) |
void | aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose) |
void | unaliasParameters (const std::string &p1, const std::string &p2) |
ParameterList | getAliasedParameters (const ParameterList &pl) const |
ParameterList | getFromParameters (const ParameterList &pl) const |
virtual std::vector< std::string > | getAlias (const std::string &name) const |
virtual std::map< std::string, std::string > | getAliases () const |
std::string | getFrom (const std::string &name) const |
bool | hasParameter (const std::string &name) const override |
const ParameterList & | getParameters () const override |
const Parameter & | parameter (const std::string &name) const override |
const std::shared_ptr< Parameter > & | getParameter (const std::string &name) const |
double | getParameterValue (const std::string &name) const override |
void | setAllParametersValues (const ParameterList ¶meters) override |
void | setParameterValue (const std::string &name, double value) override |
void | setParametersValues (const ParameterList ¶meters) override |
bool | matchParametersValues (const ParameterList ¶meters) override |
void | removeConstraint (const std::string &name) override |
void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override |
size_t | getNumberOfParameters () const override |
std::string | getNamespace () const override |
std::string | getParameterNameWithoutNamespace (const std::string &name) const override |
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 const TransitionModelInterface & | transitionModel () const =0 |
const TransitionModelInterface & | transitionModel () const |
bool | isScalable () const |
returns if model is scalable More... | |
void | setScalable (bool scalable) |
sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalization for example. More... | |
void | normalize () |
Normalize the generator. More... | |
void | setDiagonal () |
set the diagonal of the generator such that sum on each line equals 0. More... | |
double | getScale () const |
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) |
Multiplies the current generator by the given scale. More... | |
void | addRateParameter () override |
Methods to supersede TransitionModel methods. More... | |
void | setFreqFromData (const SequenceDataInterface &data, double pseudoCount=0) override |
Set equilibrium frequencies equal to the frequencies estimated from the data. More... | |
virtual void | fireParameterChanged (const ParameterList ¶meters) override |
Methods to supersede AbstractTransitionModel methods. More... | |
void | setNamespace (const std::string &name) override |
double | freq (size_t i) const override |
Methods to supersede TransitionModel methods. 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 |
const Vdouble & | getFrequencies () 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 |
double | getInitValue (size_t i, int state) const override |
double | getRate () const override |
Get the rate. More... | |
void | setRate (double rate) override |
Set the rate of the model (must be positive). More... | |
bool | computeFrequencies () const override |
void | computeFrequencies (bool yn) override |
const std::vector< int > & | getAlphabetStates () const override |
const StateMapInterface & | stateMap () const override |
std::shared_ptr< const StateMapInterface > | getStateMap () const override |
int | getAlphabetStateAsInt (size_t i) const override |
std::string | getAlphabetStateAsChar (size_t i) 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 Alphabet & | alphabet () const override |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
size_t | getNumberOfStates () const override |
Get the number of states. More... | |
double | Qij (size_t i, size_t j) const |
Methods to supersede SubstitutionModel methods. More... | |
const Matrix< double > & | generator () const |
const Matrix< double > & | exchangeabilityMatrix () const |
double | Sij (size_t i, size_t j) const |
void | enableEigenDecomposition (bool yn) |
Set if eigenValues and Vectors must be computed. More... | |
bool | enableEigenDecomposition () |
Tell if eigenValues and Vectors must be computed. More... | |
bool | isDiagonalizable () const |
bool | isNonSingular () const |
const Vdouble & | getEigenValues () const |
const Vdouble & | getIEigenValues () const |
const Matrix< double > & | getRowLeftEigenVectors () const |
const Matrix< double > & | getColumnRightEigenVectors () const |
Protected Attributes | |
std::map< std::string, std::string > | mapParNamesFromPmodel_ |
Tools to make the link between the Parameters of the object and those of pmixmodel_. More... | |
ParameterList | lParPmodel_ |
Private Attributes | |
std::unique_ptr< CodonDistancePhaseFrequenciesSubstitutionModel > | pmodel_ |
ParameterList | independentParameters_ |
std::map< std::string, std::shared_ptr< AliasParameterListener > > | aliasListenersRegister_ |
ParameterList | parameters_ |
std::string | prefix_ |
Eigen::VectorXd | lik_ |
The Muse and Gaut (1994) substitution model for codons.
This model has one ratio of synonymous substitution rate over non-synonymous substitution rate. It allows distinct equilibrium frequencies between nucleotides.
For codons and , the generator term is:
0 if 2 or 3 of the pair are different.
if exactly 1 of the pairs is different ( ), and that difference is non-synonymous.
if exactly 1 of the pairs is different ( ), and that difference is synonymous.
corresponds to ratio in original publication.
is a normalization factor.
This model includes one parameter ( ). The codon frequencies are either observed or inferred.
Reference:
MG94::MG94 | ( | std::shared_ptr< const GeneticCode > | gc, |
std::unique_ptr< CodonFrequencySetInterface > | codonFreqs | ||
) |
Definition at line 14 of file MG94.cpp.
References bpp::AbstractParameterAliasable::addParameter_(), bpp::ParameterList::addParameters(), bpp::AbstractParameterAliasable::addParameters_(), bpp::ParameterAliasable::getParameterNameWithoutNamespace(), bpp::AbstractBiblioTransitionModel::lParPmodel_, bpp::AbstractBiblioTransitionModel::mapParNamesFromPmodel_, pmodel_, and bpp::AbstractBiblioSubstitutionModel::updateMatrices_().
Referenced by clone().
|
overridevirtualinherited |
Methods to supersede TransitionModel methods.
Implements bpp::BranchModelInterface.
Definition at line 76 of file AbstractBiblioSubstitutionModel.cpp.
References bpp::AbstractParameterAliasable::addParameter_(), bpp::ParameterList::addParameters(), bpp::BranchModelInterface::addRateParameter(), bpp::AbstractParameterAliasable::getNamespace(), bpp::AbstractParameterAliasable::getParameters(), bpp::AbstractTotallyWrappedTransitionModel::getRate(), bpp::AbstractBiblioTransitionModel::lParPmodel_, bpp::AbstractBiblioTransitionModel::mapParNamesFromPmodel_, bpp::AbstractWrappedTransitionModel::model(), bpp::AbstractWrappedTransitionModel::model_(), bpp::Parameter::R_PLUS_STAR, and bpp::ParameterList::reset().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 53 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::alphabet(), and bpp::WrappedModelInterface::model().
Referenced by bpp::RegisterRatesSubstitutionModel::alphabet(), and bpp::OneChangeRegisterTransitionModel::OneChangeRegisterTransitionModel().
|
inlineoverridevirtual |
Implements bpp::CodonReversibleSubstitutionModelInterface.
Definition at line 64 of file MG94.h.
References MG94().
|
inlineoverridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Definition at line 75 of file MG94.h.
References pmodel_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 162 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::computeFrequencies(), and bpp::WrappedTransitionModelInterface::transitionModel().
Referenced by bpp::DFP07::DFP07(), and bpp::YN98::YN98().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 171 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::computeFrequencies(), and bpp::AbstractWrappedTransitionModel::transitionModel_().
|
pure virtualinherited |
|
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 124 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::d2Pij_dt2(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
pure virtualinherited |
|
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 123 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::dPij_dt(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inlinevirtualinherited |
Tell if eigenValues and Vectors must be computed.
Implements bpp::SubstitutionModelInterface.
Definition at line 240 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::enableEigenDecomposition(), and bpp::AbstractWrappedSubstitutionModel::substitutionModel_().
|
inlinevirtualinherited |
Set if eigenValues and Vectors must be computed.
Implements bpp::SubstitutionModelInterface.
Definition at line 238 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::enableEigenDecomposition(), and bpp::AbstractWrappedSubstitutionModel::substitutionModel_().
|
inlinevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 234 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::exchangeabilityMatrix(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlineoverridevirtualinherited |
Methods to supersede AbstractTransitionModel methods.
Tells the model that a parameter value has changed.
This updates the matrices consequently.
Reimplemented from bpp::AbstractParameterAliasable.
Definition at line 86 of file AbstractBiblioSubstitutionModel.h.
References bpp::AbstractParameterAliasable::getNamespace(), bpp::ParameterList::getParameterValue(), bpp::ParameterList::hasParameter(), bpp::AbstractWrappedTransitionModel::model_(), bpp::BranchModelInterface::setRate(), bpp::ParameterList::size(), and bpp::AbstractBiblioTransitionModel::updateMatrices_().
|
inlineoverridevirtualinherited |
Methods to supersede TransitionModel methods.
Implements bpp::TransitionModelInterface.
Definition at line 120 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::freq(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inlineoverridevirtualinherited |
Exception | if no FrequenceSet is associated to this model. |
Reimplemented from bpp::AbstractWrappedModel.
Reimplemented in bpp::RegisterRatesSubstitutionModel, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, and bpp::YN98.
Definition at line 93 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::frequencySet(), and bpp::WrappedTransitionModelInterface::transitionModel().
Referenced by bpp::RegisterRatesSubstitutionModel::frequencySet().
|
inlinevirtualinherited |
See Kosiol and Goldman (2005), Molecular Biology And Evolution 22(2) 193-9.
Implements bpp::SubstitutionModelInterface.
Definition at line 232 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::generator(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 55 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getAlphabet(), and bpp::WrappedModelInterface::model().
Referenced by bpp::RegisterRatesSubstitutionModel::getAlphabet(), and bpp::OneChangeRegisterTransitionModel::OneChangeRegisterTransitionModel().
|
inlineoverridevirtualinherited |
index | The model state. |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 46 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getAlphabetStateAsChar(), and bpp::WrappedModelInterface::model().
Referenced by bpp::RegisterRatesSubstitutionModel::getAlphabetStateAsChar().
|
inlineoverridevirtualinherited |
index | The model state. |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 44 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getAlphabetStateAsInt(), and bpp::WrappedModelInterface::model().
Referenced by bpp::RegisterRatesSubstitutionModel::getAlphabetStateAsInt().
|
inlineoverridevirtualinherited |
@ brief Methods to supersede TransitionModel methods.
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 38 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getAlphabetStates(), and bpp::WrappedModelInterface::model().
Referenced by bpp::RegisterRatesSubstitutionModel::getAlphabetStates().
|
inlineoverridevirtual |
Returns the multiplicative rate specific to two codons specified by their number. The respective generator rate is this rate multiplied by the rate defined by the model defined on nucleotides.
Implements bpp::CoreCodonSubstitutionModelInterface.
Definition at line 73 of file MG94.h.
References pmodel_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 252 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::getColumnRightEigenVectors(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 132 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::getd2Pij_dt2(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 130 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::getdPij_dt(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inlinevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 246 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::getEigenValues(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 126 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::getFrequencies(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inlineoverrideprotectedvirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 181 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::getFrequencies_(), and bpp::AbstractWrappedTransitionModel::transitionModel_().
|
inlineoverridevirtual |
Implements bpp::CodonSubstitutionModelInterface.
Definition at line 71 of file MG94.h.
References pmodel_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 248 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::getIEigenValues(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlineoverridevirtualinherited |
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 134 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getInitValue(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inlineoverridevirtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
code | The alphabet state to check. |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 50 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getModelStates(), and bpp::WrappedModelInterface::model().
|
inlineoverridevirtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
code | The alphabet state to check. |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 48 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getModelStates(), and bpp::WrappedModelInterface::model().
Referenced by bpp::RegisterRatesSubstitutionModel::getModelStates().
|
inlineoverridevirtual |
Get the name of the model.
Reimplemented from bpp::AbstractWrappedModel.
|
inlineoverridevirtualinherited |
Get the number of states.
For most models, this equals the size of the alphabet.
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 57 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getNumberOfStates(), and bpp::WrappedModelInterface::model().
|
inherited |
get the name of a parameter from its name in a submodel
name | the name of the parameter in the submodel |
Definition at line 37 of file AbstractBiblioSubstitutionModel.cpp.
References bpp::AbstractBiblioTransitionModel::mapParNamesFromPmodel_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 128 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::getPij_t(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inherited |
get the name of a parameter in the submodel from its apparent name
name | the name of the parameter |
Definition at line 47 of file AbstractBiblioSubstitutionModel.cpp.
References bpp::AbstractBiblioTransitionModel::mapParNamesFromPmodel_.
|
inlineoverridevirtualinherited |
Get the rate.
Implements bpp::BranchModelInterface.
Definition at line 139 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getRate(), and bpp::WrappedTransitionModelInterface::transitionModel().
Referenced by bpp::AbstractBiblioTransitionModel::addRateParameter(), and bpp::FromMixtureSubstitutionModel::addRateParameter().
|
inlinevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 250 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::getRowLeftEigenVectors(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlinevirtualinherited |
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 278 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::getScale(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 42 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::getStateMap(), and bpp::WrappedModelInterface::model().
Referenced by bpp::RegisterRatesSubstitutionModel::getStateMap().
|
inlineoverridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Definition at line 80 of file MG94.h.
References pmodel_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 242 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::isDiagonalizable(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlinevirtualinherited |
Implements bpp::SubstitutionModelInterface.
Definition at line 244 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::isNonSingular(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlinevirtualinherited |
returns if model is scalable
Implements bpp::SubstitutionModelInterface.
Definition at line 258 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::isScalable(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
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 | time |
IndexOutOfBoundsException | if array position is out of range. |
BadIntException | if states are not allowed in the associated alphabet. |
Implemented in bpp::AbstractLkTransitionModel, bpp::TransitionModelInterface, bpp::TransitionFromTransitionModel, and bpp::MultinomialFromTransitionModel.
|
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_.
|
inlineoverridevirtualinherited |
Implements bpp::WrappedModelInterface.
Definition at line 98 of file AbstractWrappedModel.h.
References bpp::WrappedTransitionModelInterface::transitionModel().
Referenced by bpp::AbstractBiblioTransitionModel::addRateParameter(), bpp::FromMixtureSubstitutionModel::addRateParameter(), bpp::InMixedSubstitutionModel::getInitValue(), bpp::FromMixtureSubstitutionModel::getName(), bpp::RegisterRatesSubstitutionModel::getRate(), bpp::AbstractBiblioSubstitutionModel::operator=(), bpp::AbstractBiblioTransitionModel::operator=(), bpp::RegisterRatesSubstitutionModel::RegisterRatesSubstitutionModel(), bpp::AbstractBiblioTransitionModel::setFreq(), bpp::AbstractBiblioTransitionModel::setNamespace(), and bpp::BppOSubstitutionModelFormat::write().
|
inlineprotectedinherited |
Definition at line 85 of file AbstractWrappedModel.h.
References bpp::AbstractWrappedTransitionModel::transitionModel_().
Referenced by bpp::AbstractBiblioTransitionModel::addRateParameter(), bpp::FromMixtureSubstitutionModel::addRateParameter(), bpp::AbstractBiblioTransitionModel::fireParameterChanged(), bpp::FromMixtureSubstitutionModel::fireParameterChanged(), bpp::RegisterRatesSubstitutionModel::RegisterRatesSubstitutionModel(), bpp::AbstractBiblioTransitionModel::setNamespace(), bpp::FromMixtureSubstitutionModel::setNamespace(), bpp::RegisterRatesSubstitutionModel::setRate(), and bpp::AbstractBiblioTransitionModel::updateMatrices_().
|
inlinevirtualinherited |
Normalize the generator.
Implements bpp::SubstitutionModelInterface.
Definition at line 268 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::normalize(), and bpp::AbstractWrappedSubstitutionModel::substitutionModel_().
Definition at line 60 of file MG94.cpp.
References bpp::AbstractBiblioSubstitutionModel::operator=(), and pmodel_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 122 of file AbstractWrappedModel.h.
References bpp::TransitionModelInterface::Pij_t(), and bpp::WrappedTransitionModelInterface::transitionModel().
|
inlinevirtualinherited |
Methods to supersede SubstitutionModel methods.
Implements bpp::SubstitutionModelInterface.
Definition at line 230 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::Qij(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlinevirtualinherited |
set the diagonal of the generator such that sum on each line equals 0.
Implements bpp::SubstitutionModelInterface.
Definition at line 273 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::setDiagonal(), and bpp::AbstractWrappedSubstitutionModel::substitutionModel_().
|
inlineoverridevirtual |
Set equilibrium frequencies.
frequencies | The map of the frequencies to use. |
Reimplemented from bpp::AbstractBiblioTransitionModel.
Definition at line 85 of file MG94.h.
References bpp::AbstractBiblioTransitionModel::setFreq().
|
overridevirtualinherited |
Set equilibrium frequencies equal to the frequencies estimated from the data.
data | The sequences to use. |
pseudoCount | A quantity to add to adjust the observed values in order to prevent issues due to missing states on small data set. The corrected frequencies shall be computed as
|
Implements bpp::TransitionModelInterface.
Definition at line 125 of file AbstractBiblioSubstitutionModel.cpp.
References bpp::SequenceContainerTools::getFrequencies(), and bpp::AbstractBiblioTransitionModel::setFreq().
|
overridevirtualinherited |
Reimplemented from bpp::AbstractParameterAliasable.
Definition at line 88 of file AbstractBiblioSubstitutionModel.cpp.
References bpp::ParameterList::addParameters(), bpp::ParameterAliasable::getParameterNameWithoutNamespace(), bpp::AbstractParameterAliasable::getParameters(), bpp::AbstractBiblioTransitionModel::lParPmodel_, bpp::AbstractBiblioTransitionModel::mapParNamesFromPmodel_, bpp::AbstractWrappedTransitionModel::model(), bpp::AbstractWrappedTransitionModel::model_(), bpp::ParameterList::reset(), bpp::AbstractParameterAliasable::setNamespace(), and bpp::ParameterAliasable::setNamespace().
|
inlineoverridevirtualinherited |
Set the rate of the model (must be positive).
rate | must be positive. |
Implements bpp::BranchModelInterface.
Definition at line 144 of file AbstractWrappedModel.h.
References bpp::BranchModelInterface::setRate(), and bpp::AbstractWrappedTransitionModel::transitionModel_().
|
inlinevirtualinherited |
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 263 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::setScalable(), and bpp::AbstractWrappedSubstitutionModel::substitutionModel_().
|
inlinevirtualinherited |
Multiplies the current generator by the given scale.
scale | the scale by which the generator is multiplied. |
Implements bpp::SubstitutionModelInterface.
Definition at line 283 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::setScale(), and bpp::AbstractWrappedSubstitutionModel::substitutionModel_().
|
inlinevirtualinherited |
By definition Sij(i,j) = Sij(j,i).
Implements bpp::SubstitutionModelInterface.
Definition at line 236 of file AbstractWrappedModel.h.
References bpp::SubstitutionModelInterface::Sij(), and bpp::WrappedSubstitutionModelInterface::substitutionModel().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 40 of file AbstractWrappedModel.h.
References bpp::WrappedModelInterface::model(), and bpp::BranchModelInterface::stateMap().
Referenced by bpp::RegisterRatesSubstitutionModel::stateMap().
|
inlineoverridevirtual |
Implements bpp::WrappedSubstitutionModelInterface.
Definition at line 69 of file MG94.h.
References pmodel_.
|
inlineoverrideprotectedvirtual |
Implements bpp::AbstractWrappedSubstitutionModel.
Definition at line 91 of file MG94.h.
References pmodel_.
|
inlinevirtualinherited |
Implements bpp::WrappedTransitionModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 199 of file AbstractWrappedModel.h.
References bpp::WrappedSubstitutionModelInterface::substitutionModel().
Referenced by bpp::InMixedSubstitutionModel::d2Pij_dt2(), bpp::InMixedSubstitutionModel::dPij_dt(), bpp::InMixedSubstitutionModel::freq(), bpp::InMixedSubstitutionModel::getd2Pij_dt2(), bpp::InMixedSubstitutionModel::getdPij_dt(), bpp::InMixedSubstitutionModel::getFrequencies(), bpp::InMixedSubstitutionModel::getPij_t(), bpp::InMixedSubstitutionModel::getRate(), and bpp::InMixedSubstitutionModel::Pij_t().
|
pure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::AbstractFromSubstitutionModelTransitionModel, bpp::AbstractBiblioMixedTransitionModel, and bpp::AbstractWrappedSubstitutionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::computeFrequencies(), bpp::AbstractTotallyWrappedTransitionModel::d2Pij_dt2(), bpp::AbstractTotallyWrappedTransitionModel::dPij_dt(), bpp::AbstractTotallyWrappedTransitionModel::freq(), bpp::AbstractWrappedTransitionModel::frequencySet(), bpp::AbstractTotallyWrappedTransitionModel::getd2Pij_dt2(), bpp::AbstractTotallyWrappedTransitionModel::getdPij_dt(), bpp::AbstractTotallyWrappedTransitionModel::getFrequencies(), bpp::AbstractTotallyWrappedTransitionModel::getInitValue(), bpp::AbstractTotallyWrappedTransitionModel::getPij_t(), bpp::AbstractTotallyWrappedTransitionModel::getRate(), bpp::AbstractWrappedTransitionModel::model(), and bpp::AbstractTotallyWrappedTransitionModel::Pij_t().
|
inlineprotectedvirtualinherited |
Implements bpp::AbstractWrappedTransitionModel.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 205 of file AbstractWrappedModel.h.
References bpp::AbstractWrappedSubstitutionModel::substitutionModel_().
|
protectedpure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::AbstractFromSubstitutionModelTransitionModel, bpp::AbstractBiblioMixedTransitionModel, and bpp::AbstractWrappedSubstitutionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::computeFrequencies(), bpp::AbstractTotallyWrappedTransitionModel::getFrequencies_(), bpp::AbstractWrappedTransitionModel::model_(), bpp::AbstractTotallyWrappedTransitionModel::setFreq(), bpp::AbstractTotallyWrappedTransitionModel::setFreqFromData(), and bpp::AbstractTotallyWrappedTransitionModel::setRate().
|
inlineoverrideprotectedvirtualinherited |
Reimplemented from bpp::AbstractBiblioTransitionModel.
Definition at line 129 of file AbstractBiblioSubstitutionModel.h.
References bpp::AbstractBiblioTransitionModel::updateMatrices_().
Referenced by bpp::GY94::GY94(), bpp::KCM::KCM(), MG94(), and bpp::YN98::YN98().
|
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 30 of file AbstractBiblioSubstitutionModel.h.
Referenced by bpp::AbstractBiblioTransitionModel::addRateParameter(), bpp::DFP07::DFP07(), bpp::GY94::GY94(), bpp::KCM::KCM(), bpp::LG10_EX_EHO::LG10_EX_EHO(), bpp::LGL08_CAT::LGL08_CAT(), bpp::LLG08_EHO::LLG08_EHO(), bpp::LLG08_EX2::LLG08_EX2(), bpp::LLG08_EX3::LLG08_EX3(), bpp::LLG08_UL2::LLG08_UL2(), bpp::LLG08_UL3::LLG08_UL3(), MG94(), bpp::AbstractBiblioTransitionModel::operator=(), bpp::RELAX::RELAX(), bpp::AbstractBiblioTransitionModel::setNamespace(), bpp::AbstractBiblioTransitionModel::updateMatrices_(), bpp::RELAX::updateMatrices_(), bpp::YNGP_M3::updateMatrices_(), bpp::YN98::YN98(), bpp::YNGP_M1::YNGP_M1(), bpp::YNGP_M10::YNGP_M10(), bpp::YNGP_M2::YNGP_M2(), bpp::YNGP_M3::YNGP_M3(), bpp::YNGP_M7::YNGP_M7(), bpp::YNGP_M8::YNGP_M8(), and bpp::YNGP_M9::YNGP_M9().
|
protectedinherited |
Tools to make the link between the Parameters of the object and those of pmixmodel_.
Definition at line 28 of file AbstractBiblioSubstitutionModel.h.
Referenced by bpp::AbstractBiblioTransitionModel::addRateParameter(), bpp::DFP07::DFP07(), bpp::AbstractBiblioTransitionModel::getParNameFromPmodel(), bpp::AbstractBiblioTransitionModel::getPmodelParName(), bpp::GY94::GY94(), bpp::KCM::KCM(), bpp::LG10_EX_EHO::LG10_EX_EHO(), bpp::LGL08_CAT::LGL08_CAT(), bpp::LLG08_EHO::LLG08_EHO(), bpp::LLG08_EX2::LLG08_EX2(), bpp::LLG08_EX3::LLG08_EX3(), bpp::LLG08_UL2::LLG08_UL2(), bpp::LLG08_UL3::LLG08_UL3(), MG94(), bpp::AbstractBiblioTransitionModel::operator=(), bpp::RELAX::RELAX(), bpp::AbstractBiblioTransitionModel::setFreq(), bpp::AbstractBiblioTransitionModel::setNamespace(), bpp::AbstractBiblioTransitionModel::updateMatrices_(), bpp::RELAX::updateMatrices_(), bpp::YNGP_M3::updateMatrices_(), bpp::YN98::YN98(), bpp::YNGP_M1::YNGP_M1(), bpp::YNGP_M10::YNGP_M10(), bpp::YNGP_M2::YNGP_M2(), bpp::YNGP_M3::YNGP_M3(), bpp::YNGP_M7::YNGP_M7(), bpp::YNGP_M8::YNGP_M8(), and bpp::YNGP_M9::YNGP_M9().
|
private |
Definition at line 51 of file MG94.h.
Referenced by codonFrequencySet(), getCodonsMulRate(), getGeneticCode(), hasCodonFrequencySet(), MG94(), operator=(), substitutionModel(), and substitutionModel_().