bpp-seq3
3.0.0
|
Grantham (1974) Amino-Acid chemical distance. More...
#include <Bpp/Seq/AlphabetIndex/GranthamAAChemicalDistance.h>
Public Member Functions | |
GranthamAAChemicalDistance () | |
GranthamAAChemicalDistance (const GranthamAAChemicalDistance &gd) | |
GranthamAAChemicalDistance & | operator= (const GranthamAAChemicalDistance &gd) |
GranthamAAChemicalDistance * | clone () const override |
virtual | ~GranthamAAChemicalDistance () |
void | setSymmetric (bool yn) |
bool | isSymmetric () const override |
void | setPC1Sign (bool yn) |
The sign of the distance is computed using the coordinate on the first axis of a principal component analysis with the 3 elementary properties (Volume, Polarity, Composition). Otherwise, use the default arbitrary sign. Using this option will lead isSymmetric to return false. More... | |
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 |
Static Public Attributes | |
static short int | SIGN_ARBITRARY = 1 |
static short int | SIGN_PC1 = 2 |
static short int | SIGN_NONE = 0 |
Protected Member Functions | |
void | computeIndexMatrix_ () |
Private Attributes | |
LinearMatrix< double > | distanceMatrix_ |
LinearMatrix< double > | signMatrix_ |
LinearMatrix< double > | indexMatrix_ |
short int | sign_ |
std::shared_ptr< const ProteicAlphabet > | alpha_ |
Grantham (1974) Amino-Acid chemical distance.
Two kinds of matrix can be built:
Reference: Grantham, R. Amino acid difference formula to help explain protein evolution Science 185, 862-864 (1974)
Data from AAIndex2 database, Accession Number GRAR740104.
Definition at line 61 of file GranthamAAChemicalDistance.h.
GranthamAAChemicalDistance::GranthamAAChemicalDistance | ( | ) |
Definition at line 19 of file GranthamAAChemicalDistance.cpp.
References computeIndexMatrix_().
Referenced by clone().
|
inline |
Definition at line 73 of file GranthamAAChemicalDistance.h.
|
inlinevirtual |
Definition at line 94 of file GranthamAAChemicalDistance.h.
|
inlineoverridevirtualinherited |
Get the alphabet associated to this index.
Implements bpp::AlphabetIndex2.
Definition at line 104 of file AlphabetIndex2.h.
References bpp::ProteicAlphabetIndex2::alpha_.
|
inlineoverridevirtual |
Implements bpp::ProteicAlphabetIndex2.
Definition at line 92 of file GranthamAAChemicalDistance.h.
References GranthamAAChemicalDistance().
|
protected |
Definition at line 47 of file GranthamAAChemicalDistance.cpp.
References distanceMatrix_, indexMatrix_, sign_, SIGN_NONE, SIGN_PC1, and signMatrix_.
Referenced by GranthamAAChemicalDistance(), setPC1Sign(), and setSymmetric().
|
inlineoverridevirtualinherited |
Get 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(), getIndex(), and bpp::MiyataAAChemicalDistance::getIndex().
|
overridevirtual |
Get the index associated to a pair of states.
state1 | First state to consider, as a string value. |
state2 | Second state to consider, as a string value. |
Implements bpp::AlphabetIndex2.
Definition at line 42 of file GranthamAAChemicalDistance.cpp.
References bpp::ProteicAlphabetIndex2::getAlphabet(), and getIndex().
|
overridevirtual |
Get the index associated to a pair of states.
state1 | First state to consider, as a int value in the Alphabet |
state2 | Second state to consider, as a int value in the Alphabet |
Implements bpp::AlphabetIndex2.
Definition at line 31 of file GranthamAAChemicalDistance.cpp.
References distanceMatrix_, bpp::ProteicAlphabetIndex2::getAlphabet(), sign_, SIGN_NONE, SIGN_PC1, and signMatrix_.
Referenced by getIndex().
|
inlineoverridevirtual |
Implements bpp::AlphabetIndex2.
Definition at line 104 of file GranthamAAChemicalDistance.h.
References indexMatrix_.
|
inlineoverridevirtual |
Implements bpp::AlphabetIndex2.
Definition at line 116 of file GranthamAAChemicalDistance.h.
|
inline |
Definition at line 81 of file GranthamAAChemicalDistance.h.
References distanceMatrix_, indexMatrix_, bpp::ProteicAlphabetIndex2::operator=(), sign_, and signMatrix_.
|
inline |
The sign of the distance is computed using the coordinate on the first axis of a principal component analysis with the 3 elementary properties (Volume, Polarity, Composition). Otherwise, use the default arbitrary sign. Using this option will lead isSymmetric to return false.
yn | Tell is the PC1-based sign should be used instead of the arbitrary one. |
Definition at line 124 of file GranthamAAChemicalDistance.h.
References computeIndexMatrix_(), sign_, SIGN_ARBITRARY, and SIGN_PC1.
|
inline |
Definition at line 111 of file GranthamAAChemicalDistance.h.
References computeIndexMatrix_(), sign_, SIGN_ARBITRARY, and SIGN_NONE.
|
privateinherited |
Definition at line 84 of file AlphabetIndex2.h.
Referenced by bpp::ProteicAlphabetIndex2::alphabet(), bpp::ProteicAlphabetIndex2::getAlphabet(), and bpp::ProteicAlphabetIndex2::operator=().
|
private |
Definition at line 65 of file GranthamAAChemicalDistance.h.
Referenced by computeIndexMatrix_(), getIndex(), and operator=().
|
private |
Definition at line 67 of file GranthamAAChemicalDistance.h.
Referenced by computeIndexMatrix_(), getIndexMatrix(), and operator=().
|
private |
Definition at line 68 of file GranthamAAChemicalDistance.h.
Referenced by computeIndexMatrix_(), getIndex(), isSymmetric(), operator=(), setPC1Sign(), and setSymmetric().
|
static |
Definition at line 130 of file GranthamAAChemicalDistance.h.
Referenced by setPC1Sign(), and setSymmetric().
|
static |
Definition at line 132 of file GranthamAAChemicalDistance.h.
Referenced by computeIndexMatrix_(), getIndex(), isSymmetric(), and setSymmetric().
|
static |
Definition at line 131 of file GranthamAAChemicalDistance.h.
Referenced by computeIndexMatrix_(), getIndex(), and setPC1Sign().
|
private |
Definition at line 66 of file GranthamAAChemicalDistance.h.
Referenced by computeIndexMatrix_(), getIndex(), and operator=().