Install
openclaw skills install @fmaxy/bubble-plot在需要基于基因表达数据画气泡图(dot plot)时使用。适用于单细胞 RNA-seq、空间转录组等场景,按细胞类型 × 癌种展示基因表达比例和均值。
openclaw skills install @fmaxy/bubble-plot基于基因表达矩阵数据,生成按细胞类型 × 癌种分组的气泡图(dot plot)。
pip3 install --break-system-packages pandas matplotlib)读取文件前几行,识别以下关键列:
| 角色 | 识别关键词 | 示例列名 |
|---|---|---|
| 细胞类型 | majorCluster, cell_type, cluster | majorCluster |
| 组织类型 | tissue, class, condition, group | tissue |
| 癌种 | cancerType, cancer_type, disease | cancerType |
| 基因表达 | 所有数值型非元数据列 | FOLR1, TACSTD2, MET ... |
Adjacent 等正常组织名称统一映射为 Normal# 基本用法 — 自动检测所有基因
python3 skills/bubble-plot/bubble_plot.py <data.tsv>
# 只画指定基因
python3 skills/bubble-plot/bubble_plot.py <data.tsv> --genes FOLR1 TACSTD2 MET
# 自定义列名(如果自动检测失败)
python3 skills/bubble-plot/bubble_plot.py <data.tsv> --genes FOLR1 MET --cell-col CellType --cancer-col Disease
# 不按组织类型拆分
python3 skills/bubble-plot/bubble_plot.py <data.tsv> --no-split-tissue
# 自定义输出目录和分辨率
python3 skills/bubble-plot/bubble_plot.py <data.tsv> -o my_plots --dpi 600
bubble_plots/ 目录{基因}_dotplot_{Normal|Tumor}.{png|pdf}| 参数 | 默认值 | 说明 |
|---|---|---|
input | 必填 | 输入 TSV 或 CSV 文件路径 |
--genes / -g | 自动检测 | 要画的基因名列表 |
--cell-col | 自动检测 | 细胞类型列名 |
--cancer-col | 自动检测 | 癌种/疾病列名 |
--tissue-col | 自动检测 | 组织类型列名 |
--split-tissue | True | 按组织类型拆分画图 |
--no-split-tissue | - | 不拆分,所有数据画一张 |
--outdir / -o | bubble_plots | 输出目录 |
--dpi | 300 | PNG 分辨率 |
tissue 列中 Adjacent 是否已映射为 Normal