bpp-phyl3
3.0.0
|
Interface for all transition models. More...
#include <Bpp/Phyl/Model/SubstitutionModel.h>
Public Member Functions | |
TransitionModelInterface () | |
virtual | ~TransitionModelInterface () |
TransitionModelInterface * | clone () const =0 |
virtual double | freq (size_t i) const =0 |
virtual double | Pij_t (size_t i, size_t j, double t) const =0 |
virtual double | dPij_dt (size_t i, size_t j, double t) const =0 |
virtual double | d2Pij_dt2 (size_t i, size_t j, double t) const =0 |
virtual const Vdouble & | getFrequencies () const =0 |
virtual bool | computeFrequencies () const =0 |
virtual void | computeFrequencies (bool yn)=0 |
virtual const Matrix< double > & | getPij_t (double t) const =0 |
virtual const Matrix< double > & | getdPij_dt (double t) const =0 |
virtual const Matrix< double > & | getd2Pij_dt2 (double t) const =0 |
virtual const Eigen::VectorXd & | Lik_t (const Eigen::VectorXd &values, double t) const =0 |
virtual const Eigen::VectorXd & | dLik_dt (const Eigen::VectorXd &values, double t) const =0 |
virtual const Eigen::VectorXd & | d2Lik_dt2 (const Eigen::VectorXd &values, double t) const =0 |
virtual void | setFreqFromData (const SequenceDataInterface &data, double pseudoCount=0)=0 |
Set equilibrium frequencies equal to the frequencies estimated from the data. More... | |
virtual void | setFreq (std::map< int, double > &frequencies)=0 |
Set equilibrium frequencies. More... | |
virtual std::string | getName () const =0 |
Get the name of the model. More... | |
virtual const std::vector< int > & | getAlphabetStates () const =0 |
virtual const StateMapInterface & | stateMap () const =0 |
virtual std::shared_ptr< const StateMapInterface > | getStateMap () const =0 |
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... | |
virtual int | getAlphabetStateAsInt (size_t index) const =0 |
virtual std::string | getAlphabetStateAsChar (size_t index) const =0 |
virtual const Alphabet & | alphabet () const =0 |
virtual std::shared_ptr< const Alphabet > | getAlphabet () const =0 |
virtual const FrequencySetInterface & | frequencySet () const =0 |
virtual size_t | getNumberOfStates () const =0 |
Get the number of states. More... | |
virtual double | getInitValue (size_t i, int state) const =0 |
virtual double | getRate () const =0 |
Get the rate. More... | |
virtual void | setRate (double rate)=0 |
Set the rate of the model (must be positive). More... | |
virtual void | addRateParameter ()=0 |
virtual size_t | getNumberOfIndependentParameters () const=0 |
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 |
virtual void | unaliasParameters (const std::string &p1, const std::string &p2)=0 |
virtual const ParameterList & | getIndependentParameters () const=0 |
virtual std::vector< std::string > | getAlias (const std::string &name) const=0 |
virtual std::map< std::string, std::string > | getAliases () const=0 |
virtual bool | hasParameter (const std::string &name) const=0 |
virtual const ParameterList & | getParameters () const=0 |
virtual const Parameter & | parameter (const std::string &name) const=0 |
virtual double | getParameterValue (const std::string &name) const=0 |
virtual void | setAllParametersValues (const ParameterList ¶meters)=0 |
virtual void | setParameterValue (const std::string &name, double value)=0 |
virtual void | setParametersValues (const ParameterList ¶meters)=0 |
virtual bool | matchParametersValues (const ParameterList ¶meters)=0 |
virtual void | removeConstraint (const std::string &name)=0 |
virtual void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0 |
virtual size_t | getNumberOfParameters () const=0 |
virtual void | setNamespace (const std::string &prefix)=0 |
virtual std::string | getNamespace () const=0 |
virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const=0 |
Protected Member Functions | |
virtual Vdouble & | getFrequencies_ ()=0 |
virtual ParameterList & | getParameters_ ()=0 |
Friends | |
class | AbstractTotallyWrappedTransitionModel |
class | AbstractFromSubstitutionModelTransitionModel |
class | InMixedSubstitutionModel |
Interface for all transition models.
A transition model defines transition probability matrices, the size of which depends on the alphabet used (4 for nucleotides, 20 for proteins, etc.). Each SubstitutionModel object hence includes a pointer toward an alphabet, and provides a method to retrieve the alphabet used (getAlphabet() method).
What we want from a transition model is to compute the probabilities of state j at time t geven state j at time 0 ( ).
First and second order derivatives of with respect to can also be retrieved. These methods may be useful for optimization processes.
Definition at line 187 of file SubstitutionModel.h.
|
inline |
Definition at line 193 of file SubstitutionModel.h.
|
inlinevirtual |
Definition at line 194 of file SubstitutionModel.h.
|
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().
|
pure virtual |
Implements bpp::BranchModelInterface.
Implemented in bpp::ReversibleSubstitutionModelInterface, bpp::SubstitutionModelInterface, bpp::AbstractReversibleProteinSubstitutionModel, bpp::AbstractProteinSubstitutionModel, bpp::ProteinReversibleSubstitutionModelInterface, bpp::ProteinSubstitutionModelInterface, bpp::AbstractReversibleNucleotideSubstitutionModel, bpp::AbstractNucleotideSubstitutionModel, bpp::NucleotideReversibleSubstitutionModelInterface, bpp::NucleotideSubstitutionModelInterface, bpp::MixedTransitionModelInterface, bpp::MarkovModulatedSubstitutionModel, bpp::YNGP_M, bpp::CodonReversibleSubstitutionModelInterface, bpp::CodonSubstitutionModelInterface, bpp::AbstractKroneckerCodonSubstitutionModel, bpp::AbstractDFPSubstitutionModel, bpp::AbstractCodonSubstitutionModel, bpp::AbstractReversibleSubstitutionModel, bpp::AbstractMixedTransitionModel, bpp::WordSubstitutionModel, bpp::TS98, bpp::RegisterRatesSubstitutionModel, bpp::RE08Codon, bpp::RE08Protein, bpp::RE08Nucleotide, bpp::RE08, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LLG08_UL3, bpp::LLG08_UL3::EmbeddedModel, bpp::LLG08_UL2, bpp::LLG08_UL2::EmbeddedModel, bpp::LLG08_EX3, bpp::LLG08_EX3::EmbeddedModel, bpp::LLG08_EX2, bpp::LLG08_EX2::EmbeddedModel, bpp::LLG08_EHO, bpp::LLG08_EHO::EmbeddedModel, bpp::LGL08_CAT, bpp::LGL08_CAT::EmbeddedModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::Coala, bpp::POMO, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::YpR_Gen, bpp::YpR_Sym, bpp::TN93, bpp::T92, bpp::SSR, bpp::RN95s, bpp::RN95, bpp::L95, bpp::K80, bpp::JCnuc, bpp::GTR, bpp::gBGC, bpp::F81, bpp::MixtureOfTransitionModels, bpp::MixtureOfSubstitutionModels, bpp::MixtureOfATransitionModel, bpp::MixtureOfASubstitutionModel, bpp::KroneckerWordSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::G2001, bpp::FromMixtureSubstitutionModel, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, bpp::YNGP_M9, bpp::YNGP_M8, bpp::YNGP_M7, bpp::YNGP_M3, bpp::YNGP_M2, bpp::YNGP_M10, bpp::YNGP_M1, bpp::YN98, bpp::TripletSubstitutionModel, bpp::SENCA, bpp::RELAX, bpp::MG94, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::KCM, bpp::GY94, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::DFP07, bpp::CodonSameAARateSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::CodonAdHocSubstitutionModel, bpp::AnonymousSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::LG10_EX_EHO, bpp::LG10_EX_EHO::EmbeddedModel, bpp::HKY85, bpp::F84, bpp::CodonDistanceSubstitutionModel, and bpp::BinarySubstitutionModel.
Referenced by bpp::AbstractSinglePhyloSubstitutionMapping::addModel(), bpp::MixtureOfATransitionModel::MixtureOfATransitionModel(), and bpp::AbstractMixedTransitionModel::operator=().
|
pure virtual |
Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractTransitionModel, bpp::AbstractMixedTransitionModel, bpp::AbstractFromSubstitutionModelTransitionModel, and bpp::AbstractSubstitutionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::computeFrequencies(), bpp::InMixedSubstitutionModel::computeFrequencies(), bpp::RELAX::RELAX(), bpp::SENCA::SENCA(), 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().
|
pure virtual |
Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractMixedTransitionModel, bpp::AbstractFromSubstitutionModelTransitionModel, and bpp::AbstractSubstitutionModel.
|
pure virtual |
Implements bpp::BranchModelInterface.
Implemented in bpp::AbstractLkTransitionModel.
|
pure virtual |
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().
|
pure virtual |
Implements bpp::BranchModelInterface.
Implemented in bpp::AbstractLkTransitionModel.
|
pure virtual |
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().
|
pure virtual |
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().
|
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().
|
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_().
|
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().
|
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().
|
pure virtualinherited |
Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.
Referenced by bpp::SubstitutionModelSet::getAlphabetStates(), and bpp::AbstractWrappedModel::getAlphabetStates().
|
pure virtual |
Implemented in bpp::AbstractTransitionModel, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractMixedTransitionModel, bpp::AbstractSubstitutionModel, bpp::WordSubstitutionModel, 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::AbstractLkTransitionModel::d2Lik_dt2(), bpp::AbstractTotallyWrappedTransitionModel::getd2Pij_dt2(), bpp::InMixedSubstitutionModel::getd2Pij_dt2(), and bpp::OneChangeRegisterTransitionModel::getd2Pij_dt2().
|
pure virtual |
Implemented in bpp::AbstractTransitionModel, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractMixedTransitionModel, bpp::AbstractSubstitutionModel, bpp::WordSubstitutionModel, 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::AbstractLkTransitionModel::dLik_dt(), bpp::OneChangeRegisterTransitionModel::getd2Pij_dt2(), bpp::AbstractTotallyWrappedTransitionModel::getdPij_dt(), bpp::InMixedSubstitutionModel::getdPij_dt(), and bpp::OneChangeRegisterTransitionModel::getdPij_dt().
|
pure virtual |
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().
|
protectedpure virtual |
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().
|
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.
|
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().
|
pure virtualinherited |
Get the name of the model.
Implemented in bpp::WordSubstitutionModel, bpp::TS98, bpp::TransitionFromTransitionModel, bpp::RegisterRatesSubstitutionModel, bpp::RE08, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LLG08_UL3, bpp::LLG08_UL3::EmbeddedModel, bpp::LLG08_UL2, bpp::LLG08_UL2::EmbeddedModel, bpp::LLG08_EX3, bpp::LLG08_EX3::EmbeddedModel, bpp::LLG08_EX2, bpp::LLG08_EX2::EmbeddedModel, bpp::LLG08_EHO, bpp::LLG08_EHO::EmbeddedModel, bpp::LGL08_CAT, bpp::LGL08_CAT::EmbeddedModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::Coala, bpp::POMO, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::YpR_Gen, bpp::YpR_Sym, bpp::TN93, bpp::T92, bpp::SSR, bpp::RN95s, bpp::RN95, bpp::L95, bpp::K80, bpp::JCnuc, bpp::GTR, bpp::gBGC, bpp::F81, bpp::MultinomialFromTransitionModel, bpp::MixtureOfTransitionModels, bpp::MixtureOfATransitionModel, bpp::KroneckerWordSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::G2001, bpp::FromMixtureSubstitutionModel, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, bpp::YNGP_M9, bpp::YNGP_M8, bpp::YNGP_M7, bpp::YNGP_M3, bpp::YNGP_M2, bpp::YNGP_M10, bpp::YNGP_M1, bpp::YN98, bpp::TripletSubstitutionModel, bpp::SENCA, bpp::RELAX, bpp::MG94, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::KCM, bpp::GY94, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::DFP07, bpp::CodonSameAARateSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::CodonAdHocSubstitutionModel, bpp::AnonymousSubstitutionModel, bpp::AbstractWrappedModel, bpp::TwoParameterBinarySubstitutionModel, bpp::LG10_EX_EHO, bpp::LG10_EX_EHO::EmbeddedModel, bpp::HKY85, bpp::F84, bpp::CodonDistanceSubstitutionModel, and bpp::BinarySubstitutionModel.
Referenced by bpp::YpR::checkModel(), bpp::TransitionMatrixFromModel::compute(), bpp::AbstractWrappedModel::getName(), bpp::FromMixtureSubstitutionModel::getName(), bpp::AbstractSubstitutionModel::getPij_t(), bpp::BppOSubstitutionModelFormat::initialize_(), bpp::MixtureOfSubstitutionModels::MixtureOfSubstitutionModels(), bpp::MixtureOfATransitionModel::model(), bpp::LegacyPhylogeneticsApplicationTools::setSubstitutionModelParametersInitialValuesWithAliases(), bpp::ModelPath::toString(), and bpp::BppOSubstitutionModelFormat::write().
|
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().
|
pure virtual |
Implemented in bpp::AbstractTransitionModel, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractMixedTransitionModel, bpp::AbstractSubstitutionModel, bpp::WordSubstitutionModel, 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::getd2Pij_dt2(), bpp::OneChangeRegisterTransitionModel::getdPij_dt(), bpp::AbstractTotallyWrappedTransitionModel::getPij_t(), bpp::InMixedSubstitutionModel::getPij_t(), bpp::OneChangeRegisterTransitionModel::getPij_t(), and bpp::AbstractLkTransitionModel::Lik_t().
|
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().
|
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().
|
pure virtual |
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.
|
pure virtual |
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().
|
pure virtual |
Set equilibrium frequencies.
frequencies | The map of the frequencies to use. |
Implemented in bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::RE08Codon, bpp::RE08, bpp::POMO, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::YN98, bpp::SENCA, bpp::MG94, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::KCM, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonSameAARateSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::CodonAdHocSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractMixedTransitionModel, bpp::AbstractBiblioTransitionModel, bpp::TN93, bpp::T92, bpp::GTR, bpp::F81, bpp::AbstractTransitionModel, bpp::HKY85, bpp::BinarySubstitutionModel, bpp::AbstractWordSubstitutionModel, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, bpp::SSR, bpp::RN95s, bpp::RN95, bpp::L95, bpp::MixtureOfTransitionModels, bpp::MixtureOfATransitionModel, and bpp::F84.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::setFreq(), bpp::InMixedSubstitutionModel::setFreq(), bpp::RE08Codon::setFreq(), bpp::MultinomialFromTransitionModel::setFreq(), bpp::TransitionFromTransitionModel::setFreq(), bpp::OneChangeRegisterTransitionModel::setFreq(), bpp::OneChangeTransitionModel::setFreq(), and bpp::AbstractTotallyWrappedTransitionModel::setFreqFromData().
|
pure virtual |
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
|
Implemented in bpp::RE08, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::Coala, bpp::K80, bpp::JCnuc, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractTransitionModel, bpp::AbstractBiblioTransitionModel, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, and bpp::AbstractMixedTransitionModel.
Referenced by bpp::TransitionFromTransitionModel::setFreqFromData(), bpp::OneChangeRegisterTransitionModel::setFreqFromData(), bpp::OneChangeTransitionModel::setFreqFromData(), bpp::MultinomialFromTransitionModel::setFreqFromData(), and bpp::InMixedSubstitutionModel::setFreqFromData().
|
pure virtualinherited |
Set the rate of the model (must be positive).
rate | must be positive. |
Implemented in bpp::TS98, bpp::TransitionFromTransitionModel, bpp::RegisterRatesSubstitutionModel, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MultinomialFromTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::G2001, bpp::AbstractTotallyWrappedTransitionModel, bpp::AbstractTransitionModel, and bpp::AbstractMixedTransitionModel.
Referenced by bpp::AbstractBiblioTransitionModel::fireParameterChanged(), bpp::AbstractTotallyWrappedTransitionModel::setRate(), bpp::InMixedSubstitutionModel::setRate(), bpp::MultinomialFromTransitionModel::setRate(), bpp::OneChangeRegisterTransitionModel::setRate(), bpp::OneChangeTransitionModel::setRate(), bpp::RegisterRatesSubstitutionModel::setRate(), and bpp::TransitionFromTransitionModel::setRate().
|
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().
|
friend |
Definition at line 301 of file SubstitutionModel.h.
|
friend |
Definition at line 300 of file SubstitutionModel.h.
|
friend |
Definition at line 302 of file SubstitutionModel.h.