bulkrna-deconvolution

bulkrna-deconvolution is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 54 tokens per session (1,027 once invoked), scanned A, original, Apache-2.0.

A method for estimating the proportions of cell types in bulk RNA-sequencing samples. Bulk sequencing mixes signals from many cells, so it needs a reference profile or signature matrix for comparison.

In plain words
What is it for?
Use it with a bulk count matrix and a single-cell or signature-matrix reference to estimate per-sample cell-type proportions and produce tables, heatmaps, stacked charts, and a report.
Why use it?
It helps separate changes caused by different cell mixtures from changes within the cells themselves.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tiangzlab/omicsclaw/bulkrna-deconvolution
Any agent
npx skills add TianGzlab/OmicsClaw --skill bulkrna-deconvolution
Clone the repo
git clone --depth 1 https://github.com/TianGzlab/OmicsClaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bulkrna-deconvolution

README.md
[![agentmods](https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/bulkrna-deconvolution.svg)](https://agentmods.dev/skills/tiangzlab/omicsclaw/bulkrna-deconvolution)
Your own site
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/bulkrna-deconvolution"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/bulkrna-deconvolution.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,027 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01027
Opus 5 $0.00027 $0.00513
Sonnet 5 $0.00011 $0.00205
Haiku 4.5 $0.00005 $0.00103

Measured 6d ago against content hash c3062fce2ed0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

bulkrna-deconvolution scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (bulkrna_deconvolution.py, tests/__init__.py, tests/test_bulkrna_deconvolution.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bulkrna/bulkrna-deconvolution/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bulkrna-deconvolution

When to use

Run on a bulk RNA-seq cohort when you have a reference (single-cell profile or signature matrix) and want per-sample cell-type proportions. Built-in NNLS solver is the only backend currently implemented; the wrapper does not call CIBERSORTx or MuSiC.

Inputs & Outputs

Inputs

  • File types: .csv

Outputs

  • tables/dominant_types.csv
  • tables/proportions.csv
  • figures/mean_proportions_pie.png
  • figures/proportions_heatmap.png
  • figures/proportions_stacked.png
  • report.md
  • result.json

Flow

  1. Load bulk matrix (bulkrna_deconvolution.py:368 raises ValueError if --input missing without --demo).
  2. Load reference (:370 raises ValueError if --reference missing without --demo; :76 raises FileNotFoundError if path doesn't exist).
  3. Align gene namespaces between bulk and reference (:131 raises ValueError if no overlap).
  4. Run scipy.optimize.nnls per sample to estimate per-cell-type weights, then row-normalise to proportions.
  5. Render stacked-bar + heatmap; emit tables/proportions.csv + tables/dominant_types.csv.

Gotchas

  • --reference is REQUIRED for non-demo runs. Unlike most bulkrna skills, this one needs two inputs. bulkrna_deconvolution.py:370 raises with "--reference is required when not using --demo" if you forget; no silent fallback.
  • Gene-namespace mismatch is fatal. :131 raises ValueError when bulk and reference share zero gene IDs (typical cause: bulk uses Ensembl, reference uses HGNC symbols). Pre-run bulkrna-geneid-mapping to harmonise.
  • NNLS is the only backend; there is no --method flag. Despite the skill catalog historically advertising CIBERSORTx and MuSiC bridges, the script (bulkrna_deconvolution.py:347-358 argparser) accepts only --input, --output, --demo, --reference. The summary dict (:163-172) records n_genes_shared, n_samples, n_cell_types, cell_types, proportions_df, dominant_types, mean_proportions, residuals — no method field, because there is no choice.
  • Negative residuals are not surfaced as a warning. NNLS by definition produces non-negative weights, but the per-sample reconstruction residuals (saved in result.json["residuals"]) measure how well the linear combination explains the bulk profile. Sanity-check that residuals are small relative to library size; large residuals indicate the reference is missing a major cell type from the bulk.

Read the full file on GitHub · 80 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 80 lines · 54 tokens per session scan A c3062fce2ed0

Subscribe to this mod's changes

bulkrna-deconvolution is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 1,027 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

differential-analysis

Find differentially expressed genes between conditions, regions, or cell types. Use when user wants to compare gene expression, find markers, or identify condition-specific changes. Triggers: "differential expression", "DEG", "marker genes", "compare conditions", "what genes differ", "find markers", "condition…

cafferychen777/ChatSpatial · 74 tokens

functional-analysis

Understand the biological meaning of gene sets through pathway and functional enrichment analysis. Use when user has gene lists (DEGs, markers, SVGs) and wants to know what pathways or functions they represent. Triggers: "pathway analysis", "enrichment", "GSEA", "GO terms", "what pathways", "biological function"…

cafferychen777/ChatSpatial · 87 tokens

troubleshoot

Diagnose and resolve common issues in spatial transcriptomics analysis. Use when analysis fails, produces unexpected results, or user encounters errors. Triggers: "error", "failed", "not working", "issue", "problem", "help", "unexpected result", "debug", "fix", "wrong output".

cafferychen777/ChatSpatial · 65 tokens

cell-composition

Determine cell type composition at each spatial location through deconvolution or annotation. Use when user wants to know what cell types exist, their proportions, or where specific cells are located. Triggers: "cell type composition", "deconvolution", "what cells are here", "cell type proportions", "estimate cell…

cafferychen777/ChatSpatial · 78 tokens

cell-dynamics

Understand cellular differentiation, state transitions, and dynamic processes through trajectory and velocity analysis. Use when user wants to study development, differentiation, cell fate decisions, or temporal dynamics. Triggers: "trajectory", "pseudotime", "RNA velocity", "differentiation", "cell fate", "how do…

cafferychen777/ChatSpatial · 86 tokens

cell-interaction

Analyze cell-cell communication patterns and ligand-receptor interactions in spatial context. Use when user wants to understand how cells communicate, signaling pathways, or intercellular interactions. Triggers: "cell communication", "ligand receptor", "cell-cell interaction", "signaling", "how do cells talk"…

cafferychen777/ChatSpatial · 75 tokens