A library for working with phylogenetic and population genetic data.
v0.32.0
heat_tree.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_TREE_DRAWING_HEAT_TREE_H_
2 #define GENESIS_TREE_DRAWING_HEAT_TREE_H_
3 
4 /*
5  Genesis - A toolkit for working with phylogenetic data.
6  Copyright (C) 2014-2023 Lucas Czech
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 <lczech@carnegiescience.edu>
23  Department of Plant Biology, Carnegie Institution For Science
24  260 Panama Street, Stanford, CA 94305, USA
25 */
26 
41 
42 #include <string>
43 #include <vector>
44 
45 namespace genesis {
46 namespace tree {
47 
48 // =================================================================================================
49 // SVG Functions
50 // =================================================================================================
51 
53 {
54  // Tree parameters
57  bool ladderize = true;
58  std::vector<utils::Color> color_per_branch;
60 
61  // Matrix parameters
63  std::vector<std::string> column_labels;
64  bool matrix_as_bmp = false;
65 };
66 
68  HeatTreeParameters const& params
69 );
70 
72  HeatTreeParameters const& params,
73  utils::ColorMap const& matrix_color_map,
74  utils::ColorNormalization const& matrix_color_norm
75 );
76 
78  HeatTreeParameters const& params,
79  utils::ColorMap const& matrix_color_map,
80  utils::ColorNormalization const& matrix_color_norm,
81  utils::ColorMap const& tree_color_map,
82  utils::ColorNormalization const& tree_color_norm
83 );
84 
85 } // namespace tree
86 } // namespace genesis
87 
88 #endif // include guard
genesis::utils::ColorMap
Store a list of colors and offer them as a map for values in range [ 0.0, 1.0 ].
Definition: map.hpp:61
genesis::tree::HeatTreeParameters::stroke
utils::SvgStroke stroke
Definition: heat_tree.hpp:59
genesis::tree::LayoutType
LayoutType
Type of tree for drawing, either phylogram or cladogram.
Definition: layout_base.hpp:62
genesis::tree::HeatTreeParameters
Definition: heat_tree.hpp:52
genesis::utils::ColorNormalization
Base class for color normalization.
Definition: normalization.hpp:52
map.hpp
genesis::tree::HeatTreeParameters::matrix_as_bmp
bool matrix_as_bmp
Definition: heat_tree.hpp:64
genesis::tree::HeatTreeParameters::ladderize
bool ladderize
Definition: heat_tree.hpp:57
layout_base.hpp
genesis::tree::HeatTreeParameters::column_labels
std::vector< std::string > column_labels
Definition: heat_tree.hpp:63
genesis::tree::HeatTreeParameters::color_per_branch
std::vector< utils::Color > color_per_branch
Definition: heat_tree.hpp:58
genesis::utils::Matrix
Definition: placement/function/emd.hpp:53
genesis::utils::SvgStroke
Definition: attributes.hpp:49
genesis::tree::Tree
Class for representing phylogenetic trees.
Definition: tree/tree.hpp:97
genesis::tree::HeatTreeParameters::type
LayoutType type
Definition: heat_tree.hpp:56
matrix.hpp
genesis
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Definition: placement/formats/edge_color.cpp:42
tree.hpp
color.hpp
Header of Color class.
genesis::tree::HeatTreeParameters::tree
CommonTree tree
Definition: heat_tree.hpp:55
genesis::utils::SvgDocument
Definition: svg/document.hpp:50
genesis::tree::LayoutType::kCladogram
@ kCladogram
genesis::tree::HeatTreeParameters::matrix
utils::Matrix< utils::Color > matrix
Definition: heat_tree.hpp:62
svg.hpp
genesis::tree::heat_tree
utils::SvgDocument heat_tree(HeatTreeParameters const &params)
Definition: heat_tree.cpp:359
normalization.hpp