source: branches/profile/SL/SEQUENCE/AP_seq_protein.hxx

Last change on this file was 9533, checked in by westram, 11 years ago
  • use explicit override
    • rest
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : AP_seq_protein.hxx                                //
4//   Purpose   :                                                   //
5//                                                                 //
6//   Institute of Microbiology (Technical University Munich)       //
7//   http://www.arb-home.de/                                       //
8//                                                                 //
9// =============================================================== //
10
11#ifndef AP_SEQ_PROTEIN_HXX
12#define AP_SEQ_PROTEIN_HXX
13
14#ifndef AP_SEQUENCE_HXX
15#include <AP_sequence.hxx>
16#endif
17
18
19enum AP_PROTEINS {
20    APP_ILLEGAL = 0,
21    APP_A       = (1 <<  0),    // Ala
22    APP_C       = (1 <<  1),    // Cys
23    APP_D       = (1 <<  2),    // Asp
24    APP_E       = (1 <<  3),    // Glu
25    APP_F       = (1 <<  4),    // Phe
26    APP_G       = (1 <<  5),    // Gly
27    APP_H       = (1 <<  6),    // His
28    APP_I       = (1 <<  7),    // Ile
29    APP_K       = (1 <<  8),    // Lys
30    APP_L       = (1 <<  9),    // Leu
31    APP_M       = (1 << 10),    // Met
32    APP_N       = (1 << 11),    // Asn
33    APP_P       = (1 << 12),    // Pro
34    APP_Q       = (1 << 13),    // Gln
35    APP_R       = (1 << 14),    // Arg
36    APP_S       = (1 << 15),    // Ser
37    APP_T       = (1 << 16),    // Thr
38    APP_V       = (1 << 17),    // Val
39    APP_W       = (1 << 18),    // Trp
40    APP_Y       = (1 << 19),    // Tyr
41
42    APP_STAR = (1 << 20),        // *
43    APP_GAP = (1 << 21),        // space (gap)
44
45    APP_X = (APP_STAR-1),        // Xxx (any real codon)
46
47    APP_B = APP_D | APP_N,      // Asx ( = Asp | Asn )
48    APP_Z = APP_E | APP_Q,      // Glx ( = Glu | Gln )
49};
50
51class AP_sequence_protein : public AP_sequence { // derived from a Noncopyable
52    AP_PROTEINS *seq_prot;
53
54    AP_FLOAT count_weighted_bases() const OVERRIDE;
55    void set(const char *isequence) OVERRIDE;
56    void unset() OVERRIDE;
57
58public:
59    AP_sequence_protein(const AliView *aliview);
60    virtual ~AP_sequence_protein() OVERRIDE;
61
62    const AP_PROTEINS *get_sequence() const { lazy_load_sequence(); ap_assert(seq_prot); return seq_prot; }
63
64    AP_sequence *dup() const OVERRIDE;                       // used to get the real new element
65    AP_FLOAT combine(const AP_sequence* lefts, const AP_sequence *rights, char *mutation_per_site = 0) OVERRIDE;
66    void partial_match(const AP_sequence* part, long *overlap, long *penalty) const OVERRIDE;
67};
68
69
70
71#else
72#error AP_seq_protein.hxx included twice
73#endif // AP_SEQ_PROTEIN_HXX
Note: See TracBrowser for help on using the repository browser.