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: Hannes Hauswedell <hannes.hauswedell@fu-berlin.de>
33 // ==========================================================================
34 // Murphy10 reduction of AminoAcid alphabet
35 // ==========================================================================
36 
37 #ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
38 #define SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
39 
40 namespace seqan {
41 
42 // ============================================================================
43 // Forwards
44 // ============================================================================
45 
46 // ============================================================================
47 // Tags, Classes, Enums
48 // ============================================================================
49 
50 // -----------------------------------------------------------------------
51 // Tag Murphy10
52 // -----------------------------------------------------------------------
53 
54 /*!
55  * @tag Murphy10
56  * @brief Specialization for @link ReducedAminoAcid @endlink#
57  * @headerfile seqan/reduced_aminoacid.h
58  *
59  * @signature typedef Murphy10 Tag<Murphy10_>;
60  *
61  * This is the 10-character reduction defined by Murphy et al,
62  * 2000, <a href="http://www.ncbi.nlm.nih.gov/pubmed/10775656">http://www.ncbi.nlm.nih.gov/pubmed/10775656</a>
63  *
64  * This alphabet is used by many tools, e.g. Rapsearch2, Lambda, UBlast.
65  *
66  * Since it was created from the 20-letter alphabet the clusters in SeqAn are
67  * not identical (they contain more symbols). This is the clustering:
68  * @code{.txt}
69  *   'A', // A O U X
70  *   'B', // B D E N Q Z
71  *   'C', // C
72  *   'F', // F W Y *
73  *   'G', // G
74  *   'H', // H
75  *   'I', // I J L M V
76  *   'K', // K R
77  *   'P', // P
78  *   'S'  // S T
79  * @endcode
80  *
81  */
82 
83 struct Murphy10_ {};
84 
85 typedef Tag<Murphy10_> Murphy10;
86 
87 // ============================================================================
88 // Metafunctions
89 // ============================================================================
90 
91 // -----------------------------------------------------------------------
92 // Metafunction ValueSize
93 // -----------------------------------------------------------------------
94 
95 template <>
96 struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
97 {
98     typedef uint8_t Type;
99     static const Type VALUE = 10;
100 };
101 
102 // -----------------------------------------------------------------------
103 // Metafunction BitPerValue
104 // -----------------------------------------------------------------------
105 
106 template <>
107 struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
108 {
109     typedef uint8_t Type;
110     static const Type VALUE = 4;
111 };
112 
113 // -----------------------------------------------------------------------
114 // Translation Tables (implementations see extra files)
115 // -----------------------------------------------------------------------
116 
117 // ============================================================================
118 // Functions
119 // ============================================================================
120 
121 }
122 #endif // def SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
123