| 1 | // =============================================================== // |
|---|
| 2 | // // |
|---|
| 3 | // File : AP_seq_simple_pro.hxx // |
|---|
| 4 | // Purpose : // |
|---|
| 5 | // // |
|---|
| 6 | // Institute of Microbiology (Technical University Munich) // |
|---|
| 7 | // http://www.arb-home.de/ // |
|---|
| 8 | // // |
|---|
| 9 | // =============================================================== // |
|---|
| 10 | |
|---|
| 11 | #ifndef AP_SEQ_SIMPLE_PRO_HXX |
|---|
| 12 | #define AP_SEQ_SIMPLE_PRO_HXX |
|---|
| 13 | |
|---|
| 14 | #ifndef AP_SEQUENCE_HXX |
|---|
| 15 | #include <AP_sequence.hxx> |
|---|
| 16 | #endif |
|---|
| 17 | |
|---|
| 18 | enum aas { |
|---|
| 19 | ALA, ARG, ASN, ASP, CYS, GLN, GLU, GLY, HIS, ILEU, LEU, LYS, MET, PHE, PRO, |
|---|
| 20 | SER, THR, TRP, TYR, VAL, STOP, DEL, ASX, GLX, UNK, QUEST |
|---|
| 21 | }; |
|---|
| 22 | |
|---|
| 23 | typedef unsigned char ap_pro; // aas but only one character used |
|---|
| 24 | |
|---|
| 25 | class AP_sequence_simple_protein : public AP_sequence { // derived from a Noncopyable |
|---|
| 26 | ap_pro *sequence; |
|---|
| 27 | |
|---|
| 28 | AP_FLOAT count_weighted_bases() const OVERRIDE; |
|---|
| 29 | |
|---|
| 30 | void set(const char *sequence) OVERRIDE; |
|---|
| 31 | void unset() OVERRIDE; |
|---|
| 32 | |
|---|
| 33 | public: |
|---|
| 34 | |
|---|
| 35 | AP_sequence_simple_protein(const AliView *aliview); |
|---|
| 36 | ~AP_sequence_simple_protein() OVERRIDE; |
|---|
| 37 | |
|---|
| 38 | AP_sequence *dup() const OVERRIDE; // used to get the real new element |
|---|
| 39 | |
|---|
| 40 | AP_FLOAT combine(const AP_sequence *lefts, const AP_sequence *rights, char *mutation_per_site = 0) OVERRIDE; |
|---|
| 41 | void partial_match(const AP_sequence* part, long *overlap, long *penalty) const OVERRIDE; |
|---|
| 42 | |
|---|
| 43 | const ap_pro *get_sequence() const { return sequence; } |
|---|
| 44 | ap_pro *get_sequence() { return sequence; } |
|---|
| 45 | }; |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | #else |
|---|
| 49 | #error AP_seq_simple_pro.hxx included twice |
|---|
| 50 | #endif // AP_SEQ_SIMPLE_PRO_HXX |
|---|