cgapsPlot: Plot Individual CoGAPS Patterns

View source: R/cgaps_plot.R

cgapsPlotR Documentation

Plot Individual CoGAPS Patterns

Description

Function to plot each pattern of the pattern matrix from a cogapsResult and color by cell classifier information to identify which patterns identify which cell classes.

Usage

cgapsPlot(
  cgaps_result,
  sample.classifier,
  cols = NULL,
  sort = TRUE,
  patterns = NULL,
  matrix = FALSE,
  ...
)

Arguments

cgaps_result

CoGAPSResult object from a CoGAPS run or the pattern matrix (matrix must be set equal to TRUE in the latter case)

sample.classifier

factor of sample classifications for all cells for the data to be plotted by (e.g. celltypes)

cols

vector of colors to be used for the cell classes; should have the same number of colors as levels of the sample.classifier factor. If left null a list of colors is produced

sort

TRUE if samples will be sorted according to sample.classifier prior to plotting

patterns

numerical vector of patterns to be plotted; if null all patterns are plotted

matrix

if false cgaps_result is interpreted as a CoGAPSResult object, if true it is interpreted as the pattern matrix

...

addition arguments to plot function

Value

Series of plots of pattern matrix patterns colored by cell classifications

Examples

data("schepCogapsResult")
data(schepCellTypes)

cgapsPlot(schepCogapsResult, schepCellTypes)

FertigLab/ATACCoGAPS documentation built on Feb. 8, 2023, 6:46 p.m.