plotCOMPASSResultStack: Plot multiple COMPASSResults

Description Usage Arguments Value Examples

View source: R/plotMeanGammaMulti.R

Description

This function can be used to visualize the mean probability of response; that is, the probability that there is a difference in response between samples subjected to the 'treatment' condition, and samples subjected to the 'control' condition. This version is used for plotting multiple COMPASSResult objects. The COMPASS runs must all use the same markers. The code is heavily based on the plot.COMPASSResult and plot2 functions. Not all options from plot.COMPASSResult are supported yet.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotCOMPASSResultStack(
  x,
  threshold = 0.01,
  minimum_dof = 1,
  maximum_dof = Inf,
  row_annotation,
  variable,
  palette = colorRampPalette(brewer.pal(9, "Purples"))(20),
  show_rownames = FALSE,
  ...
)

Arguments

x

A named list of objects of class COMPASSResult. The names are values of type variable

threshold

A numeric threshold for filtering under-expressed categories. Any categories with mean score < threshold are removed.

minimum_dof

The minimum degree of functionality for the categories to be plotted.

maximum_dof

The maximum degree of functionality for the categories to be plotted.

row_annotation

A vector of names, pulled from the metadata, to be used for row annotation.

variable

What to call the variable that is different across the objects in x.

palette

The colour palette to be used.

show_rownames

Boolean; if TRUE we display row names (ie, the individual ids).

...

Optional arguments passed to pheatmap.

Value

The plot as a grid object (grob). It can be redrawn with e.g. grid::grid.draw().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# allCompassResults is a list of 4 COMPASSResults
names(allCompassResults) <- c("Antigen 85A", "CFP-10", "CMV", "ESAT-6")
plotCOMPASSResultStack(allCompassResults,
    row_annotation = c("Antigen", "PATIENT ID", "Time"),
    variable = "Antigen", show_rownames = FALSE,
    main = "Heatmap of Mean Probability of Response to Antigens, CD8+",
    fontsize = 14, fontsize_row = 13, fontsize_col = 11)
  
## End(Not run)

COMPASS documentation built on Nov. 8, 2020, 8:05 p.m.