bpp-phyl3  3.0.0
bpp::SubstitutionProcessSequenceSimulator Class Reference

Sequences simulation under position specific substitution process. More...

#include <Bpp/Phyl/Simulation/SubstitutionProcessSequenceSimulator.h>

+ Inheritance diagram for bpp::SubstitutionProcessSequenceSimulator:
+ Collaboration diagram for bpp::SubstitutionProcessSequenceSimulator:

Public Member Functions

 SubstitutionProcessSequenceSimulator (const SequenceEvolution &evol)
 
 SubstitutionProcessSequenceSimulator (const SubstitutionProcessSequenceSimulator &)
 
SubstitutionProcessSequenceSimulatoroperator= (const SubstitutionProcessSequenceSimulator &)
 
SubstitutionProcessSequenceSimulatorclone () const override
 
virtual ~SubstitutionProcessSequenceSimulator ()
 
const SiteSimulatorInterfacesiteSimulator (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< SiteContainerInterfacesimulate (size_t numberOfSites) const override
 
std::unique_ptr< SiteContainerInterfacesimulate (const std::vector< double > &rates) const
 
std::unique_ptr< SiteContainerInterfacesimulate (const std::vector< size_t > &states) const
 
std::unique_ptr< SiteContainerInterfacesimulate (const std::vector< double > &rates, const std::vector< size_t > &states) const
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 
const Alphabetalphabet () 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...
 

Detailed Description

Sequences simulation under position specific substitution process.

Definition at line 20 of file SubstitutionProcessSequenceSimulator.h.

Constructor & Destructor Documentation

◆ SubstitutionProcessSequenceSimulator() [1/2]

◆ SubstitutionProcessSequenceSimulator() [2/2]

SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator ( const SubstitutionProcessSequenceSimulator spss)

Definition at line 76 of file SubstitutionProcessSequenceSimulator.cpp.

References mProcess_.

◆ ~SubstitutionProcessSequenceSimulator()

virtual bpp::SubstitutionProcessSequenceSimulator::~SubstitutionProcessSequenceSimulator ( )
inlinevirtual

Definition at line 61 of file SubstitutionProcessSequenceSimulator.h.

Member Function Documentation

◆ alphabet()

const Alphabet & SubstitutionProcessSequenceSimulator::alphabet ( ) const
overridevirtual

Implements bpp::SequenceSimulatorInterface.

Definition at line 278 of file SubstitutionProcessSequenceSimulator.cpp.

References mProcess_.

◆ clone()

SubstitutionProcessSequenceSimulator* bpp::SubstitutionProcessSequenceSimulator::clone ( ) const
inlineoverridevirtual

◆ getAlphabet()

shared_ptr< const Alphabet > SubstitutionProcessSequenceSimulator::getAlphabet ( ) const
overridevirtual

Implements bpp::SequenceSimulatorInterface.

Definition at line 268 of file SubstitutionProcessSequenceSimulator.cpp.

References mProcess_.

Referenced by simulate().

◆ getNumberOfSites()

size_t bpp::SubstitutionProcessSequenceSimulator::getNumberOfSites ( ) const
inline

the number of mapped sites.

Definition at line 91 of file SubstitutionProcessSequenceSimulator.h.

References vMap_.

◆ getSequenceNames()

std::vector<std::string> bpp::SubstitutionProcessSequenceSimulator::getSequenceNames ( ) const
inlineoverridevirtual

Implements bpp::SequenceSimulatorInterface.

Definition at line 70 of file SubstitutionProcessSequenceSimulator.h.

References seqNames_.

◆ operator=()

SubstitutionProcessSequenceSimulator & SubstitutionProcessSequenceSimulator::operator= ( const SubstitutionProcessSequenceSimulator spss)

◆ outputInternalSequences()

void SubstitutionProcessSequenceSimulator::outputInternalSequences ( bool  yn)
overridevirtual

Sets whether we will output the internal sequences or not.

Parameters
ynTell if we should output internal sequences.

Implements bpp::SequenceSimulatorInterface.

Definition at line 124 of file SubstitutionProcessSequenceSimulator.cpp.

References mProcess_.

◆ setMap()

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().

◆ simulate() [1/4]

unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate ( const std::vector< double > &  rates) const

◆ simulate() [2/4]

unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate ( const std::vector< double > &  rates,
const std::vector< size_t > &  states 
) const

◆ simulate() [3/4]

unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate ( const std::vector< size_t > &  states) const

◆ simulate() [4/4]

unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate ( size_t  numberOfSites) const
overridevirtual

◆ siteSimulator()

const SiteSimulatorInterface& bpp::SubstitutionProcessSequenceSimulator::siteSimulator ( size_t  pos) const
inlineoverridevirtual

Implements bpp::SequenceSimulatorInterface.

Definition at line 63 of file SubstitutionProcessSequenceSimulator.h.

References mProcess_, and vMap_.

Member Data Documentation

◆ mProcess_

std::map<size_t, std::shared_ptr<SiteSimulatorInterface> > bpp::SubstitutionProcessSequenceSimulator::mProcess_
protected

◆ mvPosNames_

std::map<size_t, std::vector<size_t> > bpp::SubstitutionProcessSequenceSimulator::mvPosNames_
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().

◆ seqNames_

std::vector<std::string> bpp::SubstitutionProcessSequenceSimulator::seqNames_
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().

◆ vMap_

std::vector<size_t> bpp::SubstitutionProcessSequenceSimulator::vMap_
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().


The documentation for this class was generated from the following files: