1 // ========================================================================== 2 // SeqAn - The Library for Sequence Analysis 3 // ========================================================================== 4 // Copyright (c) 2006-2018, Knut Reinert, FU Berlin 5 // All rights reserved. 6 // 7 // Redistribution and use in source and binary forms, with or without 8 // modification, are permitted provided that the following conditions are met: 9 // 10 // * Redistributions of source code must retain the above copyright 11 // notice, this list of conditions and the following disclaimer. 12 // * Redistributions in binary form must reproduce the above copyright 13 // notice, this list of conditions and the following disclaimer in the 14 // documentation and/or other materials provided with the distribution. 15 // * Neither the name of Knut Reinert or the FU Berlin nor the names of 16 // its contributors may be used to endorse or promote products derived 17 // from this software without specific prior written permission. 18 // 19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 // ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE 23 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 29 // DAMAGE. 30 // 31 // ========================================================================== 32 // Author: Kristin Knorr <kristin.knorr@fu-berlin.de> 33 // ========================================================================== 34 // Murphy5 reduction tables 35 // ========================================================================== 36 37 #ifndef SEQAN_REDUCED_AMINOACID_MURPHY5_TABLES_H_ 38 #define SEQAN_REDUCED_AMINOACID_MURPHY5_TABLES_H_ 39 40 namespace seqan { 41 42 // ============================================================================ 43 // Forwards 44 // ============================================================================ 45 46 // ============================================================================ 47 // Tags, Classes, Enums 48 // ============================================================================ 49 50 // ============================================================================ 51 // Metafunctions 52 // ============================================================================ 53 54 template <typename TSpec> 55 struct TranslateTableRedAAToChar_<Murphy5, TSpec> 56 { 57 static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy5> > >::VALUE]; 58 }; 59 60 template <typename TSpec> 61 struct TranslateTableCharToRedAA_<Murphy5, TSpec> 62 { 63 static const char VALUE[256]; 64 }; 65 66 template <typename TSpec> 67 struct TranslateTableAAToRedAA_<Murphy5, TSpec> 68 { 69 static const char VALUE[27]; 70 }; 71 72 template <typename TSpec> 73 struct TranslateTableByteToRedAA_<Murphy5, TSpec> 74 { 75 static const char VALUE[256]; 76 }; 77 78 // ---------------------------------- N = 5 ------------------------------ 79 80 template <typename TVoidSpec> 81 char const TranslateTableRedAAToChar_<Murphy5, TVoidSpec>::VALUE[5] = 82 { 83 'A', // A G P S T X 84 'B', // B D E N Q Z 85 'C', // C I J L M U V 86 'F', // F W Y * 87 'H', // H K O R 88 }; 89 90 template <typename TVoidSpec> 91 char const TranslateTableCharToRedAA_<Murphy5, TVoidSpec>::VALUE[256] = 92 { 93 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 96 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 3, 0, 4, 2, 2, 98 4, 2, 2, 1, 4, 0, 1, 4, 0, 0, 2, 2, 3, 0, 3, 99 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 3, 0, 4, 100 2, 2, 4, 2, 2, 1, 4, 0, 1, 4, 0, 0, 2, 2, 3, 101 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110 0 111 }; 112 113 template <typename TVoidSpec> 114 char const TranslateTableAAToRedAA_<Murphy5, TVoidSpec>::VALUE[27] = 115 { 116 0, 1, 2, 1, 1, 3, 0, 4, 2, 2, 4, 2, 2, 117 1, 4, 0, 1, 4, 0, 0, 2, 2, 3, 3, 1, 0, 3 118 }; 119 120 template <typename TVoidSpec> 121 char const TranslateTableByteToRedAA_<Murphy5, TVoidSpec>::VALUE[256] = 122 { 123 0, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140 0 141 }; 142 143 // ============================================================================ 144 // Functions 145 // ============================================================================ 146 147 } // namespace 148 149 #endif // SEQAN_REDUCED_AMINOACID_MURPHY5_TABLES_H_ 150