Plot top markers

plotTopMarkers(object, ...)

# S4 method for SingleCellExperiment
plotTopMarkers(object, markers, n = 1L,
  direction = c("up", "down", "both"), reducedDim = "TSNE",
  headerLevel = 2L, progress = FALSE, ...)

# S4 method for Seurat
plotTopMarkers(object, markers, n = 1L,
  direction = c("up", "down", "both"), reducedDim = "TSNE",
  headerLevel = 2L, progress = FALSE, ...)

Arguments

object

Object.

markers

grouped_df. Marker genes, grouped by "cluster".

n

integer(1). Number to include.

direction

character(1). Whether to include upregulated ("up"; positive LFC), downregulated ("down"; negative LFC) or "both" directions of association per cluster.

reducedDim

character(1). Name of reduced dimension matrix slotted in reducedDims(). Includes TNSE, UMAP, PCA, for example.

headerLevel

integer(1) (1-7). Markdown header level.

progress

logical(1). Show progress, using progress bars.

...

Passthrough arguments to plotMarker().

Value

Show graphical output. Invisibly return a ggplot list.

Details

The number of markers to plot is determined by the output of the topMarkers() function. If you want to reduce the number of genes to plot, simply reassign first using that function. If necessary, we can add support for the number of genes to plot here in a future update.

Examples

data(seurat, seurat_all_markers) plotTopMarkers(object = seurat, markers = seurat_all_markers)
#> Grouping by cluster.
#> Including upregulated markers.
#> Returning as tibble.
#> #> #> ## Cluster 0 {.tabset} #>
#> #> #> ## Cluster 1 {.tabset} #>
#> #> #> ## Cluster 2 {.tabset} #>