bpp-phyl3
3.0.0
|
#include <Bpp/Phyl/Model/MixtureOfSubstitutionModels.h>
Public Member Functions | |
MixtureOfSubstitutionModels (std::shared_ptr< const Alphabet > alpha, std::vector< std::unique_ptr< TransitionModelInterface >> &vpModel) | |
Constructor of a MixtureOfSubstitutionModels, where all the models have rate 1 and equal probability. More... | |
MixtureOfSubstitutionModels (std::shared_ptr< const Alphabet > alpha, std::vector< std::unique_ptr< TransitionModelInterface >> &vpModel, Vdouble &vproba, Vdouble &vrate) | |
Constructor of a MixtureOfSubstitutionModels. More... | |
MixtureOfSubstitutionModels (const MixtureOfSubstitutionModels &model) | |
MixtureOfSubstitutionModels & | operator= (const MixtureOfSubstitutionModels &model) |
MixtureOfSubstitutionModels * | clone () const override |
const SubstitutionModelInterface & | subModel (const std::string &name) const |
retrieve a pointer to the substitution model with the given name. More... | |
std::string | getName () const override |
Get the name of the model. More... | |
const TransitionModelInterface & | model (const std::string &name) const override |
retrieve a pointer to the submodel with the given name. More... | |
const TransitionModelInterface & | model (size_t i) const |
void | updateMatrices_ () override |
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVectors_ matrices. More... | |
virtual void | setVRates (const Vdouble &vd) override |
Sets the rates of the submodels to follow the constraint that the mean rate of the mixture equals rate_. More... | |
Vuint | getSubmodelNumbers (const std::string &desc) const override |
Returns the vector of numbers of the submodels in the mixture that match a description of the parameters numbers. More... | |
void | setFreq (std::map< int, double > &) override |
applies setFreq to all the models of the mixture and recovers the parameters values. More... | |
virtual size_t | getNumberOfModels () const override |
returns the number of models in the mixture More... | |
const TransitionModelInterface & | nModel (size_t i) const override |
Returns a specific model from the mixture. More... | |
std::shared_ptr< const TransitionModelInterface > | getNModel (size_t i) const override |
double | getNRate (size_t i) const override |
Returns the rate of a specific model from the mixture. More... | |
virtual void | setRate (double rate) override |
Set the rate of the model and the submodels. More... | |
virtual void | normalizeVRates () override |
Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_. More... | |
const std::vector< double > & | getVRates () const override |
Returns the vector of all the rates of the mixture. More... | |
virtual double | getNProbability (size_t i) const override |
Returns the probability of a specific model from the mixture. More... | |
virtual const std::vector< double > & | getProbabilities () const override |
Returns the vector of probabilities. More... | |
virtual void | setNProbability (size_t i, double prob) override |
Sets the probability of a specific model from the mixture. More... | |
virtual const Matrix< double > & | getPij_t (double t) const override |
From TransitionModel interface. More... | |
virtual const Matrix< double > & | getdPij_dt (double t) const override |
virtual const Matrix< double > & | getd2Pij_dt2 (double t) const override |
bool | computeFrequencies () const override |
void | computeFrequencies (bool yn) override |
void | setFreqFromData (const SequenceDataInterface &data, double pseudoCount) override |
Set equilibrium frequencies equal to the frequencies estimated from the data. More... | |
virtual double | freq (size_t i) const =0 |
virtual double | freq (size_t i) const override |
virtual double | Pij_t (size_t i, size_t j, double t) const =0 |
virtual double | Pij_t (size_t i, size_t j, double t) const override |
virtual double | dPij_dt (size_t i, size_t j, double t) const =0 |
virtual double | dPij_dt (size_t i, size_t j, double t) const override |
virtual double | d2Pij_dt2 (size_t i, size_t j, double t) const =0 |
virtual double | d2Pij_dt2 (size_t i, size_t j, double t) const override |
virtual const Vdouble & | getFrequencies () const =0 |
const Vdouble & | getFrequencies () 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 std::vector< int > & | getAlphabetStates () const =0 |
const std::vector< int > & | getAlphabetStates () const override |
virtual const StateMapInterface & | stateMap () const =0 |
const StateMapInterface & | stateMap () const override |
virtual std::shared_ptr< const StateMapInterface > | getStateMap () const =0 |
std::shared_ptr< const StateMapInterface > | getStateMap () const override |
virtual std::vector< size_t > | getModelStates (int code) const =0 |
Get the state in the model corresponding to a particular state in the alphabet. More... | |
virtual std::vector< size_t > | getModelStates (const std::string &code) const =0 |
Get the state in the model corresponding to a particular state in the alphabet. More... | |
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... | |
virtual int | getAlphabetStateAsInt (size_t index) const =0 |
int | getAlphabetStateAsInt (size_t index) const override |
virtual std::string | getAlphabetStateAsChar (size_t index) const =0 |
std::string | getAlphabetStateAsChar (size_t index) const override |
virtual const Alphabet & | alphabet () const =0 |
const Alphabet & | alphabet () const override |
virtual std::shared_ptr< const Alphabet > | getAlphabet () const =0 |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
virtual const FrequencySetInterface & | frequencySet () const =0 |
const FrequencySetInterface & | frequencySet () const override |
virtual size_t | getNumberOfStates () const =0 |
Get the number of states. More... | |
size_t | getNumberOfStates () const override |
Get the number of states. More... | |
virtual double | getInitValue (size_t i, int state) const =0 |
double | getInitValue (size_t i, int state) const override |
virtual double | getRate () const =0 |
Get the rate. More... | |
virtual double | getRate () const override |
The rate of the substitution process. More... | |
virtual void | addRateParameter ()=0 |
void | addRateParameter () override |
add a "rate" parameter to the model, that handles the overall rate of the process. More... | |
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 void | setNamespace (const std::string &prefix)=0 |
void | setNamespace (const std::string &prefix) |
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 |
virtual void | fireParameterChanged (const ParameterList ¶meters) override |
Tells the model that a parameter value has changed. More... | |
void | setVerboseLevel (short level) |
short | verboseLevel () const |
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 | |
TransitionModelInterface & | nModel_ (size_t i) override |
virtual Vdouble & | getFrequencies_ ()=0 |
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::vector< std::shared_ptr< TransitionModelInterface > > | modelsContainer_ |
vector of pointers to TransitionModels. More... | |
std::vector< double > | vProbas_ |
vector of the probabilities of the models More... | |
std::vector< double > | vRates_ |
vector of the rates of the models. More... | |
std::shared_ptr< const Alphabet > | alphabet_ |
The alphabet relevant to this model. More... | |
std::shared_ptr< const StateMapInterface > | stateMap_ |
The map of model states with alphabet states. More... | |
size_t | size_ |
The number of states. More... | |
double | rate_ |
The rate of the model (default: 1). The generator (and all its vectorial components) is independent of the rate, since it should be normalized. More... | |
Vdouble | freq_ |
The vector of equilibrium frequencies. More... | |
RowMatrix< double > | pijt_ |
These ones are for bookkeeping: More... | |
RowMatrix< double > | dpijt_ |
RowMatrix< double > | d2pijt_ |
short | verboseLevel_ |
Private Attributes | |
Eigen::VectorXd | lik_ |
ParameterList | independentParameters_ |
std::map< std::string, std::shared_ptr< AliasParameterListener > > | aliasListenersRegister_ |
ParameterList | parameters_ |
std::string | prefix_ |
Definition at line 18 of file MixtureOfSubstitutionModels.h.
|
inline |
Constructor of a MixtureOfSubstitutionModels, where all the models have rate 1 and equal probability.
alpha | pointer to the Alphabet |
vpModel | vector of pointers to SubstitutionModels. All the SubstitutionModels are owned by the instance. |
Definition at line 31 of file MixtureOfSubstitutionModels.h.
References bpp::BranchModelInterface::getName(), bpp::MixtureOfTransitionModels::model(), and bpp::AbstractMixedTransitionModel::modelsContainer_.
Referenced by clone().
|
inline |
Constructor of a MixtureOfSubstitutionModels.
alpha | pointer to the Alphabet |
vpModel | vector of pointers to SubstitutionModels. All the SubstitutionModels are owned by the instance. |
vproba | vector of the probabilities of the models |
vrate | vector of the rates of the models |
See above the constraints on the rates and the probabilities of the vectors.
Definition at line 59 of file MixtureOfSubstitutionModels.h.
References bpp::BranchModelInterface::getName(), bpp::MixtureOfTransitionModels::model(), and bpp::AbstractMixedTransitionModel::modelsContainer_.
|
inline |
Definition at line 79 of file MixtureOfSubstitutionModels.h.
|
overridevirtualinherited |
add a "rate" parameter to the model, that handles the overall rate of the process.
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 63 of file AbstractSubstitutionModel.cpp.
References bpp::AbstractParameterAliasable::addParameter_(), bpp::AbstractParameterAliasable::getNamespace(), bpp::Parameter::R_PLUS_STAR, and bpp::AbstractTransitionModel::rate_.
|
pure virtualinherited |
Implemented in bpp::TS98, bpp::TransitionFromTransitionModel, bpp::RegisterRatesSubstitutionModel, bpp::MultinomialFromTransitionModel, bpp::InMixedSubstitutionModel, bpp::G2001, bpp::FromMixtureSubstitutionModel, bpp::AbstractTransitionModel, bpp::AbstractFromSubstitutionModelTransitionModel, and bpp::AbstractBiblioTransitionModel.
Referenced by bpp::AbstractBiblioTransitionModel::addRateParameter(), bpp::AbstractFromSubstitutionModelTransitionModel::addRateParameter(), bpp::FromMixtureSubstitutionModel::addRateParameter(), bpp::InMixedSubstitutionModel::addRateParameter(), bpp::MultinomialFromTransitionModel::addRateParameter(), bpp::TransitionFromTransitionModel::addRateParameter(), and bpp::BppOSubstitutionModelFormat::updateParameters_().
|
pure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
Referenced by bpp::SubstitutionModelSet::addModel(), bpp::AbstractWrappedModel::alphabet(), bpp::NonHomogeneousSubstitutionProcess::createHomogeneousSubstitutionProcess(), bpp::NonHomogeneousSubstitutionProcess::createNonHomogeneousSubstitutionProcess(), and bpp::SENCA::setFreq().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 167 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::alphabet_.
Referenced by bpp::AbstractWordSubstitutionModel::AbstractWordSubstitutionModel(), and bpp::AbstractWordSubstitutionModel::operator=().
|
inlineoverridevirtual |
Implements bpp::AbstractMixedTransitionModel.
Definition at line 92 of file MixtureOfSubstitutionModels.h.
References MixtureOfSubstitutionModels().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 176 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::modelsContainer_.
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 184 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::modelsContainer_.
|
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_.
|
pure virtualinherited |
Implemented in bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractTransitionModel, bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::d2Pij_dt2(), bpp::InMixedSubstitutionModel::d2Pij_dt2(), and bpp::OneChangeRegisterTransitionModel::d2Pij_dt2().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Reimplemented in bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.
Definition at line 199 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::getd2Pij_dt2().
Referenced by bpp::JCprot::d2Pij_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_.
|
pure virtualinherited |
Implemented in bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractTransitionModel, bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.
Referenced by bpp::OneChangeRegisterTransitionModel::d2Pij_dt2(), bpp::AbstractTotallyWrappedTransitionModel::dPij_dt(), and bpp::InMixedSubstitutionModel::dPij_dt().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Reimplemented in bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.
Definition at line 198 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::getdPij_dt().
Referenced by bpp::JCprot::dPij_dt().
|
inlineoverridevirtualinherited |
Tells the model that a parameter value has changed.
This updates the matrices consequently.
Reimplemented from bpp::AbstractParameterAliasable.
Reimplemented in bpp::RegisterRatesSubstitutionModel, bpp::RE08, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::POMO, bpp::YpR, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, bpp::CodonSameAARateSubstitutionModel, bpp::AbstractDFPSubstitutionModel, bpp::SENCA, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::CodonAdHocSubstitutionModel, bpp::CodonDistanceSubstitutionModel, and bpp::gBGC.
Definition at line 217 of file AbstractSubstitutionModel.h.
References bpp::AbstractParameterAliasable::fireParameterChanged(), bpp::AbstractParameterAliasable::getNamespace(), bpp::ParameterList::getParameterValue(), bpp::ParameterList::hasParameter(), bpp::AbstractTransitionModel::rate_, bpp::ParameterList::size(), and bpp::AbstractTransitionModel::updateMatrices_().
Referenced by bpp::gBGC::fireParameterChanged(), bpp::CodonDistanceSubstitutionModel::fireParameterChanged(), bpp::CodonAdHocSubstitutionModel::fireParameterChanged(), bpp::CodonDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::CodonDistancePhaseFrequenciesSubstitutionModel::fireParameterChanged(), bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::KroneckerCodonDistanceSubstitutionModel::fireParameterChanged(), bpp::SENCA::fireParameterChanged(), bpp::D1WalkSubstitutionModel::fireParameterChanged(), bpp::EquiprobableSubstitutionModel::fireParameterChanged(), bpp::DSO78::fireParameterChanged(), bpp::JCprot::fireParameterChanged(), bpp::JTT92::fireParameterChanged(), bpp::LG08::fireParameterChanged(), bpp::UserProteinSubstitutionModel::fireParameterChanged(), and bpp::WAG01::fireParameterChanged().
|
pure virtualinherited |
Implemented in bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, and bpp::AbstractTransitionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::freq(), bpp::InMixedSubstitutionModel::freq(), bpp::OneChangeRegisterTransitionModel::freq(), and bpp::OneChangeTransitionModel::freq().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 195 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::freq_.
Referenced by bpp::CodonSameAARateSubstitutionModel::compute_().
|
pure virtualinherited |
Exception | if no FrequenceSet is associated to this model. |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, bpp::YN98, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::AbstractWrappedTransitionModel, bpp::AbstractWrappedModel, bpp::AbstractTransitionModel, and bpp::AbstractBiblioMixedTransitionModel.
Referenced by bpp::RE08Codon::codonFrequencySet(), bpp::AbstractWrappedModel::frequencySet(), bpp::AbstractWrappedTransitionModel::frequencySet(), bpp::OneChangeRegisterTransitionModel::frequencySet(), bpp::OneChangeTransitionModel::frequencySet(), and bpp::BppOSubstitutionModelFormat::write().
|
inlineoverridevirtualinherited |
Exception | if no FrequenceSet is associated to this model. |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, and bpp::CodonDistanceFrequenciesSubstitutionModel.
Definition at line 207 of file AbstractSubstitutionModel.h.
|
pure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
Referenced by bpp::NonHomogeneousSubstitutionProcess::addModel(), bpp::YpR::checkModel(), bpp::NonHomogeneousSubstitutionProcess::createHomogeneousSubstitutionProcess(), bpp::NonHomogeneousSubstitutionProcess::createNonHomogeneousSubstitutionProcess(), bpp::AbstractWrappedModel::getAlphabet(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::SENCA::setFreq(), bpp::NonHomogeneousSubstitutionProcess::setModel(), and bpp::BppOSubstitutionModelFormat::writeMixed_().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 169 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::alphabet_.
Referenced by bpp::AbstractWordSubstitutionModel::AbstractWordSubstitutionModel(), bpp::WordSubstitutionModel::completeMatrices_(), and bpp::RE08::getInitValue().
|
pure virtualinherited |
index | The model state. |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractTransitionModel, and bpp::AbstractWrappedModel.
Referenced by bpp::AbstractWrappedModel::getAlphabetStateAsChar(), and bpp::SubstitutionModelSet::getAlphabetStateAsChar().
|
inlineoverridevirtualinherited |
index | The model state. |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 179 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
|
pure virtualinherited |
index | The model state. |
Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::AbstractTransitionModel, bpp::RegisterRatesSubstitutionModel, and bpp::AbstractWrappedModel.
Referenced by bpp::AbstractWrappedModel::getAlphabetStateAsInt(), bpp::SubstitutionModelSet::getAlphabetStateAsInt(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), and bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns().
|
inlineoverridevirtualinherited |
index | The model state. |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 181 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
Referenced by bpp::AbstractCodonSubstitutionModel::completeMatrices_(), and bpp::AbstractTransitionModel::getInitValue().
|
pure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
Referenced by bpp::SubstitutionModelSet::getAlphabetStates(), and bpp::AbstractWrappedModel::getAlphabetStates().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 177 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
Referenced by bpp::DFP07::DFP07(), bpp::YNGP_M3::YNGP_M3(), and bpp::YNGP_M8::YNGP_M8().
|
overridevirtualinherited |
Implements bpp::AbstractTransitionModel.
Definition at line 110 of file AbstractMixedTransitionModel.cpp.
References bpp::AbstractTransitionModel::d2pijt_, bpp::AbstractTransitionModel::getNumberOfStates(), bpp::AbstractMixedTransitionModel::modelsContainer_, and bpp::AbstractMixedTransitionModel::vProbas_.
|
overridevirtualinherited |
Implements bpp::AbstractTransitionModel.
Definition at line 84 of file AbstractMixedTransitionModel.cpp.
References bpp::AbstractTransitionModel::dpijt_, bpp::AbstractTransitionModel::getNumberOfStates(), bpp::AbstractMixedTransitionModel::modelsContainer_, and bpp::AbstractMixedTransitionModel::vProbas_.
|
pure virtualinherited |
Implemented in bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, and bpp::AbstractTransitionModel.
Referenced by bpp::EquilibriumFrequenciesFromModel::compute(), bpp::AbstractTotallyWrappedTransitionModel::getFrequencies(), bpp::InMixedSubstitutionModel::getFrequencies(), bpp::OneChangeRegisterTransitionModel::getFrequencies(), and bpp::OneChangeTransitionModel::getFrequencies().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 187 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::freq_.
Referenced by bpp::SENCA::setFreq().
|
inlineoverrideprotectedvirtualinherited |
Implements bpp::TransitionModelInterface.
Definition at line 268 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::freq_.
Referenced by bpp::CodonDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::CodonDistancePhaseFrequenciesSubstitutionModel::fireParameterChanged(), bpp::CodonDistanceFrequenciesSubstitutionModel::setFreq(), bpp::CodonDistancePhaseFrequenciesSubstitutionModel::setFreq(), and bpp::DFPDistanceFrequenciesSubstitutionModel::setFreq().
|
protectedpure virtualinherited |
Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractTransitionModel, and bpp::AbstractFromSubstitutionModelTransitionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::getFrequencies_(), and bpp::InMixedSubstitutionModel::getFrequencies_().
|
pure virtualinherited |
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. |
Implemented in bpp::TransitionFromTransitionModel, bpp::RE08, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MultinomialFromTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, and bpp::AbstractTransitionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::getInitValue(), bpp::InMixedSubstitutionModel::getInitValue(), bpp::MultinomialFromTransitionModel::getInitValue(), bpp::OneChangeRegisterTransitionModel::getInitValue(), bpp::OneChangeTransitionModel::getInitValue(), and bpp::TransitionFromTransitionModel::getInitValue().
|
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.
Reimplemented in bpp::RE08.
Definition at line 70 of file AbstractSubstitutionModel.cpp.
References bpp::AbstractTransitionModel::alphabet_, bpp::AbstractTransitionModel::getAlphabetStateAsInt(), and bpp::AbstractTransitionModel::size_.
|
pure virtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
code | The alphabet state to check. |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
|
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 185 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
|
pure virtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
code | The alphabet state to check. |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
Referenced by bpp::SubstitutionModelSet::getModelStates(), and bpp::AbstractWrappedModel::getModelStates().
|
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 183 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
|
inlineoverridevirtualinherited |
Get the name of the model.
Implements bpp::BranchModelInterface.
Definition at line 133 of file MixtureOfTransitionModels.h.
Referenced by bpp::MixtureOfTransitionModels::model(), and bpp::ModelPath::toString().
|
inlineoverridevirtualinherited |
Implements bpp::MixedTransitionModelInterface.
Definition at line 91 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::modelsContainer_.
Referenced by bpp::MixtureOfTransitionModels::getSubmodelNumbers().
|
inlineoverridevirtualinherited |
Returns the probability of a specific model from the mixture.
Implements bpp::MixedTransitionModelInterface.
Definition at line 138 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::vProbas_.
|
inlineoverridevirtualinherited |
Returns the rate of a specific model from the mixture.
Implements bpp::MixedTransitionModelInterface.
Definition at line 99 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::vRates_.
|
inlineoverridevirtualinherited |
returns the number of models in the mixture
Implements bpp::MixedTransitionModelInterface.
Definition at line 78 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::modelsContainer_.
Referenced by bpp::MixtureOfTransitionModels::getSubmodelNumbers(), bpp::MixtureOfATransitionModel::model(), and bpp::MixtureOfTransitionModels::model().
|
pure virtualinherited |
Get the number of states.
For most models, this equals the size of the alphabet.
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::RE08Codon, bpp::RE08Protein, bpp::RE08Nucleotide, bpp::YpR, bpp::gBGC, bpp::MarkovModulatedSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::AbstractWrappedModel, bpp::AbstractTransitionModel, bpp::TwoParameterBinarySubstitutionModel, and bpp::BinarySubstitutionModel.
Referenced by bpp::NonHomogeneousSubstitutionProcess::addModel(), bpp::SubstitutionModelSet::addModel(), bpp::AbstractWrappedModel::getNumberOfStates(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), and bpp::NonHomogeneousSubstitutionProcess::setModel().
|
inlineoverridevirtualinherited |
Get the number of states.
For most models, this equals the size of the alphabet.
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel, bpp::RE08Codon, bpp::RE08Protein, bpp::RE08Nucleotide, bpp::YpR, bpp::gBGC, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, and bpp::BinarySubstitutionModel.
Definition at line 175 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
Referenced by bpp::AbstractCodonSubstitutionModel::completeMatrices_(), bpp::AbstractKroneckerCodonSubstitutionModel::completeMatrices_(), bpp::AbstractKroneckerWordSubstitutionModel::fillBasicGenerator_(), bpp::AbstractWordSubstitutionModel::fillBasicGenerator_(), bpp::WordSubstitutionModel::getd2Pij_dt2(), bpp::AbstractMixedTransitionModel::getd2Pij_dt2(), bpp::WordSubstitutionModel::getdPij_dt(), bpp::AbstractMixedTransitionModel::getdPij_dt(), bpp::RE08Nucleotide::getNumberOfStates(), bpp::RE08Protein::getNumberOfStates(), bpp::RE08Codon::getNumberOfStates(), bpp::WordSubstitutionModel::getPij_t(), bpp::AbstractMixedTransitionModel::getPij_t(), bpp::AbstractWordSubstitutionModel::setFreq(), bpp::AbstractSubstitutionModel::updateMatrices_(), bpp::AbstractWordSubstitutionModel::updateMatrices_(), bpp::MixtureOfATransitionModel::updateMatrices_(), and bpp::MixtureOfTransitionModels::updateMatrices_().
|
overridevirtualinherited |
From TransitionModel interface.
Implements bpp::AbstractTransitionModel.
Definition at line 58 of file AbstractMixedTransitionModel.cpp.
References bpp::AbstractTransitionModel::getNumberOfStates(), bpp::AbstractMixedTransitionModel::modelsContainer_, bpp::AbstractTransitionModel::pijt_, and bpp::AbstractMixedTransitionModel::vProbas_.
|
inlineoverridevirtualinherited |
Returns the vector of probabilities.
Implements bpp::MixedTransitionModelInterface.
Definition at line 147 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::vProbas_.
|
pure virtualinherited |
Get the rate.
Implemented in bpp::TS98, bpp::TransitionFromTransitionModel, bpp::RegisterRatesSubstitutionModel, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MultinomialFromTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::G2001, bpp::AbstractTotallyWrappedTransitionModel, and bpp::AbstractTransitionModel.
Referenced by bpp::AbstractFromSubstitutionModelTransitionModel::addRateParameter(), bpp::OneChangeRegisterTransitionModel::d2Pij_dt2(), bpp::OneChangeRegisterTransitionModel::dPij_dt(), bpp::OneChangeRegisterTransitionModel::getd2Pij_dt2(), bpp::OneChangeRegisterTransitionModel::getdPij_dt(), bpp::OneChangeRegisterTransitionModel::getPij_t(), bpp::AbstractTotallyWrappedTransitionModel::getRate(), bpp::InMixedSubstitutionModel::getRate(), bpp::MultinomialFromTransitionModel::getRate(), bpp::OneChangeRegisterTransitionModel::getRate(), bpp::OneChangeTransitionModel::getRate(), bpp::RegisterRatesSubstitutionModel::getRate(), and bpp::TransitionFromTransitionModel::getRate().
|
overridevirtualinherited |
The rate of the substitution process.
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 45 of file AbstractSubstitutionModel.cpp.
References bpp::AbstractTransitionModel::rate_.
|
pure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
Referenced by bpp::SubstitutionModelSet::getStateMap(), bpp::SubstitutionProcessCollectionMember::getStateMap(), and bpp::AbstractWrappedModel::getStateMap().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 173 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
Referenced by bpp::D1WalkSubstitutionModel::D1WalkSubstitutionModel(), and bpp::EquiprobableSubstitutionModel::EquiprobableSubstitutionModel().
|
overridevirtualinherited |
Returns the vector of numbers of the submodels in the mixture that match a description of the parameters numbers.
desc | is the description of the class indexes of the mixed parameters. Syntax is like: kappa_1,gamma_3,delta_2 |
Implements bpp::MixedTransitionModelInterface.
Definition at line 256 of file MixtureOfTransitionModels.cpp.
References bpp::AbstractMixedTransitionModel::getNModel(), and bpp::AbstractMixedTransitionModel::getNumberOfModels().
|
inlineoverridevirtualinherited |
Returns the vector of all the rates of the mixture.
Implements bpp::MixedTransitionModelInterface.
Definition at line 129 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::vRates_.
|
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_.
|
overridevirtualinherited |
retrieve a pointer to the submodel with the given name.
Implements bpp::MixedTransitionModelInterface.
Definition at line 160 of file MixtureOfTransitionModels.cpp.
References bpp::MixtureOfTransitionModels::getName(), bpp::AbstractMixedTransitionModel::getNumberOfModels(), and bpp::AbstractMixedTransitionModel::nModel().
Referenced by MixtureOfSubstitutionModels(), operator=(), and subModel().
|
inlineinherited |
Definition at line 140 of file MixtureOfTransitionModels.h.
References bpp::AbstractMixedTransitionModel::nModel().
|
inlineoverridevirtualinherited |
Returns a specific model from the mixture.
Implements bpp::MixedTransitionModelInterface.
Definition at line 86 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::modelsContainer_.
Referenced by bpp::MixtureOfATransitionModel::model(), bpp::MixtureOfTransitionModels::model(), and bpp::MixtureOfASubstitutionModel::subNModel().
|
inlineoverrideprotectedvirtualinherited |
Implements bpp::MixedTransitionModelInterface.
Definition at line 208 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::modelsContainer_.
|
overridevirtualinherited |
Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_.
Implements bpp::MixedTransitionModelInterface.
Definition at line 169 of file AbstractMixedTransitionModel.cpp.
References bpp::AbstractMixedTransitionModel::modelsContainer_, bpp::AbstractTransitionModel::rate_, bpp::AbstractMixedTransitionModel::vProbas_, and bpp::AbstractMixedTransitionModel::vRates_.
Referenced by bpp::AbstractMixedTransitionModel::setVRates().
|
inline |
Definition at line 86 of file MixtureOfSubstitutionModels.h.
References bpp::MixtureOfTransitionModels::model(), and bpp::MixtureOfTransitionModels::operator=().
|
pure virtualinherited |
Implemented in bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractTransitionModel, bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.
Referenced by bpp::OneChangeRegisterTransitionModel::d2Pij_dt2(), bpp::AbstractTotallyWrappedTransitionModel::Pij_t(), bpp::InMixedSubstitutionModel::Pij_t(), and bpp::OneChangeRegisterTransitionModel::Pij_t().
|
inlineoverridevirtualinherited |
Implements bpp::TransitionModelInterface.
Reimplemented in bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.
Definition at line 197 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::getPij_t().
Referenced by bpp::JCprot::Pij_t().
|
overridevirtualinherited |
applies setFreq to all the models of the mixture and recovers the parameters values.
Reimplemented from bpp::AbstractMixedTransitionModel.
Definition at line 227 of file MixtureOfTransitionModels.cpp.
References bpp::ParameterList::addParameters(), bpp::AbstractParameterAliasable::getParameters(), bpp::AbstractParameterAliasable::matchParametersValues(), and bpp::AbstractMixedTransitionModel::modelsContainer_.
|
inlineoverridevirtualinherited |
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 200 of file AbstractMixedTransitionModel.h.
References bpp::SequenceContainerTools::getFrequencies(), and bpp::AbstractMixedTransitionModel::setFreq().
|
inlineoverridevirtualinherited |
Sets the probability of a specific model from the mixture.
Implements bpp::MixedTransitionModelInterface.
Definition at line 155 of file AbstractMixedTransitionModel.h.
References bpp::AbstractMixedTransitionModel::vProbas_.
|
overridevirtualinherited |
Set the rate of the model and the submodels.
rate | must be positive. |
Reimplemented from bpp::AbstractTransitionModel.
Definition at line 136 of file AbstractMixedTransitionModel.cpp.
References bpp::AbstractMixedTransitionModel::modelsContainer_, bpp::AbstractTransitionModel::rate_, bpp::AbstractTransitionModel::setRate(), bpp::AbstractMixedTransitionModel::vProbas_, and bpp::AbstractMixedTransitionModel::vRates_.
|
inlineinherited |
Definition at line 239 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::verboseLevel_.
|
overridevirtualinherited |
Sets the rates of the submodels to follow the constraint that the mean rate of the mixture equals rate_.
vd | a vector of positive values such that the rates of the respective submodels are in the same proportions (ie this vector does not need to be normalized). |
Reimplemented from bpp::AbstractMixedTransitionModel.
Definition at line 238 of file MixtureOfTransitionModels.cpp.
References bpp::AbstractMixedTransitionModel::modelsContainer_, bpp::AbstractParameterAliasable::setParameterValue(), bpp::AbstractMixedTransitionModel::setVRates(), bpp::TextTools::toString(), and bpp::AbstractMixedTransitionModel::vRates_.
|
pure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
Referenced by bpp::SubstitutionModelSet::stateMap(), bpp::SubstitutionProcessCollectionMember::stateMap(), and bpp::AbstractWrappedModel::stateMap().
|
inlineoverridevirtualinherited |
Implements bpp::BranchModelInterface.
Reimplemented in bpp::RegisterRatesSubstitutionModel.
Definition at line 171 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::stateMap_.
|
inline |
retrieve a pointer to the substitution model with the given name.
Definition at line 98 of file MixtureOfSubstitutionModels.h.
References bpp::MixtureOfTransitionModels::model().
|
overridevirtualinherited |
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVectors_ matrices.
The generator_ matrix and freq_ vector must be initialized.
Eigen values and vectors are computed from the generator and assigned to the eigenValues_ for the real part, iEigenValues_ for the imaginary part, rightEigenVectors_ and leftEigenVectors_ variables. isDiagonalizable_ checks if the generator_ is diagonalizable in R.
The optional rate parameter is not taken into account in this method to prevent unnecessary computation.
!! Here there is no normalization of the generator.
Implements bpp::AbstractTransitionModel.
Definition at line 173 of file MixtureOfTransitionModels.cpp.
References bpp::AbstractTransitionModel::freq_, bpp::AbstractTransitionModel::getNumberOfStates(), bpp::AbstractParameterAliasable::getParameters(), bpp::AbstractParameterAliasable::getParameterValue(), bpp::AbstractMixedTransitionModel::modelsContainer_, bpp::AbstractTransitionModel::rate_, bpp::TextTools::toString(), bpp::AbstractMixedTransitionModel::vProbas_, and bpp::AbstractMixedTransitionModel::vRates_.
Referenced by bpp::MixtureOfTransitionModels::MixtureOfTransitionModels().
|
inlineinherited |
Definition at line 241 of file AbstractSubstitutionModel.h.
References bpp::AbstractTransitionModel::verboseLevel_.
|
protectedinherited |
The alphabet relevant to this model.
Definition at line 121 of file AbstractSubstitutionModel.h.
Referenced by bpp::AbstractWordSubstitutionModel::AbstractWordSubstitutionModel(), bpp::AbstractTransitionModel::alphabet(), bpp::POMO::getAllelicAlphabet(), bpp::AbstractTransitionModel::getAlphabet(), bpp::AbstractTransitionModel::getInitValue(), bpp::RE08::getInitValue(), bpp::AbstractNucleotideSubstitutionModel::getNucleicAlphabet(), bpp::AbstractReversibleNucleotideSubstitutionModel::getNucleicAlphabet(), bpp::RE08Nucleotide::getNucleicAlphabet(), bpp::AbstractProteinSubstitutionModel::getProteicAlphabet(), bpp::AbstractReversibleProteinSubstitutionModel::getProteicAlphabet(), bpp::RE08Protein::getProteicAlphabet(), and bpp::AbstractWordSubstitutionModel::operator=().
|
mutableprotectedinherited |
Definition at line 150 of file AbstractSubstitutionModel.h.
Referenced by bpp::WordSubstitutionModel::getd2Pij_dt2(), bpp::AbstractSubstitutionModel::getd2Pij_dt2(), and bpp::AbstractMixedTransitionModel::getd2Pij_dt2().
|
mutableprotectedinherited |
Definition at line 149 of file AbstractSubstitutionModel.h.
Referenced by bpp::WordSubstitutionModel::getdPij_dt(), bpp::AbstractSubstitutionModel::getdPij_dt(), and bpp::AbstractMixedTransitionModel::getdPij_dt().
|
protectedinherited |
The vector of equilibrium frequencies.
Definition at line 143 of file AbstractSubstitutionModel.h.
Referenced by bpp::AbstractReversibleSubstitutionModel::AbstractReversibleSubstitutionModel(), bpp::AbstractTransitionModel::AbstractTransitionModel(), bpp::WordSubstitutionModel::completeMatrices_(), bpp::Coala::computeEquilibriumFrequencies(), bpp::RE08::d2Pij_dt2(), bpp::RE08::dPij_dt(), bpp::DSO78::DSO78(), bpp::EquiprobableSubstitutionModel::EquiprobableSubstitutionModel(), bpp::EquiprobableSubstitutionModel::fireParameterChanged(), bpp::DSO78::fireParameterChanged(), bpp::JCprot::fireParameterChanged(), bpp::JTT92::fireParameterChanged(), bpp::LG08::fireParameterChanged(), bpp::UserProteinSubstitutionModel::fireParameterChanged(), bpp::WAG01::fireParameterChanged(), bpp::AbstractTransitionModel::freq(), bpp::RE08::getd2Pij_dt2(), bpp::RE08::getdPij_dt(), bpp::AbstractTransitionModel::getFrequencies(), bpp::AbstractTransitionModel::getFrequencies_(), bpp::RE08::getPij_t(), bpp::AbstractSubstitutionModel::getScale(), bpp::JCprot::JCprot(), bpp::JTT92::JTT92(), bpp::LG08::LG08(), bpp::RE08::Pij_t(), bpp::RE08::RE08(), bpp::UserProteinSubstitutionModel::readFromFile(), bpp::D1WalkSubstitutionModel::setFreq(), bpp::EquiprobableSubstitutionModel::setFreq(), bpp::AbstractTransitionModel::setFreq(), bpp::DSO78::setFreqFromData(), bpp::JCprot::setFreqFromData(), bpp::JTT92::setFreqFromData(), bpp::LG08::setFreqFromData(), bpp::UserProteinSubstitutionModel::setFreqFromData(), bpp::WAG01::setFreqFromData(), bpp::AbstractSubstitutionModel::updateMatrices_(), bpp::AbstractWordSubstitutionModel::updateMatrices_(), bpp::BinarySubstitutionModel::updateMatrices_(), bpp::F84::updateMatrices_(), bpp::HKY85::updateMatrices_(), bpp::TwoParameterBinarySubstitutionModel::updateMatrices_(), bpp::AbstractReversibleSubstitutionModel::updateMatrices_(), bpp::D1WalkSubstitutionModel::updateMatrices_(), bpp::EquiprobableSubstitutionModel::updateMatrices_(), bpp::MixtureOfATransitionModel::updateMatrices_(), bpp::MixtureOfTransitionModels::updateMatrices_(), bpp::F81::updateMatrices_(), bpp::gBGC::updateMatrices_(), bpp::GTR::updateMatrices_(), bpp::JCnuc::updateMatrices_(), bpp::K80::updateMatrices_(), bpp::L95::updateMatrices_(), bpp::RN95::updateMatrices_(), bpp::RN95s::updateMatrices_(), bpp::SSR::updateMatrices_(), bpp::T92::updateMatrices_(), bpp::TN93::updateMatrices_(), bpp::POMO::updateMatrices_(), bpp::JCprot::updateMatrices_(), bpp::RE08::updateMatrices_(), bpp::YpR::updateMatrices_(), bpp::UserProteinSubstitutionModel::UserProteinSubstitutionModel(), and bpp::WAG01::WAG01().
|
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 |
vector of pointers to TransitionModels.
Beware: these TransitionModels are owned by the object, so will be deleted at destruction
Definition at line 41 of file AbstractMixedTransitionModel.h.
Referenced by bpp::AbstractMixedTransitionModel::AbstractMixedTransitionModel(), bpp::AbstractMixedTransitionModel::computeFrequencies(), bpp::AbstractMixedTransitionModel::getd2Pij_dt2(), bpp::AbstractMixedTransitionModel::getdPij_dt(), bpp::AbstractMixedTransitionModel::getNModel(), bpp::AbstractMixedTransitionModel::getNumberOfModels(), bpp::AbstractMixedTransitionModel::getPij_t(), bpp::MixtureOfATransitionModel::getSubmodelNumbers(), bpp::MixtureOfATransitionModel::MixtureOfATransitionModel(), MixtureOfSubstitutionModels(), bpp::MixtureOfTransitionModels::MixtureOfTransitionModels(), bpp::AbstractMixedTransitionModel::nModel(), bpp::AbstractMixedTransitionModel::nModel_(), bpp::AbstractMixedTransitionModel::normalizeVRates(), bpp::AbstractMixedTransitionModel::operator=(), bpp::MixtureOfATransitionModel::setFreq(), bpp::MixtureOfTransitionModels::setFreq(), bpp::AbstractMixedTransitionModel::setFreq(), bpp::AbstractMixedTransitionModel::setRate(), bpp::AbstractMixedTransitionModel::setVRates(), bpp::MixtureOfTransitionModels::setVRates(), bpp::MixtureOfASubstitutionModel::updateMatrices_(), bpp::MixtureOfATransitionModel::updateMatrices_(), and bpp::MixtureOfTransitionModels::updateMatrices_().
|
mutableprotectedinherited |
These ones are for bookkeeping:
Definition at line 148 of file AbstractSubstitutionModel.h.
Referenced by bpp::WordSubstitutionModel::getPij_t(), bpp::AbstractSubstitutionModel::getPij_t(), and bpp::AbstractMixedTransitionModel::getPij_t().
|
protectedinherited |
The rate of the model (default: 1). The generator (and all its vectorial components) is independent of the rate, since it should be normalized.
Definition at line 138 of file AbstractSubstitutionModel.h.
Referenced by bpp::AbstractTransitionModel::addRateParameter(), bpp::BinarySubstitutionModel::d2Pij_dt2(), bpp::F84::d2Pij_dt2(), bpp::HKY85::d2Pij_dt2(), bpp::TwoParameterBinarySubstitutionModel::d2Pij_dt2(), bpp::EquiprobableSubstitutionModel::d2Pij_dt2(), bpp::F81::d2Pij_dt2(), bpp::JCnuc::d2Pij_dt2(), bpp::K80::d2Pij_dt2(), bpp::T92::d2Pij_dt2(), bpp::TN93::d2Pij_dt2(), bpp::JCprot::d2Pij_dt2(), bpp::BinarySubstitutionModel::dPij_dt(), bpp::F84::dPij_dt(), bpp::HKY85::dPij_dt(), bpp::TwoParameterBinarySubstitutionModel::dPij_dt(), bpp::EquiprobableSubstitutionModel::dPij_dt(), bpp::F81::dPij_dt(), bpp::JCnuc::dPij_dt(), bpp::K80::dPij_dt(), bpp::T92::dPij_dt(), bpp::TN93::dPij_dt(), bpp::JCprot::dPij_dt(), bpp::AbstractTransitionModel::fireParameterChanged(), bpp::BinarySubstitutionModel::getd2Pij_dt2(), bpp::F84::getd2Pij_dt2(), bpp::HKY85::getd2Pij_dt2(), bpp::TwoParameterBinarySubstitutionModel::getd2Pij_dt2(), bpp::EquiprobableSubstitutionModel::getd2Pij_dt2(), bpp::F81::getd2Pij_dt2(), bpp::JCnuc::getd2Pij_dt2(), bpp::K80::getd2Pij_dt2(), bpp::T92::getd2Pij_dt2(), bpp::TN93::getd2Pij_dt2(), bpp::JCprot::getd2Pij_dt2(), bpp::WordSubstitutionModel::getd2Pij_dt2(), bpp::AbstractSubstitutionModel::getd2Pij_dt2(), bpp::BinarySubstitutionModel::getdPij_dt(), bpp::F84::getdPij_dt(), bpp::HKY85::getdPij_dt(), bpp::TwoParameterBinarySubstitutionModel::getdPij_dt(), bpp::EquiprobableSubstitutionModel::getdPij_dt(), bpp::F81::getdPij_dt(), bpp::JCnuc::getdPij_dt(), bpp::K80::getdPij_dt(), bpp::T92::getdPij_dt(), bpp::TN93::getdPij_dt(), bpp::JCprot::getdPij_dt(), bpp::WordSubstitutionModel::getdPij_dt(), bpp::AbstractSubstitutionModel::getdPij_dt(), bpp::BinarySubstitutionModel::getPij_t(), bpp::F84::getPij_t(), bpp::HKY85::getPij_t(), bpp::TwoParameterBinarySubstitutionModel::getPij_t(), bpp::EquiprobableSubstitutionModel::getPij_t(), bpp::F81::getPij_t(), bpp::JCnuc::getPij_t(), bpp::K80::getPij_t(), bpp::T92::getPij_t(), bpp::TN93::getPij_t(), bpp::JCprot::getPij_t(), bpp::WordSubstitutionModel::getPij_t(), bpp::AbstractSubstitutionModel::getPij_t(), bpp::AbstractTransitionModel::getRate(), bpp::AbstractMixedTransitionModel::normalizeVRates(), bpp::BinarySubstitutionModel::Pij_t(), bpp::F84::Pij_t(), bpp::HKY85::Pij_t(), bpp::TwoParameterBinarySubstitutionModel::Pij_t(), bpp::EquiprobableSubstitutionModel::Pij_t(), bpp::F81::Pij_t(), bpp::JCnuc::Pij_t(), bpp::K80::Pij_t(), bpp::T92::Pij_t(), bpp::TN93::Pij_t(), bpp::JCprot::Pij_t(), bpp::AbstractMixedTransitionModel::setRate(), bpp::AbstractTransitionModel::setRate(), bpp::BinarySubstitutionModel::updateMatrices_(), bpp::TwoParameterBinarySubstitutionModel::updateMatrices_(), and bpp::MixtureOfTransitionModels::updateMatrices_().
|
protectedinherited |
The number of states.
Definition at line 131 of file AbstractSubstitutionModel.h.
Referenced by bpp::AbstractReversibleSubstitutionModel::AbstractReversibleSubstitutionModel(), bpp::AbstractTransitionModel::AbstractTransitionModel(), bpp::D1WalkSubstitutionModel::D1WalkSubstitutionModel(), bpp::EquiprobableSubstitutionModel::d2Pij_dt2(), bpp::RE08::d2Pij_dt2(), bpp::EquiprobableSubstitutionModel::dPij_dt(), bpp::RE08::dPij_dt(), bpp::EquiprobableSubstitutionModel::getd2Pij_dt2(), bpp::JCnuc::getd2Pij_dt2(), bpp::JCprot::getd2Pij_dt2(), bpp::RE08::getd2Pij_dt2(), bpp::AbstractSubstitutionModel::getd2Pij_dt2(), bpp::EquiprobableSubstitutionModel::getdPij_dt(), bpp::JCnuc::getdPij_dt(), bpp::JCprot::getdPij_dt(), bpp::RE08::getdPij_dt(), bpp::AbstractSubstitutionModel::getdPij_dt(), bpp::AbstractTransitionModel::getInitValue(), bpp::RE08::getInitValue(), bpp::EquiprobableSubstitutionModel::getPij_t(), bpp::JCnuc::getPij_t(), bpp::JCprot::getPij_t(), bpp::RE08::getPij_t(), bpp::AbstractSubstitutionModel::getPij_t(), bpp::EquiprobableSubstitutionModel::Pij_t(), bpp::RE08::Pij_t(), bpp::RE08::RE08(), bpp::AbstractSubstitutionModel::setDiagonal(), bpp::T92::T92(), bpp::TN93::TN93(), bpp::AbstractWordSubstitutionModel::updateMatrices_(), bpp::EquiprobableSubstitutionModel::updateMatrices_(), bpp::RN95::updateMatrices_(), bpp::RN95s::updateMatrices_(), bpp::RE08::updateMatrices_(), and bpp::YpR::updateMatrices_().
|
protectedinherited |
The map of model states with alphabet states.
Definition at line 126 of file AbstractSubstitutionModel.h.
Referenced by bpp::AbstractWordSubstitutionModel::AbstractWordSubstitutionModel(), bpp::CodonSameAARateSubstitutionModel::compute_(), bpp::AbstractTransitionModel::getAlphabetStateAsChar(), bpp::AbstractTransitionModel::getAlphabetStateAsInt(), bpp::AbstractTransitionModel::getAlphabetStates(), bpp::AbstractTransitionModel::getModelStates(), bpp::AbstractTransitionModel::getNumberOfStates(), bpp::AbstractTransitionModel::getStateMap(), and bpp::AbstractTransitionModel::stateMap().
|
protectedinherited |
Definition at line 152 of file AbstractSubstitutionModel.h.
Referenced by bpp::AbstractTransitionModel::setVerboseLevel(), bpp::AbstractSubstitutionModel::updateMatrices_(), and bpp::AbstractTransitionModel::verboseLevel().
|
protectedinherited |
vector of the probabilities of the models
Definition at line 46 of file AbstractMixedTransitionModel.h.
Referenced by bpp::AbstractMixedTransitionModel::AbstractMixedTransitionModel(), bpp::AbstractMixedTransitionModel::getd2Pij_dt2(), bpp::AbstractMixedTransitionModel::getdPij_dt(), bpp::AbstractMixedTransitionModel::getNProbability(), bpp::AbstractMixedTransitionModel::getPij_t(), bpp::AbstractMixedTransitionModel::getProbabilities(), bpp::MixtureOfATransitionModel::MixtureOfATransitionModel(), bpp::MixtureOfTransitionModels::MixtureOfTransitionModels(), bpp::AbstractMixedTransitionModel::normalizeVRates(), bpp::AbstractMixedTransitionModel::operator=(), bpp::AbstractMixedTransitionModel::setNProbability(), bpp::AbstractMixedTransitionModel::setRate(), bpp::MixtureOfATransitionModel::updateMatrices_(), and bpp::MixtureOfTransitionModels::updateMatrices_().
|
protectedinherited |
vector of the rates of the models.
For the computation of the transition probabilities, the rates are included in the submodels while updating the mixture, so there is no need to multiply here the transition times with the rates.
The mean (on the distribution of the models) of the elements of this vector equals the overall rate of the mixture model, that is rate_;
Definition at line 60 of file AbstractMixedTransitionModel.h.
Referenced by bpp::AbstractMixedTransitionModel::AbstractMixedTransitionModel(), bpp::AbstractMixedTransitionModel::getNRate(), bpp::AbstractMixedTransitionModel::getVRates(), bpp::MixtureOfATransitionModel::MixtureOfATransitionModel(), bpp::MixtureOfTransitionModels::MixtureOfTransitionModels(), bpp::AbstractMixedTransitionModel::normalizeVRates(), bpp::AbstractMixedTransitionModel::operator=(), bpp::AbstractMixedTransitionModel::setRate(), bpp::AbstractMixedTransitionModel::setVRates(), bpp::MixtureOfTransitionModels::setVRates(), and bpp::MixtureOfTransitionModels::updateMatrices_().