bpp-seq3  3.0.0
bpp::MiyataAAChemicalDistance Class Reference

Miyata et al. (1979) Amino-Acid chemical distance. More...

#include <Bpp/Seq/AlphabetIndex/MiyataAAChemicalDistance.h>

+ Inheritance diagram for bpp::MiyataAAChemicalDistance:
+ Collaboration diagram for bpp::MiyataAAChemicalDistance:

Public Member Functions

 MiyataAAChemicalDistance ()
 
 MiyataAAChemicalDistance (const MiyataAAChemicalDistance &md)
 
MiyataAAChemicalDistance & operator= (const MiyataAAChemicalDistance &md)
 
virtual ~MiyataAAChemicalDistance ()
 
MiyataAAChemicalDistance * clone () const override
 
void setSymmetric (bool yn)
 
bool isSymmetric () const override
 
std::shared_ptr< const Alphabet > getAlphabet () const override
 Get the alphabet associated to this index. More...
 
const Alphabet & alphabet () const override
 Get the alphabet associated to this index. More...
 
Methods from the AlphabetIndex2 interface.
double getIndex (int state1, int state2) const override
 Get the index associated to a pair of states. More...
 
double getIndex (const std::string &state1, const std::string &state2) const override
 Get the index associated to a pair of states. More...
 
const Matrix< double > & getIndexMatrix () const override
 

Protected Member Functions

void computeIndexMatrix_ ()
 

Private Attributes

LinearMatrix< double > distanceMatrix_
 
LinearMatrix< double > indexMatrix_
 
bool sym_
 
std::shared_ptr< const ProteicAlphabet > alpha_
 

Detailed Description

Miyata et al. (1979) Amino-Acid chemical distance.

Two kinds of matrix can be built:

  • a symmetric one, with $I_{i,j} = I_{i,j}$,
  • or a non-symmetric one, with $I_{i,j} = -I_{i,j}$.

Reference: Miyata, T., Miyazawa, S. and Yasunaga, T. Two types of amino acid substitutions in protein evolution J. Mol. Evol. 12, 219-236 (1979)

Data from AAIndex2 database, Accession Number MIYT790101.

Definition at line 33 of file MiyataAAChemicalDistance.h.

Constructor & Destructor Documentation

◆ MiyataAAChemicalDistance() [1/2]

MiyataAAChemicalDistance::MiyataAAChemicalDistance ( )

Definition at line 16 of file MiyataAAChemicalDistance.cpp.

Referenced by clone().

◆ MiyataAAChemicalDistance() [2/2]

bpp::MiyataAAChemicalDistance::MiyataAAChemicalDistance ( const MiyataAAChemicalDistance &  md)
inline

Definition at line 44 of file MiyataAAChemicalDistance.h.

◆ ~MiyataAAChemicalDistance()

virtual bpp::MiyataAAChemicalDistance::~MiyataAAChemicalDistance ( )
inlinevirtual

Definition at line 61 of file MiyataAAChemicalDistance.h.

Member Function Documentation

◆ alphabet()

const Alphabet& bpp::ProteicAlphabetIndex2::alphabet ( ) const
inlineoverridevirtualinherited

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex2.

Definition at line 104 of file AlphabetIndex2.h.

References bpp::ProteicAlphabetIndex2::alpha_.

◆ clone()

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

Implements bpp::ProteicAlphabetIndex2.

Definition at line 63 of file MiyataAAChemicalDistance.h.

References MiyataAAChemicalDistance().

◆ computeIndexMatrix_()

void MiyataAAChemicalDistance::computeIndexMatrix_ ( )
protected

Definition at line 36 of file MiyataAAChemicalDistance.cpp.

References distanceMatrix_, indexMatrix_, and sym_.

Referenced by setSymmetric().

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::ProteicAlphabetIndex2::getAlphabet ( ) const
inlineoverridevirtualinherited

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex2.

Definition at line 102 of file AlphabetIndex2.h.

References bpp::ProteicAlphabetIndex2::alpha_.

Referenced by bpp::AAIndex2Entry::getIndex(), bpp::BLOSUM50::getIndex(), bpp::GranthamAAChemicalDistance::getIndex(), and getIndex().

◆ getIndex() [1/2]

double MiyataAAChemicalDistance::getIndex ( const std::string &  state1,
const std::string &  state2 
) const
overridevirtual

Get the index associated to a pair of states.

Parameters
state1First state to consider, as a string value.
state2Second state to consider, as a string value.
Returns
The index associated to the pair of states.

Implements bpp::AlphabetIndex2.

Definition at line 31 of file MiyataAAChemicalDistance.cpp.

References bpp::ProteicAlphabetIndex2::getAlphabet(), and getIndex().

◆ getIndex() [2/2]

double MiyataAAChemicalDistance::getIndex ( int  state1,
int  state2 
) const
overridevirtual

Get the index associated to a pair of states.

Parameters
state1First state to consider, as a int value in the Alphabet
state2Second state to consider, as a int value in the Alphabet
Returns
The index associated to the pair of states.

Implements bpp::AlphabetIndex2.

Definition at line 25 of file MiyataAAChemicalDistance.cpp.

References distanceMatrix_, bpp::ProteicAlphabetIndex2::getAlphabet(), and sym_.

Referenced by getIndex().

◆ getIndexMatrix()

const Matrix<double>& bpp::MiyataAAChemicalDistance::getIndexMatrix ( ) const
inlineoverridevirtual
Returns
A matrix object with all indices.

Implements bpp::AlphabetIndex2.

Definition at line 73 of file MiyataAAChemicalDistance.h.

References indexMatrix_.

◆ isSymmetric()

bool bpp::MiyataAAChemicalDistance::isSymmetric ( ) const
inlineoverridevirtual
Returns
True if the index is symetric (that is, index(i,j) == index(j, i)).

Implements bpp::AlphabetIndex2.

Definition at line 85 of file MiyataAAChemicalDistance.h.

References sym_.

◆ operator=()

MiyataAAChemicalDistance& bpp::MiyataAAChemicalDistance::operator= ( const MiyataAAChemicalDistance &  md)
inline

◆ setSymmetric()

void bpp::MiyataAAChemicalDistance::setSymmetric ( bool  yn)
inline

Definition at line 80 of file MiyataAAChemicalDistance.h.

References computeIndexMatrix_(), and sym_.

Member Data Documentation

◆ alpha_

std::shared_ptr<const ProteicAlphabet> bpp::ProteicAlphabetIndex2::alpha_
privateinherited

◆ distanceMatrix_

LinearMatrix<double> bpp::MiyataAAChemicalDistance::distanceMatrix_
private

Definition at line 37 of file MiyataAAChemicalDistance.h.

Referenced by computeIndexMatrix_(), getIndex(), and operator=().

◆ indexMatrix_

LinearMatrix<double> bpp::MiyataAAChemicalDistance::indexMatrix_
private

Definition at line 38 of file MiyataAAChemicalDistance.h.

Referenced by computeIndexMatrix_(), getIndexMatrix(), and operator=().

◆ sym_

bool bpp::MiyataAAChemicalDistance::sym_
private

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