3
// Created by: Julien Dutheil
4
// Created on: Wed Jan 21 14:09:43 2004
8
Copyright or © or Copr. CNRS, (November 16, 2004)
10
This software is a computer program whose purpose is to provide classes
11
for phylogenetic data analysis.
13
This software is governed by the CeCILL license under French law and
14
abiding by the rules of distribution of free software. You can use,
15
modify and/ or redistribute the software under the terms of the CeCILL
16
license as circulated by CEA, CNRS and INRIA at the following URL
17
"http://www.cecill.info".
19
As a counterpart to the access to the source code and rights to copy,
20
modify and redistribute granted by the license, users are provided only
21
with a limited warranty and the software's author, the holder of the
22
economic rights, and the successive licensors have only limited
25
In this respect, the user's attention is drawn to the risks associated
26
with loading, using, modifying and/or developing or reproducing the
27
software by the user in light of its specific status of free software,
28
that may mean that it is complicated to manipulate, and that also
29
therefore means that it is reserved for developers and experienced
30
professionals having in-depth computer knowledge. Users are therefore
31
encouraged to load and test the software's suitability as regards their
32
requirements in conditions enabling the security of their systems and/or
33
data to be ensured and, more generally, to use and operate it in the
34
same conditions as regards security.
36
The fact that you are presently reading this means that you have had
37
knowledge of the CeCILL license and that you accept its terms.
43
#include "ProteinSubstitutionModel.h"
44
#include "AbstractSubstitutionModel.h"
45
#include "FrequenciesSet.h"
48
#include <Bpp/Seq/Alphabet/ProteicAlphabet.h>
54
* @brief The Jones, Taylor and Thornton substitution model for proteins.
56
* Exchangeabilities have been computed using the DCMut method of Kosiol and Goldman.
57
* The exchangability matrix is normalized so that \f$Q = S . \pi\f$ and \f$\sum_i Q_{i,i}\pi_i = -1\f$.
58
* The original frequencies can be used, or alternatively a parametrized version, corresponding to the
59
* so-called JTT92+F model.
60
* Eigen values and vectors are obtained numerically.
63
* - Jones DT, Taylor WR and Thornton JM (1992), _Computer Applications In The Biosciences_, 8(3) 275-82.
64
* - Kosiol C and Goldman N (2005), _Molecular Biology And Evolution_ 22(2) 193-9.
67
public virtual ProteinSubstitutionModel,
68
public AbstractReversibleSubstitutionModel
71
ProteinFrequenciesSet* freqSet_;
75
* @brief Build a simple JTT92 model, with original equilibrium frequencies.
77
* @param alpha A proteic alphabet.
79
JTT92(const ProteicAlphabet* alpha);
82
* @brief Build a JTT92 model with special equilibrium frequencies.
84
* @param alpha A proteic alphabet.
85
* @param freqSet A pointer toward a protein frequencies set, which will be owned by this instance.
86
* @param initFreqs Tell if the frequency set should be initialized with the original JTT92 values.
87
* Otherwise, the values of the set will be used.
89
JTT92(const ProteicAlphabet* alpha, ProteinFrequenciesSet* freqSet, bool initFreqs=false);
91
JTT92(const JTT92& model) :
92
AbstractReversibleSubstitutionModel(model),
93
freqSet_(dynamic_cast<ProteinFrequenciesSet *>(model.freqSet_->clone()))
96
JTT92& operator=(const JTT92& model)
98
AbstractReversibleSubstitutionModel::operator=(model);
99
if (freqSet_) delete freqSet_;
100
freqSet_ = dynamic_cast<ProteinFrequenciesSet *>(model.freqSet_->clone());
104
virtual ~JTT92() { delete freqSet_; }
106
#ifndef NO_VIRTUAL_COV
111
clone() const { return new JTT92(*this); }
114
std::string getName() const
116
if (freqSet_->getNamespace() == "JTT92+F.")
122
void fireParameterChanged(const ParameterList& parameters)
124
freqSet_->matchParametersValues(parameters);
125
freq_ = freqSet_->getFrequencies();
126
AbstractReversibleSubstitutionModel::fireParameterChanged(parameters);
129
void setFrequenciesSet(const ProteinFrequenciesSet& freqSet)
132
freqSet_ = dynamic_cast<ProteinFrequenciesSet*>(freqSet.clone());
134
addParameters_(freqSet_->getParameters());
137
const ProteinFrequenciesSet& getFrequenciesSet() const { return *freqSet_; }
139
void setFreqFromData(const SequenceContainer& data);
143
} //end of namespace bpp.