Build colorful, rectangular labels for plot headers in plot space

build_header_labels(
  data,
  grouping,
  group_order = NULL,
  ymin,
  label_height = 25,
  label_type = "simple"
)

Arguments

data

A data.frame containing joined annotations and expression data

grouping

The base to use for grouping samples.

group_order

Alternate order to use for grouping if necessary. Default is NULL, which will use grouping_id.

ymin

The minimum y value for the bottom of the headers. In gene plot contexts, this will usually be the number of genes + 1

label_height

Percentage of the plot area that the headers should take up. Default = 25.

label_type

Either "simple", "angle", or "square". Simple is for use with grouped plots. Angle will scale the header bars to be equal width, with a layer of angled polygons connecting them to the data. Square will construct headers with rectangular bars that match the width of the samples in each group.