| 1 | #include "muscle.h" |
|---|
| 2 | |
|---|
| 3 | //// Pascaralle and Argos gap factors |
|---|
| 4 | //// after Table 1 in Thompson et. al. ClustalW NAR paper. |
|---|
| 5 | //static double PAFFacs[20] = |
|---|
| 6 | // { |
|---|
| 7 | // 1.13, // A |
|---|
| 8 | // 1.13, // C |
|---|
| 9 | // 0.96, // D |
|---|
| 10 | // 1.31, // E |
|---|
| 11 | // 1.20, // F |
|---|
| 12 | // 0.61, // G |
|---|
| 13 | // 1.00, // H |
|---|
| 14 | // 1.32, // I |
|---|
| 15 | // 0.96, // K |
|---|
| 16 | // 1.21, // L |
|---|
| 17 | // 1.29, // M |
|---|
| 18 | // 0.62, // N |
|---|
| 19 | // 0.74, // P |
|---|
| 20 | // 1.07, // Q |
|---|
| 21 | // 0.72, // R |
|---|
| 22 | // 0.76, // S |
|---|
| 23 | // 0.89, // T |
|---|
| 24 | // 1.25, // V |
|---|
| 25 | // 1.00, // Y |
|---|
| 26 | // 1.23, // W |
|---|
| 27 | // }; |
|---|
| 28 | // |
|---|
| 29 | //// (Not used: does not appear to work well). |
|---|
| 30 | //SCORE PAFactor(const FCOUNT fcCounts[]) |
|---|
| 31 | // { |
|---|
| 32 | // if (ALPHA_Amino != g_Alpha) |
|---|
| 33 | // Quit("PAFFactor: requires amino acid sequence"); |
|---|
| 34 | // |
|---|
| 35 | // FCOUNT fLetterCount = 0; |
|---|
| 36 | // double dSum = 0; |
|---|
| 37 | // for (unsigned uLetter = 0; uLetter < 20; ++uLetter) |
|---|
| 38 | // { |
|---|
| 39 | // const FCOUNT fCount = fcCounts[uLetter]; |
|---|
| 40 | // dSum += fCount*PAFFacs[uLetter]; |
|---|
| 41 | // fLetterCount += fCount; |
|---|
| 42 | // } |
|---|
| 43 | // if (0 == fLetterCount) |
|---|
| 44 | // return 0.5; |
|---|
| 45 | // return (SCORE) (dSum/fLetterCount); |
|---|
| 46 | // } |
|---|
| 47 | |
|---|
| 48 | //static bool Hydrophilic[20] = |
|---|
| 49 | // { |
|---|
| 50 | // false, // A |
|---|
| 51 | // false, // C |
|---|
| 52 | // true, // D |
|---|
| 53 | // true, // E |
|---|
| 54 | // false, // F |
|---|
| 55 | // true, // G |
|---|
| 56 | // false, // H |
|---|
| 57 | // false, // I |
|---|
| 58 | // true, // K |
|---|
| 59 | // false, // L |
|---|
| 60 | // false, // M |
|---|
| 61 | // true, // N |
|---|
| 62 | // true, // P |
|---|
| 63 | // true, // Q |
|---|
| 64 | // true, // R |
|---|
| 65 | // true, // S |
|---|
| 66 | // false, // T |
|---|
| 67 | // false, // V |
|---|
| 68 | // false, // Y |
|---|
| 69 | // false, // W |
|---|
| 70 | // }; |
|---|
| 71 | // |
|---|
| 72 | //bool IsHydrophilic(const FCOUNT fcCounts[]) |
|---|
| 73 | // { |
|---|
| 74 | // if (ALPHA_Amino != g_Alpha) |
|---|
| 75 | // Quit("IsHydrophilic: requires amino acid sequence"); |
|---|
| 76 | // |
|---|
| 77 | // for (unsigned uLetter = 0; uLetter < 20; ++uLetter) |
|---|
| 78 | // if (fcCounts[uLetter] > 0 && !Hydrophilic[uLetter]) |
|---|
| 79 | // return false; |
|---|
| 80 | // return true; |
|---|
| 81 | // } |
|---|
| 82 | // |
|---|
| 83 | //bool IsHydrophilic(const unsigned uCounts[]) |
|---|
| 84 | // { |
|---|
| 85 | // if (ALPHA_Amino != g_Alpha) |
|---|
| 86 | // Quit("IsHydrophilic: requires amino acid sequence"); |
|---|
| 87 | // |
|---|
| 88 | // for (unsigned uLetter = 0; uLetter < 20; ++uLetter) |
|---|
| 89 | // if (uCounts[uLetter] > 0 && !Hydrophilic[uLetter]) |
|---|
| 90 | // return false; |
|---|
| 91 | // return true; |
|---|
| 92 | // } |
|---|
| 93 | |
|---|
| 94 | // LIVCATMFYWHK |
|---|
| 95 | // Venn Pascaralla B&T Me |
|---|
| 96 | // L y y y |
|---|
| 97 | // I y y y |
|---|
| 98 | // V y y y |
|---|
| 99 | // C y n |
|---|
| 100 | // A y y y |
|---|
| 101 | // T N n |
|---|
| 102 | // M y y y |
|---|
| 103 | // F y y y |
|---|
| 104 | // Y n n |
|---|
| 105 | // W y n |
|---|
| 106 | // H n n |
|---|
| 107 | // K n n |
|---|
| 108 | static bool Hydrophobic[20] = |
|---|
| 109 | { |
|---|
| 110 | true, // A |
|---|
| 111 | true, // C |
|---|
| 112 | false, // D |
|---|
| 113 | false, // E |
|---|
| 114 | true, // F |
|---|
| 115 | false, // G |
|---|
| 116 | true, // H |
|---|
| 117 | true, // I |
|---|
| 118 | false, // K |
|---|
| 119 | true, // L |
|---|
| 120 | true, // M |
|---|
| 121 | false, // N |
|---|
| 122 | false, // P |
|---|
| 123 | false, // Q |
|---|
| 124 | false, // R |
|---|
| 125 | false, // S |
|---|
| 126 | true, // T |
|---|
| 127 | true, // V |
|---|
| 128 | true, // Y |
|---|
| 129 | true, // W |
|---|
| 130 | }; |
|---|
| 131 | |
|---|
| 132 | bool IsHydrophobic(const FCOUNT fcCounts[]) |
|---|
| 133 | { |
|---|
| 134 | if (ALPHA_Amino != g_Alpha) |
|---|
| 135 | Quit("IsHydrophobic: requires amino acid sequence"); |
|---|
| 136 | |
|---|
| 137 | for (unsigned uLetter = 0; uLetter < 20; ++uLetter) |
|---|
| 138 | if (fcCounts[uLetter] > 0.0 && !Hydrophobic[uLetter]) |
|---|
| 139 | return false; |
|---|
| 140 | return true; |
|---|
| 141 | } |
|---|