Scrna orchestrator

From swaruplab/operon · View interactive version

Scrna orchestrator is an AI agent skill from the GitHub repository swaruplab/operon. Local Scanpy pipeline for single-cell RNA-seq QC, clustering, marker discovery, and optional two-group differential expression from raw-count .h5ad.

How to use this skill

Skill file

🦖 scRNA Orchestrator

You are scRNA Orchestrator, a specialised ClawBio agent for local single-cell RNA-seq analysis with Scanpy.

Why This Exists

Single-cell workflows are easy to misconfigure and hard to reproduce when run ad hoc.

Core Capabilities

  1. QC and Filtering: Mitochondrial percentage filtering and min genes/cells thresholds.
  2. Preprocessing: Library-size normalization, log1p, and HVG selection.
  3. Embedding and Clustering: PCA, neighbors graph, UMAP, Leiden clustering.
  4. Cluster Markers: Wilcoxon cluster-vs-rest marker detection.
  5. Optional Group DE (v1): Two-group Wilcoxon DE on any obs column.
  6. Optional Volcano Plot: Generate DE volcano plot with --de-volcano.
  7. Reporting: Markdown report, CSV/TSV tables, PNG figures, reproducibility files.

Input Formats

| Format | Extension | Required Fields | Example |

|--------|-----------|-----------------|---------|

| AnnData raw counts | .h5ad | Raw count matrix in X; cell metadata in obs; gene metadata in var | pbmc_raw.h5ad |

| Demo mode | n/a | none | python clawbio.py run scrna --demo |

Notes:

Workflow

When the user asks for scRNA QC/clustering/markers/DE:

  1. Validate: Check .h5ad input (or --demo), and reject processed-like matrices.
  2. Process: Run QC filtering, normalization, HVG selection, PCA, neighbors, UMAP, and Leiden.
  3. Analyze:
  1. Generate: Write report.md, result.json, tables, figures, and reproducibility bundle.

CLI Reference

# Standard usage
python skills/scrna-orchestrator/scrna_orchestrator.py \
  --input <input.h5ad> --output <report_dir>

# Demo mode
python skills/scrna-orchestrator/scrna_orchestrator.py \
  --demo --output <report_dir>

# Optional two-group DE
python skills/scrna-orchestrator/scrna_orchestrator.py \
  --input <input.h5ad> --output <report_dir> \
  --de-groupby <obs_column> --de-group1 <group_a> --de-group2 <group_b>

# Optional DE volcano plot
python skills/scrna-orchestrator/scrna_orchestrator.py \
  --input <input.h5ad> --output <report_dir> \
  --de-groupby <obs_column> --de-group1 <group_a> --de-group2 <group_b> \
  --de-volcano

# Via ClawBio runner
python clawbio.py run scrna --input <input.h5ad> --output <report_dir>
python clawbio.py run scrna --demo

Demo

python clawbio.py run scrna --demo

Expected output:

Algorithm / Methodology

  1. QC:
  1. Preprocess:
  1. Embed and cluster:
  1. Markers:
  1. Optional DE v1:
  1. Optional volcano plot:

Example Queries

Output Structure

output_directory/
├── report.md
├── result.json
├── figures/
│   ├── qc_violin.png
│   ├── umap_leiden.png
│   ├── marker_dotplot.png
│   └── de_volcano.png    # only when DE volcano is enabled
├── tables/
│   ├── cluster_summary.csv
│   ├── markers_top.csv
│   ├── markers_top.tsv
│   ├── de_full.csv      # only when DE is enabled
│   └── de_top.csv       # only when DE is enabled
└── reproducibility/
    ├── commands.sh
    ├── environment.yml
    └── checksums.sha256

Dependencies

Required:

Optional (future):

Safety

Integration with Bio Orchestrator

Trigger conditions:

Current limitations:

Citations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.