differential-expression

Identify differentially expressed genes across defined groups in AnnData objects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Find differentially expressed genes (DEGs) between groups using sc.tl.rank_genes_groups.

The comparison target is completely flexible. The agent must understand the user's intent and prepare the data accordingly — the key is to construct an adata with a categorical column that defines the two (or more) groups to compare.

Core Features & Use Cases

  • Flexible group definitions: compare cell types, clusters, slices, ROIs, or user-defined groupings.
  • Output: ranked DE results per group, ready for downstream interpretation and visualization.

Quick Start

Prepare an AnnData object with a grouping column and run rank_genes_groups to obtain ranked DE genes.

Frequently Asked Questions about differential-expression

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

FAQPage Schema
How do I find differentially expressed genes between cell clusters using scanpy?

To find differentially expressed genes, this Skill runs sc.tl.rank_genes_groups on an AnnData object, requiring a categorical group annotation column to produce ranked DE gene results for your defined cell clusters.

Can I compare spatial domains or custom groupings for marker gene discovery?

Yes, marker gene discovery supports flexible group definitions, allowing you to compare spatial domains, custom groupings, cell types, or slices by applying rank_genes_groups to your categorical adata annotations.

What do I need to prepare in my AnnData object before running DE analysis?

Before running DE analysis, you need an AnnData object containing a categorical group annotation column that defines the two or more groups you intend to compare for differentially expressed genes.

Does this differential expression method work with multi-slice datasets?

Yes, this differential expression analysis applies to both single-slice and multi-slice datasets, enabling comparisons across various groupings like cell types or spatial domains using rank_genes_groups.

What is the best way to get ranked DE gene results for downstream visualization?

The best way to get ranked DE gene results is to define a categorical grouping column in your AnnData object and run rank_genes_groups, which outputs ranked DE results ready for downstream interpretation and visualization.

Why are my differentially expressed genes not showing up after running rank_genes_groups?

Differentially expressed genes may not show up if your AnnData object lacks a valid categorical group annotation column, which is strictly required to define the groups for the DE comparison.