Analysis Guides/

Visium HD Multi-sample Integration Analysis: an R Tutorial in Google Colab

Jul 11, 2025
Share via:

Note: 10x Genomics does not provide support for community-developed tools and makes no guarantees regarding their function or performance. Please contact tool developers with any questions. If you have feedback about Analysis Guides, please email analysis-guides@10xgenomics.com.

This Google Colab tutorial provides detailed steps for multi-sample integration analysis of Visium HD data processed by Space Ranger. Before exploring these tutorials, please note:

  • While this tutorial uses 8 µm binned outputs, the principles apply to other bin sizes and to nucleus/cell segmentation outputs from Space Ranger.
  • This vignette covers popular Visium HD data analysis steps designed to inspire your own research. We encourage researchers to explore new tools and algorithms regularly published by the community.

To begin, open the Google Colab notebook:

Open Google Colab notebook

Next, configure your Google Colab environment:

  • Select R as the programming language: Navigate to Runtime > Change runtime type and ensure Runtime type is set to R. For optimal performance with this tutorial, we recommend selecting v2-8 TPU.
  • Click the Connect button in the top-right corner. You are now ready to run the tutorial.

You can run the analysis using the provided example data within the code. Alternatively, follow the instructions at the beginning of each section to load your own data.

This Analysis Guide is structured into the following sections:

  • Install Packages: Set up the necessary R packages.
  • Download Practice Datasets: Obtain the example datasets for the tutorial.
  • Create On-Disk Matrices: Generate on-disk matrices for the samples.
  • Create a Seurat Object: Combine samples into a single Seurat object using on-disk matrices.
  • "Sketch" Subsampled Bins: Subsample bins and load them into memory for efficient processing.
  • Conventional Data Processing: Perform standard data processing steps.
  • Batch Correction by Harmony: Apply Harmony for batch effect correction.
  • Project Results: Project analysis results from the subsampled ("sketch") bins to all bins.
  • Export and Import Clustering Results: Export clustering results to CSV and import them into Loupe Browser.
  • Find Cluster Marker Genes: Identify marker genes for cell type annotation.
  • Save Seurat Object: Save the processed Seurat object.
  • Subset Seurat for Fibroblasts: Subset the Seurat object to focus on fibroblast populations.
Stay connected with latest technical workflow and software updatesSubscribe to newsletter