Skip to content
Back to skills

Scanpy Qc Starter

ASecurity

Use this skill to run a lightweight Scanpy QC pass on a toy count matrix with the repository-managed Scanpy environment.

  • 38 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
ai-agentspythonangularapi

Works with

  • api

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add ma-compbio-lab/SkillFoundry --skill scanpy-qc-starter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Scanpy Qc Starter?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Scanpy Qc Starter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ma-compbio-lab-scanpy-qc-starter/badge)](https://www.skillsdirectory.com/skills/ma-compbio-lab-scanpy-qc-starter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: scanpy-qc-starter
description: Use this skill to run a lightweight Scanpy QC pass on a toy count matrix with the repository-managed Scanpy environment.
---

## Purpose
Provide a reproducible starting point for Scanpy-based QC work with toy matrix inputs, AnnData export, and a small verification report.

## When to use
- You want to verify Scanpy and AnnData on this repository.
- You need a minimal example layout for single-cell QC work.

## When not to use
- You need GPU-backed modeling or integrated single-cell workflows.

## Inputs
- Tab-separated matrix with gene names in the first column and sample or cell columns after that

## Outputs
- Summary statistics about matrix dimensions and zero fraction
- QC summary JSON with per-cell metrics
- Optional `.h5ad` artifact

## Requirements
- `slurm/envs/scanpy`
- Run with `slurm/envs/scanpy/bin/python`

## Procedure
1. Inspect `examples/toy_counts.tsv`.
2. Run `python3 skills/transcriptomics/scanpy-qc-starter/scripts/preflight_counts.py --input skills/transcriptomics/scanpy-qc-starter/examples/toy_counts.tsv`.
3. Run `slurm/envs/scanpy/bin/python skills/transcriptomics/scanpy-qc-starter/scripts/run_scanpy_qc.py --input skills/transcriptomics/scanpy-qc-starter/examples/toy_counts.tsv --summary-out skills/transcriptomics/scanpy-qc-starter/assets/scanpy_qc_summary.json --h5ad-out scratch/scanpy/toy_counts_qc.h5ad`.
4. Inspect `total_counts`, `n_genes_by_counts`, and `pct_counts_mt` in the summary output.

## Validation
- Preflight script exits successfully.
- Reported dimensions match the example matrix.
- Scanpy writes a valid `.h5ad` file.
- QC summary includes per-cell metrics.

## Failure modes and fixes
- Ragged rows: normalize the input to a rectangular TSV.
- Non-numeric counts: clean or coerce the count columns before QC.
- Missing Scanpy environment: recreate `slurm/envs/scanpy` and rerun with that interpreter.

## Safety and limits
- This is a lightweight QC starter, not a full single-cell analysis workflow.
- Toy matrices are for environment verification and examples only.

## Examples
- `python3 .../preflight_counts.py --input skills/transcriptomics/scanpy-qc-starter/examples/toy_counts.tsv`
- `slurm/envs/scanpy/bin/python .../run_scanpy_qc.py --input skills/transcriptomics/scanpy-qc-starter/examples/toy_counts.tsv --summary-out scratch/scanpy/summary.json --h5ad-out scratch/scanpy/toy_counts.h5ad`

## Provenance
- Scanpy docs: https://scanpy.readthedocs.io/en/stable/
- Scanpy installation docs: https://scanpy.readthedocs.io/en/stable/installation.html
- Scanpy QC metrics API: https://scanpy.readthedocs.io/en/stable/generated/scanpy.pp.calculate_qc_metrics.html
- AnnData docs: https://anndata.readthedocs.io/en/latest/index.html
- scvi-tools docs: https://docs.scvi-tools.org/en/latest/index.html

## Related skills
- `snakemake-toy-workflow-starter`

Files in this skill

  • SKILL.md2.8 KB
  • assets/README.md94 B
  • assets/scanpy_qc_summary.json549 B
  • assets/toy_counts_qc.h5ad19.7 KB
  • assets/toy_counts_summary.json80 B
  • examples/README.md259 B
  • examples/toy_counts.tsv75 B
  • metadata.yaml1.2 KB
  • refs.md425 B
  • scripts/preflight_counts.py1.7 KB
  • scripts/run_scanpy_qc.py3.2 KB
  • tests/README.md464 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.