ARB
Main Page
Namespaces
Classes
Files
File List
File Members
ARBDB
arbdbt.h
Go to the documentation of this file.
1
#ifndef ARBDBT_H
2
#define ARBDBT_H
3
4
#ifndef ARBDB_H
5
#include <
arbdb.h
>
6
#endif
7
#ifndef DOWNCAST_H
8
#include <
downcast.h
>
9
#endif
10
11
#define gb_assert(cond) arb_assert(cond)
12
13
#define GBT_SPECIES_INDEX_SIZE 10000L
14
#define GBT_SAI_INDEX_SIZE 1000L
15
16
#define GB_GROUP_NAME_MAX 256
17
18
#define DEFAULT_BRANCH_LENGTH 0.1
19
20
#define ERROR_CONTAINER_PATH "tmp/message/pending"
21
22
#define REMOTE_BASE "tmp/remote/"
23
#define MACRO_TRIGGER_CONTAINER REMOTE_BASE "trigger"
24
#define MACRO_TRIGGER_TERMINATED MACRO_TRIGGER_CONTAINER "/terminated"
25
#define MACRO_TRIGGER_RECORDING MACRO_TRIGGER_CONTAINER "/recording"
26
#define MACRO_TRIGGER_EXECUTING MACRO_TRIGGER_CONTAINER "/executing"
27
#define MACRO_TRIGGER_ERROR MACRO_TRIGGER_CONTAINER "/error"
28
#define MACRO_TRIGGER_TRACKED MACRO_TRIGGER_CONTAINER "/tracked"
29
30
enum
GBT_RemarkType
{
REMARK_NONE
,
REMARK_BOOTSTRAP
,
REMARK_OTHER
};
31
32
enum
GBT_TreeRemoveType
{
33
GBT_REMOVE_MARKED
= 1,
34
GBT_REMOVE_UNMARKED
= 2,
35
GBT_REMOVE_ZOMBIES
= 4,
36
37
// please keep AWT_RemoveType in sync with GBT_TreeRemoveType
38
// see ../SL/AP_TREE/AP_Tree.hxx@sync_GBT_TreeRemoveType__AWT_RemoveType
39
40
// combined defines:
41
GBT_KEEP_MARKED
=
GBT_REMOVE_UNMARKED
|
GBT_REMOVE_ZOMBIES
,
42
};
43
44
enum
GBT_ORDER_MODE
{
45
GBT_BEHIND
,
46
GBT_INFRONTOF
,
47
};
48
49
enum
TreeModel
{
ROOTED
= 0,
UNROOTED
= 1 };
50
51
CONSTEXPR_INLINE
int
nodes_2_edges
(
int
nodes) {
return
nodes-1; }
52
CONSTEXPR_INLINE
int
edges_2_nodes
(
int
nodes) {
return
nodes+1; }
53
54
CONSTEXPR_INLINE
int
leafs_2_nodes
(
int
leafs,
TreeModel
model) {
56
return
2*leafs-1-
int
(model);
57
}
58
CONSTEXPR_INLINE
int
nodes_2_leafs
(
int
nodes,
TreeModel
model) {
60
return
(nodes+1+
int
(model))/2;
61
}
62
CONSTEXPR_INLINE
int
leafs_2_edges
(
int
leafs,
TreeModel
model) {
64
return
nodes_2_edges
(
leafs_2_nodes
(leafs, model));
65
}
66
CONSTEXPR_INLINE
int
edges_2_leafs
(
int
edges,
TreeModel
model) {
68
return
nodes_2_leafs
(
edges_2_nodes
(edges), model);
69
}
70
71
CONSTEXPR_INLINE
int
leafs_2_innerNodes
(
int
leafs,
TreeModel
model) {
73
return
leafs_2_nodes
(leafs, model)-leafs;
74
}
75
CONSTEXPR_INLINE
int
nodes_2_innerNodes
(
int
nodes,
TreeModel
model) {
77
return
nodes-
nodes_2_leafs
(nodes, model);
78
}
79
80
#define SRT_AUTOCORRECT_TREENAME " =:\n=:*=tree_*1:tree_tree_*=tree_*1"
81
#define SRT_AUTOCORRECT_ALINAME " =:\n=:*=ali_*1:ali_ali_*=ali_*1"
82
83
typedef
GB_ERROR
(*
species_callback
)(
GBDATA
*gb_species,
int
*clientdata);
84
typedef
void (*
WarningConsumer
)(
const
char
*
message
);
// e.g. GB_warning
85
86
#include <
ad_t_prot.h
>
87
88
#define CHANGE_KEY_PATH "presets/key_data"
89
#define CHANGE_KEY_PATH_GENES "presets/gene_key_data"
90
#define CHANGE_KEY_PATH_EXPERIMENTS "presets/experiment_key_data"
91
92
#define CHANGEKEY "key"
93
#define CHANGEKEY_NAME "key_name"
94
#define CHANGEKEY_TYPE "key_type"
95
#define CHANGEKEY_HIDDEN "key_hidden"
96
97
98
#else
99
#error arbdbt.h included twice
100
#endif
101
102
ROOTED
Definition:
arbdbt.h:49
GB_ERROR
const char * GB_ERROR
Definition:
arb_core.h:25
edges_2_nodes
CONSTEXPR_INLINE int edges_2_nodes(int nodes)
Definition:
arbdbt.h:52
GBT_TreeRemoveType
GBT_TreeRemoveType
Definition:
arbdbt.h:32
downcast.h
GBT_REMOVE_MARKED
Definition:
arbdbt.h:33
nodes_2_edges
CONSTEXPR_INLINE int nodes_2_edges(int nodes)
Definition:
arbdbt.h:51
GBT_REMOVE_ZOMBIES
Definition:
arbdbt.h:35
TreeModel
TreeModel
Definition:
arbdbt.h:49
nodes_2_innerNodes
CONSTEXPR_INLINE int nodes_2_innerNodes(int nodes, TreeModel model)
Definition:
arbdbt.h:75
leafs_2_innerNodes
CONSTEXPR_INLINE int leafs_2_innerNodes(int leafs, TreeModel model)
Definition:
arbdbt.h:71
GBT_INFRONTOF
Definition:
arbdbt.h:46
arbdb.h
GBDATA
Definition:
gb_data.h:129
species_callback
GB_ERROR(* species_callback)(GBDATA *gb_species, int *clientdata)
Definition:
arbdbt.h:83
GBT_BEHIND
Definition:
arbdbt.h:45
leafs_2_nodes
CONSTEXPR_INLINE int leafs_2_nodes(int leafs, TreeModel model)
Definition:
arbdbt.h:54
REMARK_OTHER
Definition:
arbdbt.h:30
GBT_REMOVE_UNMARKED
Definition:
arbdbt.h:34
GBT_ORDER_MODE
GBT_ORDER_MODE
Definition:
arbdbt.h:44
leafs_2_edges
CONSTEXPR_INLINE int leafs_2_edges(int leafs, TreeModel model)
Definition:
arbdbt.h:62
message
void message(char *errortext)
UNROOTED
Definition:
arbdbt.h:49
CONSTEXPR_INLINE
#define CONSTEXPR_INLINE
Definition:
cxxforward.h:111
ad_t_prot.h
GBT_RemarkType
GBT_RemarkType
Definition:
arbdbt.h:30
edges_2_leafs
CONSTEXPR_INLINE int edges_2_leafs(int edges, TreeModel model)
Definition:
arbdbt.h:66
nodes_2_leafs
CONSTEXPR_INLINE int nodes_2_leafs(int nodes, TreeModel model)
Definition:
arbdbt.h:58
GBT_KEEP_MARKED
Definition:
arbdbt.h:41
REMARK_BOOTSTRAP
Definition:
arbdbt.h:30
int
WarningConsumer
void(* WarningConsumer)(const char *message)
Definition:
arbdbt.h:84
REMARK_NONE
Definition:
arbdbt.h:30
Generated by
1.8.8