|
bpp-phyl
2.1.0
|
Interface for Substitution models, defined as a mixture of "simple" substitution models. More...
#include <Bpp/Phyl/Model/MixedSubstitutionModel.h>
Inheritance diagram for bpp::MixedSubstitutionModel:
Collaboration diagram for bpp::MixedSubstitutionModel:Public Member Functions | |
| MixedSubstitutionModel () | |
| virtual | ~MixedSubstitutionModel () |
| virtual MixedSubstitutionModel * | clone () const =0 |
| virtual const SubstitutionModel * | getNModel (size_t i) const =0 |
| Returns a specific model from the mixture. | |
| virtual SubstitutionModel * | getNModel (size_t i)=0 |
| virtual double | getNProbability (size_t i) const =0 |
| Returns the probability of a specific model from the mixture. | |
| virtual const std::vector < double > & | getProbabilities () const =0 |
| virtual void | setNProbability (size_t i, double prob)=0 |
| Sets the probability of a specific model from the mixture. | |
| virtual size_t | getNumberOfModels () const =0 |
| virtual const std::vector < double > & | getVRates () const =0 |
| Returns the rates of the submodels. | |
| virtual double | getNRate (size_t i) const =0 |
| Returns the rate of a specific submodel. | |
| virtual void | setVRates (const Vdouble &vd)=0 |
| Sets the rates of the submodels to be proportional to a given vector, and normalizes them so that the mean rate of the mixture equals rate_. | |
| virtual void | normalizeVRates ()=0 |
| Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_. | |
| virtual Vint | getSubmodelNumbers (std::string &desc) const =0 |
| virtual std::string | getName () const =0 |
| Get the name of the model. | |
| virtual const std::vector< int > & | getAlphabetChars () const =0 |
| virtual int | getAlphabetChar (size_t i) const =0 |
| Get the char in the alphabet corresponding to a given state in the model. | |
| virtual std::vector< size_t > | getModelStates (int i) const =0 |
| Get the state in the model corresponding to a particular char in the alphabet. | |
| virtual double | freq (size_t i) const =0 |
| virtual double | Qij (size_t i, size_t j) 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 const Matrix< double > & | getGenerator () const =0 |
| virtual const Matrix< double > & | getExchangeabilityMatrix () const =0 |
| virtual double | Sij (size_t i, size_t j) const =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 void | enableEigenDecomposition (bool yn)=0 |
| Set if eigenValues and Vectors must be computed. | |
| virtual bool | enableEigenDecomposition ()=0 |
| Tell if eigenValues and Vectors must be computed. | |
| virtual const Vdouble & | getEigenValues () const =0 |
| virtual const Vdouble & | getIEigenValues () const =0 |
| virtual bool | isDiagonalizable () const =0 |
| virtual bool | isNonSingular () const =0 |
| virtual const Matrix< double > & | getRowLeftEigenVectors () const =0 |
| virtual const Matrix< double > & | getColumnRightEigenVectors () const =0 |
| virtual const Alphabet * | getAlphabet () const =0 |
| virtual size_t | getNumberOfStates () const =0 |
| Get the number of states. | |
| virtual double | getInitValue (size_t i, int state) const =0 throw (IndexOutOfBoundsException, BadIntException) |
| virtual double | getScale () const =0 |
| 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. | |
| virtual void | setScale (double scale)=0 |
| Set the rate of the generator, defined as the scalar product of diagonal elements of the generator and the frequencies vector. | |
| virtual double | getRate () const =0 |
| Get the rate. | |
| virtual void | setRate (double rate)=0 |
| Set the rate of the model (must be positive). | |
| virtual void | addRateParameter ()=0 |
| virtual void | setFreqFromData (const SequenceContainer &data, double pseudoCount=0)=0 |
| Set equilibrium frequencies equal to the frequencies estimated from the data. | |
| virtual void | setFreq (std::map< int, double > &frequencies) |
| Set equilibrium frequencies. | |
| virtual const FrequenciesSet * | getFrequenciesSet () const |
| If the model owns a FrequenciesSet, returns a pointer to it, otherwise return 0. | |
| virtual size_t | getNumberOfIndependentParameters () const =0 |
| virtual void | aliasParameters (const std::string &p1, const std::string &p2)=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 bool | hasParameter (const std::string &name) const =0 |
| virtual const ParameterList & | getParameters () const =0 |
| virtual const Parameter & | getParameter (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 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 |
Interface for Substitution models, defined as a mixture of "simple" substitution models.
Definition at line 59 of file MixedSubstitutionModel.h.
| bpp::MixedSubstitutionModel::MixedSubstitutionModel | ( | ) | [inline] |
Definition at line 63 of file MixedSubstitutionModel.h.
| virtual bpp::MixedSubstitutionModel::~MixedSubstitutionModel | ( | ) | [inline, virtual] |
Definition at line 65 of file MixedSubstitutionModel.h.
| virtual void bpp::SubstitutionModel::addRateParameter | ( | ) | [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::G2001, bpp::AbstractBiblioSubstitutionModel, and bpp::TS98.
Referenced by bpp::AbstractBiblioSubstitutionModel::addRateParameter().
| virtual MixedSubstitutionModel* bpp::MixedSubstitutionModel::clone | ( | ) | const [pure virtual] |
Implements bpp::SubstitutionModel.
Implemented in bpp::MixtureOfSubstitutionModels, bpp::MixtureOfASubstitutionModel, bpp::AbstractMixedSubstitutionModel, bpp::LLG08_EX3, bpp::LLG08_EHO, bpp::LLG08_UL3, bpp::LG10_EX_EHO, bpp::LGL08_CAT, bpp::LLG08_EX2, bpp::LLG08_UL2, bpp::YNGKP_M1, bpp::YNGKP_M8, bpp::YNGKP_M7, bpp::YNGKP_M2, bpp::YNGKP_M3, and bpp::AbstractBiblioMixedSubstitutionModel.
| virtual double bpp::SubstitutionModel::d2Pij_dt2 | ( | size_t | i, |
| size_t | j, | ||
| double | t | ||
| ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::RE08, bpp::JCnuc, bpp::BinarySubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::d2Pij_dt2(), and bpp::RE08::d2Pij_dt2().
| virtual double bpp::SubstitutionModel::dPij_dt | ( | size_t | i, |
| size_t | j, | ||
| double | t | ||
| ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::RE08, bpp::JCnuc, bpp::BinarySubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::RE08::d2Pij_dt2(), bpp::AbstractBiblioSubstitutionModel::dPij_dt(), and bpp::RE08::dPij_dt().
| virtual void bpp::SubstitutionModel::enableEigenDecomposition | ( | bool | yn | ) | [pure virtual, inherited] |
Set if eigenValues and Vectors must be computed.
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractCodonSubstitutionModel::AbstractCodonSubstitutionModel(), bpp::AbstractBiblioSubstitutionModel::enableEigenDecomposition(), bpp::gBGC::gBGC(), and bpp::YpR::YpR().
| virtual bool bpp::SubstitutionModel::enableEigenDecomposition | ( | ) | [pure virtual, inherited] |
Tell if eigenValues and Vectors must be computed.
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
| virtual double bpp::SubstitutionModel::freq | ( | size_t | i | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::TwoTreeLikelihood::computeTreeD2Likelihood(), bpp::TwoTreeLikelihood::computeTreeDLikelihood(), bpp::RE08::d2Pij_dt2(), bpp::RE08::dPij_dt(), bpp::AbstractBiblioSubstitutionModel::freq(), bpp::RE08::getd2Pij_dt2(), bpp::RE08::getdPij_dt(), bpp::RE08::getPij_t(), bpp::RE08::Pij_t(), and bpp::RE08::updateMatrices().
| virtual const Alphabet* bpp::SubstitutionModel::getAlphabet | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::SubstitutionModelSet::addModel(), bpp::DecompositionSubstitutionCount::DecompositionSubstitutionCount(), bpp::AbstractMutationProcess::detailedEvolve(), bpp::LaplaceSubstitutionCount::getAllNumbersOfSubstitutions(), bpp::AbstractBiblioSubstitutionModel::getAlphabet(), bpp::MarkovModulatedSubstitutionModel::getAlphabet(), bpp::NonHomogeneousSequenceSimulator::NonHomogeneousSequenceSimulator(), bpp::LaplaceSubstitutionCount::setSubstitutionModel(), bpp::UniformizationSubstitutionCount::setSubstitutionModel(), bpp::DecompositionSubstitutionCount::setSubstitutionModel(), bpp::UniformizationSubstitutionCount::substitutionRegisterHasChanged(), bpp::DecompositionSubstitutionCount::substitutionRegisterHasChanged(), bpp::UniformizationSubstitutionCount::UniformizationSubstitutionCount(), bpp::YpR::updateMatrices(), and bpp::BppOSubstitutionModelFormat::writeMixed_().
| virtual int bpp::SubstitutionModel::getAlphabetChar | ( | size_t | i | ) | const [pure virtual, inherited] |
Get the char in the alphabet corresponding to a given state in the model.
In most cases, this method will return i.
| i | The index of the state. |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::getAlphabetChar(), bpp::MarginalAncestralStateReconstruction::getAncestralSequenceForNode(), and bpp::NonHomogeneousSequenceSimulator::multipleEvolve().
| virtual const std::vector<int>& bpp::SubstitutionModel::getAlphabetChars | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::getAlphabetChars(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices().
| virtual const Matrix<double>& bpp::SubstitutionModel::getColumnRightEigenVectors | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::DecompositionSubstitutionCount::computeEigen_(), bpp::AbstractBiblioSubstitutionModel::getColumnRightEigenVectors(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices().
| virtual const Matrix<double>& bpp::SubstitutionModel::getd2Pij_dt2 | ( | double | t | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::AbstractMixedSubstitutionModel, bpp::F84, bpp::HKY85, bpp::MarkovModulatedSubstitutionModel, bpp::JCprot, bpp::T92, bpp::K80, bpp::RN95, bpp::TN93, bpp::RE08, bpp::JCnuc, bpp::RN95s, bpp::BinarySubstitutionModel, bpp::WordSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::TwoTreeLikelihood::fireParameterChanged(), bpp::AbstractBiblioSubstitutionModel::getd2Pij_dt2(), and bpp::RE08::getd2Pij_dt2().
| virtual const Matrix<double>& bpp::SubstitutionModel::getdPij_dt | ( | double | t | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::AbstractMixedSubstitutionModel, bpp::F84, bpp::HKY85, bpp::MarkovModulatedSubstitutionModel, bpp::JCprot, bpp::T92, bpp::K80, bpp::RN95, bpp::TN93, bpp::RE08, bpp::JCnuc, bpp::RN95s, bpp::BinarySubstitutionModel, bpp::WordSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::TwoTreeLikelihood::fireParameterChanged(), bpp::RE08::getd2Pij_dt2(), bpp::AbstractBiblioSubstitutionModel::getdPij_dt(), and bpp::RE08::getdPij_dt().
| virtual const Vdouble& bpp::SubstitutionModel::getEigenValues | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::DecompositionSubstitutionCount::computeEigen_(), bpp::AbstractBiblioSubstitutionModel::getEigenValues(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices().
| virtual const Matrix<double>& bpp::SubstitutionModel::getExchangeabilityMatrix | ( | ) | const [pure virtual, inherited] |
. Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::getExchangeabilityMatrix(), bpp::RE08::updateMatrices(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices().
| virtual const Vdouble& bpp::SubstitutionModel::getFrequencies | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractHomogeneousTreeLikelihood::applyParameters(), bpp::AbstractHomogeneousTreeLikelihood::computeAllTransitionProbabilities(), bpp::TwoTreeLikelihood::computeTreeLikelihood(), bpp::RHomogeneousTreeLikelihood::fireParameterChanged(), bpp::AbstractBiblioSubstitutionModel::getFrequencies(), bpp::TwoTreeLikelihood::getRootFrequencies(), bpp::AbstractHomogeneousTreeLikelihood::getRootFrequencies(), bpp::NonHomogeneousSequenceSimulator::NonHomogeneousSequenceSimulator(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices().
| virtual const FrequenciesSet* bpp::SubstitutionModel::getFrequenciesSet | ( | ) | const [inline, virtual, inherited] |
If the model owns a FrequenciesSet, returns a pointer to it, otherwise return 0.
Reimplemented in bpp::JCprot, bpp::AbstractBiblioSubstitutionModel, bpp::UserProteinSubstitutionModel, bpp::WAG01, bpp::DSO78, bpp::JTT92, bpp::LG08, bpp::AbstractCodonPhaseFrequenciesSubstitutionModel, and bpp::AbstractCodonFrequenciesSubstitutionModel.
Definition at line 463 of file SubstitutionModel.h.
Referenced by bpp::AbstractBiblioSubstitutionModel::getFrequenciesSet(), and bpp::BppOSubstitutionModelFormat::write().
| virtual const Matrix<double>& bpp::SubstitutionModel::getGenerator | ( | ) | const [pure virtual, inherited] |
, meaning that $
, and (ii)
. This means that, under normalization, the mean rate of replacement at equilibrium is 1 and that time
are measured in units of expected number of changes per site. Additionnaly, the rate_ attibute provides the possibility to increase or decrease this mean rate.See Kosiol and Goldman (2005), Molecular Biology And Evolution 22(2) 193-9.
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::LaplaceSubstitutionCount::computeCounts(), bpp::UniformizationSubstitutionCount::computeCounts_(), bpp::AbstractBiblioSubstitutionModel::getGenerator(), bpp::SimpleMutationProcess::SimpleMutationProcess(), bpp::RE08::updateMatrices(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices().
| virtual const Vdouble& bpp::SubstitutionModel::getIEigenValues | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::getIEigenValues().
| virtual double bpp::SubstitutionModel::getInitValue | ( | size_t | i, |
| int | state | ||
| ) | const throw (IndexOutOfBoundsException, BadIntException) [pure virtual, inherited] |
This method is used to initialize likelihoods in reccursions. 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::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::RE08, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::getInitValue().
| virtual std::vector<size_t> bpp::SubstitutionModel::getModelStates | ( | int | i | ) | const [pure virtual, inherited] |
Get the state in the model corresponding to a particular char in the alphabet.
| i | The alphabet char to check. |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::getModelStates(), bpp::MarkovModulatedSubstitutionModel::getModelStates(), and bpp::MarginalAncestralStateReconstruction::recursiveMarginalAncestralStates().
| virtual std::string bpp::SubstitutionModel::getName | ( | ) | const [pure virtual, inherited] |
Get the name of the model.
Implemented in bpp::YpR_Gen, bpp::YpR_Sym, bpp::F84, bpp::HKY85, bpp::JCprot, bpp::T92, bpp::K80, bpp::RN95, bpp::GTR, bpp::TN93, bpp::RE08, bpp::MixtureOfSubstitutionModels, bpp::JCnuc, bpp::RN95s, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::BinarySubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::UserProteinSubstitutionModel, bpp::CodonDistanceFitnessPhaseFrequenciesSubstitutionModel, bpp::MixtureOfASubstitutionModel, bpp::LLG08_EX3, bpp::WAG01, bpp::WordSubstitutionModel, bpp::LLG08_EHO, bpp::LLG08_UL3, bpp::SSR, bpp::LG10_EX_EHO, bpp::CodonDistanceSubstitutionModel, bpp::L95, bpp::DSO78, bpp::JTT92, bpp::LGL08_CAT, bpp::LLG08_EX2, bpp::LLG08_UL2, bpp::CodonRateFrequenciesSubstitutionModel, bpp::gBGC, bpp::LG08, bpp::G2001, bpp::YNGKP_M1, bpp::YNGKP_M8, bpp::TS98, bpp::YNGKP_M7, bpp::GY94, bpp::YNGKP_M2, bpp::YNGKP_M3, bpp::TripletSubstitutionModel, bpp::YN98, bpp::MG94, bpp::CodonRateSubstitutionModel, bpp::Coala, bpp::LLG08_EX3::EmbeddedModel, bpp::LLG08_EHO::EmbeddedModel, bpp::LLG08_UL3::EmbeddedModel, bpp::LG10_EX_EHO::EmbeddedModel, bpp::LGL08_CAT::EmbeddedModel, bpp::LLG08_EX2::EmbeddedModel, and bpp::LLG08_UL2::EmbeddedModel.
Referenced by bpp::AbstractCodonFitnessSubstitutionModel::AbstractCodonFitnessSubstitutionModel(), bpp::AbstractSubstitutionModel::fireParameterChanged(), bpp::gBGC::getName(), bpp::MixtureOfSubstitutionModels::getSubmodelNumbers(), bpp::BppOSubstitutionModelFormat::readMixed_(), bpp::AbstractWordSubstitutionModel::updateMatrices(), bpp::AbstractBiblioSubstitutionModel::updateMatrices(), and bpp::BppOSubstitutionModelFormat::write().
| virtual const SubstitutionModel* bpp::MixedSubstitutionModel::getNModel | ( | size_t | i | ) | const [pure virtual] |
Returns a specific model from the mixture.
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::RNonHomogeneousMixedTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood(), bpp::RHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::AbstractBiblioMixedSubstitutionModel::getNModel(), and bpp::RHomogeneousMixedTreeLikelihood::RHomogeneousMixedTreeLikelihood().
| virtual SubstitutionModel* bpp::MixedSubstitutionModel::getNModel | ( | size_t | i | ) | [pure virtual] |
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
| virtual double bpp::MixedSubstitutionModel::getNProbability | ( | size_t | i | ) | const [pure virtual] |
Returns the probability of a specific model from the mixture.
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::MixedSubstitutionModelSet::computeHyperNodesProbabilities(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood(), bpp::MixedSubstitutionModelSet::getHyperNodeProbability(), bpp::AbstractBiblioMixedSubstitutionModel::getNProbability(), and bpp::RHomogeneousMixedTreeLikelihood::RHomogeneousMixedTreeLikelihood().
| virtual double bpp::MixedSubstitutionModel::getNRate | ( | size_t | i | ) | const [pure virtual] |
Returns the rate of a specific submodel.
Implemented in bpp::AbstractBiblioMixedSubstitutionModel, and bpp::AbstractMixedSubstitutionModel.
Referenced by bpp::AbstractBiblioMixedSubstitutionModel::getNRate().
| virtual size_t bpp::MixedSubstitutionModel::getNumberOfModels | ( | ) | const [pure virtual] |
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::MixedSubstitutionModelSet::complete(), bpp::SubstitutionModelSetTools::createNonHomogeneousModelSet(), bpp::DRHomogeneousMixedTreeLikelihood::DRHomogeneousMixedTreeLikelihood(), bpp::RHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::AbstractBiblioMixedSubstitutionModel::getNumberOfModels(), bpp::BppOSubstitutionModelFormat::readMixed_(), and bpp::RHomogeneousMixedTreeLikelihood::RHomogeneousMixedTreeLikelihood().
| virtual size_t bpp::SubstitutionModel::getNumberOfStates | ( | ) | const [pure virtual, inherited] |
Get the number of states.
For most models, this equals the size of the alphabet.
Implemented in bpp::AbstractMixedSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::RE08, bpp::YpR, bpp::AbstractBiblioSubstitutionModel, bpp::AbstractWordSubstitutionModel, bpp::BinarySubstitutionModel, bpp::gBGC, bpp::NucleotideSubstitutionModel, and bpp::ProteinSubstitutionModel.
Referenced by bpp::SubstitutionModelSet::addModel(), bpp::OneJumpSubstitutionCount::getAllNumbersOfSubstitutions(), bpp::AbstractBiblioSubstitutionModel::getNumberOfStates(), bpp::BranchLikelihood::initModel(), bpp::RE08::RE08(), bpp::SimpleMutationProcess::SimpleMutationProcess(), and bpp::MarkovModulatedSubstitutionModel::updateMatrices().
| virtual const Matrix<double>& bpp::SubstitutionModel::getPij_t | ( | double | t | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::AbstractMixedSubstitutionModel, bpp::F84, bpp::HKY85, bpp::MarkovModulatedSubstitutionModel, bpp::JCprot, bpp::T92, bpp::K80, bpp::RN95, bpp::TN93, bpp::RE08, bpp::JCnuc, bpp::RN95s, bpp::BinarySubstitutionModel, bpp::WordSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::LaplaceSubstitutionCount::computeCounts(), bpp::UniformizationSubstitutionCount::computeCounts_(), bpp::DecompositionSubstitutionCount::computeCounts_(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::NonHomogeneousSequenceSimulator::evolve(), bpp::TwoTreeLikelihood::fireParameterChanged(), bpp::OneJumpSubstitutionCount::getAllNumbersOfSubstitutions(), bpp::RE08::getd2Pij_dt2(), bpp::RE08::getdPij_dt(), bpp::AbstractBiblioSubstitutionModel::getPij_t(), and bpp::RE08::getPij_t().
| virtual const std::vector<double>& bpp::MixedSubstitutionModel::getProbabilities | ( | ) | const [pure virtual] |
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::RHomogeneousMixedTreeLikelihood::fireParameterChanged(), bpp::DRHomogeneousMixedTreeLikelihood::fireParameterChanged(), and bpp::AbstractBiblioMixedSubstitutionModel::getProbabilities().
| virtual double bpp::SubstitutionModel::getRate | ( | ) | const [pure virtual, inherited] |
Get the rate.
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::G2001, bpp::AbstractBiblioSubstitutionModel, and bpp::TS98.
Referenced by bpp::AbstractBiblioSubstitutionModel::getRate(), and bpp::MarkovModulatedSubstitutionModel::getRate().
| virtual const Matrix<double>& bpp::SubstitutionModel::getRowLeftEigenVectors | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::DecompositionSubstitutionCount::computeEigen_(), and bpp::AbstractBiblioSubstitutionModel::getRowLeftEigenVectors().
| virtual double bpp::SubstitutionModel::getScale | ( | ) | const [pure virtual, inherited] |
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.
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::getScale().
| virtual Vint bpp::MixedSubstitutionModel::getSubmodelNumbers | ( | std::string & | desc | ) | const [pure virtual] |
| virtual const std::vector<double>& bpp::MixedSubstitutionModel::getVRates | ( | ) | const [pure virtual] |
Returns the rates of the submodels.
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::AbstractBiblioMixedSubstitutionModel::getVRates().
| virtual bool bpp::SubstitutionModel::isDiagonalizable | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::isDiagonalizable().
| virtual bool bpp::SubstitutionModel::isNonSingular | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::isNonSingular().
| virtual void bpp::MixedSubstitutionModel::normalizeVRates | ( | ) | [pure virtual] |
Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_.
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::MixedSubstitutionModelSet::computeHyperNodesProbabilities(), and bpp::AbstractBiblioMixedSubstitutionModel::normalizeVRates().
| virtual double bpp::SubstitutionModel::Pij_t | ( | size_t | i, |
| size_t | j, | ||
| double | t | ||
| ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::RE08, bpp::JCnuc, bpp::BinarySubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::RE08::d2Pij_dt2(), bpp::RE08::dPij_dt(), bpp::NonHomogeneousSequenceSimulator::evolve(), bpp::SimpleMutationProcess::evolve(), bpp::OneJumpSubstitutionCount::getNumberOfSubstitutions(), bpp::AbstractBiblioSubstitutionModel::Pij_t(), and bpp::RE08::Pij_t().
| virtual double bpp::SubstitutionModel::Qij | ( | size_t | i, |
| size_t | j | ||
| ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractSubstitutionModel, bpp::AbstractMixedSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::UniformizationSubstitutionCount::fillBMatrices_(), bpp::DecompositionSubstitutionCount::fillBMatrices_(), bpp::AbstractMutationProcess::getTimeBeforeNextMutationEvent(), bpp::AbstractBiblioSubstitutionModel::Qij(), bpp::UniformizationSubstitutionCount::setSubstitutionModel(), bpp::SimpleMutationProcess::SimpleMutationProcess(), bpp::UniformizationSubstitutionCount::UniformizationSubstitutionCount(), bpp::gBGC::updateMatrices(), and bpp::YpR::updateMatrices().
| virtual void bpp::SubstitutionModel::setFreq | ( | std::map< int, double > & | frequencies | ) | [inline, virtual, inherited] |
Set equilibrium frequencies.
| frequencies | The map of the frequencies to use. |
Reimplemented in bpp::AbstractSubstitutionModel, bpp::F84, bpp::HKY85, bpp::MixtureOfSubstitutionModels, bpp::T92, bpp::AbstractWordSubstitutionModel, bpp::GTR, bpp::RN95, bpp::TN93, bpp::RN95s, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::MixtureOfASubstitutionModel, bpp::AbstractBiblioSubstitutionModel, bpp::BinarySubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFitnessPhaseFrequenciesSubstitutionModel, bpp::SSR, bpp::L95, bpp::CodonRateFrequenciesSubstitutionModel, bpp::AbstractCodonPhaseFrequenciesSubstitutionModel, bpp::AbstractCodonFrequenciesSubstitutionModel, and bpp::AbstractCodonFitnessSubstitutionModel.
Definition at line 455 of file SubstitutionModel.h.
Referenced by bpp::AbstractBiblioSubstitutionModel::setFreq().
| virtual void bpp::SubstitutionModel::setFreqFromData | ( | const SequenceContainer & | data, |
| double | pseudoCount = 0 |
||
| ) | [pure virtual, inherited] |
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::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::setFreqFromData(), and bpp::MarkovModulatedSubstitutionModel::setFreqFromData().
| virtual void bpp::MixedSubstitutionModel::setNProbability | ( | size_t | i, |
| double | prob | ||
| ) | [pure virtual] |
Sets the probability of a specific model from the mixture.
Implemented in bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::MixedSubstitutionModelSet::computeHyperNodesProbabilities(), and bpp::AbstractBiblioMixedSubstitutionModel::setNProbability().
| virtual void bpp::SubstitutionModel::setRate | ( | double | rate | ) | [pure virtual, inherited] |
Set the rate of the model (must be positive).
| rate | must be positive. |
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractMixedSubstitutionModel, bpp::G2001, bpp::AbstractBiblioSubstitutionModel, and bpp::TS98.
Referenced by bpp::AbstractBiblioSubstitutionModel::setRate(), and bpp::MarkovModulatedSubstitutionModel::setRate().
| virtual void bpp::SubstitutionModel::setScale | ( | double | scale | ) | [pure virtual, inherited] |
Set the rate of the generator, defined as the scalar product of diagonal elements of the generator and the frequencies vector.
When the generator is normalized, scale=1. Otherwise each element is multiplied such that the correct scale is set.
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::setScale(), and bpp::MarkovModulatedSubstitutionModel::setScale().
| virtual void bpp::MixedSubstitutionModel::setVRates | ( | const Vdouble & | vd | ) | [pure virtual] |
Sets the rates of the submodels to be proportional to a given vector, and normalizes them so 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). |
Implemented in bpp::MixtureOfSubstitutionModels, bpp::AbstractMixedSubstitutionModel, and bpp::AbstractBiblioMixedSubstitutionModel.
Referenced by bpp::AbstractBiblioMixedSubstitutionModel::setVRates().
| virtual double bpp::SubstitutionModel::Sij | ( | size_t | i, |
| size_t | j | ||
| ) | const [pure virtual, inherited] |
By definition Sij(i,j) = Sij(j,i).
Implemented in bpp::AbstractSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::AbstractBiblioSubstitutionModel.
Referenced by bpp::AbstractBiblioSubstitutionModel::Sij().