plot_embedding: Plot the cells in the embedding

Description Usage Arguments Value Examples

View source: R/embeddr.R

Description

This function takes a data frame with at least positional (component_0 & component_1) information and plots the resulting embedding. If clusters are assigned it can colour by these, and if a pseudotime trajectory is assigned it will plot this through the embeddding.

Usage

1
2
plot_embedding(sce, color_by = "cluster", plot_genes = NULL,
  use_short_names = FALSE, plot_pseudotime = TRUE)

Arguments

sce

The SCESet object

color_by

The variable to color the embedding with (defaults to cluster)

plot_genes

A vector of gene names or indices (anything with which to subset the SCESet) for plotting gene expression as a size in the reduced space. This will facet wrap, so an individual plot for each gene (don't choose too many).

use_short_names

If fData(sce)$gene_short_names is defined and this is true then those are used on the plot

plot_pseudotime

If TRUE (default) the pseudotime curve (principal curve) is shown on the plot. If pData(sce)$pseudotime is null then this is ignored

Value

A ggplot2 plot

Examples

1
2
3
4
library(scater)
data('sc_example_counts') ; sce <- newSCESet(countData = sc_example_counts)
sce <- embeddr(sce)
plot_embedding(sce)

kieranrcampbell/embeddr documentation built on May 20, 2019, 9:24 a.m.