source: tags/arb-6.0/PARSIMONY/ap_main.hxx

Last change on this file was 11401, checked in by westram, 10 years ago
  • reintegrates 'tree' into 'trunk':
    • consensus trees:
      • support for merging partial trees ("worked" before, but results were crap; implements #65)
      • generated trees are automatically re-rooted and -ordered
      • always list source trees in consensus-tree-comment; show info about partial trees
      • fixed progress bar
    • made GBT_TREE a base class of other tree classes (implements #31)
    • save tree properties in properties (not in DB)
    • new functions 'Remove zombies/marked from ALL trees'
    • tree load/save: layout fixes
    • unit tests
      • added tests for basic tree modifications (PARSIMONY)
    • performance:
      • compute_tree updates tree information in one traversal
      • tree generators are now capable to generate any type of tree (w/o needing to copy it once)
    • bugfixes:
      • NNI (of marked species) was also always performed for colored species
      • centered beautify-order is stable now
      • improved 'search optimal root'
  • adds:
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : ap_main.hxx                                       //
4//   Purpose   :                                                   //
5//                                                                 //
6//   Institute of Microbiology (Technical University Munich)       //
7//   http://www.arb-home.de/                                       //
8//                                                                 //
9// =============================================================== //
10
11#ifndef AP_MAIN_HXX
12#define AP_MAIN_HXX
13
14#ifndef AP_BUFFER_HXX
15#include "AP_buffer.hxx"
16#endif
17#ifndef TREEDISPLAY_HXX
18#include <TreeDisplay.hxx>
19#endif
20
21#define AWAR_ALIGNMENT        "tmp/pars/alignment"
22#define AWAR_FILTER_NAME      "tmp/pars/filter/name"
23#define AWAR_FILTER_FILTER    "tmp/pars/filter/filter"
24#define AWAR_FILTER_ALIGNMENT "tmp/pars/filter/alignment"
25#define AWAR_PARSIMONY        "tmp/pars/parsimony"
26#define AWAR_BEST_PARSIMONY   "tmp/pars/best_parsimony"
27#define AWAR_STACKPOINTER     "tmp/pars/stackpointer"
28
29#define AWAR_PARS_TYPE      "pars/pars_type"
30
31enum PARS_pars_type {
32    PARS_WAGNER,
33    PARS_TRANSVERSION
34};
35
36struct PARS_commands {
37    bool add_marked;
38    bool add_selected;
39    bool calc_branch_lengths;
40    bool calc_bootstrap;
41    bool quit;
42
43    PARS_commands()
44        : add_marked(false)
45        , add_selected(false)
46        , calc_branch_lengths(false)
47        , calc_bootstrap(false)
48        , quit(false)
49    {
50    }
51};
52
53class AP_tree_nlen;
54class AWT_graphic_tree;
55
56class AP_main : virtual Noncopyable {
57    AP_main_stack    *stack;
58    AP_main_list      list;
59    unsigned long     stack_level;
60    AWT_graphic_tree *agt;                          // provides access to tree!
61    unsigned long     user_push_counter;
62
63public:
64    AP_main()
65        : stack(NULL),
66          stack_level(0),
67          agt(NULL),
68          user_push_counter(0)
69    {}
70    ~AP_main() {
71        delete stack;
72    }
73
74    void set_tree_root(AWT_graphic_tree *agt_);
75    AWT_graphic_tree *get_tree_root() { return agt; }
76
77    DEFINE_DOWNCAST_ACCESSORS(AP_tree_nlen, get_root_node, agt->get_root_node());
78
79    const char *get_aliname() const;
80    unsigned long get_user_push_counter() const { return user_push_counter; }
81
82    GB_ERROR open(const char *db_server);
83
84    void user_push();
85    void user_pop();
86    void push();
87    void pop();
88    void push_node(AP_tree_nlen *node, AP_STACK_MODE);
89    void clear();               // clears all buffers
90};
91
92extern AP_main *ap_main;
93extern GBDATA  *GLOBAL_gb_main;
94
95#else
96#error ap_main.hxx included twice
97#endif // AP_MAIN_HXX
Note: See TracBrowser for help on using the repository browser.