niche-detection

Identify spatial cellular niches in single-slice spatial transcriptomics data using Harmonics hierarchical modeling.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and characterize spatial cellular niches (microenvironments) in spatial transcriptomics data using a Harmonics hierarchical model.

Core Features & Use Cases

  • Identify spatial niches from a single-slice dataset based on cell-type composition and spatial layout.
  • Perform hierarchical refinement and niche merging using the Harmonics framework.
  • Assign niche labels back to cells for downstream analyses.

Quick Start

Run the Harmonics niche-detection workflow on your spatial dataset to assign niche labels to cells.

Frequently Asked Questions about niche-detection

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

FAQPage Schema
How do I detect spatial niches in a single-slice spatial transcriptomics dataset?

Detect spatial niches by applying Harmonics hierarchical modeling to an AnnData object, which identifies cellular microenvironments and assigns niche labels back to cells for downstream analysis.

What is spatial niche detection and how does Harmonics modeling work?

Spatial niche detection identifies cellular microenvironments based on cell-type composition and spatial layout. Harmonics modeling performs hierarchical refinement and merging to characterize these niches.

What data format and annotations are required for spatial niche detection with Harmonics?

Spatial niche detection requires a working AnnData object with gene modality, a single tissue slice, and pre-existing cell-type annotations, specifically needing adata.obs['celltype'] and adata.obsm['spatial'].

Can I use this niche detection workflow for multi-slice spatial transcriptomics data?

No, this niche detection workflow is strictly applicable to single-slice spatial transcriptomics datasets and does not support multi-slice data integration or processing.

What are the runtime steps for assigning niche labels using the Harmonics framework?

The runtime steps for assigning niche labels include preprocessing the spatial dataset, clustering cells, performing hierarchical refinement, and selecting the final solution to label cells.

Do I need to install the Harmonics library before running spatial niche detection?

Yes, you must install the Harmonics library because the workflow depends on it to execute the hierarchical modeling, clustering, and niche merging required for spatial niche detection.