gheatmap: gheatmap

View source: R/gheatmap.R

gheatmapR Documentation

gheatmap

Description

append a heatmap of a matrix to the right side of a phylogenetic tree

Usage

gheatmap(
  p,
  data,
  offset = 0,
  width = 1,
  low = "green",
  high = "red",
  color = "white",
  colnames = TRUE,
  colnames_position = "bottom",
  colnames_angle = 0,
  colnames_level = NULL,
  colnames_offset_x = 0,
  colnames_offset_y = 0,
  font.size = 4,
  family = "",
  hjust = 0.5,
  legend_title = "value",
  custom_column_labels = NULL
)

Arguments

p

tree view

data

matrix or data.frame

offset

set offset of the heatmap to tree

width

total width of heatmap, compare to width of tree, defaults to 1, which means they are of the same length

low

set color of the lowest value, defaults to "green"

high

set color of the highest value, defaults to "red"

color

set color of heatmap cell border, defaults to "white"

colnames

logical, whether to add matrix colnames, defaults to "TRUE"

colnames_position

set the position of the colnames, one of 'bottom' (default) or 'top'

colnames_angle

set the angle of colnames

colnames_level

set levels of colnames

colnames_offset_x

set x offset for colnames

colnames_offset_y

set y offset for colnames

font.size

set font size of matrix colnames

family

font of matrix colnames, can be any supported font

hjust

adjust horizonal position of column names (0: align left, 0.5: align center (default), 1: align righ)

legend_title

title of fill legend

custom_column_labels

instead of using the colnames from the input matrix/data.frame, input a custom vector to be set as column labels

Value

tree view

Author(s)

Guangchuang Yu

References

For demonstration of this function, please refer to chapter 7.3 of Data Integration, Manipulation and Visualization of Phylogenetic Trees http://yulab-smu.top/treedata-book/index.html by Guangchuang Yu.


GuangchuangYu/ggtree documentation built on Oct. 31, 2024, 10:10 a.m.