bpp-seq3  3.0.0
AAChenGuHuangHydrophobicityIndex.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_SEQ_ALPHABETINDEX_AACHENGUHUANGHYDROPHOBICITYINDEX_H
6 #define BPP_SEQ_ALPHABETINDEX_AACHENGUHUANGHYDROPHOBICITYINDEX_H
7 
8 
9 #include "AlphabetIndex1.h"
10 
11 namespace bpp
12 {
32 {
33 private:
34  std::vector<double> hydrophobicity_;
35 
36 public:
40  {
41  hydrophobicity_.resize(20);
42  hydrophobicity_[ 0] = 0.87; // A
43  hydrophobicity_[ 1] = 0.85; // R
44  hydrophobicity_[ 2] = 0.09; // N
45  hydrophobicity_[ 3] = 0.66; // D
46  hydrophobicity_[ 4] = 1.52; // C
47  hydrophobicity_[ 5] = 0.00; // Q
48  hydrophobicity_[ 6] = 0.67; // E
49  hydrophobicity_[ 7] = 0.00; // G
50  hydrophobicity_[ 8] = 0.87; // H
51  hydrophobicity_[ 9] = 3.15; // I
52  hydrophobicity_[10] = 2.17; // L
53  hydrophobicity_[11] = 1.64; // K
54  hydrophobicity_[12] = 1.67; // M
55  hydrophobicity_[13] = 2.87; // F
56  hydrophobicity_[14] = 2.77; // P
57  hydrophobicity_[15] = 0.07; // S
58  hydrophobicity_[16] = 0.07; // T
59  hydrophobicity_[17] = 3.77; // W
60  hydrophobicity_[18] = 2.76; // Y
61  hydrophobicity_[19] = 1.87; // V
62  }
63 
65 
67  {
69  }
70 
71 public:
72  double getIndex(int state) const override
73  {
74  return hydrophobicity_[getAlphabet()->getStateIndex(state) - 1];
75  }
76 
77  double getIndex(const std::string& state) const override
78  {
79  return hydrophobicity_[getAlphabet()->getStateIndex(state) - 1];
80  }
81 
82  const std::vector<double>& indexVector() const override { return hydrophobicity_; }
83 };
84 } // end of namespace bpp.
85 #endif // BPP_SEQ_ALPHABETINDEX_AACHENGUHUANGHYDROPHOBICITYINDEX_H
Hydrophobicity of each amino acid, according to Table 1 in Chen, Gu and Huang, BMC Bioinformatics 200...
AAChenGuHuangHydrophobicityIndex * clone() const override
double getIndex(const std::string &state) const override
Get the index associated to a state.
const std::vector< double > & indexVector() const override
double getIndex(int state) const override
Get the index associated to a state.
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to this index.
This alphabet is used to deal NumericAlphabet.