/bionexus-reliability:single-cell-rna-qcfrom bionexus-reliability
Implements the scverse community standard single-cell RNA-seq workflow: inspect, MAD QC, scrublet doublet detection, normalization, Harmony/ComBat integration, PCA-UMAP-Leiden clustering, Wilcoxon marker identification, pseudobulk aggregation, and PyDESeq2 differential expression.
Ships in bionexus-reliability. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
single-cell-rna-qc)[!NOTE] Gold Reference Plugin: This skill serves as the canonical reference implementation for all BioNexus analytical tools. All contributors must follow this architecture.
The single-cell-rna-qc skill implements the official scverse community standard workflow for single-cell RNA sequencing data. It strictly enforces the distinction between Execution Fidelity and Scientific Evidence Quality, providing multi-dimensional EvidenceCard validation, input distribution audits, and reproducible provenance sidecars.
The canonical execution path is the modular scverse gold chain:
# 0. Verify environment backend (scanpy, anndata)
python scripts/doctor.py --require-scverse
# 1. Inspect data semantics, sparsity, library size, and log-transformation
python skills/single-cell-rna-qc/scripts/scrna_inspect.py raw.h5ad
# 2. Run the complete canonical pipeline (MAD QC -> norm/log1p -> HVG -> PCA -> Leiden -> markers)
python skills/single-cell-rna-qc/scripts/scrna_pipeline.py raw.h5ad -o clustered.h5ad
# 3. Official doublet detection on raw count layer (scanpy.pp.scrublet)
python skills/single-cell-rna-qc/scripts/scrna_scrublet.py raw.h5ad -o raw_scrub.h5ad
# 4. Pseudobulk aggregation by biological replicate × condition
python skills/single-cell-rna-qc/scripts/scrna_pseudobulk.py clustered.h5ad -o pb.csv --by sample condition --design pb_design.tsv
# 5. Condition Differential Expression (Wald test via PyDESeq2)
python skills/single-cell-rna-qc/scripts/scrna_deseq.py pb.csv --design pb_design.tsv --condition condition --reference control --contrast-level treated -o de.csv
# 6. Generate standardized exploratory figures
python skills/single-cell-rna-qc/scripts/scrna_plot.py clustered.h5ad -o figures/ --color leiden
# 7. Multi-donor DE Evidence Audit (before lab meetings, manuscript submission, or sharing)
bionexus audit-de clustered.h5ad --de-table de.csv -o audit_report.md
| Step | Script | Canonical Backend | Evidence Grade | Output Artifacts |
|---|---|---|---|---|
| Inspect | scrna_inspect.py | anndata + bionexus.integrity | A | JSON summary (sparsity, log-scale check) |
| Convert | scrna_convert.py | scanpy.read_* | A | Standardized .h5ad |
| QC (MAD) | qc_core.py | scanpy / Median Absolute Deviation | A | Filtered .h5ad + QC metrics |
| Doublets | scrna_scrublet.py | scanpy.pp.scrublet only | A | .h5ad with doublet scores (Refuse if missing) |
| Preprocess | scrna_preprocess.py | scanpy.pp.normalize_total, log1p, highly_variable_genes | A | Preprocessed .h5ad |
| Integrate | scrna_integrate.py | harmonypy / scanpy.pp.combat | A | Batch-corrected PCA space |
| Cluster | scrna_reduce_cluster.py | scanpy.tl.pca, neighbors, umap, leiden | A | Clustered .h5ad (Numeric labels only) |
| Markers | scrna_markers.py | scanpy.tl.rank_genes_groups (Wilcoxon) | A | Cluster marker gene rankings table |
| Plot | scrna_plot.py | scanpy.pl / matplotlib | A | umap_leiden.png, dotplot_markers.png, violin_qc.png |
| Subset | scrna_subset.py | anndata slice & stale embedding drop | A | Subsampled .h5ad |
| Pseudobulk | scrna_pseudobulk.py | Sum raw counts over replicate groups | A | Pseudobulk count matrix pb.csv + pb_design.tsv |
| Condition DE | scrna_deseq.py | pydeseq2 (Wald test) | A | Differential expression table de.csv (Refuse if missing) |
leiden: "0", "1", "2").rank_genes_groups) discovers cluster-specific expression within a single dataset.pydeseq2.ambient_rna.py, doublet_detection.py, qc_analysis.py) are legacy Grade C heuristics.scanpy, pydeseq2) is missing, the tool must cleanly return refuse() with EvidenceGrade.ABSTAIN.Every analytical run produces a structured EvidenceCard evaluating the 7 quality dimensions:
{
"method": "scanpy_gold_chain",
"backend": "scanpy",
"evidence_grade": "A",
"conclusion_status": "SUPPORTED",
"evidence_card": {
"execution_fidelity": "A",
"input_integrity": "A",
"assumption_validity": "A",
"statistical_support": "A",
"parameter_robustness": "B",
"cross_method_concordance": "UNTESTED",
"external_validation": "UNTESTED"
},
"limitations": [
"This plugin does not assign cell-type identity. Leiden/KMeans labels are numeric only.",
"Research-use only. Not a clinical diagnostic, not CLIA/CAP validated, and not an authorized medical device."
]
}
The following scripts are maintained solely for backward compatibility. They are not part of the default canonical path:
qc_analysis.py (Replaced by scrna_pipeline.py)doublet_detection.py (Replaced by scrna_scrublet.py)ambient_rna.py (Local NNLS heuristic; not SoupX/CellBender)LICENSE.txt (opens in a new tab)configs/gold_chain.example.json (opens in a new tab)references/r_interop.md (opens in a new tab)references/scverse_qc_guidelines.md (opens in a new tab)scripts/_common.py (opens in a new tab)scripts/ambient_rna.py (opens in a new tab)scripts/doublet_detection.py (opens in a new tab)scripts/qc_analysis.py (opens in a new tab)scripts/qc_core.py (opens in a new tab)scripts/qc_plotting.py (opens in a new tab)scripts/scrna_cluster_stability.py (opens in a new tab)scripts/scrna_convert.py (opens in a new tab)scripts/scrna_deseq.py (opens in a new tab)scripts/scrna_inspect.py (opens in a new tab)scripts/scrna_integrate.py (opens in a new tab)scripts/scrna_markers.py (opens in a new tab)scripts/scrna_pipeline.py (opens in a new tab)scripts/scrna_plot.py (opens in a new tab)scripts/scrna_preprocess.py (opens in a new tab)scripts/scrna_pseudobulk.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub herry423/bionexus --plugin bionexus-reliability10 skills in this plugin
/external-evidence-auditAudit completed results from literature, database, analysis, sequence, structure, or slide capabilities, then optionally assemble an explicitly adjudicated multi-source claim assessment. Passive only; never select tools, infer evidence relationships, or make the final scientific decision./instrument-data-to-allotropeConvert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV using native allotropy or declarative YAML mapping rules. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis./nextflow-developmentPrepare nf-core samplesheets, cluster nextflow.config, and write launch artifacts. nfcore_launch.py only wraps nf-core/rnaseq and nf-core/scrnaseq with optional nextflow -preview. Other pipelines still use generate_samplesheet.py plus a hand-written nextflow run. Does not reimplement the pipelines./provenance-and-auditSHA-256 hashes, environment snapshot, and activity-aware Methods text. Use to attach a reproducibility sidecar to an analysis. Do not use for 21 CFR Part 11, GxP, ALCOA+, or CLIA audit claims./scientific-problem-selectionThis skill should be used when scientists need help with research problem selection, project ideation, troubleshooting stuck projects, or strategic scientific decisions. Use this skill when users ask to pitch a new research idea, work through a project problem, evaluate project risks, plan research strategy, navigate decision trees, or get help choosing what scientific problem to work on. Typical requests include "I have an idea for a project", "I'm stuck on my research", "help me evaluate this project", "what should I work on", or "I need strategic advice about my research"./scvi-toolsTrain official scvi-tools models (scVI/scANVI/totalVI/PeakVI/MultiVI/veloVI) on raw counts after the scRNA gold chain. Use for probabilistic batch integration or those named models. Does not run DestVI/Cell2location. Do not log-normalize before setup_anndata.Other plugins' skills for the same job