Skip to content

Feature Request: Add Interactive Region Selector for SpatialDimPlot #9797

Open
@mayurdoke6

Description

@mayurdoke6

Motivation

In our current spatial transcriptomics workflow using Seurat, we frequently utilize UMAP visualizations where interactive tools allow us to select clusters or regions of interest for downstream analysis. This ability to select a subset of cells based on visual clustering has been extremely helpful for targeted exploration.

However, this kind of functionality is currently not available in the SpatialDimPlot function. While we can visually inspect specific regions on tissue, there is no built-in method to select those regions interactively within the spatial view itself. This creates a challenge when we want to perform subsetting, differential expression, or other region-specific analyses directly from the spatial map — especially in high-resolution datasets such as Visium HD.

Having the ability to interactively select tissue regions directly from the SpatialDimPlot output would greatly enhance usability and biological interpretation, allowing researchers to link spatial context with transcriptional identity more intuitively and efficiently.

Feature Description

We propose adding an interactive selection tool to SpatialDimPlot similar to what is available for UMAP plots in Seurat. Specifically, this feature would allow users to:

Click-and-drag or draw a selection box/polygon on the spatial plot to highlight a specific region of interest.

Automatically generate a list of selected spots/cells that can be assigned to a metadata column or used for subsetting.

Optionally allow exporting the selection for downstream analyses such as FindMarkers, subclustering, or label transfer.

The tool could be implemented using base R interactivity or integrated with packages like plotly, shiny, or ggiraph for more dynamic user experiences. A command-line version could also allow users to define coordinates or masks manually.

This addition would make spatial data exploration more powerful, user-friendly, and aligned with how we already interact with UMAP and other reduced-dimensionality visualizations.

Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions