Description Usage Arguments Value Examples
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.
1 2 | plot_embedding(sce, color_by = "cluster", plot_genes = NULL,
use_short_names = FALSE, plot_pseudotime = TRUE)
|
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 |
A ggplot2 plot
1 2 3 4 | library(scater)
data('sc_example_counts') ; sce <- newSCESet(countData = sc_example_counts)
sce <- embeddr(sce)
plot_embedding(sce)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.