source: trunk/SL/SEQUENCE/AP_seq_dna.hxx

Last change on this file was 16880, checked in by westram, 7 years ago
  • reintegrates 'multicore' into 'trunk'
    • derive sequence classes able to be combined from new class AP_combinableSeq
      • elim dummy functions from rest of hierarchy
    • implements non-writing combine for add-species (speedup: 25-35%)
    • introduce type Mutations ⇒ uses long everywhere (before mostly, but not always used float)
    • allows use of futures
      • nucleotide combine is able to calculate async (disabled via define atm → NEVER_COMBINE_ASYNC; needs more work on calling algorithm)
  • adds: log:branches/multicore@16769:16879
  • 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 FINAL_TYPE : public AP_combinableSeq { // 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_combinableSeq *dup() const OVERRIDE; // used to get the real new element
44    Mutations combine_seq(const AP_combinableSeq *lefts, const AP_combinableSeq *rights, char *mutation_per_site) OVERRIDE;
45    Mutations mutations_if_combined_with(const AP_combinableSeq *other) OVERRIDE;
46    void partial_match(const AP_combinableSeq *part, long *overlap, long *penalty) const OVERRIDE;
47    uint32_t checksum() const OVERRIDE;
48    int cmp_combined(const AP_combinableSeq *other) const OVERRIDE;
49};
50
51
52#else
53#error AP_seq_dna.hxx included twice
54#endif // AP_SEQ_DNA_HXX
Note: See TracBrowser for help on using the repository browser.