bpp-seq3  3.0.0
bpp::BLOSUM50 Class Reference

BLOSUM 50 Substitution Matrix. More...

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

+ Inheritance diagram for bpp::BLOSUM50:
+ Collaboration diagram for bpp::BLOSUM50:

Public Member Functions

 BLOSUM50 ()
 
 BLOSUM50 (const BLOSUM50 &blosum)
 
BLOSUM50operator= (const BLOSUM50 &blosum)
 
BLOSUM50clone () const override
 
virtual ~BLOSUM50 ()
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 Get the alphabet associated to this index. More...
 
const Alphabetalphabet () 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
 
bool isSymmetric () const override
 

Private Attributes

LinearMatrix< double > distanceMatrix_
 
std::shared_ptr< const ProteicAlphabetalpha_
 

Detailed Description

BLOSUM 50 Substitution Matrix.

Reference: Henikoff, S. and Henikoff, J.G. Amino acid substitution matrices from protein blocks Proc. Natl. Acad. Sci. USA 89, 10915-10919 (1992)

Data from AAIndex2 database, Accession Number HENS920104.

Definition at line 29 of file BLOSUM50.h.

Constructor & Destructor Documentation

◆ BLOSUM50() [1/2]

BLOSUM50::BLOSUM50 ( )

Definition at line 14 of file BLOSUM50.cpp.

Referenced by clone().

◆ BLOSUM50() [2/2]

bpp::BLOSUM50::BLOSUM50 ( const BLOSUM50 blosum)
inline

Definition at line 38 of file BLOSUM50.h.

◆ ~BLOSUM50()

virtual bpp::BLOSUM50::~BLOSUM50 ( )
inlinevirtual

Definition at line 52 of file BLOSUM50.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()

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

Implements bpp::ProteicAlphabetIndex2.

Definition at line 50 of file BLOSUM50.h.

References BLOSUM50().

◆ 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(), getIndex(), bpp::GranthamAAChemicalDistance::getIndex(), and bpp::MiyataAAChemicalDistance::getIndex().

◆ getIndex() [1/2]

double BLOSUM50::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 26 of file BLOSUM50.cpp.

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

◆ getIndex() [2/2]

double BLOSUM50::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 21 of file BLOSUM50.cpp.

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

◆ getIndexMatrix()

const Matrix< double > & BLOSUM50::getIndexMatrix ( ) const
overridevirtual
Returns
A matrix object with all indices.

Implements bpp::AlphabetIndex2.

Definition at line 31 of file BLOSUM50.cpp.

References distanceMatrix_.

◆ isSymmetric()

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

Implements bpp::AlphabetIndex2.

Definition at line 63 of file BLOSUM50.h.

◆ operator=()

BLOSUM50& bpp::BLOSUM50::operator= ( const BLOSUM50 blosum)
inline

Definition at line 43 of file BLOSUM50.h.

References distanceMatrix_, and bpp::ProteicAlphabetIndex2::operator=().

Member Data Documentation

◆ alpha_

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

◆ distanceMatrix_

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

Definition at line 33 of file BLOSUM50.h.

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


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