source: tags/ms_r16q3/SL/SEQUENCE/AP_seq_simple_pro.hxx

Last change on this file was 13625, checked in by westram, 9 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
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#ifndef DOWNCAST_H
18#include <downcast.h>
19#endif
20
21enum aas {
22    ALA, ARG, ASN, ASP, CYS, GLN, GLU, GLY, HIS, ILEU, LEU, LYS, MET, PHE, PRO,
23    SER, THR, TRP, TYR, VAL, STOP, DEL, ASX, GLX, UNK, QUEST
24};
25
26typedef unsigned char ap_pro;   // aas but only one character used
27
28class AP_sequence_simple_protein : public AP_sequence { // derived from a Noncopyable
29    ap_pro *sequence;
30
31    AP_FLOAT count_weighted_bases() const OVERRIDE;
32
33    void set(const char *sequence) OVERRIDE;
34    void unset() OVERRIDE;
35
36public:
37
38    AP_sequence_simple_protein(const AliView *aliview);
39    ~AP_sequence_simple_protein() OVERRIDE;
40
41    AP_sequence *dup() const OVERRIDE;                             // used to get the real new element
42
43    AP_FLOAT combine(const AP_sequence *lefts, const AP_sequence *rights, char *mutation_per_site = 0) OVERRIDE;
44    void partial_match(const AP_sequence* part, long *overlap, long *penalty) const OVERRIDE;
45    uint32_t checksum() const OVERRIDE;
46
47    bool equals(const AP_sequence_simple_protein */*other*/) const { arb_assert(0); return false; } // unused
48    bool equals(const AP_sequence *other) const OVERRIDE { return equals(DOWNCAST(const AP_sequence_simple_protein*, other)); }
49
50    const ap_pro *get_sequence() const { return sequence; }
51    ap_pro *get_sequence() { return sequence; }
52};
53
54
55#else
56#error AP_seq_simple_pro.hxx included twice
57#endif // AP_SEQ_SIMPLE_PRO_HXX
Note: See TracBrowser for help on using the repository browser.