plot_signature: Plot an ID83 signature ro series of signatures

Description Usage Arguments Value

View source: R/plot_signatures.R

Description

Plot an ID83 signature ro series of signatures

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plot_signature(
  x,
  label = "Signature",
  title = "",
  xlabel = NULL,
  ylabel = "Count",
  usePercent = TRUE,
  ylimits = NULL,
  countsAsProportions = FALSE,
  separatePlots = FALSE,
  contextType = "auto"
)

Arguments

x

A TidySig dataframe/tibble

label

The right-side (i.e., facet) label. Usually "Signature" or "Sample" or a sample ID.

title

A title for the plot

xlabel

An x-axis label

ylabel

A y-axis label

usePercent

Use percent scales (rather than counts)

ylimits

Use custom ylimits (useful for normalizing the views of multiple signatures). Takes a numeric vector length-two OR a string "smart" to indicate that consistent y-limits should be automatically fit from the values in x.

countsAsProportions

Convert the input data (in counts) to per-signature proportions

separatePlots

If true, return a vector of plots, one for each signature, rather than one plot with a facet for each signature.

contextType

An argument for determining the context, generally "SBS96" or "ID83". The default, "auto", will attempt to determine the context automatically based on the columns of the x.

Value

a ggplot2 object, unless separatePlot = True, in which case a list of ggplot objects is returned.


edawson/tidysig documentation built on May 2, 2020, 5:33 a.m.