bpp-phyl  2.4.0
bpp::AbstractCodonPhaseFrequenciesSubstitutionModel Class Referenceabstract

Abstract Class for substitution models on codons parametrized by a frequency. More...

#include <Bpp/Phyl/Model/Codon/AbstractCodonPhaseFrequenciesSubstitutionModel.h>

+ Inheritance diagram for bpp::AbstractCodonPhaseFrequenciesSubstitutionModel:
+ Collaboration diagram for bpp::AbstractCodonPhaseFrequenciesSubstitutionModel:

Public Member Functions

 AbstractCodonPhaseFrequenciesSubstitutionModel (FrequenciesSet *pfreq, const std::string &prefix)
 Build a AbstractCodonPhaseFrequenciesSubstitutionModel instance. More...
 
 AbstractCodonPhaseFrequenciesSubstitutionModel (const AbstractCodonPhaseFrequenciesSubstitutionModel &model)
 
AbstractCodonPhaseFrequenciesSubstitutionModeloperator= (const AbstractCodonPhaseFrequenciesSubstitutionModel &model)
 
AbstractCodonPhaseFrequenciesSubstitutionModelclone () const
 
virtual ~AbstractCodonPhaseFrequenciesSubstitutionModel ()
 
void fireParameterChanged (const ParameterList &parameters)
 
void setFreq (std::map< int, double > &frequencies)
 
void setNamespace (const std::string &prefix)
 
double getCodonsMulRate (size_t, size_t) const
 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 FrequenciesSetgetFrequenciesSet () const
 
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 ParameterListgetIndependentParameters () 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 ParameterListgetParameters () const =0
 
virtual const ParametergetParameter (const std::string &name) const =0
 
virtual double getParameterValue (const std::string &name) const =0
 
virtual void setAllParametersValues (const ParameterList &parameters)=0
 
virtual void setParameterValue (const std::string &name, double value)=0
 
virtual void setParametersValues (const ParameterList &parameters)=0
 
virtual bool matchParametersValues (const ParameterList &parameters)=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 ParameterListgetIndependentParameters () 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
 
const ParameterListgetParameters () const
 
const ParametergetParameter (const std::string &name) const
 
const std::shared_ptr< Parameter > & getSharedParameter (const std::string &name) const
 
double getParameterValue (const std::string &name) const
 
void setAllParametersValues (const ParameterList &parameters)
 
void setParameterValue (const std::string &name, double value)
 
void setParametersValues (const ParameterList &parameters)
 
bool matchParametersValues (const ParameterList &parameters)
 
size_t getNumberOfParameters () const
 
std::string getNamespace () const
 
std::string getParameterNameWithoutNamespace (const std::string &name) const
 

Protected Member Functions

const std::shared_ptr< Parameter > & getSharedParameter (size_t i) const
 
std::shared_ptr< Parameter > & getSharedParameter (size_t i)
 
void addParameter_ (Parameter *parameter)
 
void addParameters_ (const ParameterList &parameters)
 
void includeParameters_ (const ParameterList &parameters)
 
void deleteParameter_ (size_t index)
 
void deleteParameter_ (std::string &name)
 
void deleteParameters_ (const std::vector< std::string > &names)
 
void resetParameters_ ()
 
void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
void shareParameters_ (const ParameterList &parameters)
 
ParametergetParameter_ (const std::string &name)
 
ParametergetParameter_ (size_t index)
 
const ParametergetParameter_ (size_t index) const
 
ParametergetParameterWithNamespace_ (const std::string &name)
 
const ParametergetParameterWithNamespace_ (const std::string &name) const
 
ParameterListgetParameters_ ()
 

Private Attributes

WordFrequenciesSetposfreqset_
 Position dependent version of Codon Frequencies Set. More...
 
std::string freqName_
 

Detailed Description

Abstract Class for substitution models on codons parametrized by a frequency.

Author
Laurent Gu├ęguen

This class should be used with models which equilibrium distribution is fixed, ans does not depend on the parameters. Otherwise there may be problems of identifiability of the parameters.

If we denote $F$ the given frequencies for codons, $F_{j_k}$ is the frequency of letter $j$ in phase $k$.

For codons $i=i_1i_2i_3$ and $j=j_1j_2j_3$, the generator term defined from inherited and inheriting classes, $Q_{ij})$, is multiplied by the product of the $F_{j_k}$ for each $k \in 1, 2, 3$ such that $i_k \neq j_k$.

Definition at line 69 of file AbstractCodonPhaseFrequenciesSubstitutionModel.h.

Constructor & Destructor Documentation

bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::AbstractCodonPhaseFrequenciesSubstitutionModel ( const AbstractCodonPhaseFrequenciesSubstitutionModel model)
inline
AbstractCodonPhaseFrequenciesSubstitutionModel::~AbstractCodonPhaseFrequenciesSubstitutionModel ( )
virtual

Definition at line 89 of file AbstractCodonPhaseFrequenciesSubstitutionModel.cpp.

References posfreqset_.

Referenced by clone().

Member Function Documentation

double AbstractCodonPhaseFrequenciesSubstitutionModel::getCodonsMulRate ( size_t  ,
size_t   
) const
virtual

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::CoreCodonSubstitutionModel.

Reimplemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel.

Definition at line 107 of file AbstractCodonPhaseFrequenciesSubstitutionModel.cpp.

References bpp::FrequenciesSet::getFrequencies(), bpp::WordFrequenciesSet::getFrequenciesSetForLetter(), and posfreqset_.

Referenced by bpp::CodonDistancePhaseFrequenciesSubstitutionModel::getCodonsMulRate(), and setNamespace().

void bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::setNamespace ( const std::string &  prefix)
inlinevirtual

Member Data Documentation

std::string bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::freqName_
private
WordFrequenciesSet* bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::posfreqset_
private

The documentation for this class was generated from the following files: