xena-tcga-gene-query
Query TCGA tumor biology through the ucscxenatoolspy API.
Skill by lishensuo
Chalk Labs
Need help deploying xena-tcga-gene-query?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/clawbio-xena-tcga-gene-query
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/xena-tcga-gene-query
What's inside
- Skill name
xena-tcga-gene-query- Description
- Query TCGA tumor biology through the ucscxenatoolspy API. Supports tumor-vs-normal differential expression, gene-gene correlation, survival association, and cancer catalogue browsing across 30+ TCGA cancer types.
- License
- MIT
- Metadata
- author: lishensuo · domain: cancer-genomics · version: 0.1.0
- Instructions
- 302 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions call the network
Files (6)
- SKILL.md
- demo_output.md · examples/
- api.md · references/
- tcga_codes.md · references/
- query_tcga_api.py · scripts/
- test_query.py · tests/
SKILL.md (first lines)
# 🦀 xena-tcga-gene-query 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. ## Trigger **Fire this skill when the user says any of:** - "Is TP53 upregulated in LUAD?" - "Are EGFR and KRAS co-expressed in lung cancer?" - "Does HER2 expression affect breast cancer survival?" - "What cancers have normal tissue controls?" - "Show me correlation between TP53 and MDM2 in GBM" - "Is there a survival difference for high vs low PD-L1 in melanoma?" - "TP53在肺癌中的作用" - "EGFR和肺癌有什么关系" - "HER2在乳腺癌预后如何" - "KRAS和TP53在胰腺癌中是否共表达?" - "列出所有可以做差异表达分析的癌症" - "PD-L1高表达是否影响黑色素瘤患者生存?" - "肝癌中MET和EGFR的相关性如何?" - Any question about a gene's expression, correlation, or survival association in a specific TCGA cancer type **Do NOT fire when:** - The user asks about general gene function or pathway biology without a cancer context — this is for TCGA data queries, not literature review. - The user wants variant-level annotation — route to `variant-annotation` or `clinical-variant-reporter`. - The user asks for drug-gene interactions — route to `pharmgx-reporter` or `clinpgx`. - The user has their own expression data to analyse — route to `rnaseq-de` for bulk RNA-seq differential expression. ## Why This Exists - **Without it**: Users must navigate the UCSC Xena browser manually, write custom API calls, and interpret raw JSON. Multi-step queries (diff-expr + survival + correlation for one gene) compound the friction. - **With it**: One natural-language question routes to the correct API endpoints, normalises cancer names to TCGA codes, resolves gene aliases, and returns a synthesised report with proper statistical framing. - **Why ClawBio**: The API returns structured JSON suitable for chaining; the skill enforces cautious interpretation of p-values, sample sizes, and exploratory cutoffs that raw API consumers often misreport. ## Core Capabilities 1. **Cancer catalogue**: List 30+ TCGA cancer types with tumor/normal sample counts. 2. **Differential expression**: Compare tumor vs normal expression (Mann-Whitney U, log2-fold change) for one gene in one cancer. 3. **Gene-gene correlation**: Spearman rank correlation between two genes in primary tumor samples. 4. **Survival association**: Log-rank tests across OS, DSS, DFI, and PFI endpoints with median and exploratory optimal cutoffs. ## Scope **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. ## Input Formats | 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` | ## Workflow When the user asks a gene-cancer question: 1. **Check API health** (prescriptive): try `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. 2. **Map cancer name to TCGA code** (prescriptive): use the natural-language mapping table and `references/tcga_codes.md`. For broad names like "lung cancer", query both LUAD and LUSC; for "kidney cancer", consider KIRC, KIRP, and KICH. 3. **Determine which endpoints to call** (flexible): "Is gene X upregulated?" → diff-expr. "Are X and Y co-expressed?" → corr. "Is X prognostic?" → survival. Broad questions like "What is the role of X in Y cancer?" → diff-expr + survival; add correlation if a second gene is mentioned. 4. **Execute queries** (prescriptive): use `curl` or the helper script. Wait for all results before synthesising. 5. **Report** (prescriptive for numbers, flexible for narrative): state sample sizes before effect sizes, p-values as associations not causality, mention alias resolution if any. For survival, distinguish median cutoff from exploratory optimal cutoff. **Freedom level guidance:** - For API endpoints, parameter names, cancer code mapping, and statistical framing: be prescriptive. Every step must be exact. - For narrative synthesis across endpoints and biological contextualisation: give guidance but leave room for the model to reason and compose. ## CLI Reference ```bash # 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 ``` ## Demo ```bash 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. ## Algorithm / Methodology So an LLM agent can apply the same logic without the script: 1. **Health check**: GET `/health` on each candidate base URL in order (biotree → render → localhost). Stop at the first 200 response. 2. **Cancer name mapping**: match user's natural-language cancer name against the mapping table in SKILL.md and the full code list in `references/tcga_codes.md`. For ambiguous broad names, query multiple subtypes. 3. **Gene alias resolution**: the API resolves common aliases (e.g. HER2 → ERBB2). Always report the `gene_input` → `gene` mapping when it occurs. 4. **Differential expression**: Mann-Whitney U test on log2(TPM + 0.001) expression values. Report tumor n, normal n, log2 fold change, and p-value. 5. **Correlation**: Spearman rank correlation on primary tumor samples. Report n, rho, and p-value. 6. **Survival**: log-rank test with median-split and minimum-p optimal cutoffs across OS/DSS/DFI/PFI. Frame optimal-cutoff p-values as exploratory (not adjusted for multiple cutoff testing).
From ClawBio/ClawBio, MIT.
More from ClawBio/ClawBio
- 0.825score
polars-bio
ClawBio (adapted from K-Dense scientific-agent-skills/polars-bio)
Fast genomic interval operations (overlap, nearest, merge, coverage, cluster, complement, subtract, count-overlaps), multi-format bioinformatics I/O…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
ena-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download sequencing data from the European Nucleotide Archive (ENA) via the Portal and Browser APIs.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
gwas-sumstats-harmonize
AlsammanAlsamman
Harmonize GWAS summary statistics from any common format (GWAS-Catalog SSF, PLINK 1.9/2, REGENIE, METAL, BOLT, SAIGE) to one canonical table (SNP CHR BP EA…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
pride-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download data from the PRIDE Archive, EMBL-EBI's proteomics identifications database, via the PRIDE Archive REST API v3.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
ukb-ppp-region-fetch
ClawBio
Fetch a regional slice of plasma pQTL summary statistics from the UK Biobank Pharma Proteomics Project (UKB-PPP; Sun 2023 Nature) for a specific (protein…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
wgs-prs
David de Lorenzo
End-to-end WGS to polygenic risk score pipeline.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
geo-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download data from the NCBI Gene Expression Omnibus (GEO).
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
gi-expression
ClawBio + Genomic Intelligence
Predict tissue / cell-type expression (log TPM + TPM) from 9,198–500,000 bp of DNA around a TSS, at least 4,599 bp each side (anything but exactly 9,198 bp…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
protocols-io
ClawBio Contributors
Search, browse, and retrieve scientific protocols from protocols.io via REST API.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
prs-applicability-gate
Rinat Rizvanov
Deterministic gate for ONE already-computed polygenic score result and ONE person: returns SUPPORTED (raw score, standardised score and reference percentile…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
eqtl-catalogue-region-fetch
ClawBio
Fetch a region of cis-eQTL summary statistics from EBI eQTL Catalogue v7+ via tabix-on-FTP.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
biostudies-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download data from EMBL-EBI BioStudies, the database that describes biological studies and links their data across collections…
SkillAFreshness: A★ 1.2KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 1,166
- Forks
- 288
- Open issues
- 27
- Last commit (this folder)
- Jul 12, 2026 (3 months ago)
- Last release
- Sep 11, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 0.1.0
- License
- MIT
- Repository
- github.com/ClawBio/ClawBio
- Website
- clawbio.github.io/ClawBio/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get xena-tcga-gene-query running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
xena-tcga-gene-query skill. Agent Mart. https://agentmart.dev/skills/clawbio-xena-tcga-gene-query (last updated 2026-10-24)