bpp-seq  2.2.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
 
void setSymmetric (bool yn)
 
bool isSymmetric () const
 
Methods from the AlphabetIndex2 interface.
double getIndex (int state1, int state2) const throw (BadIntException)
 Get the index associated to a pair of states. More...
 
double getIndex (const std::string &state1, const std::string &state2) const throw (BadCharException)
 Get the index associated to a pair of states. More...
 
const Alphabet * getAlphabet () const
 Get the alphabet associated to this index. More...
 
Matrix< double > * getIndexMatrix () const
 

Private Attributes

LinearMatrix< double > distanceMatrix_
 
const ProteicAlphabet * alpha_
 
bool sym_
 

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 68 of file MiyataAAChemicalDistance.h.

Constructor & Destructor Documentation

◆ MiyataAAChemicalDistance() [1/2]

MiyataAAChemicalDistance::MiyataAAChemicalDistance ( )

Definition at line 51 of file MiyataAAChemicalDistance.cpp.

Referenced by clone().

◆ MiyataAAChemicalDistance() [2/2]

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

Definition at line 79 of file MiyataAAChemicalDistance.h.

◆ ~MiyataAAChemicalDistance()

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

Definition at line 93 of file MiyataAAChemicalDistance.h.

Member Function Documentation

◆ clone()

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

Implements bpp::AlphabetIndex2.

Definition at line 95 of file MiyataAAChemicalDistance.h.

References MiyataAAChemicalDistance().

◆ getAlphabet()

const Alphabet* bpp::MiyataAAChemicalDistance::getAlphabet ( ) const
inlinevirtual

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex2.

Definition at line 105 of file MiyataAAChemicalDistance.h.

References alpha_.

◆ getIndex() [1/2]

double MiyataAAChemicalDistance::getIndex ( int  state1,
int  state2 
) const
throw (BadIntException
)
virtual

Get the index associated to a pair of states.

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

Implements bpp::AlphabetIndex2.

Definition at line 59 of file MiyataAAChemicalDistance.cpp.

◆ getIndex() [2/2]

double MiyataAAChemicalDistance::getIndex ( const std::string &  state1,
const std::string &  state2 
) const
throw (BadCharException
)
virtual

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 68 of file MiyataAAChemicalDistance.cpp.

◆ getIndexMatrix()

Matrix< double > * MiyataAAChemicalDistance::getIndexMatrix ( ) const
virtual
Returns
A matrix object with all indices.

Implements bpp::AlphabetIndex2.

Definition at line 77 of file MiyataAAChemicalDistance.cpp.

References distanceMatrix_, and sym_.

◆ isSymmetric()

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

Implements bpp::AlphabetIndex2.

Definition at line 111 of file MiyataAAChemicalDistance.h.

References sym_.

◆ operator=()

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

Definition at line 85 of file MiyataAAChemicalDistance.h.

References alpha_, distanceMatrix_, and sym_.

◆ setSymmetric()

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

Definition at line 110 of file MiyataAAChemicalDistance.h.

References sym_.

Referenced by bpp::BppOAlphabetIndex2Format::read().

Member Data Documentation

◆ alpha_

const ProteicAlphabet* bpp::MiyataAAChemicalDistance::alpha_
private

Definition at line 73 of file MiyataAAChemicalDistance.h.

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

◆ distanceMatrix_

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

Definition at line 72 of file MiyataAAChemicalDistance.h.

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

◆ sym_

bool bpp::MiyataAAChemicalDistance::sym_
private

Definition at line 74 of file MiyataAAChemicalDistance.h.

Referenced by getIndexMatrix(), isSymmetric(), operator=(), and setSymmetric().


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