bpp-phyl3
3.0.0
|
Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models. More...
#include <Bpp/Phyl/Model/Codon/AbstractCodonDistanceSubstitutionModel.h>
Public Member Functions | |
AbstractCodonDistanceSubstitutionModel (std::shared_ptr< const AlphabetIndex2 > pdist, std::shared_ptr< const GeneticCode > pgencode, const std::string &prefix, bool paramSynRate=false) | |
Build a new AbstractCodonDistanceSubstitutionModel object. More... | |
AbstractCodonDistanceSubstitutionModel (const AbstractCodonDistanceSubstitutionModel &model) | |
AbstractCodonDistanceSubstitutionModel & | operator= (const AbstractCodonDistanceSubstitutionModel &model) |
AbstractCodonDistanceSubstitutionModel * | clone () const override |
virtual | ~AbstractCodonDistanceSubstitutionModel () |
void | fireParameterChanged (const ParameterList ¶meters) override |
double | getCodonsMulRate (size_t i, size_t j) const override |
Returns the multiplicative rate specific to two codons specified by their number. The respective generator rate is this rate multiplied by the rate defined by the model defined on nucleotides. More... | |
const CodonFrequencySetInterface & | codonFrequencySet () const override |
bool | hasCodonFrequencySet () const override |
void | setFreq (std::map< int, double > &frequencies) override |
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 |
void | setNamespace (const std::string &prefix) |
bool | hasIndependentParameter (const std::string &name) const |
const ParameterList & | getIndependentParameters () const |
size_t | getNumberOfIndependentParameters () const |
void | aliasParameters (const std::string &p1, const std::string &p2) |
void | aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose) |
void | unaliasParameters (const std::string &p1, const std::string &p2) |
ParameterList | getAliasedParameters (const ParameterList &pl) const |
ParameterList | getFromParameters (const ParameterList &pl) const |
virtual std::vector< std::string > | getAlias (const std::string &name) const |
virtual std::map< std::string, std::string > | getAliases () const |
std::string | getFrom (const std::string &name) const |
bool | hasParameter (const std::string &name) const override |
const ParameterList & | getParameters () const override |
const Parameter & | parameter (const std::string &name) const override |
const std::shared_ptr< Parameter > & | getParameter (const std::string &name) const |
double | getParameterValue (const std::string &name) const override |
void | setAllParametersValues (const ParameterList ¶meters) override |
void | setParameterValue (const std::string &name, double value) override |
void | setParametersValues (const ParameterList ¶meters) override |
bool | matchParametersValues (const ParameterList ¶meters) override |
void | removeConstraint (const std::string &name) override |
void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override |
size_t | getNumberOfParameters () const override |
std::string | getNamespace () const override |
std::string | getParameterNameWithoutNamespace (const std::string &name) const override |
Protected Member Functions | |
virtual ParameterList & | getParameters_ ()=0 |
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 |
ParameterList & | getParameters_ () override |
Private Attributes | |
std::shared_ptr< const AlphabetIndex2 > | pdistance_ |
std::shared_ptr< const GeneticCode > | pgencode_ |
double | alpha_ |
double | beta_ |
double | gamma_ |
std::shared_ptr< const StateMapInterface > | stateMap_ |
ParameterList | independentParameters_ |
std::map< std::string, std::shared_ptr< AliasParameterListener > > | aliasListenersRegister_ |
ParameterList | parameters_ |
std::string | prefix_ |
Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models.
If a distance between amino-acids is defined, the non-synonymous rate is multiplied with, if the coded amino-acids are and , with non-negative parameter "alpha"
and positive parameter "beta"
.
If such a distance is not defined, the non-synonymous substitution rate is multiplied with with positive parameter "beta"
(ie ).
If paramSynRate is true, the synonymous substitution rate is multiplied with (with optional positive parameter "gamma"
), else it is multiplied with 1.
References:
Definition at line 45 of file AbstractCodonDistanceSubstitutionModel.h.
AbstractCodonDistanceSubstitutionModel::AbstractCodonDistanceSubstitutionModel | ( | std::shared_ptr< const AlphabetIndex2 > | pdist, |
std::shared_ptr< const GeneticCode > | pgencode, | ||
const std::string & | prefix, | ||
bool | paramSynRate = false |
||
) |
Build a new AbstractCodonDistanceSubstitutionModel object.
pdist | optional pointer to a distance between amino-acids |
pgencode | the genetic code |
prefix | the Namespace |
paramSynRate | is true iff synonymous rate is parametrised (default=false). |
Definition at line 14 of file AbstractCodonDistanceSubstitutionModel.cpp.
References bpp::AbstractParameterAliasable::addParameter_(), pdistance_, bpp::Parameter::R_PLUS_STAR, and bpp::NumConstants::SMALL().
Referenced by clone().
|
inline |
Definition at line 76 of file AbstractCodonDistanceSubstitutionModel.h.
|
inlinevirtual |
Definition at line 105 of file AbstractCodonDistanceSubstitutionModel.h.
|
inlineoverridevirtual |
Implements bpp::AbstractParameterAliasable.
Reimplemented in bpp::SENCA, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, and bpp::CodonDistanceSubstitutionModel.
Definition at line 100 of file AbstractCodonDistanceSubstitutionModel.h.
References AbstractCodonDistanceSubstitutionModel().
|
inlineoverridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Reimplemented in bpp::SENCA, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, and bpp::CodonDistanceFrequenciesSubstitutionModel.
Definition at line 112 of file AbstractCodonDistanceSubstitutionModel.h.
|
overridevirtual |
Reimplemented from bpp::AbstractParameterAliasable.
Reimplemented in bpp::SENCA, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, and bpp::CodonDistanceSubstitutionModel.
Definition at line 36 of file AbstractCodonDistanceSubstitutionModel.cpp.
References alpha_, beta_, gamma_, bpp::AbstractParameterAliasable::getParameterValue(), bpp::AbstractParameterAliasable::hasParameter(), and pdistance_.
Referenced by bpp::CodonDistanceSubstitutionModel::fireParameterChanged(), bpp::CodonDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::CodonDistancePhaseFrequenciesSubstitutionModel::fireParameterChanged(), bpp::DFPDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::KroneckerCodonDistanceSubstitutionModel::fireParameterChanged(), and bpp::SENCA::fireParameterChanged().
|
overridevirtual |
Returns the multiplicative rate specific to two codons specified by their number. The respective generator rate is this rate multiplied by the rate defined by the model defined on nucleotides.
Implements bpp::CoreCodonSubstitutionModelInterface.
Reimplemented in bpp::SENCA, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, and bpp::CodonDistanceSubstitutionModel.
Definition at line 46 of file AbstractCodonDistanceSubstitutionModel.cpp.
References alpha_, beta_, bpp::exp(), gamma_, pdistance_, pgencode_, and stateMap_.
Referenced by bpp::CodonDistanceSubstitutionModel::getCodonsMulRate(), bpp::CodonDistanceFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::CodonDistancePhaseFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::DFPDistanceFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::KroneckerCodonDistanceSubstitutionModel::getCodonsMulRate(), and bpp::SENCA::getCodonsMulRate().
|
inlineoverridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Reimplemented in bpp::SENCA, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, and bpp::CodonDistanceFrequenciesSubstitutionModel.
Definition at line 117 of file AbstractCodonDistanceSubstitutionModel.h.
|
inline |
Definition at line 86 of file AbstractCodonDistanceSubstitutionModel.h.
References alpha_, beta_, gamma_, bpp::AbstractParameterAliasable::operator=(), pdistance_, pgencode_, and stateMap_.
|
inlineoverridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Reimplemented in bpp::SENCA, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, and bpp::CodonDistanceFrequenciesSubstitutionModel.
Definition at line 122 of file AbstractCodonDistanceSubstitutionModel.h.
|
private |
Definition at line 54 of file AbstractCodonDistanceSubstitutionModel.h.
Referenced by fireParameterChanged(), getCodonsMulRate(), and operator=().
|
private |
Definition at line 54 of file AbstractCodonDistanceSubstitutionModel.h.
Referenced by fireParameterChanged(), getCodonsMulRate(), and operator=().
|
private |
Definition at line 56 of file AbstractCodonDistanceSubstitutionModel.h.
Referenced by fireParameterChanged(), getCodonsMulRate(), and operator=().
|
private |
Definition at line 50 of file AbstractCodonDistanceSubstitutionModel.h.
Referenced by AbstractCodonDistanceSubstitutionModel(), fireParameterChanged(), getCodonsMulRate(), and operator=().
|
private |
Definition at line 52 of file AbstractCodonDistanceSubstitutionModel.h.
Referenced by getCodonsMulRate(), and operator=().
|
private |
Definition at line 58 of file AbstractCodonDistanceSubstitutionModel.h.
Referenced by getCodonsMulRate(), and operator=().