Skip to contents

Converts Components-per-signature data to a heatmap, and returns the ggplot object. Components and Signatures are sorted for display according to the order provided. Heatmap is plotted using the viridis colour-schemes.

Usage

ComponentSignaturesHeatmap(
  signatures,
  transpose = FALSE,
  colour_scheme = "C",
  colour_dir = 1,
  cm_begin = 0
)

Arguments

signatures

Dataframe. Expects a dataframe of signature exposures (rows) by samples (columns).

transpose

(optional) Logical. If set to TRUE the function returns the order in which samples were plotted.

colour_scheme

(optional) Character. Value passed to the viridis::scale_fill_viridis option parameter. ex. 'A' or 'B'

colour_dir

(optional) Either 1 OR -1. Value passed to the viridis::scale_fill_viridis direction parameter.

cm_begin

(optional) Float. Value within range 0,1. Value passed to the viridis::scale_fill_viridis direction parameter.

Value

A ggplot2 object.