source: tags/ms_r16q4/SL/SEQUENCE/AP_seq_dna.hxx

Last change on this file was 13639, 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.0 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : AP_seq_dna.hxx                                    //
4//   Purpose   :                                                   //
5//                                                                 //
6//   Institute of Microbiology (Technical University Munich)       //
7//   http://www.arb-home.de/                                       //
8//                                                                 //
9// =============================================================== //
10
11#ifndef AP_SEQ_DNA_HXX
12#define AP_SEQ_DNA_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
21class AP_sequence_parsimony : public AP_sequence { // derived from a Noncopyable
22    void build_table();
23    AP_FLOAT count_weighted_bases() const OVERRIDE;
24
25    void set(const char *sequence) OVERRIDE;
26    void unset() OVERRIDE;
27
28    char *seq_pars;                                 // AP_BASES
29
30public:
31    static char *table;
32
33    AP_sequence_parsimony(const AliView *aliview);
34    ~AP_sequence_parsimony() OVERRIDE;
35
36    const char *get_sequence() const {
37        lazy_load_sequence();
38        ap_assert(seq_pars);
39        return seq_pars;
40    }
41    const unsigned char *get_usequence() const { return (const unsigned char*)get_sequence(); }
42
43    AP_sequence *dup() const OVERRIDE;                         // used to get the real new element
44    AP_FLOAT combine(const AP_sequence *lefts, const AP_sequence *rights, char *mutation_per_site) OVERRIDE;
45    void partial_match(const AP_sequence* part, long *overlap, long *penalty) const OVERRIDE;
46    uint32_t checksum() const OVERRIDE;
47
48    bool equals(const AP_sequence_parsimony *other) const;
49    bool equals(const AP_sequence *other) const OVERRIDE { return equals(DOWNCAST(const AP_sequence_parsimony*, other)); }
50};
51
52
53#else
54#error AP_seq_dna.hxx included twice
55#endif // AP_SEQ_DNA_HXX
Note: See TracBrowser for help on using the repository browser.