omicverse-single-cell-differential-abundance

Run differential cell-type abundance analysis on single-cell AnnData between conditions.

13|2|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Starlitnightly/omicverse-skills --skill omicverse-single-cell-differential-abundance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: omicverse-single-cell-differential-abundance
Source: https://github.com/Starlitnightly/omicverse-skills/tree/main/src/omicverse_skills/skills/single-cell-differential-abundance
Command: npx skills add https://github.com/Starlitnightly/omicverse-skills --skill omicverse-single-cell-differential-abundance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, anndata, scanpy, omicverse, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Turn notebook-style differential cell-type abundance analysis into a reusable, triggerable operation so researchers can reliably compare cell-type compositions between experimental conditions without reworking exploratory code each time.

Core Features & Use Cases

  • Multiple backends: Choose between scCODA posterior sampling or Milo-family neighborhood testing (milopy or milo) depending on inference needs.
  • Input validation: Ensures required AnnData fields, sample identifiers, and embedding keys exist before execution to prevent common runtime errors.
  • Reproducible workflows: Encapsulates constructor, run, and result collection patterns so the same analysis can be rerun, smoke-tested, and integrated into larger pipelines.
  • Use Case: Compare Control versus infected samples to identify cell-type compositional shifts using either Bayesian compositional inference or neighborhood-based testing.

Quick Start

Run a differential abundance test comparing Control and Salmonella on an AnnData with sample_key batch and embedding X_pca.

Frequently Asked Questions about omicverse-single-cell-differential-abundance

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

FAQPage Schema
How do I detect differential cell-type abundance in single-cell data?

Run differential abundance analysis on single-cell AnnData using scCODA posterior inference or Milo neighborhood testing to detect compositional changes between condition labels.

What's the difference between scCODA and Milo for single-cell compositional analysis?

scCODA uses sample-aware Bayesian posterior inference for compositional shifts, while Milo-family methods apply embedding-driven neighborhood testing to identify local differential abundance without requiring strict sample references.

Do I need a sample identifier column to run differential abundance testing?

Yes, sample-aware branches like scCODA require a sample identifier column in AnnData obs to correctly model compositional variance. Milo methods additionally require an embedding key stored in obsm.

How do I compare cell-type composition between control and infected samples?

Compare control and infected samples by specifying your condition labels and cell-type obs columns in an AnnData object, then executing differential abundance analysis to quantify compositional shifts.

Why does my Milo differential abundance analysis fail on AnnData?

Milo analyses fail when required AnnData fields are missing. Input validation requires a condition column, cell-type column, sample identifier, and a valid embedding key in obsm like X_pca before execution.