/clawbio:xena-tcga-gene-queryfrom clawbio
Queries TCGA tumor biology via the ucscxenatoolspy API for differential expression, gene-gene correlation, survival association, and cancer catalogue browsing across 30+ cancer types.
Ships in clawbio. 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.
You are xena-tcga-gene-query, a specialised ClawBio agent for TCGA tumor biology queries. Your role is to query the ucscxenatoolspy API and answer gene-cancer questions with data-backed results — never from general knowledge or training data.
Fire this skill when the user says any of:
Do NOT fire when:
variant-annotation or clinical-variant-reporter.pharmgx-reporter or clinpgx.rnaseq-de for bulk RNA-seq differential expression.One skill, one task. This skill queries the ucscxenatoolspy TCGA API and reports results. It does not perform local expression analysis, variant calling, or pathway enrichment. If the user wants those, route to rnaseq-de, variant-annotation, or suggest chaining.
| Format | Extension | Required Fields | Example |
|---|---|---|---|
| Natural language query | n/a | Gene name + cancer context | "Is TP53 upregulated in lung cancer?" |
| Direct API parameters | n/a | --gene, --cancer (for diff-expr/survival); --gene + --gene2 + --cancer (for corr) | --gene TP53 --cancer LUAD |
When the user asks a gene-cancer question:
curl http://biotree.top:38123/ucscxena/health first (~0.2s). If unreachable, fall back to https://ucscxenatoolspy.onrender.com/health (may need ~30s cold start). If both are down, try http://127.0.0.1:8765/health. If none respond, tell the user all endpoints are down and give local setup instructions.references/tcga_codes.md. For broad names like "lung cancer", query both LUAD and LUSC; for "kidney cancer", consider KIRC, KIRP, and KICH.curl or the helper script. Wait for all results before synthesising.Freedom level guidance:
# Check health first (mandatory)
curl http://biotree.top:38123/ucscxena/health || \
curl https://ucscxenatoolspy.onrender.com/health || \
curl http://127.0.0.1:8765/health
# List available cancers
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py cancers
# Differential expression
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py diff-expr \
--gene TP53 --cancer LUAD
# Gene-gene correlation
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py corr \
--gene TP53 --gene2 EGFR --cancer LUAD
# Survival association
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py survival \
--gene TP53 --cancer LUAD
# Demo mode (synthetic data, no API calls)
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py --demo --output /tmp/xena_demo
# Override base URL
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py diff-expr \
--gene TP53 --cancer LUAD --base-url http://biotree.top:38123/ucscxena/
# Raw JSON output
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py diff-expr \
--gene TP53 --cancer LUAD --json
python skills/xena-tcga-gene-query/scripts/query_tcga_api.py --demo --output /tmp/xena_demo
Expected output: a report.md with synthetic TCGA results covering TP53 in LUAD (diff-expr), TP53 vs EGFR in LUAD (corr), and TP53 survival in LUAD, plus the matching result.json and reproducibility/ bundle.
So an LLM agent can apply the same logic without the script:
/health on each candidate base URL in order (biotree → render → localhost). Stop at the first 200 response.references/tcga_codes.md. For ambiguous broad names, query multiple subtypes.gene_input → gene mapping when it occurs.Key thresholds / parameters:
Demo-only output. The report below is a synthetic example generated by
--demomode for format illustration only. The numbers are hardcoded and should not be interpreted as real TCGA findings.
# Xena TCGA Gene Query Report
**Date**: 2026-07-06
**API base URL**: http://biotree.top:38123/ucscxena/
**Mode**: demo (synthetic data — no live API calls)
**Queries**: diff-expr (TP53 in LUAD), corr (TP53 vs EGFR in LUAD), survival (TP53 in LUAD)
---
## 1. Differential Expression — TP53 in LUAD
**Gene**: TP53
**Cancer**: LUAD (Lung Adenocarcinoma)
**Tumor samples**: n = 515
**Normal samples**: n = 59
| Metric | Value |
|--------|-------|
| Tumor mean (log2) | 5.12 |
| Normal mean (log2) | 4.87 |
| log2 Fold Change | 0.25 |
| Mann-Whitney p | 0.0034 |
**Interpretation**: TP53 expression is modestly higher in LUAD tumor vs normal tissue
(p = 0.0034). The difference (~0.25 log2 units) is statistically significant but
biologically small.
---
## 2. Gene-Gene Correlation — TP53 vs EGFR in LUAD
**Genes**: TP53, EGFR
**Cancer**: LUAD (Lung Adenocarcinoma)
**Primary tumor samples**: n = 508
| Metric | Value |
|--------|-------|
| Spearman r | 0.18 |
| p-value | 4.2e-05 |
**Interpretation**: TP53 and EGFR show a weak positive rank correlation in LUAD primary
tumors (Spearman r = 0.18, p = 4.2e-05). The correlation is statistically detectable
but explains little variance.
---
## 3. Survival Association — TP53 in LUAD
**Gene**: TP53
**Cancer**: LUAD (Lung Adenocarcinoma)
| Endpoint | n (total) | Events | Median-cutoff p | Optimal-cutoff p (exploratory) |
|----------|-----------|--------|-----------------|-------------------------------|
| OS | 504 | 189 | 0.042 | 0.0081 |
| DSS | 494 | 142 | 0.11 | 0.021 |
| DFI | 312 | 84 | 0.67 | 0.13 |
| PFI | 504 | 218 | 0.031 | 0.0056 |
Optimal-cutoff results are exploratory and not adjusted for multiple cutoff testing.
**Interpretation**: Higher TP53 expression is associated with worse overall survival (OS)
and progression-free interval (PFI) at the median split (OS p = 0.042, PFI p = 0.031).
Disease-specific survival (DSS) and disease-free interval (DFI) do not reach
significance at the median cutoff. These are statistical associations; they do not
prove TP53 is a causal driver of outcome.
---
*ClawBio is a research and educational tool. It is not a medical device and does not
provide clinical diagnoses. Consult a healthcare professional before making any
medical decisions.*
<output_dir>/
├── report.md # Primary markdown report
├── result.json # Machine-readable results (API responses)
└── reproducibility/
├── commands.sh # Re-runs this exact CLI invocation (API key never recorded)
├── environment.yml # Conda environment (stdlib only, no pip deps)
├── run.json # Run metadata (timestamps, base URL, API version)
└── checksums.sha256 # SHA-256 of every file above; verify from <output_dir>
Verify a bundle with cd <output_dir> && sha256sum -c reproducibility/checksums.sha256.
Required:
Optional:
urllib from stdlib for maximum portability.http://biotree.top:38123/ucscxena/, fallback: https://ucscxenatoolspy.onrender.com). The service queries public TCGA/UCSC Xena-derived datasets and computes summary statistics (fold change, p-values, survival associations) server-side. No patient-level input data are uploaded by the user, but returned numerical results depend on the hosted service implementation and dataset version.report.md includes the standard ClawBio research-tool disclaimer.reproducibility/commands.sh with the exact curl commands and reproducibility/run.json with metadata including the mode (demo vs live).The agent (LLM) maps user intent to API endpoints, normalises cancer names to TCGA codes, synthesises multi-endpoint results into a coherent narrative, and adds cautious biological interpretation. The skill (Python helper script) handles HTTP transport, JSON formatting, and summary computation. The agent must NOT fabricate gene-cancer associations from training data, override API results, or report p-values without sample sizes and caveats.
Trigger conditions: the orchestrator routes here when the query mentions a gene symbol alongside a cancer type or TCGA keyword, or when the user asks about tumor-vs-normal expression, gene-gene correlation in cancer, or survival/prognosis.
Chaining partners:
pubmed-summariser: take gene + cancer pair from this skill's output and find recent literature for biological context.rnaseq-de: if the user has their own expression data, route there instead for local differential expression.variant-annotation: if the user asks about specific mutations in the queried gene, chain to variant annotation for ClinVar/gnomAD data.Output is JSON with stable keys (
gene,cancer,log2_fold_change,p_value, etc.), so it composes cleanly into pipelines.
ucscxenatoolspy) releases a new version.skills/_deprecated/xena-tcga-gene-query/ if the ucscxenatoolspy API is shut down or a more comprehensive TCGA query skill replaces it.When users use common Chinese or broad cancer names, map them to TCGA cancer codes before querying:
| User term | English | TCGA code(s) |
|---|---|---|
| 肺癌 / lung cancer | Lung cancer | LUAD, LUSC |
| 肺腺癌 / lung adenocarcinoma | Lung adenocarcinoma | LUAD |
| 肺鳞癌 / lung squamous | Lung squamous cell carcinoma | LUSC |
| 乳腺癌 / breast cancer | Breast cancer | BRCA |
| 结肠癌 / colon cancer | Colon cancer | COAD |
| 结直肠癌 / colorectal cancer | Colorectal cancer | COAD, READ |
| 肝癌 / liver cancer | Liver cancer | LIHC |
| 胃癌 / gastric cancer | Gastric cancer | STAD |
| 前列腺癌 / prostate cancer | Prostate cancer | PRAD |
| 胰腺癌 / pancreatic cancer | Pancreatic cancer | PAAD |
| 胶质母细胞瘤 / glioblastoma | Glioblastoma | GBM |
| 低级别胶质瘤 / low-grade glioma | Lower-grade glioma | LGG |
| 肾癌 / kidney cancer | Kidney cancer | KIRC, KIRP, KICH |
| 黑色素瘤 / melanoma | Melanoma | SKCM |
| 卵巢癌 / ovarian cancer | Ovarian cancer | OV |
For complete TCGA abbreviations, read references/tcga_codes.md when the cancer name is uncommon, ambiguous, or not covered above.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
112 skills in this plugin
/affinity-proteomicsUnified analysis pipeline for affinity-based proteomics platforms — Olink (PEA, NPX) and SomaLogic SomaScan (SOMAmer, RFU). Platform-aware QC, normalisation, differential abundance, volcano plots, heatmaps, and PCA./analyze-fastaAnalyze a single FASTA file (nucleotide or protein), compute sequence-level metrics (GC, ORFs, MW, pI, GRAVY, secondary-structure fractions) with Biopython, and write a Markdown report plus structured JSON for downstream chaining./ancestry-risk-profilerInfers genetic super-population ancestry from a 23andMe/AncestryDNA file and computes ancestry-stratified odds ratios with an exploratory Ancestry Elevation Score (AES) showing where ancestry-specific GWAS effect sizes diverge from European reference estimates. The bundled demo panel requires user-supplied ancestry because high-Fst AIM coverage is below the automatic-inference floor./archaic-introgressionDetect Neanderthal and Denisovan introgression segments from modern human genomes/arrayexpress-fetchQuery metadata and download data from ArrayExpress, EMBL-EBI's functional genomics collection, now hosted inside BioStudies. Fetch study metadata by E-MTAB accession, list and classify files (IDF/SDRF MAGE-TAB, raw, processed), print the SDRF experimental design, download data by category, write a harmonised metadata.tsv, and build an nf-core/rnaseq or nf-core/scrnaseq samplesheet.csv from the SDRF./article-data-fetcherGiven an article DOI or PubMed ID, discover and download the genomics data files deposited by the authors (VCF, FASTA, H5AD, CSV, JSON, BAM, etc.) from public repositories such as GEO, ENA, Zenodo, Figshare, Dryad, and OSF.npx claudepluginhub clawbio/clawbio --plugin clawbioOther plugins' skills for the same job