TCGA 通用生存分析

SKILL研究检索
研究检索 未标注权限 许可证不明确
安装这个技能

Chat2Research Al科研工作台:Generalized TCGA survival analysis in R — arbitrary TCGA cancer type x mutation gene x expression gene(s) Kaplan-Meier OS analysis (GDC mutation/expression + Xena clinical). Use when the user asks for TCGA 生存分析, mutation-sample survival plots (EGFR/KRAS/TP53 etc.), or expression-based OS grouping in TCGA cohorts.(Skill由Chat2Research Al科研工作台:https://icell.abiosciences.cn/?source=20e0489c 提供,登录平台可享免费算力和Token及更多分析组学Skills)

一句话选型结论

按资料字段整理

TCGA 通用生存分析是研究检索类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类研究检索 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_7ece4fea/tcga-survival-analysis
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

研究检索
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_7ece4fea仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791672279
正文体量7.3 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
查资料并整理出处

让模型按主题查资料,并把引用来源整理成清单。

网页与文献要点提炼

把长文、论文、网页压成能直接看的要点。

竞品与行业汇总

按关键词汇总竞品动态与行业信息。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在研究检索场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
TCGA 通用生存分析当前 未标注权限 未标注 未标注 未标注 有
寻找技能 浏览器控制 GitHub 仓库 3120.0 万 Codex、Claude、Cursor 有
自我改进 Agent 接触敏感数据 ClawHub 市场 1646.4 万 OpenClaw 有
灵魂追踪 联网访问 GitHub 仓库 758.9 万 Codex、Claude、Cursor 有
自我完善 联网访问 ClawHub 市场 682.9 万 OpenClaw 有
微软代工厂 调用外部服务 GitHub 仓库 661.4 万 Codex、Claude、Cursor 有

SKILL.md 全文

7.3 KB
模型实际读到的说明书原文,来自技能仓库

TCGA 通用生存分析(突变样本 + 表达分组 + OS)

When to use

  • User asks: TCGA 某癌种、某基因突变样本里、某表达基因高低组的生存分析(原需求:TCGA-LUAD + EGFR 突变 + COL1A1/STAB1 表达与预后)。
  • Or: "把 TCGA_analysis.R 泛化" / "换个癌种/基因跑生存分析"。

Canonical script

  • /workspace/yanyali/other_work/PM-202396-hongxuan-288/TCGA-LUAD_analysis/TCGA_analysis_general.R.txt
    (copy in this skill: scripts/TCGA_analysis_general.R.txt; original TCGA_analysis.R is the LUAD/EGFR/COL1A1-STAB1 hardcoded version — NEVER modify it, only use/generalize the general version)
  • R environment: Rscript is NOT in PATH — use /workspace/yanyali/miniconda3/envs/seuratv4/bin/Rscript (has TCGAbiolinks, survminer, ggplot2, survival, dplyr; no optparse → base-R arg parsing).

Usage

R=/workspace/yanyali/miniconda3/envs/seuratv4/bin/Rscript
$R TCGA_analysis_general.R.txt --project TCGA-LUAD --mut_gene EGFR \
    --exp_genes COL1A1,STAB1 --quantiles 0.25,0.5,0.75 \
    --outdir TCGA-LUAD_EGFR_analysis
# 换癌种/基因:
$R TCGA_analysis_general.R.txt --project TCGA-BRCA --mut_gene TP53 \
    --exp_genes ESR1,ERBB2 --outdir TCGA-BRCA_TP53_analysis

Params: --project (any TCGA-*), --mut_gene (Hugo_Symbol, or ALL = any-mutated samples), --exp_genes (comma list), --quantiles (comma list, default 0.5), --outdir, --clinical_url (override Xena URL), --sample_types (default 1 = primary tumor), --exclude (comma barcodes), --overwrite (redownload).

Data flow (same as original)

  1. Mutation: GDCquery "Simple Nucleotide Variation"/"Masked Somatic Mutation"/"Aliquot Ensemble Somatic Variant Merging and Masking" → filter Hugo_Symbol == mut_gene; sample = substr(Tumor_Sample_Barcode,1,15).
  2. Expression: GDCquery "Transcriptome Profiling"/"Gene Expression Quantification"/"STAR - Counts" → assay tpm_unstrand → log2(TPM+1); rowData gene_name as rownames.
  3. Clinical: UCSC Xena clinicalMatrix, auto URL https://tcga-xena-hub.s3.us-east-1.amazonaws.com/download/TCGA.<CANCER>.sampleMap/<CANCER>_clinicalMatrix (verified for LUAD, BRCA; download.file method="libcurl"). Keep sample_type_id in --sample_types; event from vital_status; days: death→days_to_death, censor→days_to_last_followup; OS_time = days/30.4375 (months).
  4. Merge meta + expression by 15-char barcode (inner_join sampleID=Sample) → per gene × quantile: split High/Low at quantile, survfit(Surv(OS_time,event)~Expression), ggsurvplot PDF, logrank p via survdiff → results CSV.

Outputs

<project>_<mut_gene>_mutations.txt, <project>_TPM_exp.rds (cache), <project>_mutations.rds (cache), <cancer>_clinicalMatrix.txt (cache), <project>_<mut_gene>.samples_OS_meta.rds (merged), <gene>_quantile<q>_expression_OS_plot.pdf (KM + risk table), <project>_<mut_gene>_survival_results.csv (gene, quantile, n_samples, n_high, n_low, logrank_p).

Pitfalls (learned the hard way)

  • survminer named palette → "No shared levels found between names(values)..." warnings even when names match strata ("Expression=High" etc.). Fix: use an UNNAMED 2-color vector in level order c("#2166AC", "#B2182B") (Low=blue, High=red) — zero warnings. (Verified: named → 22 warnings, unnamed → 0.)
  • GDC downloads are huge (whole-project MAF + expression). Script caches rds/txt in outdir; reuse unless --overwrite. Real GDC run takes a long time — don't run it as part of a quick test.
  • Barcode lengths differ: mutation MAF = 16-char TCGA-XX-XXXX-01A, expression/Xena = 15-char TCGA-XX-XXXX-01 → always substr(...,1,15) before matching.
  • vital_status encoding varies by cohort (LIVING/DECEASED vs ALIVE/DEAD vs 0/1) — build_meta normalizes all.
  • LUAD had duplicate-sample problems (original script hardcoded 4 exclusions: TCGA-44-6147-01A/01B, TCGA-44-5645-01A/01B) — the general script exposes --exclude AND auto-dedups: the STAR expression matrix can contain multiple aliquots (01A/01B) of the same 15-char sample → duplicated Sample values inflate inner_join results. exp_df[!duplicated(exp_df$Sample), ] removes them with a printed count. Verified: 79 EGFR-mut samples with expression → 4 duplicates removed → 75 → 73 with survival info.
  • Reusing the original run's caches: the old TCGA-LUAD_TPM_exp.rds format is list(exp = raw TPM matrix (Ensembl rownames), gene = gene_names) — the new script's cache-hit path consumes it directly (positional gene match). Values are raw TPM (not log2) but quantile grouping is monotonic → identical High/Low groups and p-values.
  • mut_gene not found → stop() with a hint to check Hugo_Symbol spelling; exp gene not found → warning + skip (error if all missing).
  • Testing without GDC downloads: source("TCGA_analysis_general.R.txt") only loads functions (main is gated by sys.nframe()==0), then test with the real local LUAD_clinicalMatrix.txt + mock expression data — verifies build_meta, survival_plot, PDF output, and catches palette/strata issues. Real LUAD clinical: 511 primary tumor samples (184 deceased / 327 living), OS_time 0–238 months.
  • Fontconfig warning from cairo_pdf on this cluster is harmless.

Real-data context (PM-202396)

Original run outputs live in /workspace/yanyali/other_work/PM-202396-hongxuan-288/TCGA-LUAD_analysis/ (GDCdata/ [2.5GB: 618 mutation MAFs + 601 STAR files], TCGA_LUAD_EGFR.txt, TCGA-LUAD_TPM_exp.rds, TCGA-LUAD_EGFR.samples_OS_meta.rds, LUAD_clinicalMatrix.txt, 6 KM PDFs). Reuse these cached files (copy into outdir or point --outdir there) to skip re-downloading.
Test run of the general script (validated end-to-end): TCGA-LUAD_analysis/TCGA-LUAD_EGFR_test/ — caches: TCGA-LUAD_mutations.rds (built once via GDCquery+GDCprepare reading local GDCdata, 194729x140), TCGA-LUAD_TPM_exp.rds, LUAD_clinicalMatrix.txt. Results: 79 EGFR-mut samples with expression → 4 dups removed → 75 → 73 with survival (30 events); COL1A1 q0.25 p=0.098 / q0.5 p=0.405 / q0.75 p=0.877; STAB1 q0.25 p=0.023 / q0.5 p=0.078 / q0.75 p=0.631; 6 KM PDFs + TCGA-LUAD_EGFR_survival_results.csv. Sample set identical to the original run's 73.

> Packaging note. Scripts and tables in this skill carry a .txt suffix on their
> original extension (e.g. .R.txt, .tsv.txt) because the SkillHub upload allowlist
> does not accept .R or .tsv. This is cosmetic: Rscript is extension-agnostic, so
> Rscript scripts/<name>.R.txt ... behaves exactly like .R, and tab-separated data
> parses identically from .tsv.txt. Keep the suffix when repackaging.

常见问题

5 问
答案由本站依据条目字段整理
TCGA 通用生存分析怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_7ece4fea/tcga-survival-analysis。安装方式为未标注。装完刷新技能列表或重开客户端。

TCGA 通用生存分析支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

TCGA 通用生存分析权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

TCGA 通用生存分析收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

TCGA 通用生存分析用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。