bpp-phyl3
3.0.0
|
Abstract Class for substitution models on codons parametrized by a frequency. More...
#include <Bpp/Phyl/Model/Codon/AbstractCodonPhaseFrequenciesSubstitutionModel.h>
Public Member Functions | |
AbstractCodonPhaseFrequenciesSubstitutionModel (std::unique_ptr< CodonFrequencySetInterface > pfreq, const std::string &prefix) | |
Build a AbstractCodonPhaseFrequenciesSubstitutionModel instance. More... | |
AbstractCodonPhaseFrequenciesSubstitutionModel (const AbstractCodonPhaseFrequenciesSubstitutionModel &model) | |
AbstractCodonPhaseFrequenciesSubstitutionModel & | operator= (const AbstractCodonPhaseFrequenciesSubstitutionModel &model) |
AbstractCodonPhaseFrequenciesSubstitutionModel * | clone () const override |
virtual | ~AbstractCodonPhaseFrequenciesSubstitutionModel () |
void | fireParameterChanged (const ParameterList ¶meters) override |
void | setFreq (std::map< int, double > &frequencies) override |
void | setNamespace (const std::string &prefix) override |
double | getCodonsMulRate (size_t, size_t) 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 |
const FrequencySetInterface & | frequencySet () const |
bool | hasCodonFrequencySet () const 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 std::string | getNamespace () const=0 |
virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const=0 |
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::unique_ptr< CodonFrequencySetInterface > | posFreqSet_ |
Position dependent version of Codon Frequencies Set. More... | |
std::string | freqName_ |
ParameterList | independentParameters_ |
std::map< std::string, std::shared_ptr< AliasParameterListener > > | aliasListenersRegister_ |
ParameterList | parameters_ |
std::string | prefix_ |
Abstract Class for substitution models on codons parametrized by a frequency.
This class should be used with models which equilibrium distribution is fixed, and does not depend on the parameters. Otherwise there may be problems of identifiability of the parameters.
If we denote the given frequencies for codons, is the frequency of letter in phase .
For codons and , the generator term defined from inherited and inheriting classes, , is multiplied by the product of the for each such that .
Definition at line 34 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
AbstractCodonPhaseFrequenciesSubstitutionModel::AbstractCodonPhaseFrequenciesSubstitutionModel | ( | std::unique_ptr< CodonFrequencySetInterface > | pfreq, |
const std::string & | prefix | ||
) |
Build a AbstractCodonPhaseFrequenciesSubstitutionModel instance.
pfreq | pointer to the AbstractFrequencySet equilibrium frequencies. It is owned by the instance. |
prefix | the Namespace |
Definition at line 15 of file AbstractCodonPhaseFrequenciesSubstitutionModel.cpp.
References bpp::AbstractParameterAliasable::addParameters_(), fireParameterChanged(), freqName_, and posFreqSet_.
Referenced by clone().
|
inline |
Definition at line 57 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
|
virtual |
Definition at line 57 of file AbstractCodonPhaseFrequenciesSubstitutionModel.cpp.
|
inlineoverridevirtual |
Implements bpp::AbstractParameterAliasable.
Reimplemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel.
Definition at line 72 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
References AbstractCodonPhaseFrequenciesSubstitutionModel().
|
inlineoverridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Reimplemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel.
Definition at line 91 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
References posFreqSet_.
Referenced by bpp::CodonDistancePhaseFrequenciesSubstitutionModel::codonFrequencySet(), bpp::CodonDistancePhaseFrequenciesSubstitutionModel::fireParameterChanged(), and bpp::CodonDistancePhaseFrequenciesSubstitutionModel::setFreq().
|
overridevirtual |
Reimplemented from bpp::AbstractParameterAliasable.
Reimplemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel.
Definition at line 61 of file AbstractCodonPhaseFrequenciesSubstitutionModel.cpp.
References posFreqSet_.
Referenced by AbstractCodonPhaseFrequenciesSubstitutionModel(), and bpp::CodonDistancePhaseFrequenciesSubstitutionModel::fireParameterChanged().
|
inline |
Definition at line 96 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
References posFreqSet_.
|
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::CodonDistancePhaseFrequenciesSubstitutionModel.
Definition at line 76 of file AbstractCodonPhaseFrequenciesSubstitutionModel.cpp.
References bpp::WordFrequencySetInterface::frequencySetForLetter(), and bpp::FrequencySetInterface::getFrequencies().
Referenced by bpp::CodonDistancePhaseFrequenciesSubstitutionModel::getCodonsMulRate().
|
inlineoverridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Reimplemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel.
Definition at line 101 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
References posFreqSet_.
Referenced by bpp::CodonDistancePhaseFrequenciesSubstitutionModel::hasCodonFrequencySet().
|
inline |
Definition at line 63 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
References freqName_, bpp::AbstractParameterAliasable::operator=(), and posFreqSet_.
|
overridevirtual |
Implements bpp::CoreCodonSubstitutionModelInterface.
Reimplemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel.
Definition at line 68 of file AbstractCodonPhaseFrequenciesSubstitutionModel.cpp.
References bpp::AbstractParameterAliasable::matchParametersValues(), and posFreqSet_.
Referenced by bpp::CodonDistancePhaseFrequenciesSubstitutionModel::setFreq().
|
inlineoverridevirtual |
Reimplemented from bpp::AbstractParameterAliasable.
Reimplemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel.
Definition at line 83 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
References freqName_, posFreqSet_, and bpp::AbstractParameterAliasable::setNamespace().
Referenced by bpp::CodonDistancePhaseFrequenciesSubstitutionModel::setNamespace().
|
private |
Definition at line 43 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
Referenced by AbstractCodonPhaseFrequenciesSubstitutionModel(), operator=(), and setNamespace().
|
private |
Position dependent version of Codon Frequencies Set.
Definition at line 42 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.
Referenced by AbstractCodonPhaseFrequenciesSubstitutionModel(), codonFrequencySet(), fireParameterChanged(), frequencySet(), hasCodonFrequencySet(), operator=(), setFreq(), and setNamespace().