43 #include <Bpp/Seq/Container/SequenceContainerTools.h> 54 AbstractParameterAliasable(
"DSO78."),
58 #include "__DSO78ExchangeabilityCode" 59 #include "__DSO78FrequenciesCode" 65 AbstractParameterAliasable(
"DSO78+F."),
69 #include "__DSO78ExchangeabilityCode" 70 #include "__DSO78FrequenciesCode" 74 addParameters_(
freqSet_->getParameters());
83 SequenceContainerTools::getCounts(data, counts);
85 for (
int i = 0; i < static_cast<int>(
size_); i++)
87 t += (counts[i] + pseudoCount);
89 for (
size_t i = 0; i < size_; ++i) freq_[i] = (static_cast<double>(counts[
static_cast<int>(i)]) + pseudoCount) / t;
92 matchParametersValues(
freqSet_->getParameters());
This class implements a state map where all resolved states are modeled.
virtual void setFrequencies(const std::vector< double > &frequencies)=0
Set the parameters in order to match a given set of frequencies.
FrequenciesSet useful for homogeneous and stationary models, protein implementation.
virtual const std::vector< double > getFrequencies() const =0
Vdouble freq_
The vector of equilibrium frequencies.
virtual void updateMatrices()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
Partial implementation of the ReversibleSubstitutionModel interface.
Parametrize a set of state frequencies for proteins.
void setFreqFromData(const SequenceContainer &data, double pseudoCount=0)
Set equilibrium frequencies equal to the frequencies estimated from the data.
size_t size_
The size of the generator, i.e. the number of states.
DSO78(const ProteicAlphabet *alpha)
Build a simple DSO78 model, with original equilibrium frequencies.
ProteinFrequenciesSet * freqSet_