bpp-phyl
2.2.0
|
FrequenciesSet useful for homogeneous and stationary models, codon implementation. More...
#include <Bpp/Phyl/Model/FrequenciesSet/CodonFrequenciesSet.h>
Public Member Functions | |
FixedCodonFrequenciesSet (const GeneticCode *gCode, const std::vector< double > &initFreqs, const std::string &name="Fixed") | |
FixedCodonFrequenciesSet (const GeneticCode *gCode, const std::string &name="Fixed") | |
Construction with uniform frequencies on the letters of the alphabet. The stop codon frequencies are null. More... | |
FixedCodonFrequenciesSet (const FixedCodonFrequenciesSet &fcfs) | |
FixedCodonFrequenciesSet & | operator= (const FixedCodonFrequenciesSet &fcfs) |
FixedCodonFrequenciesSet * | clone () const |
const GeneticCode * | getGeneticCode () const |
const CodonAlphabet * | getAlphabet () const |
void | setFrequencies (const std::vector< double > &frequencies) |
the given frequencies are normalized such thaat the sum of the frequencies on the non-stop codons equals 1. More... | |
virtual const StateMap & | getStateMap () const =0 |
virtual const std::vector< double > | getFrequencies () const =0 |
virtual const std::map< int, double > | getAlphabetStatesFrequencies () const =0 |
virtual void | setFrequenciesFromAlphabetStatesFrequencies (const std::map< int, double > &frequencies)=0 |
Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1. More... | |
virtual std::string | getName () const =0 |
virtual size_t | getNumberOfFrequencies () const =0 |
const StateMap & | getStateMap () const |
const std::vector< double > | getFrequencies () const |
const std::map< int, double > | getAlphabetStatesFrequencies () const |
void | setFrequenciesFromAlphabetStatesFrequencies (const std::map< int, double > &frequencies) |
Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1. More... | |
size_t | getNumberOfFrequencies () const |
std::string | getName () const |
void | normalize () |
Static Public Member Functions | |
static FrequenciesSet * | getFrequenciesSetForCodons (short option, const GeneticCode *gCode, const std::string &mgmtStopFreq="quadratic", unsigned short method=1) |
A helper function that provide frequencies set for codon models according to PAML option. More... | |
Static Public Attributes | |
static const short | F0 = 0 |
static const short | F1X4 = 1 |
static const short | F3X4 = 2 |
static const short | F61 = 3 |
static IntervalConstraint | FREQUENCE_CONSTRAINT_SMALL |
static IntervalConstraint | FREQUENCE_CONSTRAINT_MILLI |
Protected Member Functions | |
void | fireParameterChanged (const ParameterList ¶meters) |
std::vector< double > & | getFrequencies_ () |
double & | getFreq_ (size_t i) |
const double & | getFreq_ (size_t i) const |
void | setFrequencies_ (const std::vector< double > &frequencies) |
Protected Attributes | |
const GeneticCode * | pgc_ |
FrequenciesSet useful for homogeneous and stationary models, codon implementation.
This set contains no parameter.
Definition at line 177 of file CodonFrequenciesSet.h.
FixedCodonFrequenciesSet::FixedCodonFrequenciesSet | ( | const GeneticCode * | gCode, |
const std::vector< double > & | initFreqs, | ||
const std::string & | name = "Fixed" |
||
) |
Definition at line 331 of file CodonFrequenciesSet.cpp.
References setFrequencies().
Referenced by clone().
FixedCodonFrequenciesSet::FixedCodonFrequenciesSet | ( | const GeneticCode * | gCode, |
const std::string & | name = "Fixed" |
||
) |
Construction with uniform frequencies on the letters of the alphabet. The stop codon frequencies are null.
Definition at line 341 of file CodonFrequenciesSet.cpp.
References bpp::AbstractFrequenciesSet::getFreq_().
|
inline |
Definition at line 193 of file CodonFrequenciesSet.h.
|
inlinevirtual |
Implements bpp::CodonFrequenciesSet.
Definition at line 210 of file CodonFrequenciesSet.h.
References FixedCodonFrequenciesSet().
|
inlineprotected |
Definition at line 229 of file CodonFrequenciesSet.h.
|
inlinevirtual |
Implements bpp::CodonFrequenciesSet.
Definition at line 216 of file CodonFrequenciesSet.h.
References bpp::AbstractFrequenciesSet::getAlphabet().
Referenced by setFrequencies().
|
pure virtualinherited |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::CodonDistanceFitnessPhaseFrequenciesSubstitutionModel::setFreq().
|
virtualinherited |
Implements bpp::FrequenciesSet.
Definition at line 79 of file FrequenciesSet.cpp.
|
inlineprotectedinherited |
Definition at line 203 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::GCFrequenciesSet::fireParameterChanged(), bpp::FullNucleotideFrequenciesSet::fireParameterChanged(), FixedCodonFrequenciesSet(), bpp::FixedFrequenciesSet::FixedFrequenciesSet(), bpp::FullNucleotideFrequenciesSet::FullNucleotideFrequenciesSet(), bpp::GCFrequenciesSet::GCFrequenciesSet(), bpp::GCFrequenciesSet::setFrequencies(), setFrequencies(), bpp::FullCodonFrequenciesSet::updateFreq_(), bpp::FullFrequenciesSet::updateFreq_(), bpp::MvaFrequenciesSet::updateFrequencies(), bpp::WordFromIndependentFrequenciesSet::updateFrequencies(), bpp::WordFromUniqueFrequenciesSet::updateFrequencies(), bpp::FullPerAACodonFrequenciesSet::updateFrequencies(), bpp::CodonFromIndependentFrequenciesSet::updateFrequencies(), and bpp::CodonFromUniqueFrequenciesSet::updateFrequencies().
|
inlineprotectedinherited |
Definition at line 204 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
|
pure virtualinherited |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::AbstractCodonPhaseFrequenciesSubstitutionModel(), bpp::DSO78::DSO78(), bpp::LG08::fireParameterChanged(), bpp::DSO78::fireParameterChanged(), bpp::JTT92::fireParameterChanged(), bpp::WAG01::fireParameterChanged(), bpp::UserProteinSubstitutionModel::fireParameterChanged(), bpp::JCprot::fireParameterChanged(), bpp::MarkovModulatedFrequenciesSet::fireParameterChanged(), bpp::AbstractCodonFitnessSubstitutionModel::getCodonsMulRate(), bpp::AbstractCodonFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::JCprot::JCprot(), bpp::JTT92::JTT92(), bpp::LG08::LG08(), bpp::MarkovModulatedFrequenciesSet::MarkovModulatedFrequenciesSet(), bpp::WordFromUniqueFrequenciesSet::updateFrequencies(), bpp::UserProteinSubstitutionModel::UserProteinSubstitutionModel(), bpp::WAG01::WAG01(), and bpp::BppOFrequenciesSetFormat::write().
|
inlinevirtualinherited |
Implements bpp::FrequenciesSet.
Definition at line 174 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::MvaFrequenciesSet::updateFrequencies().
|
inlineprotectedinherited |
Definition at line 202 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
|
staticinherited |
A helper function that provide frequencies set for codon models according to PAML option.
option | A code describing the option, one of F61, F1X4 or F3X4. |
gCode | The genetic code to use. The underlying codon alphabet object will be passed to the FrequenciesSet instance. |
mgmtStopFreq | the optional way the frequencies assigned to the stop codons are redistributed to the other codons, with F1X4 and F3X4 options. The available values are:
|
method | The parametrization used for F61. Default method is 1 (ie global ratio). |
Definition at line 623 of file CodonFrequenciesSet.cpp.
References bpp::CodonFrequenciesSet::F0, bpp::CodonFrequenciesSet::F1X4, bpp::CodonFrequenciesSet::F3X4, and bpp::CodonFrequenciesSet::F61.
Referenced by bpp::BppOFrequenciesSetFormat::read().
|
inlinevirtual |
Implements bpp::CodonFrequenciesSet.
Definition at line 213 of file CodonFrequenciesSet.h.
References pgc_.
|
pure virtualinherited |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::AbstractCodonFrequenciesSubstitutionModel::AbstractCodonFrequenciesSubstitutionModel(), bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::AbstractCodonPhaseFrequenciesSubstitutionModel(), bpp::WordFromUniqueFrequenciesSet::getDescription(), bpp::PhylogeneticsApplicationTools::getRootFrequenciesSet(), bpp::BppOFrequenciesSetFormat::read(), and bpp::BppOFrequenciesSetFormat::write().
|
inlinevirtualinherited |
Implements bpp::FrequenciesSet.
Definition at line 191 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::name_.
Referenced by bpp::WordFromIndependentFrequenciesSet::getDescription(), and bpp::WordFromUniqueFrequenciesSet::getDescription().
|
pure virtualinherited |
Implemented in bpp::AbstractFrequenciesSet.
|
inlinevirtualinherited |
Implements bpp::FrequenciesSet.
Definition at line 189 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::FixedFrequenciesSet::setFrequencies().
|
pure virtualinherited |
Implemented in bpp::AbstractFrequenciesSet.
|
inlinevirtualinherited |
Implements bpp::FrequenciesSet.
Definition at line 172 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::stateMap_.
Referenced by bpp::FullPerAACodonFrequenciesSet::updateFrequencies().
|
inlineinherited |
Definition at line 193 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::FullPerAACodonFrequenciesSet::updateFrequencies().
|
inline |
Definition at line 198 of file CodonFrequenciesSet.h.
References bpp::AbstractFrequenciesSet::operator=(), and pgc_.
|
virtual |
the given frequencies are normalized such thaat the sum of the frequencies on the non-stop codons equals 1.
Implements bpp::FrequenciesSet.
Definition at line 353 of file CodonFrequenciesSet.cpp.
References getAlphabet(), bpp::AbstractFrequenciesSet::getFreq_(), and pgc_.
Referenced by FixedCodonFrequenciesSet().
|
inlineprotectedinherited |
Definition at line 205 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::MarkovModulatedFrequenciesSet::fireParameterChanged(), bpp::MarkovModulatedFrequenciesSet::MarkovModulatedFrequenciesSet(), bpp::FullNucleotideFrequenciesSet::setFrequencies(), bpp::FixedFrequenciesSet::setFrequencies(), and bpp::MvaFrequenciesSet::updateFrequencies().
|
pure virtualinherited |
Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1.
frequencies | The set of frequencies to match. |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::BppOFrequenciesSetFormat::initialize_(), bpp::AbstractCodonFitnessSubstitutionModel::setFreq(), bpp::AbstractCodonFrequenciesSubstitutionModel::setFreq(), and bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::setFreq().
|
virtualinherited |
Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1.
In this implementation, all model states with the same alphabet state are given the same frequency.
frequencies | The set of frequencies to match. |
Implements bpp::FrequenciesSet.
Definition at line 58 of file FrequenciesSet.cpp.
|
staticinherited |
Definition at line 95 of file CodonFrequenciesSet.h.
Referenced by bpp::CodonFrequenciesSet::getFrequenciesSetForCodons(), and bpp::BppOFrequenciesSetFormat::read().
|
staticinherited |
Definition at line 96 of file CodonFrequenciesSet.h.
Referenced by bpp::CodonFrequenciesSet::getFrequenciesSetForCodons(), and bpp::BppOFrequenciesSetFormat::read().
|
staticinherited |
Definition at line 97 of file CodonFrequenciesSet.h.
Referenced by bpp::CodonFrequenciesSet::getFrequenciesSetForCodons(), and bpp::BppOFrequenciesSetFormat::read().
|
staticinherited |
Definition at line 98 of file CodonFrequenciesSet.h.
Referenced by bpp::CodonFrequenciesSet::getFrequenciesSetForCodons(), and bpp::BppOFrequenciesSetFormat::read().
|
staticinherited |
Definition at line 118 of file FrequenciesSet.h.
|
staticinherited |
Definition at line 117 of file FrequenciesSet.h.
Referenced by bpp::F84::F84(), bpp::FullNucleotideFrequenciesSet::FullNucleotideFrequenciesSet(), bpp::GTR::GTR(), bpp::HKY85::HKY85(), bpp::T92::T92(), and bpp::TN93::TN93().
|
protected |
Definition at line 182 of file CodonFrequenciesSet.h.
Referenced by getGeneticCode(), operator=(), and setFrequencies().