1 | // ==================================================================== // |
---|
2 | // // |
---|
3 | // File : merge.hxx // |
---|
4 | // Purpose : Local header for usage inside directory MERGE // |
---|
5 | // // |
---|
6 | // // |
---|
7 | // Copyright Department of Microbiology (Technical University Munich) // |
---|
8 | // // |
---|
9 | // Visit our web site at: http://www.arb-home.de/ // |
---|
10 | // // |
---|
11 | // ==================================================================== // |
---|
12 | |
---|
13 | #ifndef MERGE_HXX |
---|
14 | #define MERGE_HXX |
---|
15 | |
---|
16 | #ifndef ARB_ASSERT_H |
---|
17 | #include <arb_assert.h> |
---|
18 | #endif |
---|
19 | #define mg_assert(bed) arb_assert(bed) |
---|
20 | |
---|
21 | #define AWAR_MERGE_DB "tmp/merge1/db" |
---|
22 | #define AWAR_MAIN_DB "tmp/merge2/db" |
---|
23 | |
---|
24 | AW_window *MG_merge_alignment_cb(AW_root *awr); |
---|
25 | AW_window *MG_merge_names_cb(AW_root *awr); |
---|
26 | AW_window *MG_merge_species_cb(AW_root *awr); |
---|
27 | AW_window *MG_select_preserves_cb(AW_root *awr); |
---|
28 | AW_window *MG_merge_extendeds_cb(AW_root *awr); |
---|
29 | AW_window *MG_merge_trees_cb(AW_root *awr); |
---|
30 | AW_window *MG_merge_configs_cb(AW_root *awr); |
---|
31 | AW_window *create_mg_check_fields(AW_root *aw_root); |
---|
32 | |
---|
33 | void MG_create_config_awar(AW_root *aw_root, AW_default aw_def); |
---|
34 | void MG_create_trees_awar(AW_root *aw_root, AW_default aw_def); |
---|
35 | void MG_create_extendeds_awars(AW_root *aw_root, AW_default aw_def); |
---|
36 | void MG_create_alignment_awars(AW_root *aw_root,AW_default aw_def); |
---|
37 | void MG_create_species_awars(AW_root *aw_root, AW_default aw_def); |
---|
38 | void MG_create_rename_awars(AW_root *aw_root, AW_default aw_def); |
---|
39 | |
---|
40 | |
---|
41 | void MG_create_db_dependent_rename_awars(AW_root *aw_root, GBDATA *gb_merge, GBDATA *gb_dest); |
---|
42 | |
---|
43 | void MG_set_renamed(bool renamed, AW_root *aw_root, const char *reason); |
---|
44 | GB_ERROR MG_expect_renamed(); |
---|
45 | |
---|
46 | int MG_check_alignment(AW_window *aww, int fast = 0); |
---|
47 | |
---|
48 | // export of gene-species: |
---|
49 | |
---|
50 | void MG_create_gene_species_awars(AW_root *aw_root, AW_default aw_def); |
---|
51 | AW_window *MG_gene_species_create_field_transfer_def_window(AW_root *aw_root); |
---|
52 | GB_ERROR MG_export_fields(AW_root *aw_root, GBDATA *gb_source, GBDATA *gb_dest, GB_HASH *error_suppressor, GB_HASH *source_organism_hash); // export defined fields |
---|
53 | |
---|
54 | #define AWAR_REMAP_SPECIES_LIST "merge/remap_species_list" |
---|
55 | #define AWAR_REMAP_ENABLE "merge/remap_enable" |
---|
56 | |
---|
57 | #define AWAR_MERGE_GENE_SPECIES_BASE "merge/gene_species/" |
---|
58 | |
---|
59 | const char *MG_left_AWAR_SPECIES_NAME(); |
---|
60 | const char *MG_right_AWAR_SPECIES_NAME(); |
---|
61 | |
---|
62 | class MG_remap { |
---|
63 | int in_length; |
---|
64 | int out_length; |
---|
65 | int *remap_tab; |
---|
66 | int *soft_remap_tab; |
---|
67 | int compiled; |
---|
68 | public: |
---|
69 | MG_remap(); |
---|
70 | ~MG_remap(); |
---|
71 | GB_ERROR set(const char *in_reference, const char *out_reference); // returns only warnings |
---|
72 | GB_ERROR compile(); // after last set |
---|
73 | char *remap(const char *sequence); // returns 0 on error, else copy of sequence |
---|
74 | }; |
---|
75 | |
---|
76 | class AW_root; |
---|
77 | |
---|
78 | class MG_remaps { |
---|
79 | public: |
---|
80 | int n_remaps; |
---|
81 | char **alignment_names; |
---|
82 | MG_remap **remaps; |
---|
83 | MG_remaps(GBDATA *gb_left,GBDATA *gb_right,AW_root *awr); |
---|
84 | ~MG_remaps(); |
---|
85 | }; |
---|
86 | |
---|
87 | #ifndef MG_MERGE_HXX |
---|
88 | #include "mg_merge.hxx" |
---|
89 | #endif |
---|
90 | |
---|
91 | #else |
---|
92 | #error merge.hxx included twice |
---|
93 | #endif // MERGE_HXX |
---|