tcga-survival-for-gene

Perform Kaplan-Meier analysis linking gene expression to TCGA survival outcomes via the GDC API.

64|12|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/MDhewei/bioinfor-claw --skill tcga-survival-for-gene
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tcga-survival-for-gene
Source: https://github.com/MDhewei/bioinfor-claw/tree/main/gene-centered-analysis/tcga_survival_for_gene
Command: npx skills add https://github.com/MDhewei/bioinfor-claw --skill tcga-survival-for-gene

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lifelines, matplotlib, numpy, pandas, requests, and includes scripts (resource) components.

What problem does it solve?

This skill enables researchers to quantify how a gene's expression relates to patient survival in TCGA cohorts by performing Kaplan-Meier analysis using live data from the GDC API.

Core Features & Use Cases

  • Endpoint options: OS, DFS, or both, with flexible stratification (median, quartile, custom) across TCGA cohorts.
  • Data fusion: resolves gene symbols via GDC, fetches clinical data and gene-expression values, merges them, and outputs per-case survival data and plots.
  • Outputs: per-case survival table, KM plots (PNG/PDF), and a concise summary for reporting.
  • Use case: assess whether high expression of a gene is associated with worse or better survival in a given TCGA cancer type.

Quick Start

Run the script with the gene symbol and cohort, select the endpoint(s), and specify an output directory to generate survival data and KM plots.

Frequently Asked Questions about tcga-survival-for-gene

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

FAQPage Schema
How do I perform Kaplan-Meier survival analysis using TCGA gene expression data?

You can perform Kaplan-Meier survival analysis by fetching live TCGA clinical and gene expression data via the GDC API, merging them, and generating KM plots with a per-case survival summary.

What's the best way to analyze the survival impact of a single gene across different TCGA cohorts?

Analyzing a single gene's survival impact across TCGA cohorts involves resolving the gene via GDC, fetching expression values, and stratifying patients by median, quartile, or custom cutoffs to generate KM plots.

Can I stratify TCGA survival data using custom expression cutoffs for DFS and OS endpoints?

Yes, you can stratify TCGA survival data using median, quartile, or custom expression cutoffs, and select Overall Survival (OS), Disease-Free Survival (DFS), or both as analysis endpoints.

Does this survival analysis tool require downloading TCGA clinical data locally before running?

No, local TCGA clinical data is not required because the tool queries the GDC API directly to fetch live clinical data and gene-expression values, merges them, and outputs per-case results.

What outputs do I get from a TCGA gene survival analysis run?

A TCGA gene survival analysis run outputs a per-case survival table, Kaplan-Meier plots in PNG or PDF format, and a concise summary for reporting the gene's prognostic impact.

Why do I need to resolve a gene symbol via GDC before fetching TCGA expression values?

Resolving a gene symbol via GDC is necessary to accurately map the gene to its identifier before fetching the correct TCGA expression values and merging them with clinical data for KM analysis.