xena-tcga-gene-query

Query TCGA tumor biology data for differential expression, gene correlation, and survival analysis.

1.1k|257|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/ClawBio/ClawBio --skill xena-tcga-gene-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xena-tcga-gene-query
Source: https://github.com/ClawBio/ClawBio/tree/main/skills/xena-tcga-gene-query
Command: npx skills add https://github.com/ClawBio/ClawBio --skill xena-tcga-gene-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Answering gene-cancer questions normally requires navigating the UCSC Xena browser manually, writing custom API calls, and interpreting raw JSON. This Skill routes natural-language questions to the ucscxenatoolspy TCGA API and returns data-backed results with sample sizes, effect sizes, and cautious statistical framing instead of answers from model training data.

Core Features & Use Cases

  • Differential Expression: Compare tumor vs normal expression for a gene in any of 30+ TCGA cancer types using Mann-Whitney U tests and log2 fold change.
  • Gene-Gene Correlation: Compute Spearman rank correlation between two genes in primary tumor samples.
  • Survival Association: Run log-rank tests across OS, DSS, DFI, and PFI endpoints with median and exploratory optimal cutoffs.
  • Use Case: Ask "Is TP53 upregulated in lung cancer?" and receive a report covering LUAD and LUSC with tumor/normal sample counts, fold change, p-values, and a reproducibility bundle containing the exact curl commands used.

Quick Start

Ask the agent whether a specific gene is upregulated, co-expressed with another gene, or associated with survival in a given TCGA cancer type, for example "Does HER2 expression affect breast cancer survival?"

Frequently Asked Questions about xena-tcga-gene-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a gene is upregulated in a TCGA cancer type?

Run the diff-expr task with a gene symbol and TCGA cancer code, for example --gene TP53 --cancer LUAD. The API compares tumor vs normal expression with a Mann-Whitney U test and returns sample sizes, log2 fold change, and p-value.

How to test gene-gene co-expression in TCGA tumor samples?

Use the corr task with two gene symbols and a cancer code, such as --gene TP53 --gene2 EGFR --cancer LUAD. The API computes Spearman rank correlation across primary tumor samples and reports n, correlation coefficient, and p-value.

Does the skill work without internet access or when the API is down?

Yes, a --demo mode generates synthetic example output with no API calls. For live queries, the skill checks health endpoints in order (biotree, render.com fallback, localhost) and reports if all endpoints are unreachable.

What Python dependencies does the TCGA query script require?

Only Python 3.10 or later with the standard library. The helper script uses urllib for HTTP requests and requires no external packages, making it portable across macOS and Linux environments.

Why are optimal-cutoff survival p-values labeled exploratory?

The optimal cutoff is found by a minimum-p scan across candidate thresholds, so its p-values are not adjusted for multiple cutoff testing. They should be treated as hypothesis-generating, with the median-split result as the primary report.

When should I not use this TCGA query skill?

Do not use it for variant-level annotation, drug-gene interactions, or analysis of your own expression data. Route those to variant annotation, pharmacogenomics, or local RNA-seq differential expression skills instead.