View source: R/visualization.R
| InteractiveSpatialPlot | R Documentation |
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.
InteractiveSpatialPlot(
object,
image = NULL,
image.scale = "lowres",
group.by = NULL,
alpha = 1,
pt.size.factor = 1,
overlay_image = TRUE
)
object |
A |
image |
Name of the spatial image stored in the object. If |
image.scale |
Character. Which image scaling factor to use for spatial coordinate transformation ( |
group.by |
Metadata variable (column name) to use for coloring cell points (e.g., cluster assignment). If |
alpha |
Numeric transparency value for cell points (default |
pt.size.factor |
Numeric scaling factor for point size (default |
overlay_image |
Logical; if |
A character vector of cell names selected via lasso, which can be used to subset the object.
This function requires the plotly, magrittr, and base64enc packages to be installed. It also requires shiny and miniUI for the interactive UI.
## Not run:
selected_cells <- InteractiveSpatialPlot(object = brain)
selected_cells <- InteractiveSpatialPlot(object = brain, overlay_image = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.