bpp-phyl
2.2.0
|
the Frequencies in words are the product of Independent Frequencies in letters More...
#include <Bpp/Phyl/Model/FrequenciesSet/WordFrequenciesSet.h>
Public Member Functions | |
WordFromIndependentFrequenciesSet (const WordAlphabet *pWA, const std::vector< FrequenciesSet *> &freqVector, const std::string &prefix="", const std::string &name="WordFromIndependent") | |
Constructor from a WordAlphabet* and a vector of different FrequenciesSet*. Throws an Exception if their lengths do not match. More... | |
WordFromIndependentFrequenciesSet (const WordFromIndependentFrequenciesSet &iwfs) | |
~WordFromIndependentFrequenciesSet () | |
WordFromIndependentFrequenciesSet & | operator= (const WordFromIndependentFrequenciesSet &iwfs) |
WordFromIndependentFrequenciesSet * | clone () const |
void | fireParameterChanged (const ParameterList &pl) |
virtual void | updateFrequencies () |
virtual void | setFrequencies (const std::vector< double > &frequencies) |
const FrequenciesSet & | getFrequenciesSetForLetter (size_t i) const |
virtual size_t | getLength () const |
void | setNamespace (const std::string &prefix) |
std::string | getDescription () const |
const WordAlphabet * | getAlphabet () const |
virtual const StateMap & | getStateMap () const =0 |
const StateMap & | getStateMap () const |
virtual const std::vector< double > | getFrequencies () const =0 |
const std::vector< double > | getFrequencies () const |
virtual const std::map< int, double > | getAlphabetStatesFrequencies () const =0 |
const std::map< int, double > | getAlphabetStatesFrequencies () const |
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... | |
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... | |
virtual std::string | getName () const =0 |
std::string | getName () const |
virtual size_t | getNumberOfFrequencies () const =0 |
size_t | getNumberOfFrequencies () const |
void | normalize () |
Static Public Attributes | |
static IntervalConstraint | FREQUENCE_CONSTRAINT_SMALL |
static IntervalConstraint | FREQUENCE_CONSTRAINT_MILLI |
Protected Member Functions | |
size_t | getSizeFromVector (const std::vector< FrequenciesSet *> &freqVector) |
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 | |
std::vector< FrequenciesSet * > | vFreq_ |
std::vector< std::string > | vNestedPrefix_ |
the Frequencies in words are the product of Independent Frequencies in letters
Definition at line 139 of file WordFrequenciesSet.h.
WordFromIndependentFrequenciesSet::WordFromIndependentFrequenciesSet | ( | const WordAlphabet * | pWA, |
const std::vector< FrequenciesSet *> & | freqVector, | ||
const std::string & | prefix = "" , |
||
const std::string & | name = "WordFromIndependent" |
||
) |
Constructor from a WordAlphabet* and a vector of different FrequenciesSet*. Throws an Exception if their lengths do not match.
Definition at line 77 of file WordFrequenciesSet.cpp.
References bpp::AbstractWordFrequenciesSet::getSizeFromVector(), updateFrequencies(), vFreq_, and vNestedPrefix_.
Referenced by clone().
WordFromIndependentFrequenciesSet::WordFromIndependentFrequenciesSet | ( | const WordFromIndependentFrequenciesSet & | iwfs | ) |
Definition at line 102 of file WordFrequenciesSet.cpp.
References updateFrequencies(), and vFreq_.
WordFromIndependentFrequenciesSet::~WordFromIndependentFrequenciesSet | ( | ) |
Definition at line 114 of file WordFrequenciesSet.cpp.
References vFreq_.
|
inlinevirtual |
Implements bpp::AbstractWordFrequenciesSet.
Definition at line 159 of file WordFrequenciesSet.h.
References WordFromIndependentFrequenciesSet().
void WordFromIndependentFrequenciesSet::fireParameterChanged | ( | const ParameterList & | pl | ) |
Definition at line 143 of file WordFrequenciesSet.cpp.
References updateFrequencies(), and vFreq_.
|
inlinevirtualinherited |
Reimplemented from bpp::AbstractFrequenciesSet.
Definition at line 118 of file WordFrequenciesSet.h.
References bpp::AbstractFrequenciesSet::getAlphabet().
Referenced by bpp::CodonFromIndependentFrequenciesSet::getAlphabet(), bpp::CodonFromUniqueFrequenciesSet::getAlphabet(), bpp::AbstractWordFrequenciesSet::getLength(), setFrequencies(), bpp::WordFromUniqueFrequenciesSet::setFrequencies(), updateFrequencies(), and bpp::WordFromUniqueFrequenciesSet::updateFrequencies().
|
pure virtualinherited |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::CodonDistanceFitnessPhaseFrequenciesSubstitutionModel::setFreq().
|
virtualinherited |
Implements bpp::FrequenciesSet.
Definition at line 79 of file FrequenciesSet.cpp.
std::string WordFromIndependentFrequenciesSet::getDescription | ( | ) | const |
Definition at line 239 of file WordFrequenciesSet.cpp.
References bpp::AbstractFrequenciesSet::getName(), and vFreq_.
|
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(), 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_.
|
inlinevirtual |
@ brief Return the n-th FrequenciesSet&
Implements bpp::WordFrequenciesSet.
Definition at line 177 of file WordFrequenciesSet.h.
References vFreq_.
Referenced by bpp::BppOFrequenciesSetFormat::write().
|
virtual |
@ brief Return the length of the words
Reimplemented from bpp::AbstractWordFrequenciesSet.
Definition at line 225 of file WordFrequenciesSet.cpp.
References vFreq_.
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 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().
|
protectedvirtualinherited |
Implements bpp::WordFrequenciesSet.
Definition at line 48 of file WordFrequenciesSet.cpp.
Referenced by WordFromIndependentFrequenciesSet().
|
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().
WordFromIndependentFrequenciesSet & WordFromIndependentFrequenciesSet::operator= | ( | const WordFromIndependentFrequenciesSet & | iwfs | ) |
Definition at line 122 of file WordFrequenciesSet.cpp.
References bpp::AbstractWordFrequenciesSet::operator=(), updateFrequencies(), vFreq_, and vNestedPrefix_.
Referenced by bpp::CodonFromIndependentFrequenciesSet::operator=().
|
virtual |
@ brief Independent letter frequencies from given word frequencies. The frequencies of a letter at a position is the sum of the frequencies of the words that have this letter at this position.
Implements bpp::FrequenciesSet.
Definition at line 183 of file WordFrequenciesSet.cpp.
References bpp::AbstractWordFrequenciesSet::getAlphabet(), updateFrequencies(), and vFreq_.
|
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 WordFromIndependentFrequenciesSet::setNamespace | ( | const std::string & | prefix | ) |
Definition at line 230 of file WordFrequenciesSet.cpp.
References vFreq_, and vNestedPrefix_.
|
virtual |
Reimplemented in bpp::CodonFromIndependentFrequenciesSet.
Definition at line 157 of file WordFrequenciesSet.cpp.
References bpp::AbstractWordFrequenciesSet::getAlphabet(), bpp::AbstractFrequenciesSet::getFreq_(), and vFreq_.
Referenced by fireParameterChanged(), operator=(), setFrequencies(), bpp::CodonFromIndependentFrequenciesSet::updateFrequencies(), and WordFromIndependentFrequenciesSet().
|
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 143 of file WordFrequenciesSet.h.
Referenced by fireParameterChanged(), getDescription(), getFrequenciesSetForLetter(), getLength(), operator=(), setFrequencies(), setNamespace(), updateFrequencies(), WordFromIndependentFrequenciesSet(), and ~WordFromIndependentFrequenciesSet().
|
protected |
Definition at line 144 of file WordFrequenciesSet.h.
Referenced by operator=(), setNamespace(), and WordFromIndependentFrequenciesSet().