bpp-phyl
2.2.0
|
FrequenciesSet integrating ProteinFrequenciesSet inside CodonFrequenciesSet. In this case, FrequencieSet defined inside each amino acid is parametrized as a FullFrequenciesSet. Hence there are 61-20=41 parameters in addition of the parameters of the ProteinFrequenciesSet. More...
#include <Bpp/Phyl/Model/FrequenciesSet/CodonFrequenciesSet.h>
Public Member Functions | |
FullPerAACodonFrequenciesSet (const GeneticCode *gencode, ProteinFrequenciesSet *ppfs, unsigned short method=1) | |
Create a new FullPerAACodonFrequenciesSet object. More... | |
FullPerAACodonFrequenciesSet (const GeneticCode *gencode, unsigned short method=1) | |
Construction with fixed uniform frequencies on the amino acids. The stop codon frequencies are null. More... | |
FullPerAACodonFrequenciesSet (const FullPerAACodonFrequenciesSet &ffs) | |
FullPerAACodonFrequenciesSet & | operator= (const FullPerAACodonFrequenciesSet &ffs) |
virtual | ~FullPerAACodonFrequenciesSet () |
FullPerAACodonFrequenciesSet * | clone () const |
const CodonAlphabet * | getAlphabet () const |
const GeneticCode * | getGeneticCode () 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... | |
void | setNamespace (const std::string &prefix) |
const ProteinFrequenciesSet * | getProteinFrequenciesSet () const |
unsigned short | getMethod () const |
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) |
Private Member Functions | |
void | updateFrequencies () |
Private Attributes | |
const GeneticCode * | pgc_ |
std::auto_ptr< ProteinFrequenciesSet > | ppfs_ |
std::vector< Simplex > | vS_ |
FrequenciesSet integrating ProteinFrequenciesSet inside CodonFrequenciesSet. In this case, FrequencieSet defined inside each amino acid is parametrized as a FullFrequenciesSet. Hence there are 61-20=41 parameters in addition of the parameters of the ProteinFrequenciesSet.
The parametrization depends on the method used. Default method is 1 (ie global ratio).
Definition at line 246 of file CodonFrequenciesSet.h.
FullPerAACodonFrequenciesSet::FullPerAACodonFrequenciesSet | ( | const GeneticCode * | gencode, |
ProteinFrequenciesSet * | ppfs, | ||
unsigned short | method = 1 |
||
) |
Create a new FullPerAACodonFrequenciesSet object.
gencode | The genetic code to use. |
ppfs | The protein frequencies to use. The codon frequencies set will own the instance of the protein frequencies set. |
method | the method used for parametrization. |
Definition at line 177 of file CodonFrequenciesSet.cpp.
References bpp::StateMap::getAlphabetStateAsInt(), bpp::StateMap::getNumberOfModelStates(), pgc_, ppfs_, updateFrequencies(), and vS_.
Referenced by clone().
FullPerAACodonFrequenciesSet::FullPerAACodonFrequenciesSet | ( | const GeneticCode * | gencode, |
unsigned short | method = 1 |
||
) |
Construction with fixed uniform frequencies on the amino acids. The stop codon frequencies are null.
gencode | The genetic code to use. |
method | the method used for parametrization. |
Definition at line 206 of file CodonFrequenciesSet.cpp.
References bpp::StateMap::getAlphabetStateAsInt(), bpp::StateMap::getNumberOfModelStates(), pgc_, ppfs_, updateFrequencies(), and vS_.
FullPerAACodonFrequenciesSet::FullPerAACodonFrequenciesSet | ( | const FullPerAACodonFrequenciesSet & | ffs | ) |
Definition at line 228 of file CodonFrequenciesSet.cpp.
References updateFrequencies().
|
inlinevirtual |
Definition at line 288 of file CodonFrequenciesSet.h.
|
inlinevirtual |
Implements bpp::CodonFrequenciesSet.
Definition at line 295 of file CodonFrequenciesSet.h.
References FullPerAACodonFrequenciesSet().
|
protected |
Definition at line 249 of file CodonFrequenciesSet.cpp.
References ppfs_, updateFrequencies(), and vS_.
|
inlinevirtual |
Implements bpp::CodonFrequenciesSet.
Definition at line 299 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(), bpp::FixedCodonFrequenciesSet::FixedCodonFrequenciesSet(), bpp::FixedFrequenciesSet::FixedFrequenciesSet(), bpp::FullNucleotideFrequenciesSet::FullNucleotideFrequenciesSet(), bpp::GCFrequenciesSet::GCFrequenciesSet(), bpp::GCFrequenciesSet::setFrequencies(), bpp::FixedCodonFrequenciesSet::setFrequencies(), bpp::FullCodonFrequenciesSet::updateFreq_(), bpp::FullFrequenciesSet::updateFreq_(), bpp::MvaFrequenciesSet::updateFrequencies(), bpp::WordFromIndependentFrequenciesSet::updateFrequencies(), bpp::WordFromUniqueFrequenciesSet::updateFrequencies(), 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 305 of file CodonFrequenciesSet.h.
References pgc_.
|
inline |
Definition at line 321 of file CodonFrequenciesSet.h.
References vS_.
Referenced by bpp::BppOFrequenciesSetFormat::write().
|
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().
|
inline |
Definition at line 316 of file CodonFrequenciesSet.h.
References ppfs_.
Referenced by bpp::BppOFrequenciesSetFormat::write().
|
pure virtualinherited |
Implemented in bpp::AbstractFrequenciesSet.
|
inlinevirtualinherited |
Implements bpp::FrequenciesSet.
Definition at line 172 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::stateMap_.
Referenced by updateFrequencies().
|
inlineinherited |
Definition at line 193 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by updateFrequencies().
FullPerAACodonFrequenciesSet & FullPerAACodonFrequenciesSet::operator= | ( | const FullPerAACodonFrequenciesSet & | ffs | ) |
Definition at line 238 of file CodonFrequenciesSet.cpp.
References bpp::AbstractFrequenciesSet::operator=(), pgc_, ppfs_, and vS_.
|
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 277 of file CodonFrequenciesSet.cpp.
References getAlphabet(), bpp::StateMap::getAlphabetStateAsInt(), bpp::StateMap::getNumberOfModelStates(), pgc_, ppfs_, updateFrequencies(), and vS_.
|
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.
void FullPerAACodonFrequenciesSet::setNamespace | ( | const std::string & | prefix | ) |
Definition at line 315 of file CodonFrequenciesSet.cpp.
|
private |
Definition at line 260 of file CodonFrequenciesSet.cpp.
References bpp::StateMap::getAlphabetStateAsInt(), bpp::AbstractFrequenciesSet::getFreq_(), bpp::StateMap::getNumberOfModelStates(), bpp::AbstractFrequenciesSet::getStateMap(), bpp::AbstractFrequenciesSet::normalize(), pgc_, ppfs_, and vS_.
Referenced by fireParameterChanged(), FullPerAACodonFrequenciesSet(), and setFrequencies().
|
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().
|
private |
Definition at line 251 of file CodonFrequenciesSet.h.
Referenced by FullPerAACodonFrequenciesSet(), getGeneticCode(), operator=(), setFrequencies(), setNamespace(), and updateFrequencies().
|
private |
Definition at line 252 of file CodonFrequenciesSet.h.
Referenced by fireParameterChanged(), FullPerAACodonFrequenciesSet(), getProteinFrequenciesSet(), operator=(), setFrequencies(), setNamespace(), and updateFrequencies().
|
private |
Definition at line 259 of file CodonFrequenciesSet.h.
Referenced by fireParameterChanged(), FullPerAACodonFrequenciesSet(), getMethod(), operator=(), setFrequencies(), setNamespace(), and updateFrequencies().