PlotExposureInternal: Plot a single exposure plot

Description Usage Arguments Value

View source: R/exposure_related_functions.R

Description

Plot a single exposure plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
PlotExposureInternal(
  exposure,
  plot.proportion = FALSE,
  xlim = NULL,
  ylim = NULL,
  legend.x = NULL,
  legend.y = NULL,
  cex.legend = 0.9,
  cex.yaxis = 1,
  cex.xaxis = NULL,
  plot.sample.names = TRUE,
  yaxis.labels = NULL,
  ...
)

Arguments

exposure

Exposures as a numerical matrix (or data.frame) with signatures in rows and samples in columns. Rownames are taken as the signature names and column names are taken as the sample IDs. If you want exposure sorted from largest to smallest, use SortExposure. Do not use column names that start with multiple underscores. The exposures will often be mutation counts, but could also be e.g. mutations per megabase.

plot.proportion

Plot exposure proportions rather than counts.

xlim, ylim

Limits for the x and y axis. If NULL(default), the function tries to do something reasonable.

legend.x, legend.y

The x and y co-ordinates to be used to position the legend.

cex.legend

A numerical value giving the amount by which legend plotting text and symbols should be magnified relative to the default.

cex.yaxis

A numerical value giving the amount by which y axis values should be magnified relative to the default.

cex.xaxis

A numerical value giving the amount by which x axis values should be magnified relative to the default. If NULL(default), the function tries to do something reasonable.

plot.sample.names

Whether to plot sample names below the x axis. Default is TRUE.

yaxis.labels

User defined y axis labels to be plotted. If NULL(default), the function tries to do something reasonable.

...

Other arguments passed to barplot. If ylab is not included, it defaults to a value depending on plot.proportion. If col is not supplied the function tries to do something reasonable.

Value

An invisible list whose first element is a logic value indicating whether the plot is successful. The second element is a numeric vector giving the coordinates of all the bar midpoints drawn, useful for adding to the graph.


steverozen/ICAMSxtra documentation built on Feb. 9, 2022, 7:01 a.m.