| 1 | // =========================================================== // |
|---|
| 2 | // // |
|---|
| 3 | // File : awt_seq_protein.hxx // |
|---|
| 4 | // Purpose : // |
|---|
| 5 | // // |
|---|
| 6 | // Institute of Microbiology (Technical University Munich) // |
|---|
| 7 | // http://www.arb-home.de/ // |
|---|
| 8 | // // |
|---|
| 9 | // =========================================================== // |
|---|
| 10 | |
|---|
| 11 | #ifndef AWT_SEQ_PROTEIN_HXX |
|---|
| 12 | #define AWT_SEQ_PROTEIN_HXX |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | enum AP_PROTEINS { |
|---|
| 16 | APP_ILLEGAL = 0, |
|---|
| 17 | APP_A = (1 << 0), // Ala |
|---|
| 18 | APP_C = (1 << 1), // Cys |
|---|
| 19 | APP_D = (1 << 2), // Asp |
|---|
| 20 | APP_E = (1 << 3), // Glu |
|---|
| 21 | APP_F = (1 << 4), // Phe |
|---|
| 22 | APP_G = (1 << 5), // Gly |
|---|
| 23 | APP_H = (1 << 6), // His |
|---|
| 24 | APP_I = (1 << 7), // Ile |
|---|
| 25 | APP_K = (1 << 8), // Lys |
|---|
| 26 | APP_L = (1 << 9), // Leu |
|---|
| 27 | APP_M = (1 << 10), // Met |
|---|
| 28 | APP_N = (1 << 11), // Asn |
|---|
| 29 | APP_P = (1 << 12), // Pro |
|---|
| 30 | APP_Q = (1 << 13), // Gln |
|---|
| 31 | APP_R = (1 << 14), // Arg |
|---|
| 32 | APP_S = (1 << 15), // Ser |
|---|
| 33 | APP_T = (1 << 16), // Thr |
|---|
| 34 | APP_V = (1 << 17), // Val |
|---|
| 35 | APP_W = (1 << 18), // Trp |
|---|
| 36 | APP_Y = (1 << 19), // Tyr |
|---|
| 37 | |
|---|
| 38 | APP_STAR = (1 << 20), // * |
|---|
| 39 | APP_GAP = (1 << 21), // space (gap) |
|---|
| 40 | |
|---|
| 41 | APP_X = (APP_STAR-1), // Xxx (any real codon) |
|---|
| 42 | |
|---|
| 43 | APP_B = APP_D | APP_N, // Asx ( = Asp | Asn ) |
|---|
| 44 | APP_Z = APP_E | APP_Q, // Glx ( = Glu | Gln ) |
|---|
| 45 | }; |
|---|
| 46 | |
|---|
| 47 | class AP_sequence_protein : public AP_sequence { |
|---|
| 48 | private: |
|---|
| 49 | AP_PROTEINS *sequence; |
|---|
| 50 | |
|---|
| 51 | AP_sequence_protein(const AP_sequence_protein& other); // copying not allowed |
|---|
| 52 | AP_sequence_protein& operator = (const AP_sequence_protein& other); // assignment not allowed |
|---|
| 53 | public: |
|---|
| 54 | AP_sequence_protein(AP_tree_root *root); |
|---|
| 55 | virtual ~AP_sequence_protein(); |
|---|
| 56 | |
|---|
| 57 | AP_sequence *dup(); // used to get the real new element |
|---|
| 58 | void set(const char *isequence); |
|---|
| 59 | AP_FLOAT combine(const AP_sequence * lefts, const AP_sequence *rights) ; |
|---|
| 60 | AP_FLOAT real_len(); |
|---|
| 61 | void partial_match(const AP_sequence* part, long *overlap, long *penalty) const; |
|---|
| 62 | }; |
|---|
| 63 | |
|---|
| 64 | #else |
|---|
| 65 | #error awt_seq_protein.hxx included twice |
|---|
| 66 | #endif // AWT_SEQ_PROTEIN_HXX |
|---|