40 #ifndef _CODONFREQUENCIESSET_H_ 41 #define _CODONFREQUENCIESSET_H_ 47 #include <Bpp/Seq/Alphabet/CodonAlphabet.h> 48 #include <Bpp/Seq/GeneticCode/GeneticCode.h> 49 #include <Bpp/Numeric/Prob/Simplex.h> 60 #ifndef NO_VIRTUAL_COV 95 static const short F0;
98 static const short F61;
128 FullCodonFrequenciesSet(
const GeneticCode* gCode,
bool allowNullFreqs =
false,
unsigned short method = 1,
const std::string& name =
"Full");
129 FullCodonFrequenciesSet(
const GeneticCode* gCode,
const std::vector<double>& initFreqs,
bool allowNullFreqs =
false,
unsigned short method = 1,
const std::string& name =
"Full");
134 #ifndef NO_VIRTUAL_COV 151 #ifndef NO_VIRTUAL_COV 162 return sFreq_.getMethod();
185 FixedCodonFrequenciesSet(
const GeneticCode* gCode,
const std::vector<double>& initFreqs,
const std::string& name =
"Fixed");
205 #ifndef NO_VIRTUAL_COV 215 #ifndef NO_VIRTUAL_COV 252 std::auto_ptr<ProteinFrequenciesSet>
ppfs_;
290 #ifndef NO_VIRTUAL_COV 298 #ifndef NO_VIRTUAL_COV 323 return vS_.size() > 0 ?
vS_[0].getMethod() :
static_cast<unsigned short>(1);
370 CodonFromIndependentFrequenciesSet(
const GeneticCode* gCode,
const std::vector<FrequenciesSet*>& freqvector,
const std::string& name =
"Codon",
const std::string& mgmtStopFreq =
"quadratic");
431 const GeneticCode* gCode,
433 const std::string& name =
"Codon",
434 const std::string& mgmtStopFreq =
"quadratic");
456 #endif // _CODONFREQUENCIESSET_H_ const GeneticCode * getGeneticCode() const
virtual ~CodonFromUniqueFrequenciesSet()
A generic FrequenciesSet for Full Codon alphabets.
FixedCodonFrequenciesSet * clone() const
virtual ~FullPerAACodonFrequenciesSet()
void setNamespace(const std::string &prefix)
CodonFromUniqueFrequenciesSet & operator=(const CodonFromUniqueFrequenciesSet &iwfs)
virtual ~CodonFromIndependentFrequenciesSet()
const CodonAlphabet * getAlphabet() const
const CodonAlphabet * getAlphabet() const =0
FixedCodonFrequenciesSet & operator=(const FixedCodonFrequenciesSet &fcfs)
FullCodonFrequenciesSet(const GeneticCode *gCode, bool allowNullFreqs=false, unsigned short method=1, const std::string &name="Full")
Construction with uniform frequencies on the letters of the alphabet. The stop codon frequencies are ...
the Frequencies in codons are the product of Independent Frequencies in letters with the frequencies ...
FrequenciesSet integrating ProteinFrequenciesSet inside CodonFrequenciesSet. In this case...
std::vector< Simplex > vS_
CodonFromIndependentFrequenciesSet(const GeneticCode *gCode, const std::vector< FrequenciesSet *> &freqvector, const std::string &name="Codon", const std::string &mgmtStopFreq="quadratic")
Constructor from a CodonAlphabet* and a vector of different FrequenciesSet*. Throws an Exception if t...
FullPerAACodonFrequenciesSet & operator=(const FullPerAACodonFrequenciesSet &ffs)
CodonFromUniqueFrequenciesSet(const GeneticCode *gCode, FrequenciesSet *pfreq, const std::string &name="Codon", const std::string &mgmtStopFreq="quadratic")
Constructor from a CodonAlphabet* and a FrequenciesSet* repeated three times.
void setFrequencies(const std::vector< double > &frequencies)
the given frequencies are normalized such thaat the sum of the frequencies on the non-stop codons equ...
FixedCodonFrequenciesSet(const GeneticCode *gCode, const std::vector< double > &initFreqs, const std::string &name="Fixed")
void setFrequencies(const std::vector< double > &frequencies)
the given frequencies are normalized such that the sum of the frequencies on the non-stop codons equa...
void fireParameterChanged(const ParameterList ¶meters)
Parametrize a set of state frequencies.
CodonFromUniqueFrequenciesSet * clone() const
std::map< int, Vint > mStopNeigh_
FullPerAACodonFrequenciesSet * clone() const
Parametrize a set of state frequencies for codons.
FixedCodonFrequenciesSet(const FixedCodonFrequenciesSet &fcfs)
CodonFromIndependentFrequenciesSet & operator=(const CodonFromIndependentFrequenciesSet &iwfs)
void fireParameterChanged(const ParameterList ¶meters)
unsigned short getMethod() const
const ProteinFrequenciesSet * getProteinFrequenciesSet() const
const CodonAlphabet * getAlphabet() const
const Alphabet * getAlphabet() const
FrequenciesSet useful for homogeneous and stationary models, codon implementation.
CodonFromIndependentFrequenciesSet * clone() const
Parametrize a set of state frequencies for proteins.
const CodonAlphabet * getAlphabet() const
void updateFrequencies()
Update the frequencies given the parameters.
const GeneticCode * getGeneticCode() const
std::map< int, Vint > mStopNeigh_
FullCodonFrequenciesSet & operator=(const FullCodonFrequenciesSet &fcfs)
FullPerAACodonFrequenciesSet(const GeneticCode *gencode, ProteinFrequenciesSet *ppfs, unsigned short method=1)
Create a new FullPerAACodonFrequenciesSet object.
void setFrequencies(const std::vector< double > &frequencies)
the given frequencies are normalized such thaat the sum of the frequencies on the non-stop codons equ...
void fireParameterChanged(const ParameterList ¶meters)
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...
FullCodonFrequenciesSet * clone() const
void setNamespace(const std::string &nameSpace)
const CodonAlphabet * getAlphabet() const
unsigned short mgmtStopFreq_
unsigned short getMethod() const
const GeneticCode * getGeneticCode() const
the Frequencies in words are the product of Independent Frequencies in letters
unsigned short mgmtStopFreq_
const GeneticCode * getGeneticCode() const
virtual const GeneticCode * getGeneticCode() const =0
const GeneticCode * getGeneticCode() const
AbstractFrequenciesSet & operator=(const AbstractFrequenciesSet &af)
Simplex sFreq_
Simplex to handle the probabilities and the parameters.
std::auto_ptr< ProteinFrequenciesSet > ppfs_
the Frequencies in codons are the product of the frequencies for a unique FrequenciesSet in letters...
Basic implementation of the FrequenciesSet interface.
CodonFrequenciesSet * clone() const =0
const CodonAlphabet * getAlphabet() const