integration-harmony

Align PCA embeddings across spatial transcriptomics slices with Harmony batch correction.

3|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/chenyhvvvv/STAT-agent --skill integration-harmony
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-harmony
Source: https://github.com/chenyhvvvv/STAT-agent/tree/main/stat_agent/skills/integration-Harmony
Command: npx skills add https://github.com/chenyhvvvv/STAT-agent --skill integration-harmony

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Batch integration of multiple spatial transcriptomics slices to remove batch effects and enable joint analysis, preserving cell-type interpretation across slices.

Core Features & Use Cases

  • Harmony batch correction in PCA space to align slices
  • Optional: incorporate a reference scRNA-seq with celltype annotations for KNN label transfer
  • Store integrated embeddings back into each slice for downstream analysis and provenance
  • Compare pre- and post-integration UMAPs to assess batch correction quality

Quick Start

Run Harmony integration by specifying the slices to merge and an optional reference path, then inspect the harmonized embeddings in each slice.

Frequently Asked Questions about integration-harmony

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch correct multiple spatial transcriptomics slices for joint analysis?

Spatial transcriptomics slices can be batch-corrected by aligning PCA embeddings with Harmony. This removes batch effects across multiple gene-expression slices, preserving cell-type interpretation for joint analysis.

Can I transfer cell types from a reference scRNA-seq dataset to spatial slices?

Yes, you can transfer cell types from a reference scRNA-seq annotated dataset to spatial slices via KNN label transfer. This requires providing an optional path to the reference h5ad file and enabling the KNN transfer option.

What is the minimum number of spatial slices required for Harmony integration?

Harmony integration requires at least two spatial slices to merge. You must specify which slices to integrate, and the results are stored back into each slice's adata including harmonized embeddings and provenance.

How do I assess batch correction quality after integrating spatial slices?

You can assess batch correction quality by comparing pre- and post-integration UMAPs. Inspecting the harmonized embeddings stored in each slice allows you to evaluate how well batch effects were removed.

Does Harmony spatial integration require PCA embeddings as input?

Harmony spatial integration aligns PCA embeddings across multiple slices to remove batch effects. The process stores the integrated harmonized embeddings back into each slice's adata for downstream analysis.