#include <genesis/population/functions/heatmap_matrix.hpp>
Matrix to capture and accumulate columns of per-position or per-window values along a chromosome.
The class allows to accumulate a vector of values for each position or window along a chromosome. For example, in heatmap visualizations, a vector of values could display a histogram of the frequency spectrum of that position/window. As another example, the entries of the vector at each position/window could correspond to individuals or pools of individuals, and each value denote a property of that individual or pool.
In other words, this class models a 2D matrix of values, where the x-axis (width) goes along a chromosome, and the y-axis (height) can be used to capture/accumulate/store a vector of values for each x position.
Definition at line 62 of file heatmap_matrix.hpp.
Public Member Functions | |
HeatmapMatrix (HeatmapMatrix &&)=default | |
HeatmapMatrix (HeatmapMatrix const &)=default | |
HeatmapMatrix (size_t height) | |
~HeatmapMatrix ()=default | |
std::vector< T > & | add_column () |
Add a column and return it. More... | |
std::string const & | chromosome () const |
HeatmapMatrix & | chromosome (std::string const &value) |
size_t | end () const |
HeatmapMatrix & | end (size_t value) |
std::vector< T > & | get_column (size_t index) |
Return a specific column. More... | |
std::vector< T > const & | get_column (size_t index) const |
Return a specific column, const. More... | |
size_t | height () const |
HeatmapMatrix & | operator= (HeatmapMatrix &&)=default |
HeatmapMatrix & | operator= (HeatmapMatrix const &)=default |
size_t | start () const |
HeatmapMatrix & | start (size_t value) |
size_t | width () const |
|
inline |
Definition at line 70 of file heatmap_matrix.hpp.
|
default |
|
default |
|
default |
|
inline |
Add a column and return it.
We here return a non-const reference to the column, so that it's values can be changed as needed. The size of that column (vector) must not be changed though. Unfortunately, there is no second-level const-ness in C++ for this case...
Definition at line 162 of file heatmap_matrix.hpp.
|
inline |
Definition at line 86 of file heatmap_matrix.hpp.
|
inline |
Definition at line 139 of file heatmap_matrix.hpp.
|
inline |
Definition at line 96 of file heatmap_matrix.hpp.
|
inline |
Definition at line 151 of file heatmap_matrix.hpp.
|
inline |
Return a specific column.
We here return a non-const reference to the column, so that it's values can be changed as needed. The size of that column (vector) must not be changed though. Unfortunately, there is no second-level const-ness in C++ for this case...
Definition at line 118 of file heatmap_matrix.hpp.
|
inline |
Return a specific column, const.
Definition at line 128 of file heatmap_matrix.hpp.
|
inline |
Definition at line 101 of file heatmap_matrix.hpp.
|
default |
|
default |
|
inline |
Definition at line 91 of file heatmap_matrix.hpp.
|
inline |
Definition at line 145 of file heatmap_matrix.hpp.
|
inline |
Definition at line 106 of file heatmap_matrix.hpp.