Launch an interactive gadget for lasso-based cell selection from a spatial Seurat object. Supports Visium, SlideSeq, and Vizgen data. Returns the cell names of the selected subset, suitable for downstream subsetting or analysis.
Usage
InteractiveSpatialPlot(
object,
image = NULL,
image.scale = "lowres",
group.by = NULL,
alpha = 1,
pt.size.factor = 1,
overlay_image = TRUE
)Arguments
- object
A
Seuratobject with spatial data.- image
Name of the spatial image stored in the object. If
NULL, uses the default image for the object.- image.scale
Character. Which image scaling factor to use for spatial coordinate transformation (
"lowres"by default).- group.by
Metadata variable (column name) to use for coloring cell points (e.g., cluster assignment). If
NULL, uses"seurat_clusters"if available, otherwise all cells are grouped together.- alpha
Numeric transparency value for cell points (default
1.0).- pt.size.factor
Numeric scaling factor for point size (default
1.0).- overlay_image
Logical; if
TRUE, overlays the tissue image in the background of the plot (defaultTRUE).