Learn R Programming

ICAMS (version 2.1.2)

PlotCatalog: Plot one spectrum or signature.

Description

Plot the spectrum of one sample or plot one signature. The type of graph is based on one attribute("catalog.type") of the input catalog. You can first use TransformCatalog to get different types of catalog and then do the plotting.

Usage

PlotCatalog(
  catalog,
  plot.SBS12 = NULL,
  cex = NULL,
  grid = NULL,
  upper = NULL,
  xlabels = NULL,
  ylim = NULL
)

Arguments

catalog

A catalog as defined in ICAMS with attributes added. See as.catalog for more details.

plot.SBS12

Only meaningful for class SBS192Catalog; if TRUE, generate an abbreviated plot of only SBS without context, i.e. C>A, C>G, C>T, T>A, T>C, T>G each on transcribed and untranscribed strands, rather than SBS in trinucleotide context, e.g. ACA > AAA, ACA > AGA, ..., TCT > TAT, ...

cex

Has the usual meaning. Taken from par("cex") by default. Only implemented for SBS96Catalog, SBS192Catalog and DBS144Catalog.

grid

A logical value indicating whether to draw grid lines. Only implemented for SBS96Catalog.

upper

A logical value indicating whether to draw horizontal lines and the names of major mutation class on top of graph. Only implemented for SBS96Catalog.

xlabels

A logical value indicating whether to draw x axis labels. Only implemented for SBS96Catalog. If FALSE then plot x axis tick marks; set par(tck = 0) to suppress.

ylim

Has the usual meaning. Only implemented for SBS96Catalog and IndelCatalog.

Value

A list whose first element is a logic value indicating whether the plot is successful. For SBS96Catalog, the list will have a second element, which is a numeric vector giving the coordinates of all the bar midpoints drawn, useful for adding to the graph. For SBS192Catalog with "counts" catalog.type and non-NULL abundance, the list will have a second element which is a list containing the strand bias statistics.

Comments

For SBS192Catalog with "counts" catalog.type and non-NULL abundance, the strand bias statistics are Benjamini-Hochberg q-values based on two-sided binomial tests of the mutation counts on the transcribed and untranscribed strands relative to the actual abundances of C and T on the transcribed strand. On the SBS12 plot, asterisks indicate q-values as follows *, \(Q<0.05\); **, \(Q<0.01\); ***, \(Q<0.001\).

Examples

Run this code
# NOT RUN {
file <- system.file("extdata",
                    "strelka.regress.cat.sbs.96.csv",
                    package = "ICAMS")
catSBS96 <- ReadCatalog(file)
colnames(catSBS96) <- "sample"
PlotCatalog(catSBS96)
# }

Run the code above in your browser using DataLab