1 | // =============================================================== // |
---|
2 | // // |
---|
3 | // File : AP_pos_var_pars.h // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // =============================================================== // |
---|
10 | |
---|
11 | #ifndef AP_POS_VAR_PARS_H |
---|
12 | #define AP_POS_VAR_PARS_H |
---|
13 | |
---|
14 | #ifndef ARBDB_BASE_H |
---|
15 | #include <arbdb_base.h> |
---|
16 | #endif |
---|
17 | #ifndef ARBTOOLS_H |
---|
18 | #include <arbtools.h> |
---|
19 | #endif |
---|
20 | #ifndef NT_LOCAL_PROTO_H |
---|
21 | #include "NT_local_proto.h" |
---|
22 | #endif |
---|
23 | |
---|
24 | class AW_window; |
---|
25 | class AW_root; |
---|
26 | |
---|
27 | #define AWAR_PVP_SAI "tmp/pos_var_pars/sai" |
---|
28 | #define AWAR_PVP_TREE "tmp/pos_var_pars/tree" |
---|
29 | |
---|
30 | class arb_progress; |
---|
31 | |
---|
32 | class AP_pos_var : virtual Noncopyable { |
---|
33 | GBDATA *gb_main; |
---|
34 | long treesize; // max value for slider |
---|
35 | arb_progress *progress; |
---|
36 | GB_UINT4 *frequencies[256]; // count every occurrence |
---|
37 | GB_UINT4 *transitions; // minimum transitions |
---|
38 | GB_UINT4 *transversions; // minimum transversions (dna only) |
---|
39 | unsigned char char_2_freq[256]; // mapper (~ toupper) |
---|
40 | long char_2_transition[256]; // a->1 c->2 g->4 ... |
---|
41 | long char_2_transversion[256]; // y->1 r->2 |
---|
42 | |
---|
43 | long getsize(GBT_TREE *tree); // size of tree |
---|
44 | long ali_len; // max len of alignment |
---|
45 | long is_dna; |
---|
46 | char *ali_name; |
---|
47 | char *tree_name; |
---|
48 | |
---|
49 | const char *parsimony(GBT_TREE *tree, GB_UINT4 *bases = 0, GB_UINT4 *ltbases = 0); |
---|
50 | |
---|
51 | public: |
---|
52 | |
---|
53 | AP_pos_var(GBDATA *gb_main, char *ali_name, long ali_len, int isdna, char *tree_name); |
---|
54 | ~AP_pos_var(); |
---|
55 | |
---|
56 | GB_ERROR retrieve(GBT_TREE *tree); |
---|
57 | GB_ERROR delete_old_sai(const char *sai_name); |
---|
58 | GB_ERROR save_sai(const char *sai_name); |
---|
59 | }; |
---|
60 | |
---|
61 | #else |
---|
62 | #error AP_pos_var_pars.h included twice |
---|
63 | #endif // AP_POS_VAR_PARS_H |
---|