Last change
on this file was
18737,
checked in by westram, 4 years ago
|
- introduce LabelTranslator:
- use for label translation when loading
into database (TREE_load_to_db).
- implement NOOP-translate: leaves labels as they are (=former behavior).
|
File size:
1.5 KB
|
Line | |
---|
1 | // ============================================================ // |
---|
2 | // // |
---|
3 | // File : TreeRead.h // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Coded by Ralf Westram (coder@reallysoft.de) in June 2009 // |
---|
7 | // Institute of Microbiology (Technical University Munich) // |
---|
8 | // www.arb-home.de // |
---|
9 | // // |
---|
10 | // ============================================================ // |
---|
11 | |
---|
12 | #ifndef TREEREAD_H |
---|
13 | #define TREEREAD_H |
---|
14 | |
---|
15 | #ifndef ARBDBT_H |
---|
16 | #include <arbdbt.h> |
---|
17 | #endif |
---|
18 | #ifndef LABELTRANSLATOR_H |
---|
19 | #include "LabelTranslator.h" |
---|
20 | #endif |
---|
21 | |
---|
22 | #define DEFAULT_BRANCH_LENGTH_MARKER -1000.0 // tree-edges w/o length are marked with this value during read and corrected in TREE_scale |
---|
23 | inline bool is_marked_as_default_len(GBT_LEN len) { return len <= DEFAULT_BRANCH_LENGTH_MARKER; } |
---|
24 | void TREE_scale(TreeNode *tree, double length_scale, double bootstrap_scale); // Note: auto-called by TREE_load + TREE_load_to_db |
---|
25 | |
---|
26 | TreeNode *TREE_load(const char *path, TreeRoot *troot, char **commentPtr, bool allow_length_scaling, char **warningPtr); |
---|
27 | GB_ERROR TREE_load_to_db(GBDATA *gb_main, const char *treefile, const char *tree_name, const LabelTranslator& translator); |
---|
28 | |
---|
29 | #else |
---|
30 | #error TreeRead.h included twice |
---|
31 | #endif // TREEREAD_H |
---|
Note: See
TracBrowser
for help on using the repository browser.