bpp-phyl3
3.0.0
|
Sequences simulation under position specific substitution process. More...
#include <Bpp/Phyl/Simulation/SubstitutionProcessSequenceSimulator.h>
Public Member Functions | |
SubstitutionProcessSequenceSimulator (const SequenceEvolution &evol) | |
SubstitutionProcessSequenceSimulator (const SubstitutionProcessSequenceSimulator &) | |
SubstitutionProcessSequenceSimulator & | operator= (const SubstitutionProcessSequenceSimulator &) |
SubstitutionProcessSequenceSimulator * | clone () const override |
virtual | ~SubstitutionProcessSequenceSimulator () |
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... | |
Sequences simulation under position specific substitution process.
Definition at line 20 of file SubstitutionProcessSequenceSimulator.h.
SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator | ( | const SequenceEvolution & | evol | ) |
Definition at line 22 of file SubstitutionProcessSequenceSimulator.cpp.
References bpp::VectorTools::contains(), bpp::SubstitutionProcessInterface::getParametrizablePhyloTree(), bpp::SequenceEvolution::getSubstitutionProcess(), bpp::SequenceEvolution::getSubstitutionProcessNumbers(), mProcess_, mvPosNames_, seqNames_, setMap(), bpp::SequenceEvolution::substitutionProcess(), and bpp::VectorTools::which().
Referenced by clone().
SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator | ( | const SubstitutionProcessSequenceSimulator & | spss | ) |
Definition at line 76 of file SubstitutionProcessSequenceSimulator.cpp.
References mProcess_.
|
inlinevirtual |
Definition at line 61 of file SubstitutionProcessSequenceSimulator.h.
|
overridevirtual |
Implements bpp::SequenceSimulatorInterface.
Definition at line 278 of file SubstitutionProcessSequenceSimulator.cpp.
References mProcess_.
|
inlineoverridevirtual |
Implements bpp::SequenceSimulatorInterface.
Definition at line 59 of file SubstitutionProcessSequenceSimulator.h.
References SubstitutionProcessSequenceSimulator().
|
overridevirtual |
Implements bpp::SequenceSimulatorInterface.
Definition at line 268 of file SubstitutionProcessSequenceSimulator.cpp.
References mProcess_.
Referenced by simulate().
|
inline |
the number of mapped sites.
Definition at line 91 of file SubstitutionProcessSequenceSimulator.h.
References vMap_.
|
inlineoverridevirtual |
Implements bpp::SequenceSimulatorInterface.
Definition at line 70 of file SubstitutionProcessSequenceSimulator.h.
References seqNames_.
SubstitutionProcessSequenceSimulator & SubstitutionProcessSequenceSimulator::operator= | ( | const SubstitutionProcessSequenceSimulator & | spss | ) |
Definition at line 98 of file SubstitutionProcessSequenceSimulator.cpp.
References mProcess_, mvPosNames_, seqNames_, and vMap_.
Referenced by bpp::EvolutionSequenceSimulator::operator=().
|
overridevirtual |
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 mProcess_.
void SubstitutionProcessSequenceSimulator::setMap | ( | std::vector< size_t > | vMap | ) |
reset the set of processes.
Definition at line 134 of file SubstitutionProcessSequenceSimulator.cpp.
References mProcess_, bpp::TextTools::toString(), and vMap_.
Referenced by SubstitutionProcessSequenceSimulator().
unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate | ( | const std::vector< double > & | rates | ) | const |
Definition at line 178 of file SubstitutionProcessSequenceSimulator.cpp.
References getAlphabet(), mProcess_, mvPosNames_, seqNames_, and vMap_.
unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate | ( | const std::vector< double > & | rates, |
const std::vector< size_t > & | states | ||
) | const |
Definition at line 237 of file SubstitutionProcessSequenceSimulator.cpp.
References getAlphabet(), mProcess_, mvPosNames_, seqNames_, and vMap_.
unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate | ( | const std::vector< size_t > & | states | ) | const |
Definition at line 209 of file SubstitutionProcessSequenceSimulator.cpp.
References getAlphabet(), mProcess_, mvPosNames_, seqNames_, and vMap_.
|
overridevirtual |
Implements bpp::SequenceSimulatorInterface.
Definition at line 149 of file SubstitutionProcessSequenceSimulator.cpp.
References getAlphabet(), mProcess_, mvPosNames_, seqNames_, and vMap_.
|
inlineoverridevirtual |
Implements bpp::SequenceSimulatorInterface.
Definition at line 63 of file SubstitutionProcessSequenceSimulator.h.
|
protected |
the map of the process simulators.
Definition at line 28 of file SubstitutionProcessSequenceSimulator.h.
Referenced by alphabet(), getAlphabet(), operator=(), outputInternalSequences(), setMap(), simulate(), siteSimulator(), and SubstitutionProcessSequenceSimulator().
|
protected |
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 operator=(), simulate(), and SubstitutionProcessSequenceSimulator().
|
protected |
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 getSequenceNames(), operator=(), simulate(), and SubstitutionProcessSequenceSimulator().
|
mutableprotected |
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 getNumberOfSites(), operator=(), bpp::EvolutionSequenceSimulator::resetSiteSimulators(), setMap(), simulate(), and siteSimulator().