scanpy-single-cell-analysis

Analyze single-cell RNA-seq .h5ad data with Scanpy from QC to clustering.

1|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/Ketomihine/my_skills --skill scanpy-single-cell-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scanpy-single-cell-analysis
Source: https://github.com/Ketomihine/my_skills/tree/main/scanpy-single-cell
Command: npx skills add https://github.com/Ketomihine/my_skills --skill scanpy-single-cell-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a comprehensive, reproducible workflow for analyzing single-cell RNA-seq data stored in .h5ad format using Scanpy within a dedicated conda environment.

Core Features & Use Cases

  • Data loading and QC: Efficiently load .h5ad files, assess quality metrics, and filter cells based on gene counts and mitochondrial content.
  • Normalization, feature selection, and visualization: Normalize data, identify highly variable genes, and prepare data for downstream analyses, including UMAP visualization.
  • Clustering and integration: Construct neighborhood graphs, perform clustering, identify marker genes, and optionally integrate data across batches using scvi-tools for batch correction.

Quick Start

Activate the Scanpy conda environment and run a standard workflow to load an .h5ad file and begin analysis. For example:

  • conda activate scanpy
  • python -c "import scanpy as sc; adata = sc.read_h5ad('path/to/file.h5ad'); print(adata.shape)"

Frequently Asked Questions about scanpy-single-cell-analysis

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

FAQPage Schema
How do I analyze single-cell RNA-seq data from an h5ad file using Scanpy?

To analyze single-cell RNA-seq data, load your .h5ad file using Scanpy within a dedicated conda environment. The workflow then handles quality control, normalization, dimensionality reduction, clustering, and marker identification.

What is the best way to perform batch correction on single-cell data with scvi-tools?

Batch correction on single-cell data uses scvi-tools to integrate data across batches. This optional workflow requires batch information to be present in the AnnData object to successfully correct for batch effects.

Do I need a specific conda environment to run Scanpy workflows for h5ad data?

Yes, you need a dedicated conda environment named 'scanpy' with both Scanpy and scvi-tools installed. This setup ensures all dependencies for single-cell analysis and batch integration are correctly resolved.

How does quality control filtering work for single-cell gene counts in Scanpy?

Quality control in Scanpy assesses single-cell data metrics and filters cells based on gene counts and mitochondrial content. This removes low-quality cells before normalization and downstream clustering.

Can I identify marker genes after clustering single-cell data in an h5ad file?

Yes, after constructing neighborhood graphs and performing clustering on normalized single-cell data, the workflow identifies marker genes. This helps characterize the distinct cell populations discovered.