Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计通过

tcga-bulk-data-preprocessing-with-omicverse使用 omicverse 进行 tcga 批量数据预处理

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

737

周安装

31

GitHub Stars

964

下载量

258
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tcga-bulk-data-preprocessing-with-omicverse(使用 omicverse 进行 tcga 批量数据预处理)
来源仓库:https://github.com/starlitnightly/omicverse
仓库路径:skills/tcga-bulk-data-preprocessing-with-omicverse
安装命令:
npx skills add https://github.com/starlitnightly/omicverse --skill tcga-bulk-data-preprocessing-with-omicverse
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/starlitnightly/omicverse --skill tcga-bulk-data-preprocessing-with-omicverse

简介

用于辅助批量数据处理与表格分析,支持 CSV/Excel 清洗与指标计算。

  • 适合数据整理、异常发现与统计口径生成的场景。
  • 使用时需确认数据来源与字段含义,避免误用样本代表全量。
  • 涉及敏感数据导出时应先评估权限与脱敏要求。
  • tcga-bulk-data-preprocessing-with-omicverse 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

TCGA Bulk Data Preprocessing with OmicVerse

Overview

Use this skill for loading TCGA data from GDC downloads, building normalised expression matrices, attaching clinical metadata, and running survival analyses through ov.bulk.pyTCGA.

Instructions

1. Gather required downloads

Confirm the user has three items from the GDC Data Portal:

  • gdc_sample_sheet.<date>.tsv — the sample sheet export
  • Decompressed gdc_download_xxxxx/ directory with expression archives
  • clinical.cart.<date>/ directory with clinical XML/JSON files

2. Initialise the TCGA helper

import omicverse as ov
import scanpy as sc
ov.plot_set()

aml_tcga = ov.bulk.pyTCGA(sample_sheet_path, download_dir, clinical_dir)
aml_tcga.adata_init()  # Builds AnnData with raw counts, FPKM, and TPM layers

3. Persist and reload

aml_tcga.adata.write_h5ad('data/ov_tcga_raw.h5ad', compression='gzip')

# To reload later:
new_tcga = ov.bulk.pyTCGA(sample_sheet_path, download_dir, clinical_dir)
new_tcga.adata_read('data/ov_tcga_raw.h5ad')

4. Initialise metadata and survival

aml_tcga.adata_meta_init()   # Gene ID → symbol mapping, patient info
aml_tcga.survial_init()      # NOTE: "survial" spelling — see Critical API Reference below

5. Run survival analysis

# Single gene
aml_tcga.survival_analysis('MYC', layer='deseq_normalize', plot=True)

# All genes (can take minutes for large gene sets)
aml_tcga.survial_analysis_all()  # NOTE: "survial" spelling

6. Export results

aml_tcga.adata.write_h5ad('data/ov_tcga_survival.h5ad', compression='gzip')

Critical API Reference

IMPORTANT: Method Name Spelling Inconsistency

The pyTCGA API has an intentional spelling inconsistency. Two methods use "survial" (missing the 'v') while one uses the correct "survival":

MethodSpellingPurpose
survial_init()survial (no 'v')Initialize survival metadata columns
survival_analysis(gene, layer, plot)survival (correct)Single-gene Kaplan-Meier curve
survial_analysis_all()survial (no 'v')Sweep all genes for survival significance
# CORRECT — use the exact method names as documented
aml_tcga.survial_init()                    # "survial" — no 'v'
aml_tcga.survival_analysis('MYC', layer='deseq_normalize', plot=True)  # "survival" — correct
aml_tcga.survial_analysis_all()            # "survial" — no 'v'

# WRONG — these will raise AttributeError
# aml_tcga.survival_init()                 # AttributeError! Use survial_init()
# aml_tcga.survival_analysis_all()         # AttributeError! Use survial_analysis_all()

Survival Analysis Methodology

survival_analysis() performs Kaplan-Meier analysis:

  1. Splits patients into high/low expression groups using the median as cutoff
  2. Computes a log-rank test p-value to assess significance
  3. If plot=True, renders survival curves with confidence intervals

Layer selection matters: Use layer='deseq_normalize' (recommended) because DESeq2 normalization accounts for library size and composition bias, making expression comparable across samples. Alternative: layer='tpm' for TPM-normalized values.

Defensive Validation Patterns

import os

# Before pyTCGA init: verify all paths exist
for name, path in [('sample_sheet', sample_sheet_path),
                    ('downloads', download_dir),
                    ('clinical', clinical_dir)]:
    if not os.path.exists(path):
        raise FileNotFoundError(f"TCGA {name} path not found: {path}")

# After adata_init(): verify expected layers were created
expected_layers = ['counts', 'fpkm', 'tpm']
for layer in expected_layers:
    if layer not in aml_tcga.adata.layers:
        print(f"WARNING: Missing layer '{layer}' — check if TCGA archives are fully extracted")

# Before survival analysis: verify metadata is initialized
if 'survial_init' not in dir(aml_tcga) or aml_tcga.adata.obs.shape[1] < 5:
    print("WARNING: Run adata_meta_init() and survial_init() before survival analysis")

Troubleshooting

  • AttributeError: 'pyTCGA' object has no attribute 'survival_init': Use the misspelled name survial_init() (missing 'v'). Same for survial_analysis_all(). See Critical API Reference above.
  • KeyError during adata_meta_init(): Gene IDs in the expression matrix don't match expected format. TCGA uses ENSG IDs; the method maps them to symbols internally. Ensure archives are from the same GDC download.
  • Empty survival plot or NaN p-values: Clinical XML files are missing date fields (days_to_death, days_to_last_follow_up). Check that the clinical.cart.* directory contains complete XML files, not just metadata JSONs.
  • survial_analysis_all() runs very slowly: This tests every gene individually. For a genome with ~20,000 genes, expect 5-15 minutes. Consider filtering to genes of interest first.
  • Sample sheet column mismatch: Verify the TSV uses tab separators and the header row matches GDC's expected format. Re-download from GDC if column names differ.
  • Missing deseq_normalize layer: This layer is created during adata_meta_init(). If absent, re-run the metadata initialization step.

Examples

  • "Read my TCGA OV download, initialise metadata, and plot MYC survival curves using DESeq-normalised counts."
  • "Reload a saved AnnData file, attach survival annotations, and export the updated .h5ad."
  • "Run survival analysis for all genes and store the enriched dataset."

References

  • Tutorial notebook: t_tcga.ipynb
  • Quick copy/paste commands: reference.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.07%
按下载量换算93

Claude

29.58%
按下载量换算76

Cursor

19.93%
按下载量换算51

Gemini CLI

9.52%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills