Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/plotTopMarkerHeat.R
Plot a heatmap of expression values for the top genes in each cluster,
defined by sortGenes()
.
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
)
|
sg |
A list, typically the output of |
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. |
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.
If outs
is TRUE, plotMarkerHeat
returns a list containing
the top n
marker genes for each cluster.
Mahmoud M Ibrahim <mmibrahim@pm.me>
plotMarkerHeat
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.