🔬 SpatialROI
Loading spatial data...
Please wait while we prepare your analysis
🔬 SpatialROI
Interactive Spatial Transcriptomics Analysis Platform
Explore, analyze, and visualize spatial gene expression data with powerful interactive tools
🗺️
Interactive Map
Select regions with drawing tools
🎨
Visualization
Display gene expression patterns
🧬
Gene Sets
Calculate multi-gene signatures
📊
Clustering
Identify spatial domains
📈
DEG Analysis
Find marker genes
⚖️
Within-Tissue Comparison
Compare features & groups within one tissue
📚
Multi-Sample
Compare ROI DEGs across tissues
💾
Export
Download results & subsets
Please wait a moment...
Loading spatial data

🖼️ Save view (PDF)
▼ Spot Size
▼ H&E Opacity
① Draw a region
② Group ROIs

🔬 SpatialROI

Draw freehand regions of interest (ROIs) on a tissue image, compare regions, and analyze spatial gene expression — no coding required.

✅ Accepts: 10x Visium Seurat object (.rds) or 10x Visium Space Ranger output (.zip)

📖 Quick Start

1
Load Your Data
In 🎨 Upload & Visualize, load a 10x Visium Seurat object (.rds) or 10x Visium Space Ranger output (.zip), or start right away with Default Data (CRC) or one of the two case studies.
2
Draw and Group Regions
Use the ✏️ freehand tool to draw a tissue region and save it as a named ROI, or load a saved ROI index (.csv). Combine several ROIs into a named group when they should be analysed together.
3
Explore & Analyze
Use the sidebar tools to view gene expression, score gene signatures, run clustering, differential expression, ligand–receptor colocalisation and cell-type deconvolution. Any saved ROI or group can be used in each tool, and a comparison can be ROI vs ROI, group vs group, or a region vs the rest of the tissue.
4
Save & Compare
Use Save ROI index (.csv) to reload your regions in a later session, and Save region (.rds) to export the region as a Seurat object. Tables and figures can be downloaded from each panel. ROI-vs-rest DEG tables can be uploaded to 🧩 Multi-Sample to compare ROIs across samples.
▶ New to SpatialROI? Watch the video tutorial (18 min).

💡 Tips & Best Practices

  • Selection: Draw a region of interest using the freehand tool and save it as a named ROI. Group ROIs together to analyze them as one group. To see the tissue clearly while drawing, make the spots smaller with Spot Size and raise H&E Opacity.
  • Map display: Use “Show on map” to choose the displayed ROI/group, “Show ROIs on Map” to add its spots, “Transparent ROI Display” to reveal the tissue below, and “Show ROI contours” for high-contrast outlines.
  • Species: Select the correct species (Human/Mouse) before using built-in gene signatures or pathway gene sets.
  • Clustering: Start with the default resolution (0.8) and increase it for finer subgroup identification.
  • Export: Export selected ROIs as Seurat subsets for reuse in SpatialROI or downstream analysis in external tools.
  • Source code: Local installation, example data and source code are available at github.com/myaol/SpatialROI.
  • Reference datasets: Curated RCTD references for other cancer types and mouse brain are available on Zenodo.

⚠️ Limitations

  • Upload size: Uploads are limited to 150 MB on the public server. A local installation from GitHub allows up to 500 MB by default. To change this, run options(shiny.maxRequestSize = ...) in R before launching the app.
  • Shared resources: The public server is shared by all users. When many people use it at the same time, the app can become slow. If this happens, refresh the page or try again later. Computationally intensive steps, especially cell-type deconvolution on a large region, can take several minutes.
  • Session lifetime: Uploaded data is kept only while your browser tab is open and is cleared when you close it. To pick up your analysis later, save your regions with Save ROI index (.csv) or Save region (.rds) first. You can reload the ROI index next time with Load ROI index.

🏛 Acknowledgements

This research was supported in part by the University of Pittsburgh Center for Research Computing and Data, RRID:SCR_022735, through the resources provided. Specifically, this work used the HTC cluster, which is supported by NIH award number S10OD028483.

Funding. This work was supported by NIH grants including NHGRI R01HG014023, NLM 4R00LM013089, 5R01LM012011, and by U.S. NIH grants R35GM158094 and R01GM134020, as well as NSF grants DBI-2238093, DBI-2422619, IIS-2211597, and MCB-2205148.

SpatialROI is described in a manuscript currently in preparation. Citation details will be added here on publication.

🚀 Ready to Begin?

Click on the tools in the sidebar (🎨 Visualization, 🧬 Gene Sets, etc.) to start your spatial analysis. The tissue map will appear when you switch to any analysis tool.

Contact: Mengyao Lu (mel373@pitt.edu)  ·  Aodong Qiu (qiuaodon@pitt.edu)  ·  Lujia Chen (luc17@pitt.edu)
🎨 Upload & Visualize

💡 Load a 10x Visium Seurat object (.rds) or 10x Visium Space Ranger output (.zip), then draw regions directly on the H&E image, import a saved ROI spot index, or combine regions into named groups. Gene expression and metadata can be displayed on the same map.

Ligand–receptor colocalisation and RCTD cell-type deconvolution can be run on all spots or within a selected region.

Data Source

Default Data (CRC): human colorectal cancer 10x Visium; 1,253 spots and 17,529 genes.
Case Study 1 (CRLM): colorectal cancer liver metastasis 10x Visium; 3,721 spots and 18,040 genes.

Requirements: a 10x Visium Seurat object with a spatial image, tissue-spot coordinates, and log-normalised expression.

⚠️ Loading new data replaces the current analysis. Uploads are limited to 150 MB on the public server and 500 MB in a local installation from GitHub.

Case Study 2 (OSCC): oral squamous cell carcinoma 10x Visium; 1,903 spots after QC and 36,601 genes.

📋 How to prepare your zip:

  1. Locate your Space Ranger output folder
  2. Make sure all files are uncompressed (no .gz files)
  3. The folder must contain: .h5 file + spatial/ subfolder
  4. Compress the entire folder as a .zip and upload
⚙ QC settings

Applied to raw Space Ranger output only. Uploaded Seurat objects are used as provided.

⚠️ Loading new data replaces the current analysis. Uploads are limited to 150 MB on the public server and 500 MB in a local installation from GitHub.


          

Feature Selection

Color Scheme

Map Display

Clears the gene, gene-set or cluster colouring and returns the map to the plain tissue view. Saved ROIs and groups are not affected.

🔗 L-R Colocalization Score

Rank ligand–receptor pairs within a selected region by the geometric mean of their spatially smoothed expression. Highly ranked pairs show strong joint local expression and represent candidates for local signalling.

Scores every tissue spot. Smoothing uses the whole-section neighbour graph.

⚙ Advanced settings

σ = median distance to the 12 nearest spots × this value. 0.5–2 is a practical range. It changes the per-spot map, but the ranked pair table shifts little, because smoothing preserves each pair’s spatial average.


            

Top L-R Pairs by Mean Score

👉 Click a row to show that pair on the map (grey → red by ligand × receptor).


Download LR Score Table

🔬 Cell Type Deconvolution

Estimate the cell-type composition of each spot with RCTD, using a single-cell reference. Runs on all spots or within a selected region.

Large regions can take several minutes on the public server. The rest of the app stays usable while it runs.

Reference Data

Built for human colorectal cancer tissue. It matches Default Data (CRC).

Built for human colorectal cancer liver metastasis. It matches Case Study 1 (CRLM).

Other tissues or species need a matched reference. Curated references for other cancer types and mouse brain are available on Zenodo.


            


Cell Type Proportions

              

Download Cell Type Proportions
🧬 Gene Set Analysis

💡 Select a signature or pathway to calculate an enrichment score across the tissue, and display it on the map like any other feature.

Choose a species, then select a curated cell-type signature, a Hallmark pathway, or your own gene list. Enrichment scores are computed using mean expression, AddModuleScore, or GSVA.

Species Selection

Gene symbols and built-in signatures follow the selected species.

Marker Signatures (CellMarker 2.0)

Select a predefined signature or enter custom genes below.

Pathway Signatures (MSigDB Hallmark)

Loads genes into Gene Input. The selected scoring method is then applied.

Gene Input

Parameters

Mean: simple average expression across genes.
AddModuleScore: average corrected against control gene sets.
GSVA: rank-based enrichment score, robust to dropout and sequencing depth. Takes about a minute per gene set, longer on larger sections.


Color Legend

📊 Clustering Analysis

💡 Run unsupervised Louvain clustering on all spots or within a selected region using the normalised expression layer.

Spot Selection

Parameters


📈 Differential Expression

💡 Compare two regions, or one region against the remaining tissue, using Seurat’s FindMarkers.

The table and volcano plot show genes passing the selected FDR, prevalence, and fold-change thresholds, while Moran’s I separately assesses their spatial structure.

A DEG table of one region vs the rest of the tissue can be saved with Download DEG table (.csv) and uploaded in the Multi-Sample section to compare ROIs across samples.

Analysis

Non-overlapping regions are recommended. For overlapping regions, shared spots are excluded from both sides.

⚙ Advanced settings

All tested genes are plotted. Coloured points pass the FDR and |log2FC| thresholds. The table, Moran's I view, and export include the passing genes only.

Download Volcano Figure (PDF)
Download Moran's I Figure (PDF)

p_adj reflects differential expression. Moran's I quantifies how spatially coherent each DEG's expression is across the section.


Download DEG table (.csv)

Filtered table using your Advanced Settings. A one-region-vs-rest DEG table can be uploaded to Multi-Sample.

⚖️ Feature or Group Comparison

💡 Compare one feature across two regions, or two features within the same region.

Any gene, metadata column, or gene-set score can be used on either side. The two sides are shown as violin plots, with a Wilcoxon or t-test summarising the difference.

Group vs Group

Non-overlapping regions are recommended. For overlapping regions, shared spots are excluded from both sides.

Feature vs Feature

🧩 Multi-Sample

Compare ROI-versus-rest DEG results across tissues without pooling expression matrices. Tables may come from SpatialROI or another compatible DEG workflow. Comparisons are ROI-based: tables may describe different ROIs across samples, or different ROIs within one sample.

1 · Upload DEG tables

Upload DEG tables from SpatialROI or elsewhere. A gene column (gene, symbol) and a log-fold-change column (avg_log2FC, log2FoldChange, logFC) are required.

“Load example tables” loads three bundled TLS-signature ROI-versus-rest tables from independent sections:
01_CRC_TLS_ROI_vs_rest.csv — TLS ROI on Default Data (CRC)
02_P2N_liver_TLS_ROI_vs_rest.csv — TLS ROI on a tumour-adjacent normal liver section (dataset available on GitHub)
03_CRLM_liver_TLS_ROI_vs_rest.csv — TLS ROI on Case Study 1 (CRLM)
To regenerate the example tables yourself: load a dataset, import its TLS spot index with ⬆ Load ROI index (.csv) on the map, run that ROI versus Rest, and download the DEG table. Repeat for the other sections, then upload the tables here. The spot-index files for each sample in the example tables, and the P2N liver sample itself, can be downloaded from the GitHub repository.
Your own region works too: a .csv with a spot_id column is enough, and the ROI takes the file’s name. Then run the DEG analysis and upload the tables here.

At least two ROI tables are required. Adding more tables typically reduces the number of genes shared across all of them. Multiple ROIs from one patient are allowed, but they are not independent biological replicates.

2 · Compare ROI similarity

Compares each pair of tables over only the genes reported in both. Pairs sharing fewer than 5 genes are omitted.

Shared_genes is the number of genes reported in both tables. Same_direction_pct is the percentage of those whose fold change points the same way. logFC_correlation is the Spearman correlation of log2 fold changes across the shared genes, from −1 to 1 — values near 1 mean the two regions agree on which genes change most, and negative values mean they disagree.

Download Pair Table (.csv)

3 · Compare differential expression patterns across ROIs

The heatmap shows log2 fold change for genes reported in every uploaded table, one column per region, so genes behaving consistently across regions can be distinguished from those that do not. Half of the rows are the strongest shared up-regulated genes and half the strongest shared down-regulated genes, each ranked by how many regions agree on direction and then by average fold change. The table below lists all shared genes.

Download Figure (PDF)

Mean, median, min and max summarise each gene’s log2 fold change across regions. Same_direction counts the regions in which the gene changes the same way.

Download Shared-Pattern Table (.csv)

4 · Compare pathway enrichment across ROIs

Hallmark over-representation, run separately for each uploaded table using all of its genes (up- and down-regulated together), with all Hallmark genes as the background. Pathways found in the most ROIs appear first. Results are exploratory. The species follows the setting in the Gene Sets panel.