bpp-phyl3  3.0.0
bpp::AAInteriorSubstitutionRegister Class Reference

Indexes only intra amino-acid substitutions. Every group represents a substitutions for the same amino acid. Met and Trp are not taken into account due their non-degenerescence. More...

#include <Bpp/Phyl/Mapping/SubstitutionRegister.h>

+ Inheritance diagram for bpp::AAInteriorSubstitutionRegister:
+ Collaboration diagram for bpp::AAInteriorSubstitutionRegister:

Public Member Functions

 AAInteriorSubstitutionRegister (std::shared_ptr< const StateMapInterface > stateMap, std::shared_ptr< const GeneticCode > genCode)
 
 AAInteriorSubstitutionRegister (const AAInteriorSubstitutionRegister &ais)
 
AAInteriorSubstitutionRegisteroperator= (const AAInteriorSubstitutionRegister &ais)
 
AAInteriorSubstitutionRegisterclone () const
 
 ~AAInteriorSubstitutionRegister ()
 
std::string getTypeName (size_t type) const
 names of the types are their number. More...
 
size_t getType (size_t i, size_t j) const override
 Get the substitution type far a given pair of model states. More...
 
size_t getNumberOfSubstitutionTypes () const override
 
const StateMapInterfacestateMap () const override
 
std::shared_ptr< const StateMapInterfacegetStateMap () const override
 
const Alphabetalphabet () const override
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 
const std::string & getName () const override
 Get the name of the register. More...
 

Protected Member Functions

void updateMatrix_ ()
 
void updateTypes_ ()
 

Protected Attributes

size_t size_
 The size of the matrix, i.e. the number of states. More...
 
RowMatrix< size_t > matrix_
 The matrix of the substitution register. More...
 
std::map< size_t, std::map< size_t, std::vector< size_t > > > types_
 The map from substitution types to the map of from states to the vector of target states. More...
 
std::shared_ptr< const StateMapInterfacestateMap_
 
std::string name_
 

Private Attributes

std::map< std::string, size_t > categoryCorrespondance_
 
std::shared_ptr< const GeneticCodegenCode_
 

Detailed Description

Indexes only intra amino-acid substitutions. Every group represents a substitutions for the same amino acid. Met and Trp are not taken into account due their non-degenerescence.

Author
Juraj Michalik

Definition at line 558 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ AAInteriorSubstitutionRegister() [1/2]

bpp::AAInteriorSubstitutionRegister::AAInteriorSubstitutionRegister ( std::shared_ptr< const StateMapInterface stateMap,
std::shared_ptr< const GeneticCode genCode 
)
inline

Definition at line 565 of file SubstitutionRegister.h.

References updateMatrix_(), and bpp::GeneralSubstitutionRegister::updateTypes_().

Referenced by clone().

◆ AAInteriorSubstitutionRegister() [2/2]

bpp::AAInteriorSubstitutionRegister::AAInteriorSubstitutionRegister ( const AAInteriorSubstitutionRegister ais)
inline

Definition at line 576 of file SubstitutionRegister.h.

◆ ~AAInteriorSubstitutionRegister()

bpp::AAInteriorSubstitutionRegister::~AAInteriorSubstitutionRegister ( )
inline

Definition at line 593 of file SubstitutionRegister.h.

Member Function Documentation

◆ alphabet()

const Alphabet& bpp::AbstractSubstitutionRegister::alphabet ( ) const
inlineoverridevirtualinherited
Returns
The alphabet associated to this instance.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 133 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::stateMap_.

◆ clone()

AAInteriorSubstitutionRegister* bpp::AAInteriorSubstitutionRegister::clone ( ) const
inlinevirtual

Reimplemented from bpp::GeneralSubstitutionRegister.

Definition at line 591 of file SubstitutionRegister.h.

References AAInteriorSubstitutionRegister().

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::AbstractSubstitutionRegister::getAlphabet ( ) const
inlineoverridevirtualinherited
Returns
A shared_ptr toward the alphabet associated to this instance.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 135 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::stateMap_.

◆ getName()

const std::string& bpp::AbstractSubstitutionRegister::getName ( ) const
inlineoverridevirtualinherited

Get the name of the register.

Returns
A string describing the register.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 137 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::name_.

◆ getNumberOfSubstitutionTypes()

size_t bpp::GeneralSubstitutionRegister::getNumberOfSubstitutionTypes ( ) const
inlineoverridevirtualinherited
Returns
The number of substitution types supported by this class.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 456 of file SubstitutionRegister.h.

References bpp::GeneralSubstitutionRegister::types_.

◆ getStateMap()

std::shared_ptr<const StateMapInterface> bpp::AbstractSubstitutionRegister::getStateMap ( ) const
inlineoverridevirtualinherited
Returns
A shared_ptr toward the state map associated to this instance.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 131 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::stateMap_.

◆ getType()

size_t bpp::GeneralSubstitutionRegister::getType ( size_t  fromState,
size_t  toState 
) const
inlineoverridevirtualinherited

Get the substitution type far a given pair of model states.

Parameters
fromStateInitial state (should be a state supported by the specified alphabet).
toStateFinal state (should be a state supported by the specified alphabet).
Returns
The index of the corresponding substitution type, ranging from 0 to 'getNumberOfSubstitutionTypes' + 1, as non-substitution (that is when fromState == toState) will always return 0.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 451 of file SubstitutionRegister.h.

References bpp::GeneralSubstitutionRegister::matrix_.

◆ getTypeName()

std::string bpp::AAInteriorSubstitutionRegister::getTypeName ( size_t  type) const
inlinevirtual

names of the types are their number.

Reimplemented from bpp::GeneralSubstitutionRegister.

Definition at line 596 of file SubstitutionRegister.h.

References categoryCorrespondance_, bpp::TextTools::toString(), and bpp::GeneralSubstitutionRegister::types_.

◆ operator=()

AAInteriorSubstitutionRegister& bpp::AAInteriorSubstitutionRegister::operator= ( const AAInteriorSubstitutionRegister ais)
inline

◆ stateMap()

◆ updateMatrix_()

◆ updateTypes_()

Member Data Documentation

◆ categoryCorrespondance_

std::map<std::string, size_t> bpp::AAInteriorSubstitutionRegister::categoryCorrespondance_
private

Definition at line 561 of file SubstitutionRegister.h.

Referenced by getTypeName(), operator=(), and updateMatrix_().

◆ genCode_

std::shared_ptr<const GeneticCode> bpp::AAInteriorSubstitutionRegister::genCode_
private

Definition at line 562 of file SubstitutionRegister.h.

Referenced by operator=(), and updateMatrix_().

◆ matrix_

◆ name_

std::string bpp::AbstractSubstitutionRegister::name_
protectedinherited

◆ size_

size_t bpp::GeneralSubstitutionRegister::size_
protectedinherited

The size of the matrix, i.e. the number of states.

Definition at line 392 of file SubstitutionRegister.h.

Referenced by bpp::GeneralSubstitutionRegister::GeneralSubstitutionRegister(), and bpp::GeneralSubstitutionRegister::operator=().

◆ stateMap_

◆ types_

std::map<size_t, std::map<size_t, std::vector<size_t> > > bpp::GeneralSubstitutionRegister::types_
protectedinherited

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