Skip to content
Agentmart
Submit a tool

single-cell-rna-qc

Quality-control single-cell RNA-seq count matrices — compute per-cell QC metrics (total counts, detected genes, mitochondrial fraction) and filter low-quality…

Skill by Garhorne0813

IndexedApache-2.0★ 1
Write a review

Chalk Labs

Need help deploying single-cell-rna-qc?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/garhorne0813-single-cell-rna-qc

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Quality-control single-cell RNA-seq count matrices — compute per-cell QC metrics (total counts, detected genes, mitochondrial fraction) and filter low-quality cells using median-absolute-deviation (MAD) outlier detection with a configurable mitochondrial cap. Use when the user asks to QC, filter, or assess single-cell RNA-seq data, detect low-quality cells, or follow scverse/scanpy best practices. Core pipeline is numpy/scipy only; scanpy-based extensions are documented but optional.

Use cases: data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/single-cell-rna-qc

What's inside

Skill name
single-cell-rna-qc
Description
Quality-control single-cell RNA-seq count matrices — compute per-cell QC metrics (total counts, detected genes, mitochondrial fraction) and filter low-quality cells using median-absolute-deviation (MAD) outlier detection with a configurable mitochondrial cap. Use when the user asks to QC, filter, or assess single-cell RNA-seq data, detect low-quality cells, or follow scverse/scanpy best practices. Core pipeline is numpy/scipy only; scanpy-based extensions are documented but optional.
License
Apache-2.0
Instructions
88 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (5)

  • SKILL.md
  • single_cell_rna_qc.py
  • fixtures.json · tests/
  • single_cell_rna_qc_test.py · tests/
  • skill-content.test.ts · tests/

SKILL.md (first lines)

# Single-cell RNA-seq quality control

Compute per-cell QC metrics and filter low-quality cells with MAD-based
outlier detection. Core pipeline runs on a plain counts CSV with
numpy/scipy — no scanpy required.

## When to use

- QC or filtering of single-cell RNA-seq count data
- Detect low-quality cells (low counts, low gene detection, high
  mitochondrial fraction)
- Assess data quality before downstream analysis
- Follow scverse/scanpy QC conventions

Supported input: a counts matrix as CSV with **rows = genes** and
**columns = cells**, plus a gene-identifier first column (header
`gene`/`genes`/`symbol`/`feature`, auto-detected). Pass `--no-gene-column`
for a plain numeric matrix. For `.h5ad` / 10x `.h5` inputs, see the scanpy
extension path below.

## Core pipeline (numpy/scipy)

```bash
python3 single_cell_rna_qc.py counts.csv \
  --output-metrics qc_metrics.json \
  --output-filtered counts.filtered.csv
```

What the script does, in order:

1. **Load** the counts matrix (cells x genes), detecting the gene column.
2. **QC metrics per cell**:
   - `total_counts` — total UMI/counts per cell
   - `n_genes` — number of detected genes (count > 0)
   - `pct_mito` — percentage of counts from mitochondrial genes
     (prefixes `MT-`/`mt-`/`MTRNR`, case-insensitive)
3. **Filter** — keep a cell when ALL hold:
   - `|log1p(total_counts) − median| ≤ n_mads × 1.4826 × MAD` (default 3 MAD)
   - same MAD rule on `n_genes`
   - `pct_mito ≤ max-pct-mito` (default 20%; pass `--max-pct-mito -1` to
     disable the mito cap)
4. **Report** — JSON summary with cells kept/removed and median metrics
   before/after (input vs. kept), plus the filtered counts CSV.

The MAD rule follows the scanpy/scverse convention (`sc.pp.filter_cells` +
outlier detection on log-transformed totals). The script never silently
changes the input: the original matrix is never overwritten, and the output
CSV is always a new file.

## Interpretation guardrails

- Report the JSON summary as-is; do not invent p-values or "quality grades".
- If `cells_removed` is extreme (>50%), say so and suggest checking the
  input for batch effects or multi-sample pooling before filtering harder.
- The mito cap is a **default**, not a law: for datasets where high mito is
  biologically expected (e.g. stressed or low-input samples), re-run with a
  higher cap or none, and state the choice in the response.
- Only the metrics you computed may appear in the report — no phantom
  doublet or ambient-RNA statistics.

## Scanpy extension path (optional)

When the user has `.h5ad` / 10x `.h5` files or wants embeddings/marker
workflows, and `scanpy` is installed, use the standard scverse workflow:
`sc.read_*` → `sc.pp.filter_cells` / `sc.pp.calculate_qc_metrics` (with
`var_names="mt-"` mito detection) → MAD outlier removal → `sc.pl.highly_variable_genes`
and QC violin plots. Verify scanpy availability first; if it is missing,
state that the CSV pipeline above remains available and never fabricate
scanpy output.

## Output conventions

Always end with a compact metrics block:

```text
QC SUMMARY
cells: <kept>/<input> (removed <n>)
median total_counts: <input> -> <kept>
median n_genes: <input> -> <kept>
median pct_mito: <input> -> <kept>
filter: <n_mads> MAD + mito cap <cap>%
filtered matrix: <path>
```

Include the JSON path and filtered CSV path in the reply so the user can
inspect them in the workspace.

From Garhorne0813/pi-science, Apache-2.0.

More from Garhorne0813/pi-science

Signals

Stars
1
Forks
1
Open issues
15
Last commit (this folder)
Aug 3, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Garhorne0813

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get single-cell-rna-qc running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying single-cell-rna-qc?

CallGet help
Cite this page

single-cell-rna-qc skill. Agent Mart. https://agentmart.dev/skills/garhorne0813-single-cell-rna-qc (last updated 2026-10-24)