source: tags/arb_5.1/MERGE/merge.hxx

Last change on this file was 5675, checked in by westram, 15 years ago
  • removed automatic timestamps (the best they were good for, were vc-conflicts)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
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
24AW_window *MG_merge_alignment_cb(AW_root *awr);
25AW_window *MG_merge_names_cb(AW_root *awr);
26AW_window *MG_merge_species_cb(AW_root *awr);
27AW_window *MG_select_preserves_cb(AW_root *awr);
28AW_window *MG_merge_extendeds_cb(AW_root *awr);
29AW_window *MG_merge_trees_cb(AW_root *awr);
30AW_window *MG_merge_configs_cb(AW_root *awr);
31AW_window *create_mg_check_fields(AW_root *aw_root);
32
33void MG_create_config_awar(AW_root *aw_root, AW_default aw_def);
34void MG_create_trees_awar(AW_root *aw_root, AW_default aw_def);
35void MG_create_extendeds_awars(AW_root *aw_root, AW_default aw_def);
36void MG_create_alignment_awars(AW_root *aw_root,AW_default aw_def);
37void MG_create_species_awars(AW_root *aw_root, AW_default aw_def);
38void MG_create_rename_awars(AW_root *aw_root, AW_default aw_def);
39
40
41void MG_create_db_dependent_rename_awars(AW_root *aw_root, GBDATA *gb_merge, GBDATA *gb_dest);
42
43void     MG_set_renamed(bool renamed, AW_root *aw_root, const char *reason);
44GB_ERROR MG_expect_renamed();
45
46int MG_check_alignment(AW_window *aww, int fast = 0);
47
48// export of gene-species:
49
50void       MG_create_gene_species_awars(AW_root *aw_root, AW_default aw_def);
51AW_window *MG_gene_species_create_field_transfer_def_window(AW_root *aw_root);
52GB_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
59const char *MG_left_AWAR_SPECIES_NAME();
60const char *MG_right_AWAR_SPECIES_NAME();
61
62class MG_remap {
63    int in_length;
64    int out_length;
65    int *remap_tab;
66    int *soft_remap_tab;
67    int compiled;
68public:
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
76class AW_root;
77
78class MG_remaps {
79public:
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
Note: See TracBrowser for help on using the repository browser.