plot2 {COMPASS} | R Documentation

## Plot a pair of COMPASSResults

### 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.

### Usage

    plot2(x, y, subset, threshold = 0.01, minimum_dof = 1,
      maximum_dof = Inf, must_express = NULL, row_annotation = NULL,
      palette = NA, show_rownames = FALSE, show_colnames = FALSE, ...)

### Arguments

`x` | An object of class `COMPASSResult`.
`y` | An object of class `COMPASSResult`.
`subset` | An R expression, evaluated within the metadata, used to determine which individuals should be kept.
`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.
`must_express` | A character vector of markers that should be included in each subset plotted. For example, `must_express=c("TNFa & IFNg")` says we include only subsets that are positive for both `TNFa` or `IFNg`, while `must_express=c("TNFa", "IFNg")` says we should keep subsets which are positive for either `TNFa` or `IFNg`.
`row_annotation` | A vector of names, pulled from the metadata, to be used for row annotation.
`palette` | The colour palette to be used.
`show_rownames` | Boolean; if `TRUE` we display row names (ie, the individual ids).
`show_colnames` | Boolean; if `TRUE` we display column names (ie, the column name associated with a cytokine; typically not needed)
`...` | Optional arguments passed to `pheatmap`.

### Value

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

[Package COMPASS version 1.26.0 Index]