42 #include "../Alphabet/AlphabetTools.h" 43 #include "../AlphabetIndex/BLOSUM50.h" 44 #include "../AlphabetIndex/GranthamAAChemicalDistance.h" 45 #include "../AlphabetIndex/MiyataAAChemicalDistance.h" 46 #include "../AlphabetIndex/SimpleIndexDistance.h" 47 #include "../AlphabetIndex/AAIndex2Entry.h" 48 #include "../AlphabetIndex/AlphabetIndex1.h" 50 #include <Bpp/Text/KeyvalTools.h> 51 #include <Bpp/App/ApplicationTools.h> 61 if (description !=
"None")
64 map<string, string> args;
65 KeyvalTools::parseProcedure(description, name, args);
67 ApplicationTools::displayResult(message_, description);
71 throw Exception(
"BppOAlphabetIndex2Format::read. This index is only supported with a protein alphabet.");
72 if (name ==
"Blosum50")
76 else if (name ==
"Grantham")
78 bool sym = ApplicationTools::getBooleanParameter(
"symmetrical", args,
true,
"",
true, 1);
84 else if (name ==
"Miyata")
86 bool sym = ApplicationTools::getBooleanParameter(
"symmetrical", args,
true,
"",
true, 1);
91 else if (name ==
"Diff")
93 string index1Desc = ApplicationTools::getStringParameter(
"index1", args,
"None",
"",
true, 1);
94 bool sym = ApplicationTools::getBooleanParameter(
"symmetrical", args,
true,
"",
true);
102 throw Exception(
"BppOAlphabetIndex2Format::read. Diff: index1 should be provided.");
105 else if (name ==
"User")
107 bool sym = ApplicationTools::getBooleanParameter(
"symmetrical", args,
true,
"",
true, 1);
108 string aax2FilePath = ApplicationTools::getAFilePath(
"file", args,
true,
true,
"",
false);
109 ifstream aax2File(aax2FilePath.c_str(), ios::in);
116 throw Exception(
"Invalid index2 '" + name +
"'.");
This alphabet is used to deal NumericAlphabet.
void setSymmetric(bool yn)
Miyata et al. (1979) Amino-Acid chemical distance.
Grantham (1974) Amino-Acid chemical distance.
One dimensionnal alphabet index interface.
Create a AlphabetIndex2 object from an AAIndex2 entry.
Two dimensionnal alphabet index interface.
Simple dissimilarity distance.
void setSymmetric(bool yn)
BLOSUM 50 Substitution Matrix.
void setPC1Sign(bool yn)
The sign of the distance is computed using the coordinate on the first axis of a principal component ...
void setSymmetric(bool yn)