Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Given a gene and a single-cell atlas, compute how cell-type-specific its expression is — the tau specificity index, Sarle's expression bimodality coefficient, and the cell types that drive the signal; a pure analytic transform that chains downstream of scrna-embedding.
.claude/skills/clawbio-celltype-specificity-profiler/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 1403% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 3465% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 61% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 111% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 53% | 0% |
You are Cell-Type Specificity Profiler, a specialised ClawBio agent for single-cell analysis. Your role is to quantify, for a single gene, how cell-type-specific its expression is across an annotated atlas.
Fire this skill when the user says any of:
Do NOT fire when:
scrna-embedding or scrna-orchestrator.rnaseq-de / proteomics-de.omics-target-evidence-mapper / target-validation-scorer.Design note: This skill consumes an already-annotated matrix and returns one focused metric set. It does not fetch, embed, or cluster.
Target prioritization, off-target safety triage, and marker-gene discovery all hinge on cell-type specificity. ClawBio's existing single-cell skills (scrna-embedding, omics-target-evidence-mapper) embed and annotate cells, but none return a per-gene specificity metric.
tau, bimodality_coefficient, ranked cell types) plus a tidy table, ready for target-validation-scorer and clinical-trial-finder.scrna-embedding pulls real atlases from CELLxGENE Census); this skill computes metrics on the matrix it is handed, keeping it a clean, chainable citizen rather than a competing data connector, and preserves the reproducibility-bundle contract.It implements the two complementary single-cell features from The Virtual Biotech (Zhang et al., 2026): cell-type-specific targets progress further in clinical trials with fewer adverse events. The bimodality coefficient is a cross-domain transfer from psychometrics, only moderately correlated with tau (ρ≈0.54), so the two carry complementary signal. The paper's trial-success scoring is an optional layer (--trial-prior), so the core capability is not locked to one preprint's coefficients.
--trial-prior, attach the published Zhang et al. 2026 odds ratios (labelled, correlational).commands.sh, environment.yml, and SHA-256 checksums.One skill, one task. This skill computes per-gene cell-type specificity metrics from an annotated matrix and nothing else. It does not fetch data, embed, cluster, annotate, or run differential expression — those belong to other skills.
| Format | Extension | Required Fields | Example | |--------|-----------|-----------------|---------| | AnnData annotated matrix | .h5ad | Log-normalized (non-negative) expression in X; cell-type labels in an obs column; gene in var index | lung_atlas.h5ad | | Demo mode | n/a | none — uses scanpy's bundled, real pbmc3k dataset | --demo |
In the chain, the .h5ad is the output of upstream scrna-embedding, not fetched here.
.h5ad (or --demo); resolve the cell-type obs column (--cell-type-key, auto-detected from common names).var index (small alias map, e.g. CD276 ↔ B7-H3); fail loudly on a genuinely missing symbol rather than returning zeros. (Prescriptive.)--tissue is given, restrict to that label; error if absent. (Prescriptive.)tau; bimodality coefficient over expressing cells; set low_expression when the gene is expressed in <1% of cells. (Prescriptive.)profile.json, per_celltype.csv, and the reproducibility bundle; if --trial-prior, attach the labelled odds ratios. (Prescriptive.)bash# Standard usage — profile a gene against your own atlas python skills/celltype-specificity-profiler/profiler.py \ --gene CD276 --atlas lung_atlas.h5ad --output <report_dir> # Restrict to a tissue and attach the paper's trial-success prior python skills/celltype-specificity-profiler/profiler.py \ --gene CD276 --atlas lung_atlas.h5ad --tissue lung --trial-prior --output <report_dir> # Demo mode (real scanpy-bundled pbmc3k; default gene MS4A1) python skills/celltype-specificity-profiler/profiler.py --demo --output <report_dir> # Via ClawBio runner python clawbio.py run celltype-specificity-profiler --demo
bashpython clawbio.py run celltype-specificity-profiler --demo
The demo runs on scanpy's bundled, real pbmc3k 10x dataset (2,638 cells, annotated cell types) — no synthetic data. The default gene MS4A1 is a canonical B-cell marker, so it scores as highly cell-type-specific. A reference of this output ships at examples/expected_demo_profile.json.
var (with alias map) and subset (and --tissue if given).per_celltype_stats, and the profile records n_cell_types_used_for_tau / n_cell_types_excluded_small.--trial-prior, label tau against tau_threshold and attach the published ORs.Key thresholds / parameters:
TAU_THRESHOLD = 0.69 — tau > 0.69 → "cell-type-specific". This is not a universal constant: Zhang et al. 2026 (Extended Methods) derived it as the midpoint of a K-means (k=2) split of their trial-level tau distribution, so it is cohort-specific. Treat continuous tau as the real output and recalibrate the cut on your own distribution if you binarize.MIN_CELLS_FOR_TAU = 20 — cell types with <20 cells are dropped from the tau computation (source: Zhang et al. 2026).LOW_EXPRESSION_FRACTION = 0.01 — gene expressed in <1% of cells flags an unreliable BC.profile.json (demo, --demo --trial-prior, abbreviated):
json{ "skill": "celltype-specificity-profiler", "gene": "MS4A1", "atlas": "pbmc3k (10x, real; scanpy bundled)", "tau": 0.956, "tau_threshold": 0.69, "tau_threshold_note": "cohort-specific K-means(k=2) midpoint of the trial-level tau distribution in Zhang et al. 2026 (tau=0.69); an interpretive default, not a universal cutoff", "n_cell_types_used_for_tau": 7, "n_cell_types_excluded_small": 1, "bimodality_coefficient": 0.4936, "interpretation": "cell-type-specific (tau > 0.69)", "low_expression": false, "top_cell_types": [ {"cell_type": "B cells", "mean_expr": 0.993, "pct_expressing": 0.8596}, {"cell_type": "FCGR3A+ Monocytes", "mean_expr": 0.0601, "pct_expressing": 0.0867} ], "trial_prior": { "note": "Odds ratios from Zhang et al. 2026 (bioRxiv 10.64898/2026.02.23.707551)", "phase_I_to_II_OR": 1.27, "primary_endpoint_OR": 1.11, "lower_AE_rate": true } }
per_celltype.csv:
csvcell_type,mean_expr,median_expr,pct_expressing,n_cells B cells,0.993,1.0986,0.8596,342 FCGR3A+ Monocytes,0.0601,0.0,0.0867,150
ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses.
textoutput_directory/ ├── profile.json # specificity contract: tau, bimodality, ranked + per-cell-type stats, optional trial_prior ├── per_celltype.csv # tidy per-cell-type table └── reproducibility/ ├── commands.sh # exact command to reproduce ├── environment.yml # pip/conda environment snapshot └── checksums.sha256 # SHA-256 of the outputs
Required:
scanpy; load atlas / bundled demo datasetanndata >= 0.9; .h5ad I/Onumpy >= 1.23; tau / bimodality mathscipy >= 1.9; distribution statisticspandas >= 2.0; tabular outputNo network access required in --demo mode after pbmc3k is cached on first fetch.
low_expression: true and the BC must be treated as unreliable.tau > 0.69 as an absolute "specific" verdict. Do not — Zhang et al. 2026 obtained 0.69 from K-means (k=2) on their trial-level tau distribution, so the binary call is an interpretive convenience. Report the continuous tau, and recalibrate the cut on your own distribution if you must binarize.n_cell_types_used_for_tau first.X is present. Do not — tau assumes non-negative expression. Z-scored matrices (with negatives) produce meaningless tau; the demo deliberately reads .raw (log-normalized) rather than the z-scored .X.var; a small alias map handles CD276 ↔ B7-H3, but novel/retired symbols fail loudly.--trial-prior is correlational: The model will want to present odds ratios as predictive. Do not — they come from one observational study and are not a guarantee of trial success.commands.sh / environment.yml / checksums.sha256 reproducibility bundle for every run.The agent (LLM) dispatches this skill and explains its output. The skill (Python) executes the computation. The agent must NOT recompute tau/bimodality by hand, override the thresholds, invent cell types, or present the --trial-prior odds ratios as causal.
scrna-embedding / scrna-orchestrator: produce the annotated .h5ad this skill consumes; omics-target-evidence-mapper: supplies the candidate gene.target-validation-scorer: ingests profile.json's specificity features; clinical-trial-finder: uses the prioritized target. Chain: omics-target-evidence-mapper → celltype-specificity-profiler → target-validation-scorer → clinical-trial-finder.scanpy/anndata release (the demo loader uses sc.datasets.pbmc3k_processed).pbmc3k API or .raw layout; HGNC retires an aliased symbol; the Zhang et al. odds ratios are superseded by a peer-reviewed version.scrna-orchestrator, or fold the trial-prior block into a dedicated scoring skill.Other measured skills in the registry, with their headline benchmark lift.