5 #ifndef BPP_PHYL_MODEL_PROTEIN_USERPROTEINSUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_PROTEIN_USERPROTEINSUBSTITUTIONMODEL_H
9 #include "../AbstractSubstitutionModel.h"
10 #include "../FrequencySet/ProteinFrequencySet.h"
34 std::unique_ptr<ProteinFrequencySetInterface>
freqSet_;
45 std::shared_ptr<const ProteicAlphabet> alpha,
46 const std::string& path,
47 const std::string& prefix);
60 std::shared_ptr<const ProteicAlphabet> alpha,
61 const std::string& path,
62 std::unique_ptr<ProteinFrequencySetInterface> freqSet,
63 const std::string& prefix,
64 bool initFreqs =
false
88 std::string
getName()
const override;
94 freqSet_->matchParametersValues(parameters);
116 throw NullPointerException(
"UserProteinSubstitutionModel::frequencySet(). No associated FrequencySet.");
void addParameters_(const ParameterList ¶meters)
AbstractParameterAliasable & operator=(const AbstractParameterAliasable &ap)
void setNamespace(const std::string &prefix)
Specialisation abstract class for reversible protein substitution model.
AbstractSubstitutionModel & operator=(const AbstractSubstitutionModel &model)
virtual void fireParameterChanged(const ParameterList ¶meters) override
Tells the model that a parameter value has changed.
Vdouble freq_
The vector of equilibrium frequencies.
Parametrize a set of state frequencies.
Parametrize a set of state frequencies for proteins.
ProteinFrequencySetInterface * clone() const override=0
Build an empirical protein substitution model from a file.
const std::string & getPath() const
std::unique_ptr< ProteinFrequencySetInterface > freqSet_
void setNamespace(const std::string &prefix) override
void setFreqFromData(const SequenceDataInterface &data, double pseudoCount=0) override
Set equilibrium frequencies equal to the frequencies estimated from the data.
const FrequencySetInterface & frequencySet() const override
UserProteinSubstitutionModel(std::shared_ptr< const ProteicAlphabet > alpha, const std::string &path, const std::string &prefix)
Build a protein model from a PAML file, with original equilibrium frequencies.
UserProteinSubstitutionModel & operator=(const UserProteinSubstitutionModel &model)
void setFrequencySet(const ProteinFrequencySetInterface &freqSet)
void fireParameterChanged(const ParameterList ¶meters) override
Tells the model that a parameter value has changed.
std::string getName() const override
Get the name of the model.
UserProteinSubstitutionModel * clone() const override
virtual ~UserProteinSubstitutionModel()
UserProteinSubstitutionModel(const UserProteinSubstitutionModel &model)
Defines the basic types of data flow nodes.