plotTopMarkerHeat: plotTopMarkerHeat

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plotTopMarkerHeat.R

Description

Plot a heatmap of expression values for the top genes in each cluster, defined by sortGenes().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotTopMarkerHeat(
  sg,
  top_n = 10,
  colors = colorRampPalette(rev(c("orangered4", "orangered", "gray90", "dodgerblue",
    "dodgerblue4")))(n = 100),
  newOrder = 1:length(unique(sg$inputClass)),
  averageCells = 0,
  gaps = TRUE,
  outs = FALSE,
  plotheat = TRUE
)

Arguments

sg

A list, typically the output of sortGenes.

top_n

The number of top genes to plot for each cluster.

colors

Color palette used for the heatmap.

newOrder

Reorder the clusters in the heatmap? See Examples.

averageCells

Plot averages of cells instead of individual cells. You can use this when you have a large number of cells. See Details.

gaps

Should the heatmap have gaps between cell types and gene clusters? TRUE by default.

outs

Should the top genes names be returned? FALSE by default.

plotheat

Should the heatmap be drawn? TRUE by default.

Details

plotTopMarkerHeat is a convenience wrapper around plotMarkerHeat that plots a heatmap of the top top_n (10 by default) genes in each cell cluster. Unlike plotMarkerHeat, plotTopMarkerHeat takes the output of sortGenes as the only required input.

Value

If outs is TRUE, plotMarkerHeat returns a list containing the top n marker genes for each cluster.

Author(s)

Mahmoud M Ibrahim <mmibrahim@pm.me>

See Also

plotMarkerHeat

Examples

1
2
3
4
5
6
7
8
9
data(kidneyTabulaMuris)
gs = sortGenes(kidneyTabulaMuris$exp, kidneyTabulaMuris$cellType)
plotTopMarkerHeat(gs) # plots the top 10 genes for each cluster

#now plot the top 20 genes and average every 5 cells
plotTopMarkerHeat(gs, top_n= 20, averageCells=5)

#just identify the top 20 genes, do not make a plot
plotTopMarkerHeat(gs, top_n= 20, averageCells=5, outs = TRUE, plotheat = FALSE)

mahmoudibrahim/genesorteR documentation built on April 20, 2021, 4:07 p.m.