A toolkit for working with phylogenetic data.
v0.24.0
taxonomy/functions/tree.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_TAXONOMY_FUNCTIONS_TREE_H_
2 #define GENESIS_TAXONOMY_FUNCTIONS_TREE_H_
3 
4 /*
5  Genesis - A toolkit for working with phylogenetic data.
6  Copyright (C) 2014-2019 Lucas Czech and HITS gGmbH
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>.
20 
21  Contact:
22  Lucas Czech <lucas.czech@h-its.org>
23  Exelixis Lab, Heidelberg Institute for Theoretical Studies
24  Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
25 */
26 
34 #include "genesis/tree/tree.hpp"
35 
36 #include <string>
37 #include <unordered_map>
38 
39 namespace genesis {
40 namespace taxonomy {
41 
42 // =================================================================================================
43 // Forwad Declarations
44 // =================================================================================================
45 
46 class Taxon;
47 class Taxonomy;
48 class Taxopath;
49 
50 // =================================================================================================
51 // Tree
52 // =================================================================================================
53 
75 tree::Tree taxonomy_to_tree(
76  Taxonomy const& taxonomy,
77  bool keep_singleton_inner_nodes = false,
78  bool keep_inner_node_names = false,
79  int max_level = -1
80 );
81 
106 tree::Tree taxonomy_to_tree(
107  Taxonomy const& taxonomy,
108  std::unordered_map<std::string, Taxopath> const& extra_taxa,
109  bool keep_singleton_inner_nodes = false,
110  bool keep_inner_node_names = false,
111  int max_level = -1,
112  bool add_extra_taxa_parents = true
113 );
114 
128 tree::Tree taxonomy_to_tree(
129  std::unordered_map<std::string, Taxopath> const& taxon_map,
130  bool keep_singleton_inner_nodes = false,
131  bool keep_inner_node_names = false,
132  int max_level = -1
133 );
134 
135 } // namespace taxonomy
136 } // namespace genesis
137 
138 #endif // include guard
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
tree::Tree taxonomy_to_tree(Taxonomy const &taxonomy, bool keep_singleton_inner_nodes, bool keep_inner_node_names, int max_level)
Turn a Taxonomy into a (possibly multifurcating) Tree.
Header of Tree class.