10 #include "../Alphabet/AlphabetTools.h"
11 #include "../AlphabetIndex/AAChargeIndex.h"
12 #include "../AlphabetIndex/AAChenGuHuangHydrophobicityIndex.h"
13 #include "../AlphabetIndex/AAChouFasmanAHelixIndex.h"
14 #include "../AlphabetIndex/AAChouFasmanBSheetIndex.h"
15 #include "../AlphabetIndex/AAChouFasmanTurnIndex.h"
16 #include "../AlphabetIndex/AAIndex1Entry.h"
17 #include "../AlphabetIndex/AAMassIndex.h"
18 #include "../AlphabetIndex/AASEA1030Index.h"
19 #include "../AlphabetIndex/AASEAInf10Index.h"
20 #include "../AlphabetIndex/AASEASup30Index.h"
21 #include "../AlphabetIndex/AASurfaceIndex.h"
22 #include "../AlphabetIndex/AAVolumeIndex.h"
23 #include "../AlphabetIndex/CodonFromProteicAlphabetIndex1.h"
24 #include "../AlphabetIndex/GranthamAAPolarityIndex.h"
25 #include "../AlphabetIndex/GranthamAAVolumeIndex.h"
26 #include "../AlphabetIndex/KD_AAHydropathyIndex.h"
27 #include "../AlphabetIndex/KleinAANetChargeIndex.h"
35 if (description !=
"None")
38 map<string, string> args;
46 throw Exception(
"BppOAlphabetIndex2Format::read. Missing genetic code for codon alphabet.");
48 auto alphaPtr = gencode_->getTargetAlphabet();
51 shared_ptr<AlphabetIndex1> ai2(reader1.
read(description));
53 throw Exception(
"BppOAlphabetIndex2Format::read. Not a Proteic Alphabet for CodonAlphabetIndex1.");
55 return make_unique<CodonFromProteicAlphabetIndex1>(gencode_, ai2);
60 throw Exception(
"BppOAlphabetIndex1Format::read. This index is only supported with a protein alphabet.");
61 if (name ==
"GranthamPolarity")
63 return make_unique<GranthamAAPolarityIndex>();
65 else if (name ==
"GranthamVolume")
67 return make_unique<GranthamAAVolumeIndex>();
69 else if (name ==
"KleinCharge")
71 return make_unique<KleinAANetChargeIndex>();
73 else if (name ==
"KDHydropathy")
75 return make_unique<KD_AAHydropathyIndex>();
77 else if (name ==
"ChouFasmanAHelix")
79 return make_unique<AAChouFasmanAHelixIndex>();
81 else if (name ==
"ChouFasmanBSheet")
83 return make_unique<AAChouFasmanBSheetIndex>();
85 else if (name ==
"ChouFasmanTurn")
87 return make_unique<AAChouFasmanTurnIndex>();
89 else if (name ==
"ChenGuHuangHydrophobicity")
91 return make_unique<AAChenGuHuangHydrophobicityIndex>();
93 else if (name ==
"Surface")
95 return make_unique<AASurfaceIndex>();
97 else if (name ==
"Mass")
99 return make_unique<AAMassIndex>();
101 else if (name ==
"Volume")
103 return make_unique<AAVolumeIndex>();
105 else if (name ==
"Charge")
107 return make_unique<AAChargeIndex>();
109 else if (name ==
"SEAMedium")
111 return make_unique<AASEA1030Index>();
113 else if (name ==
"SEAHigh")
115 return make_unique<AASEASup30Index>();
117 else if (name ==
"SEALow")
119 return make_unique<AASEAInf10Index>();
121 else if (name ==
"User")
124 ifstream aax1File(aax1FilePath.c_str(), ios::in);
125 auto I = make_unique<AAIndex1Entry>(aax1File);
131 throw Exception(
"Invalid index1 '" + name +
"'.");
This alphabet is used to deal NumericAlphabet.