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 // Li10 reduction tables 35 // ========================================================================== 36 37 #ifndef SEQAN_REDUCED_AMINOACID_LI10_TABLES_H_ 38 #define SEQAN_REDUCED_AMINOACID_LI10_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_<Li10, TSpec> 56 { 57 static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Li10> > >::VALUE]; 58 }; 59 60 template <typename TSpec> 61 struct TranslateTableCharToRedAA_<Li10, TSpec> 62 { 63 static const char VALUE[256]; 64 }; 65 66 template <typename TSpec> 67 struct TranslateTableAAToRedAA_<Li10, TSpec> 68 { 69 static const char VALUE[27]; 70 }; 71 72 template <typename TSpec> 73 struct TranslateTableByteToRedAA_<Li10, TSpec> 74 { 75 static const char VALUE[256]; 76 }; 77 78 // ---------------------------------- N = 10 ------------------------------ 79 80 template <typename TVoidSpec> 81 char const TranslateTableRedAAToChar_<Li10, TVoidSpec>::VALUE[10] = 82 { 83 'A', // A S T X 84 'B', // B D E Q Z 85 'C', // C U 86 'F', // F W Y * 87 'G', // G 88 'H', // H N 89 'I', // I V 90 'J', // J L M 91 'K', // K O R 92 'P', // P 93 }; 94 95 template <typename TVoidSpec> 96 char const TranslateTableCharToRedAA_<Li10, TVoidSpec>::VALUE[256] = 97 { 98 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 3, 4, 5, 6, 7, 103 8, 7, 7, 5, 8, 9, 1, 8, 0, 0, 2, 6, 3, 0, 3, 104 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 3, 4, 5, 105 6, 7, 8, 7, 7, 5, 8, 9, 1, 8, 0, 0, 2, 6, 3, 106 0, 3, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115 0 116 }; 117 118 template <typename TVoidSpec> 119 char const TranslateTableAAToRedAA_<Li10, TVoidSpec>::VALUE[27] = 120 { 121 0, 1, 2, 1, 1, 3, 4, 5, 6, 7, 8, 7, 7, 122 5, 8, 9, 1, 8, 0, 0, 2, 6, 3, 3, 1, 0, 3 123 }; 124 125 template <typename TVoidSpec> 126 char const TranslateTableByteToRedAA_<Li10, TVoidSpec>::VALUE[256] = 127 { 128 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145 0 146 }; 147 148 // ============================================================================ 149 // Functions 150 // ============================================================================ 151 152 } // namespace 153 154 #endif // SEQAN_REDUCED_AMINOACID_LI10_TABLES_H_ 155