bpp-phyl3  3.0.0
bpp::AbstractCodonBGCSubstitutionModel Class Referenceabstract

Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models, with gBGC. More...

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

+ Inheritance diagram for bpp::AbstractCodonBGCSubstitutionModel:
+ Collaboration diagram for bpp::AbstractCodonBGCSubstitutionModel:

Public Member Functions

 AbstractCodonBGCSubstitutionModel (std::shared_ptr< const GeneticCode > pgencode, const std::string &prefix)
 Build a new AbstractCodonBGCSubstitutionModel object. More...
 
 AbstractCodonBGCSubstitutionModel (const AbstractCodonBGCSubstitutionModel &model)
 
AbstractCodonBGCSubstitutionModeloperator= (const AbstractCodonBGCSubstitutionModel &model)
 
AbstractCodonBGCSubstitutionModelclone () const override
 
virtual ~AbstractCodonBGCSubstitutionModel ()
 
void fireParameterChanged (const ParameterList &parameters) 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 CodonFrequencySetInterfacecodonFrequencySet () 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 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 Parameterparameter (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 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 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 override
 
const ParameterListgetParameters () const override
 
const Parameterparameter (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 &parameters) override
 
void setParameterValue (const std::string &name, double value) override
 
void setParametersValues (const ParameterList &parameters) override
 
bool matchParametersValues (const ParameterList &parameters) 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 ParameterListgetParameters_ ()=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 &parameters)
 
void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
void shareParameters_ (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_ ()
 
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_ () override
 

Private Attributes

std::shared_ptr< const GeneticCodepgencode_
 
double B_
 
double S_
 
std::shared_ptr< const StateMapInterfacestateMap_
 
ParameterList independentParameters_
 
std::map< std::string, std::shared_ptr< AliasParameterListener > > aliasListenersRegister_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models, with gBGC.

Author
Laurent Guéguen

The non-synonymous substitution rate is multiplied with $\frac{\epsilon B+S}{1-e^{-(\epsilon B+S)}}$.

The synonymous substitution rate is multiplied with $\frac{\epsilon B}{1-e^{-\epsilon B}}$.

with positive parameter $S$ that stands for selection, and real parameter $B$ for biased gene conversion. In the formula, $\epsilon = 1$ for AT->GC substitutions, $\epsilon = -1$ for GC->AT substitution, and $\epsilon = 0$ otherwise.

References:

  • Galtier N, Duret L, Glémin S, Ranwez V (2009) GC-biased gene conversion promotes the fixation of deleterious amino acid changes in primates, Trends in Genetics, vol. 25(1) pp.1-5.

Definition at line 42 of file AbstractCodonBGCSubstitutionModel.h.

Constructor & Destructor Documentation

◆ AbstractCodonBGCSubstitutionModel() [1/2]

AbstractCodonBGCSubstitutionModel::AbstractCodonBGCSubstitutionModel ( std::shared_ptr< const GeneticCode pgencode,
const std::string &  prefix 
)

Build a new AbstractCodonBGCSubstitutionModel object.

Parameters
pgencodethe genetic code
prefixthe Namespace

Definition at line 15 of file AbstractCodonBGCSubstitutionModel.cpp.

References bpp::AbstractParameterAliasable::addParameter_().

Referenced by clone().

◆ AbstractCodonBGCSubstitutionModel() [2/2]

bpp::AbstractCodonBGCSubstitutionModel::AbstractCodonBGCSubstitutionModel ( const AbstractCodonBGCSubstitutionModel model)
inline

Definition at line 64 of file AbstractCodonBGCSubstitutionModel.h.

◆ ~AbstractCodonBGCSubstitutionModel()

virtual bpp::AbstractCodonBGCSubstitutionModel::~AbstractCodonBGCSubstitutionModel ( )
inlinevirtual

Definition at line 89 of file AbstractCodonBGCSubstitutionModel.h.

Member Function Documentation

◆ clone()

AbstractCodonBGCSubstitutionModel* bpp::AbstractCodonBGCSubstitutionModel::clone ( ) const
inlineoverridevirtual

◆ codonFrequencySet()

const CodonFrequencySetInterface& bpp::AbstractCodonBGCSubstitutionModel::codonFrequencySet ( ) const
inlineoverridevirtual

◆ fireParameterChanged()

void AbstractCodonBGCSubstitutionModel::fireParameterChanged ( const ParameterList parameters)
overridevirtual

◆ getCodonsMulRate()

double AbstractCodonBGCSubstitutionModel::getCodonsMulRate ( size_t  ,
size_t   
) const
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.

Definition at line 34 of file AbstractCodonBGCSubstitutionModel.cpp.

References B_, bpp::exp(), pgencode_, S_, and stateMap_.

◆ hasCodonFrequencySet()

bool bpp::AbstractCodonBGCSubstitutionModel::hasCodonFrequencySet ( ) const
inlineoverridevirtual

◆ operator=()

AbstractCodonBGCSubstitutionModel& bpp::AbstractCodonBGCSubstitutionModel::operator= ( const AbstractCodonBGCSubstitutionModel model)
inline

◆ setFreq()

void bpp::AbstractCodonBGCSubstitutionModel::setFreq ( std::map< int, double > &  frequencies)
inlineoverridevirtual

Member Data Documentation

◆ B_

double bpp::AbstractCodonBGCSubstitutionModel::B_
private

◆ pgencode_

std::shared_ptr<const GeneticCode> bpp::AbstractCodonBGCSubstitutionModel::pgencode_
private

Definition at line 47 of file AbstractCodonBGCSubstitutionModel.h.

Referenced by getCodonsMulRate(), and operator=().

◆ S_

double bpp::AbstractCodonBGCSubstitutionModel::S_
private

◆ stateMap_

std::shared_ptr<const StateMapInterface> bpp::AbstractCodonBGCSubstitutionModel::stateMap_
private

Definition at line 51 of file AbstractCodonBGCSubstitutionModel.h.

Referenced by getCodonsMulRate(), and operator=().


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