Learn R Programming

Seurat (version 3.1.1)

CellSelector: Cell selector

Description

Select points on a scatterplot and get information about them

Usage

CellSelector(plot, object = NULL, ident = "SelectedCells", ...)

FeatureLocator(plot, ...)

Arguments

plot

A ggplot2 plot

object

An optional Seurat object; if passes, will return an object with the identities of selected cells set to ident

ident

An optional new identity class to assign the selected cells

...

Extra parameters, such as dark.theme, recolor, or smooth for using a dark theme, recoloring based on selected cells, or using a smooth scatterplot, respectively

Value

If object is NULL, the names of the points selected; otherwise, a Seurat object with the selected cells identity classes set to ident

See Also

locator ggplot_build pnt.in.poly DimPlot FeaturePlot

Examples

Run this code
# NOT RUN {
plot <- DimPlot(object = pbmc_small)
# Follow instructions in the terminal to select points
cells.located <- CellSelector(plot = plot)
cells.located
# Automatically set the identity class of selected cells and return a new Seurat object
pbmc_small <- CellSelector(plot = plot, object = pbmc_small, ident = 'SelectedCells')
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab