A toolkit for working with phylogenetic data.
v0.20.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tree/drawing/functions.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_TREE_DRAWING_FUNCTIONS_H_
2 #define GENESIS_TREE_DRAWING_FUNCTIONS_H_
3 
4 /*
5  Genesis - A toolkit for working with phylogenetic data.
6  Copyright (C) 2014-2018 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 
40 
41 #include <string>
42 #include <vector>
43 
44 namespace genesis {
45 namespace tree {
46 
47 // =================================================================================================
48 // Newick Functions
49 // =================================================================================================
50 
57  DefaultTree const& tree,
58  std::string const& newick_filename
59 );
60 
61 // =================================================================================================
62 // Phyloxml Functions
63 // =================================================================================================
64 
71  DefaultTree const& tree,
72  std::string const& phyloxml_filename
73 );
74 
76  DefaultTree const& tree,
77  std::vector<utils::Color> const& color_per_branch,
78  std::string const& phyloxml_filename
79 );
80 
82  DefaultTree const& tree,
83  std::vector<double> const& value_per_branch,
84  utils::ColorMap const& color_map,
85  utils::ColorNormalization const& color_norm,
86  std::string const& phyloxml_filename
87 );
88 
89 // =================================================================================================
90 // Nexus Functions
91 // =================================================================================================
92 
99  DefaultTree const& tree,
100  std::string const& nexus_filename
101 );
102 
104  DefaultTree const& tree,
105  std::vector<utils::Color> const& color_per_branch,
106  std::string const& nexus_filename
107 );
108 
110  DefaultTree const& tree,
111  std::vector<double> const& value_per_branch,
112  utils::ColorMap const& color_map,
113  utils::ColorNormalization const& color_norm,
114  std::string const& nexus_filename
115 );
116 
117 // =================================================================================================
118 // SVG Functions
119 // =================================================================================================
120 
122 {
125  bool ladderize = true;
127 };
128 
130  DefaultTree const& tree,
131  LayoutParameters const& params,
132  std::string const& svg_filename
133 );
134 
136  DefaultTree const& tree,
137  LayoutParameters const& params,
138  std::vector<utils::Color> const& color_per_branch,
139  std::string const& svg_filename
140 );
141 
143  DefaultTree const& tree,
144  LayoutParameters const& params,
145  std::vector<double> const& value_per_branch,
146  utils::ColorMap const& color_map,
147  utils::ColorNormalization const& color_norm,
148  std::string const& svg_filename
149 );
150 
152  DefaultTree const& tree,
153  LayoutParameters const& params,
154  std::vector<utils::Color> const& color_per_branch,
155  utils::ColorMap const& color_map,
156  utils::ColorNormalization const& color_norm,
157  std::string const& svg_filename
158 );
159 
160 } // namespace tree
161 } // namespace genesis
162 
163 #endif // include guard
Tree DefaultTree
Alias for a Tree with data types DefaultNodeData and DefaultEdgeData.
Store a list of colors and offer them as a map for values in range [ 0.0, 1.0 ].
Definition: map.hpp:61
void write_tree_to_phyloxml_file(DefaultTree const &tree, std::string const &phyloxml_filename)
Write a phyloxml file containing a tree.
Header of Color class.
void write_tree_to_nexus_file(DefaultTree const &tree, std::string const &nexus_filename)
Write a nexus file containing a tree.
void write_color_tree_to_nexus_file(DefaultTree const &tree, std::vector< utils::Color > const &color_per_branch, std::string const &nexus_filename)
Class for representing phylogenetic trees.
Definition: tree/tree.hpp:95
void write_color_tree_to_phyloxml_file(DefaultTree const &tree, std::vector< utils::Color > const &color_per_branch, std::string const &phyloxml_filename)
Base class for color normalization.
void write_color_tree_to_svg_file(DefaultTree const &tree, LayoutParameters const &params, std::vector< utils::Color > const &color_per_branch, std::string const &svg_filename)
void write_tree_to_svg_file(DefaultTree const &tree, LayoutParameters const &params, std::string const &svg_filename)
void write_tree_to_newick_file(DefaultTree const &tree, std::string const &newick_filename)
Write a newick file containing a tree.