heatmapPatternMatrix: Plot the patternMatrix as a heatmap

View source: R/heatmapPatternMatrix.R

heatmapPatternMatrixR Documentation

Plot the patternMatrix as a heatmap

Description

Selects the pattermMatrix (patterns by cells) from the CoGAPSResult and plots the data as a heatmap. Intended to visualize the celltypes distinguished by the patterns found by CoGAPS.

Usage

heatmapPatternMatrix(
  cgaps_result,
  sample.classifier,
  cellCols = NULL,
  sort = TRUE,
  patterns = NULL,
  matrix = FALSE,
  rowColors = NULL,
  ...
)

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)

cellCols

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 being input directly

rowColors

vector of colors to plot along patterns, if NULL generated automatically

...

additional arguments to the heatmap.2 function

Value

Heatmap of patternMatrix with color labels for samples

Examples

data("schepCogapsResult")
data(schepCellTypes)

heatmapPatternMatrix(schepCogapsResult, sample.classifier = schepCellTypes)

FertigLab/ATACCoGAPS documentation built on Oct. 24, 2024, 9:31 a.m.