Recipes

Reproducible single-cell RNA-seq analysis pipeline built with scientific agent skills

Discovered from README cross-links · 2 days ago

Research & KnowledgeSoftware & DevOps

Agent-driven scRNA-seq pipeline from raw counts to annotated cell types.

What they did

A computational biology group wanted to standardize how their lab turns raw 10x Genomics count matrices into annotated cell-type calls. Instead of hand-writing another bespoke notebook, they pointed their coding agent at the scientific-agent-skills library and asked it to assemble a pipeline. The agent pulled the relevant procedural skills for single-cell analysis, quality control, dimensionality reduction, clustering, and marker-based annotation, then scaffolded a project with a config file, a numbered step sequence, and a report template. The team ran the pipeline on a public PBMC dataset first as a smoke test, then on their own samples. They iterated with the agent on filtering thresholds and cluster resolution, and had it generate a methods section draft and a figure set from the run artifacts. Everything was committed to git so the exact skill versions and parameters were pinned alongside the data manifest.

How it went

The pipeline ran end to end on both the public test dataset and two in-house samples, producing UMAP embeddings, cluster assignments, and marker gene tables that matched what the team had previously derived by hand. The agent-generated methods draft needed light editing but saved roughly a day of writing. Reproducibility improved because parameters live in a config file rather than scattered notebook cells. Polish level is solid for internal research use; it has not been hardened for external distribution.

Worth knowing

The skills encode general best practices, not lab-specific SOPs, so thresholds still need domain review. Annotation quality depends on reference marker sets the user supplies. The agent can produce plausible-looking but wrong statistical choices if not checked, so a domain expert must review each step. No guarantee of compatibility with non-standard assay chemistries, and heavy compute steps still need a real cluster or GPU box.

Wiring

Install the skills into the agent's skills directory (or reference the repo path) so the agent can discover them. Create a project with config.yaml holding input paths, QC thresholds, and clustering resolution; a steps/ directory with numbered scripts; and a data manifest. The agent reads the skill definitions to decide tool choices (scanpy vs Seurat), writes each step script, and chains them via a Makefile or snakemake rule so outputs flow from raw counts to figures. A final reporting step consumes the run artifacts to draft methods text. Pin the skills repo commit in the project README for reproducibility.

Try it yourself

Using the scientific-agent-skills library, scaffold a reproducible single-cell RNA-seq analysis pipeline in this repo. Steps: (1) read a 10x count matrix from a path in config.yaml; (2) run QC with configurable min genes, max mitochondrial percent, and doublet detection; (3) normalize, select HVGs, scale, PCA, neighbors, UMAP, and Leiden clustering with resolution from config; (4) rank marker genes per cluster and annotate cell types against a marker dictionary I provide; (5) emit a figures/ directory and a results/ directory with cluster tables; (6) generate a methods-section draft from the actual parameters used. Pin skill versions, keep all parameters in config.yaml, and add a smoke test on a small public PBMC subset.

Source

Tools in this stack