scanpy

Preprocess and analyze single-cell RNA-seq data with Scanpy on AnnData datasets.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill scanpy-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scanpy
Source: https://github.com/shushuzn/Rairos/tree/main/skills/scanpy
Command: npx skills add https://github.com/shushuzn/Rairos --skill scanpy-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Scanpy provides an end-to-end workflow for turning raw single-cell RNA-seq data into interpretable biology through standardized QC, preprocessing, embeddings, clustering, markers, and visualizations.

Core Features & Use Cases

  • Quality control (QC): compute QC metrics, filter poor-quality cells/genes, and visualize mitochondrial content to improve dataset reliability.
  • Normalization, feature selection, and preprocessing: normalize counts, log-transform, identify highly variable genes, optionally regress out confounders, and scale for downstream analysis.
  • Dimensionality reduction, clustering, and differential expression: build neighborhood graphs, compute PCA/UMAP/t-SNE, run Leiden clustering, and rank marker genes with statistical tests.
  • Annotation and visualization: map clusters to cell types using marker genes and generate publication-ready plots for embeddings, QC, markers, and trajectories.
  • Trajectory inference and scoring: apply PAGA and pseudotime (DPT) plus gene set scoring for deeper biological interpretation.

Quick Start

Run the provided QC script on your input file named data/raw_counts.h5ad to generate a filtered dataset you can continue analyzing in Scanpy.

Frequently Asked Questions about scanpy

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

FAQPage Schema
How do I run a complete single-cell RNA-seq workflow from raw counts to cell-type annotation?

A complete single-cell RNA-seq workflow runs standardized QC, normalization, PCA/UMAP embeddings, Leiden clustering, and marker gene ranking on an AnnData dataset to yield annotated cell types. You load a raw counts .h5ad file and execute bundled scripts for automated preprocessing and visualization.

What quality control steps are needed for scRNA-seq preprocessing before clustering?

ScRNA-seq preprocessing requires computing QC metrics, filtering poor-quality cells and genes, and visualizing mitochondrial content to improve dataset reliability. Normalization, log-transformation, and highly variable gene identification follow to prepare the filtered AnnData object for downstream dimensionality reduction and clustering.

Can I use AnnData .h5ad files for UMAP embedding and Leiden clustering in a scRNA-seq pipeline?

Yes, AnnData .h5ad files serve as the standard input and output format for scRNA-seq pipelines. The workflow loads the .h5ad dataset, builds neighborhood graphs, computes PCA/UMAP/t-SNE embeddings, runs Leiden clustering, and writes the processed results back to .h5ad files for further analysis.

How does differential expression ranking work for finding marker genes in single-cell data?

Differential expression ranking identifies marker genes by applying statistical tests to compare gene expression across Leiden clusters in single-cell data. It ranks genes by significance, enabling data-driven cell-type annotation by mapping cluster-specific markers to known biological cell identities.

Does this scRNA-seq analysis approach support trajectory inference and pseudotime analysis?

Yes, the scRNA-seq analysis approach supports trajectory inference by applying PAGA and diffusion pseudotime (DPT) to the processed AnnData dataset. It also includes gene set scoring to provide deeper biological interpretation of developmental trajectories alongside standard clustering and embedding visualizations.

What's the best way to generate publication-ready visualizations for single-cell embeddings and markers?

Generating publication-ready visualizations for single-cell embeddings and markers uses sc.pl plotting functions on the processed AnnData object. It produces standardized figures for QC metrics, UMAP/t-SNE embeddings, ranked marker genes, and trajectories to interpret and communicate scRNA-seq analysis results.