bpp-phyl
2.2.0
|
Estimate a distance matrix from sequence data, according to a given model. More...
#include <Bpp/Phyl/Distance/DistanceEstimation.h>
Public Member Functions | |
DistanceEstimation (SubstitutionModel *model, DiscreteDistribution *rateDist, size_t verbose=1) | |
Create a new DistanceEstimation object according to a given substitution model and a rate distribution. More... | |
DistanceEstimation (SubstitutionModel *model, DiscreteDistribution *rateDist, const SiteContainer *sites, size_t verbose=1, bool computeMat=true) | |
Create a new DistanceEstimation object and compute distances according to a given substitution model and a rate distribution. More... | |
DistanceEstimation (const DistanceEstimation &distanceEstimation) | |
Copy constructor. More... | |
DistanceEstimation & | operator= (const DistanceEstimation &distanceEstimation) |
Assigment operator. More... | |
virtual | ~DistanceEstimation () |
DistanceEstimation * | clone () const |
void | computeMatrix () throw (NullPointerException) |
Perform the distance computation. More... | |
DistanceMatrix * | getMatrix () const |
Get the distance matrix. More... | |
bool | hasSubstitutionModel () const |
const SubstitutionModel & | getSubstitutionModel () const throw (Exception) |
void | resetSubstitutionModel (SubstitutionModel *model=0) |
bool | hasRateDistribution () const |
const DiscreteDistribution & | getRateDistribution () const throw (Exception) |
void | resetRateDistribution (DiscreteDistribution *rateDist=0) |
void | setData (const SiteContainer *sites) |
const SiteContainer * | getData () const |
void | resetData () |
void | setOptimizer (const Optimizer *optimizer) |
const Optimizer * | getOptimizer () const |
Optimizer * | getOptimizer () |
void | resetOptimizer () |
void | setAdditionalParameters (const ParameterList ¶meters) |
Specify a list of parameters to be estimated. More... | |
void | resetAdditionalParameters () |
Reset all additional parameters. More... | |
void | setVerbose (size_t verbose) |
size_t | getVerbose () const |
Private Member Functions | |
void | init_ () |
Private Attributes | |
auto_ptr< SubstitutionModel > | model_ |
auto_ptr< DiscreteDistribution > | rateDist_ |
const SiteContainer * | sites_ |
DistanceMatrix * | dist_ |
Optimizer * | optimizer_ |
MetaOptimizer * | defaultOptimizer_ |
size_t | verbose_ |
ParameterList | parameters_ |
Estimate a distance matrix from sequence data, according to a given model.
By default, the parameters of the model are fixed to there given values. It is possible to estimate one or several parameters by setting them with the setAdditionalParameters() method. Parameters will be estimated separately for each pair of sequence.
For now it is not possible to retrieve estimated values. You'll have to specify a 'profiler' to the optimizer and then look at the file if you want to do so.
Definition at line 306 of file DistanceEstimation.h.
|
inline |
Create a new DistanceEstimation object according to a given substitution model and a rate distribution.
This instance will own the model and distribution, and will take car of their recopy and destruction.
model | The substitution model to use. |
rateDist | The discrete rate distribution to use. |
verbose | The verbose level:
|
Definition at line 335 of file DistanceEstimation.h.
|
inline |
Create a new DistanceEstimation object and compute distances according to a given substitution model and a rate distribution.
This instance will own the model and distribution, and will take car of their recopy and destruction.
model | The substitution model to use. |
rateDist | The discrete rate distribution to use. |
sites | The sequence data. |
verbose | The verbose level:
|
computeMat | if true the computeMatrix() method is called. |
Definition at line 368 of file DistanceEstimation.h.
|
inline |
Copy constructor.
Only the distance matrix is hard-copied, if there is one.
distanceEstimation | The object to copy. |
Definition at line 394 of file DistanceEstimation.h.
References dist_.
|
inlinevirtual |
Definition at line 434 of file DistanceEstimation.h.
|
inline |
Definition at line 446 of file DistanceEstimation.h.
void DistanceEstimation::computeMatrix | ( | ) | ||
throw | ( | NullPointerException | ||
) |
Perform the distance computation.
Result can be called by the getMatrix() method.
NullPointerException | if at least one of the model, rate distribution or data are not initialized. |
Definition at line 652 of file DistanceEstimation.cpp.
References dist_, bpp::AbstractTreeLikelihood::enableDerivatives(), bpp::TwoTreeLikelihood::getBranchLengthsParameters(), bpp::TwoTreeLikelihood::getMinimumBranchLength(), bpp::TwoTreeLikelihood::initialize(), model_, optimizer_, parameters_, rateDist_, sites_, and verbose_.
|
inline |
Definition at line 507 of file DistanceEstimation.h.
|
inline |
Get the distance matrix.
Definition at line 482 of file DistanceEstimation.h.
Referenced by bpp::TreeTools::MRP(), and bpp::TreeTools::MRPMultilabel().
|
inline |
Definition at line 515 of file DistanceEstimation.h.
|
inline |
Definition at line 516 of file DistanceEstimation.h.
|
inline |
Definition at line 497 of file DistanceEstimation.h.
|
inline |
Definition at line 486 of file DistanceEstimation.h.
References bpp::TwoTreeLikelihood::model_.
|
inline |
Definition at line 546 of file DistanceEstimation.h.
|
inline |
Definition at line 495 of file DistanceEstimation.h.
|
inline |
Definition at line 484 of file DistanceEstimation.h.
References bpp::TwoTreeLikelihood::model_.
|
inlineprivate |
Definition at line 449 of file DistanceEstimation.h.
References bpp::TwoTreeLikelihood::model_.
|
inline |
Assigment operator.
Only the distance matrix is hard-copied, if there is one.
distanceEstimation | The object to copy. |
Definition at line 418 of file DistanceEstimation.h.
References dist_, bpp::TwoTreeLikelihood::model_, model_, optimizer_, parameters_, rateDist_, sites_, and verbose_.
|
inline |
Reset all additional parameters.
Definition at line 534 of file DistanceEstimation.h.
|
inline |
Definition at line 508 of file DistanceEstimation.h.
|
inline |
Definition at line 517 of file DistanceEstimation.h.
|
inline |
Definition at line 504 of file DistanceEstimation.h.
|
inline |
Definition at line 493 of file DistanceEstimation.h.
References bpp::TwoTreeLikelihood::model_.
|
inline |
Specify a list of parameters to be estimated.
Parameters will be estimated separately for each distance.
parameters | A list of parameters to estimate. |
Definition at line 526 of file DistanceEstimation.h.
|
inline |
Definition at line 506 of file DistanceEstimation.h.
|
inline |
Definition at line 510 of file DistanceEstimation.h.
|
inline |
verbose | Verbose level. |
Definition at line 542 of file DistanceEstimation.h.
|
private |
Definition at line 315 of file DistanceEstimation.h.
|
private |
Definition at line 313 of file DistanceEstimation.h.
Referenced by computeMatrix(), DistanceEstimation(), and operator=().
|
private |
Definition at line 310 of file DistanceEstimation.h.
Referenced by computeMatrix(), and operator=().
|
private |
Definition at line 314 of file DistanceEstimation.h.
Referenced by computeMatrix(), and operator=().
|
private |
Definition at line 317 of file DistanceEstimation.h.
Referenced by computeMatrix(), and operator=().
|
private |
Definition at line 311 of file DistanceEstimation.h.
Referenced by computeMatrix(), and operator=().
|
private |
Definition at line 312 of file DistanceEstimation.h.
Referenced by computeMatrix(), and operator=().
|
private |
Definition at line 316 of file DistanceEstimation.h.
Referenced by computeMatrix(), and operator=().