bpp-phyl3
3.0.0
|
Sequence evolution framework based on a mixture of substitution processes. More...
#include <Bpp/Phyl/Likelihood/MixtureSequenceEvolution.h>
Public Member Functions | |
MixtureSequenceEvolution (std::shared_ptr< SubstitutionProcessCollection > processColl, std::vector< size_t > &nProc) | |
MixtureSequenceEvolution (const MixtureSequenceEvolution &mlc) | |
MixtureSequenceEvolution & | operator= (const MixtureSequenceEvolution &mlc) |
virtual | ~MixtureSequenceEvolution () |
MixtureSequenceEvolution * | clone () const override |
void | setNamespace (const std::string &nameSpace) override |
void | fireParameterChanged (const ParameterList ¶meters) override |
ParameterList | getNonDerivableParameters () const override |
All non derivable parameters. More... | |
const std::vector< double > & | getSubProcessProbabilities () const |
Simplex & | simplex () |
double | getSubProcessProb (size_t i) const |
return the probability of a subprocess More... | |
void | setSubProcessProb (const Simplex &si) |
Set the probabilities of the subprocess. More... | |
const SubstitutionProcessCollection & | collection () const |
The collection. More... | |
SubstitutionProcessCollection & | collection () |
std::shared_ptr< const SubstitutionProcessCollection > | getCollection () const |
std::shared_ptr< SubstitutionProcessCollection > | getCollection () |
size_t | getNumberOfSubstitutionProcess () const |
Return the number of process used for computation. More... | |
const SubstitutionProcessInterface & | substitutionProcess (size_t number) const |
Return the SubstitutionProcess of a given index position (in nProc_ vector). More... | |
std::shared_ptr< const SubstitutionProcessInterface > | getSubstitutionProcess (size_t number) const |
const std::vector< size_t > & | getSubstitutionProcessNumbers () const |
ParameterList | getSubstitutionProcessParameters (bool independent) const |
Get the parameters associated to substitution processes(s). More... | |
ParameterList | getSubstitutionModelParameters (bool independent) const |
Get the parameters associated to substitution model(s). More... | |
ParameterList | getRateDistributionParameters (bool independent) const |
Get the parameters associated to the rate distribution(s). More... | |
ParameterList | getRootFrequenciesParameters (bool independent) const |
Get the parameters associated to the root frequencies(s). More... | |
ParameterList | getBranchLengthParameters (bool independent) const |
Get the branch lengths parameters. More... | |
void | setParameters (const ParameterList ¶meters) |
virtual bool | isCompatibleWith (const AlignmentDataInterface &data) const |
test if data fits this model More... | |
const StateMapInterface & | stateMap () const |
std::shared_ptr< const StateMapInterface > | getStateMap () const |
virtual size_t | getNumberOfIndependentParameters () const=0 |
size_t | getNumberOfIndependentParameters () const |
virtual void | aliasParameters (const std::string &p1, const std::string &p2)=0 |
virtual void | aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)=0 |
void | aliasParameters (const std::string &p1, const std::string &p2) |
void | aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose) |
virtual void | unaliasParameters (const std::string &p1, const std::string &p2)=0 |
void | unaliasParameters (const std::string &p1, const std::string &p2) |
virtual const ParameterList & | getIndependentParameters () const=0 |
const ParameterList & | getIndependentParameters () const |
virtual std::vector< std::string > | getAlias (const std::string &name) const=0 |
virtual std::vector< std::string > | getAlias (const std::string &name) const |
virtual std::map< std::string, std::string > | getAliases () const=0 |
virtual std::map< std::string, std::string > | getAliases () const |
virtual bool | hasParameter (const std::string &name) const=0 |
bool | hasParameter (const std::string &name) const override |
virtual const ParameterList & | getParameters () const=0 |
const ParameterList & | getParameters () const override |
virtual const Parameter & | parameter (const std::string &name) const=0 |
const Parameter & | parameter (const std::string &name) const override |
virtual double | getParameterValue (const std::string &name) const=0 |
double | getParameterValue (const std::string &name) const override |
virtual void | setAllParametersValues (const ParameterList ¶meters)=0 |
void | setAllParametersValues (const ParameterList ¶meters) override |
virtual void | setParameterValue (const std::string &name, double value)=0 |
void | setParameterValue (const std::string &name, double value) override |
virtual void | setParametersValues (const ParameterList ¶meters)=0 |
void | setParametersValues (const ParameterList ¶meters) override |
virtual bool | matchParametersValues (const ParameterList ¶meters)=0 |
bool | matchParametersValues (const ParameterList ¶meters) override |
virtual void | removeConstraint (const std::string &name)=0 |
void | removeConstraint (const std::string &name) override |
virtual void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0 |
void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override |
virtual size_t | getNumberOfParameters () const=0 |
size_t | getNumberOfParameters () const override |
virtual std::string | getNamespace () const=0 |
std::string | getNamespace () const override |
virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const=0 |
std::string | getParameterNameWithoutNamespace (const std::string &name) const override |
bool | hasIndependentParameter (const std::string &name) const |
ParameterList | getAliasedParameters (const ParameterList &pl) const |
ParameterList | getFromParameters (const ParameterList &pl) const |
std::string | getFrom (const std::string &name) const |
const std::shared_ptr< Parameter > & | getParameter (const std::string &name) const |
Protected Member Functions | |
virtual ParameterList & | getParameters_ ()=0 |
ParameterList & | getParameters_ () override |
const std::shared_ptr< Parameter > & | getParameter (size_t i) const |
std::shared_ptr< Parameter > & | getParameter (size_t i) |
void | addParameter_ (Parameter *parameter) |
void | addParameters_ (const ParameterList ¶meters) |
void | shareParameter_ (const std::shared_ptr< Parameter > ¶meter) |
void | shareParameters_ (const ParameterList ¶meters) |
void | includeParameters_ (const ParameterList ¶meters) |
void | deleteParameter_ (size_t index) |
void | deleteParameter_ (std::string &name) |
void | deleteParameters_ (const std::vector< std::string > &names) |
void | resetParameters_ () |
Parameter & | getParameter_ (const std::string &name) |
Parameter & | getParameter_ (size_t index) |
const Parameter & | getParameter_ (size_t index) const |
Parameter & | getParameterWithNamespace_ (const std::string &name) |
const Parameter & | getParameterWithNamespace_ (const std::string &name) const |
Protected Attributes | |
std::shared_ptr< SubstitutionProcessCollection > | processColl_ |
std::vector< size_t > | nProc_ |
the vector of the substitution process numbers, as they are used in this order. More... | |
Private Attributes | |
Simplex | simplex_ |
ParameterList | independentParameters_ |
std::map< std::string, std::shared_ptr< AliasParameterListener > > | aliasListenersRegister_ |
ParameterList | parameters_ |
std::string | prefix_ |
Sequence evolution framework based on a mixture of substitution processes.
Definition at line 21 of file MixtureSequenceEvolution.h.
MixtureSequenceEvolution::MixtureSequenceEvolution | ( | std::shared_ptr< SubstitutionProcessCollection > | processColl, |
std::vector< size_t > & | nProc | ||
) |
Definition at line 12 of file MixtureSequenceEvolution.cpp.
References bpp::AbstractParameterAliasable::addParameters_(), bpp::Simplex::getParameters(), and simplex_.
Referenced by clone().
|
inline |
Definition at line 32 of file MixtureSequenceEvolution.h.
|
inlinevirtual |
Definition at line 43 of file MixtureSequenceEvolution.h.
|
inlineoverridevirtual |
Implements bpp::AbstractParameterAliasable.
Definition at line 45 of file MixtureSequenceEvolution.h.
References MixtureSequenceEvolution().
|
inlineinherited |
Definition at line 69 of file MultiProcessSequenceEvolution.h.
|
inlineinherited |
The collection.
Definition at line 65 of file MultiProcessSequenceEvolution.h.
|
overridevirtual |
Reimplemented from bpp::MultiProcessSequenceEvolution.
Definition at line 38 of file MixtureSequenceEvolution.cpp.
References bpp::MultiProcessSequenceEvolution::fireParameterChanged(), bpp::Simplex::matchParametersValues(), and simplex_.
|
virtualinherited |
Get the branch lengths parameters.
Implements bpp::SequenceEvolution.
Definition at line 85 of file MultiProcessSequenceEvolution.cpp.
References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.
|
inlineinherited |
Definition at line 71 of file MultiProcessSequenceEvolution.h.
|
inlineinherited |
Definition at line 67 of file MultiProcessSequenceEvolution.h.
|
overridevirtual |
All non derivable parameters.
Usually, this contains all substitution model parameters and rate distribution, and alias.
Reimplemented from bpp::MultiProcessSequenceEvolution.
Definition at line 44 of file MixtureSequenceEvolution.cpp.
References bpp::MultiProcessSequenceEvolution::getNonDerivableParameters(), bpp::Simplex::getParameters(), bpp::ParameterList::includeParameters(), and simplex_.
|
inlineinherited |
Return the number of process used for computation.
Definition at line 76 of file MultiProcessSequenceEvolution.h.
Referenced by bpp::PhylogeneticsApplicationTools::printParameters().
|
virtualinherited |
Get the parameters associated to the rate distribution(s).
Implements bpp::SequenceEvolution.
Definition at line 61 of file MultiProcessSequenceEvolution.cpp.
References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.
|
virtualinherited |
Get the parameters associated to the root frequencies(s).
Implements bpp::SequenceEvolution.
Definition at line 73 of file MultiProcessSequenceEvolution.cpp.
References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.
|
inlineinherited |
Definition at line 53 of file SequenceEvolution.h.
References bpp::SubstitutionProcessInterface::getStateMap(), bpp::SequenceEvolution::getSubstitutionProcessNumbers(), and bpp::SequenceEvolution::substitutionProcess().
|
inline |
return the probability of a subprocess
i | the index of the subprocess |
Definition at line 69 of file MixtureSequenceEvolution.h.
References bpp::Simplex::prob(), and simplex_.
|
inline |
Definition at line 54 of file MixtureSequenceEvolution.h.
References bpp::Simplex::getFrequencies(), and simplex_.
Referenced by bpp::PhylogeneticsApplicationTools::printParameters(), and bpp::EvolutionSequenceSimulator::resetSiteSimulators().
|
virtualinherited |
Get the parameters associated to substitution model(s).
Implements bpp::SequenceEvolution.
Definition at line 49 of file MultiProcessSequenceEvolution.cpp.
References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.
|
inlinevirtualinherited |
Implements bpp::SequenceEvolution.
Definition at line 87 of file MultiProcessSequenceEvolution.h.
|
inlinevirtualinherited |
Implements bpp::SequenceEvolution.
Definition at line 92 of file MultiProcessSequenceEvolution.h.
Referenced by bpp::PhylogeneticsApplicationTools::printParameters().
|
virtualinherited |
Get the parameters associated to substitution processes(s).
Implements bpp::SequenceEvolution.
Definition at line 37 of file MultiProcessSequenceEvolution.cpp.
References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.
|
virtualinherited |
test if data fits this model
Implements bpp::SequenceEvolution.
Definition at line 122 of file MultiProcessSequenceEvolution.cpp.
References bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.
|
inline |
Definition at line 36 of file MixtureSequenceEvolution.h.
References bpp::MultiProcessSequenceEvolution::operator=(), and simplex_.
|
overridevirtual |
Reimplemented from bpp::AbstractParameterAliasable.
Definition at line 28 of file MixtureSequenceEvolution.cpp.
References bpp::AbstractParameterAliasable::addParameters_(), bpp::AbstractParameterAliasable::deleteParameters_(), bpp::ParameterList::getParameterNames(), bpp::Simplex::getParameters(), bpp::Simplex::setNamespace(), and simplex_.
|
inherited |
Definition at line 114 of file MultiProcessSequenceEvolution.cpp.
References bpp::AbstractParameterAliasable::setParametersValues().
void MixtureSequenceEvolution::setSubProcessProb | ( | const Simplex & | si | ) |
Set the probabilities of the subprocess.
Definition at line 22 of file MixtureSequenceEvolution.cpp.
References bpp::Simplex::getFrequencies(), bpp::Simplex::getParameters(), bpp::AbstractParameterAliasable::matchParametersValues(), bpp::Simplex::setFrequencies(), and simplex_.
|
inline |
Definition at line 59 of file MixtureSequenceEvolution.h.
References simplex_.
|
inlineinherited |
Definition at line 48 of file SequenceEvolution.h.
References bpp::SequenceEvolution::getSubstitutionProcessNumbers(), bpp::SubstitutionProcessInterface::stateMap(), and bpp::SequenceEvolution::substitutionProcess().
|
inlinevirtualinherited |
Return the SubstitutionProcess of a given index position (in nProc_ vector).
Implements bpp::SequenceEvolution.
Definition at line 82 of file MultiProcessSequenceEvolution.h.
|
protectedinherited |
the vector of the substitution process numbers, as they are used in this order.
Definition at line 37 of file MultiProcessSequenceEvolution.h.
Referenced by bpp::MultiProcessSequenceEvolution::getBranchLengthParameters(), bpp::MultiProcessSequenceEvolution::getNonDerivableParameters(), bpp::MultiProcessSequenceEvolution::getRateDistributionParameters(), bpp::MultiProcessSequenceEvolution::getRootFrequenciesParameters(), bpp::MultiProcessSequenceEvolution::getSubstitutionModelParameters(), bpp::MultiProcessSequenceEvolution::getSubstitutionProcessParameters(), bpp::MultiProcessSequenceEvolution::isCompatibleWith(), bpp::MultiProcessSequenceEvolution::MultiProcessSequenceEvolution(), bpp::MultiProcessSequenceEvolution::operator=(), and bpp::PartitionSequenceEvolution::PartitionSequenceEvolution().
|
protectedinherited |
Definition at line 31 of file MultiProcessSequenceEvolution.h.
Referenced by bpp::AutoCorrelationSequenceEvolution::AutoCorrelationSequenceEvolution(), bpp::MultiProcessSequenceEvolution::fireParameterChanged(), bpp::MultiProcessSequenceEvolution::getBranchLengthParameters(), bpp::MultiProcessSequenceEvolution::getNonDerivableParameters(), bpp::MultiProcessSequenceEvolution::getRateDistributionParameters(), bpp::MultiProcessSequenceEvolution::getRootFrequenciesParameters(), bpp::MultiProcessSequenceEvolution::getSubstitutionModelParameters(), bpp::MultiProcessSequenceEvolution::getSubstitutionProcessParameters(), bpp::HmmSequenceEvolution::HmmSequenceEvolution(), bpp::MultiProcessSequenceEvolution::isCompatibleWith(), bpp::MultiProcessSequenceEvolution::MultiProcessSequenceEvolution(), bpp::MultiProcessSequenceEvolution::operator=(), and bpp::PartitionSequenceEvolution::PartitionSequenceEvolution().
|
private |
Definition at line 25 of file MixtureSequenceEvolution.h.
Referenced by fireParameterChanged(), getNonDerivableParameters(), getSubProcessProb(), getSubProcessProbabilities(), MixtureSequenceEvolution(), operator=(), setNamespace(), setSubProcessProb(), and simplex().