bpp-phyl3
3.0.0
|
#include <Bpp/Phyl/Simulation/EvolutionSequenceSimulator.h>
Public Member Functions | |
EvolutionSequenceSimulator (const SequenceEvolution &evol) | |
virtual | ~EvolutionSequenceSimulator () |
EvolutionSequenceSimulator (const EvolutionSequenceSimulator &ess) | |
EvolutionSequenceSimulator & | operator= (const EvolutionSequenceSimulator &ess) |
EvolutionSequenceSimulator * | clone () const |
void | resetSiteSimulators (size_t numberOfSites) const |
Reset the succession of site simulators (useful in case of HMM). More... | |
const SiteSimulatorInterface & | siteSimulator (size_t pos) const override |
std::vector< std::string > | getSequenceNames () const override |
void | outputInternalSequences (bool yn) override |
Sets whether we will output the internal sequences or not. More... | |
void | setMap (std::vector< size_t > vMap) |
reset the set of processes. More... | |
size_t | getNumberOfSites () const |
the number of mapped sites. More... | |
std::unique_ptr< SiteContainerInterface > | simulate (size_t numberOfSites) const override |
std::unique_ptr< SiteContainerInterface > | simulate (const std::vector< double > &rates) const |
std::unique_ptr< SiteContainerInterface > | simulate (const std::vector< size_t > &states) const |
std::unique_ptr< SiteContainerInterface > | simulate (const std::vector< double > &rates, const std::vector< size_t > &states) const |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
const Alphabet & | alphabet () const override |
Protected Attributes | |
std::map< size_t, std::shared_ptr< SiteSimulatorInterface > > | mProcess_ |
the map of the process simulators. More... | |
std::vector< size_t > | vMap_ |
The vector of the site specific process in mProcess_; is mutable because can be changed for each simulation (for ex in case of HMM). More... | |
std::vector< std::string > | seqNames_ |
all processes trees must have at least the same sequence names as the first process of the map. More... | |
std::map< size_t, std::vector< size_t > > | mvPosNames_ |
correspondence map of seqNames positions of the several trees. Reference is the tree of the first process of the map. More... | |
Private Attributes | |
const SequenceEvolution * | seqEvol_ |
Definition at line 14 of file EvolutionSequenceSimulator.h.
EvolutionSequenceSimulator::EvolutionSequenceSimulator | ( | const SequenceEvolution & | evol | ) |
Definition at line 19 of file EvolutionSequenceSimulator.cpp.
Referenced by clone().
|
inlinevirtual |
Definition at line 23 of file EvolutionSequenceSimulator.h.
|
inline |
Definition at line 26 of file EvolutionSequenceSimulator.h.
|
overridevirtualinherited |
Implements bpp::SequenceSimulatorInterface.
Definition at line 278 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::mProcess_.
|
inlinevirtual |
Implements bpp::SequenceSimulatorInterface.
Definition at line 39 of file EvolutionSequenceSimulator.h.
References EvolutionSequenceSimulator().
|
overridevirtualinherited |
Implements bpp::SequenceSimulatorInterface.
Definition at line 268 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::mProcess_.
Referenced by bpp::SubstitutionProcessSequenceSimulator::simulate().
|
inlineinherited |
the number of mapped sites.
Definition at line 91 of file SubstitutionProcessSequenceSimulator.h.
References bpp::SubstitutionProcessSequenceSimulator::vMap_.
|
inlineoverridevirtualinherited |
Implements bpp::SequenceSimulatorInterface.
Definition at line 70 of file SubstitutionProcessSequenceSimulator.h.
References bpp::SubstitutionProcessSequenceSimulator::seqNames_.
|
inline |
Definition at line 31 of file EvolutionSequenceSimulator.h.
References bpp::SubstitutionProcessSequenceSimulator::operator=(), and seqEvol_.
|
overridevirtualinherited |
Sets whether we will output the internal sequences or not.
yn | Tell if we should output internal sequences. |
Implements bpp::SequenceSimulatorInterface.
Definition at line 124 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::mProcess_.
void EvolutionSequenceSimulator::resetSiteSimulators | ( | size_t | numberOfSites | ) | const |
Reset the succession of site simulators (useful in case of HMM).
Definition at line 26 of file EvolutionSequenceSimulator.cpp.
References bpp::PartitionSequenceEvolution::getNumberOfSites(), bpp::RandomTools::getSample(), bpp::MixtureSequenceEvolution::getSubProcessProbabilities(), bpp::PartitionSequenceEvolution::getSubstitutionProcessNumber(), bpp::SequenceEvolution::getSubstitutionProcessNumbers(), bpp::OneProcessSequenceEvolution::getSubstitutionProcessNumbers(), bpp::AutoCorrelationSequenceEvolution::hmmTransitionMatrix(), bpp::HmmSequenceEvolution::hmmTransitionMatrix(), bpp::AbstractHmmTransitionMatrix::sample(), seqEvol_, and bpp::SubstitutionProcessSequenceSimulator::vMap_.
|
inherited |
reset the set of processes.
Definition at line 134 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::mProcess_, bpp::TextTools::toString(), and bpp::SubstitutionProcessSequenceSimulator::vMap_.
Referenced by bpp::SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator().
|
inherited |
Definition at line 178 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::getAlphabet(), bpp::SubstitutionProcessSequenceSimulator::mProcess_, bpp::SubstitutionProcessSequenceSimulator::mvPosNames_, bpp::SubstitutionProcessSequenceSimulator::seqNames_, and bpp::SubstitutionProcessSequenceSimulator::vMap_.
|
inherited |
Definition at line 237 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::getAlphabet(), bpp::SubstitutionProcessSequenceSimulator::mProcess_, bpp::SubstitutionProcessSequenceSimulator::mvPosNames_, bpp::SubstitutionProcessSequenceSimulator::seqNames_, and bpp::SubstitutionProcessSequenceSimulator::vMap_.
|
inherited |
Definition at line 209 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::getAlphabet(), bpp::SubstitutionProcessSequenceSimulator::mProcess_, bpp::SubstitutionProcessSequenceSimulator::mvPosNames_, bpp::SubstitutionProcessSequenceSimulator::seqNames_, and bpp::SubstitutionProcessSequenceSimulator::vMap_.
|
overridevirtualinherited |
Implements bpp::SequenceSimulatorInterface.
Definition at line 149 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::SubstitutionProcessSequenceSimulator::getAlphabet(), bpp::SubstitutionProcessSequenceSimulator::mProcess_, bpp::SubstitutionProcessSequenceSimulator::mvPosNames_, bpp::SubstitutionProcessSequenceSimulator::seqNames_, and bpp::SubstitutionProcessSequenceSimulator::vMap_.
|
inlineoverridevirtualinherited |
Implements bpp::SequenceSimulatorInterface.
Definition at line 63 of file SubstitutionProcessSequenceSimulator.h.
References bpp::SubstitutionProcessSequenceSimulator::mProcess_, and bpp::SubstitutionProcessSequenceSimulator::vMap_.
|
protectedinherited |
the map of the process simulators.
Definition at line 28 of file SubstitutionProcessSequenceSimulator.h.
Referenced by bpp::SubstitutionProcessSequenceSimulator::alphabet(), bpp::SubstitutionProcessSequenceSimulator::getAlphabet(), bpp::SubstitutionProcessSequenceSimulator::operator=(), bpp::SubstitutionProcessSequenceSimulator::outputInternalSequences(), bpp::SubstitutionProcessSequenceSimulator::setMap(), bpp::SubstitutionProcessSequenceSimulator::simulate(), bpp::SubstitutionProcessSequenceSimulator::siteSimulator(), and bpp::SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator().
|
protectedinherited |
correspondence map of seqNames positions of the several trees. Reference is the tree of the first process of the map.
mvPosNames[process id][i] is the position in the id_th tree leaves names of the i_th name of seqName_.
Definition at line 50 of file SubstitutionProcessSequenceSimulator.h.
Referenced by bpp::SubstitutionProcessSequenceSimulator::operator=(), bpp::SubstitutionProcessSequenceSimulator::simulate(), and bpp::SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator().
|
private |
Definition at line 18 of file EvolutionSequenceSimulator.h.
Referenced by operator=(), and resetSiteSimulators().
|
protectedinherited |
all processes trees must have at least the same sequence names as the first process of the map.
Definition at line 41 of file SubstitutionProcessSequenceSimulator.h.
Referenced by bpp::SubstitutionProcessSequenceSimulator::getSequenceNames(), bpp::SubstitutionProcessSequenceSimulator::operator=(), bpp::SubstitutionProcessSequenceSimulator::simulate(), and bpp::SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator().
|
mutableprotectedinherited |
The vector of the site specific process in mProcess_; is mutable because can be changed for each simulation (for ex in case of HMM).
Definition at line 35 of file SubstitutionProcessSequenceSimulator.h.
Referenced by bpp::SubstitutionProcessSequenceSimulator::getNumberOfSites(), bpp::SubstitutionProcessSequenceSimulator::operator=(), resetSiteSimulators(), bpp::SubstitutionProcessSequenceSimulator::setMap(), bpp::SubstitutionProcessSequenceSimulator::simulate(), and bpp::SubstitutionProcessSequenceSimulator::siteSimulator().