← 返回 Skills 市场
fmaxy

bubble_plot

作者 FmaxY · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
133
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install bubble-plot
功能描述
在需要基于基因表达数据画气泡图(dot plot)时使用。适用于单细胞 RNA-seq、空间转录组等场景,按细胞类型 × 癌种展示基因表达比例和均值。
使用说明 (SKILL.md)

Skill: 气泡图生成器 (bubble-plot)

基于基因表达矩阵数据,生成按细胞类型 × 癌种分组的气泡图(dot plot)。

何时使用

  • 用户上传 TSV/CSV 表达数据文件,并要求画气泡图、dot plot、泡泡图
  • 用户说"画气泡图"、"bubble plot"、"dot plot"并提供了数据文件
  • 用户提供数据文件和基因列表,要求可视化表达模式

常见触发词

  • 画气泡图
  • bubble plot
  • dot plot
  • 泡泡图
  • 气泡图可视化
  • 表达气泡图

执行清单

1. 检查数据与环境

  • 确认用户提供了数据文件(TSV/CSV)
  • 确认文件已下载到工作目录
  • 确认 Python 3 + pandas + matplotlib 已安装(缺失时 pip3 install --break-system-packages pandas matplotlib

2. 了解数据结构

读取文件前几行,识别以下关键列:

角色 识别关键词 示例列名
细胞类型 majorCluster, cell_type, cluster majorCluster
组织类型 tissue, class, condition, group tissue
癌种 cancerType, cancer_type, disease cancerType
基因表达 所有数值型非元数据列 FOLR1, TACSTD2, MET ...
  • 如果用户指定了基因列表,只画指定的
  • 如果用户未指定,自动检测所有数值型非元数据列
  • Adjacent 等正常组织名称统一映射为 Normal

3. 运行脚本

# 基本用法 — 自动检测所有基因
python3 skills/bubble-plot/bubble_plot.py \x3Cdata.tsv>

# 只画指定基因
python3 skills/bubble-plot/bubble_plot.py \x3Cdata.tsv> --genes FOLR1 TACSTD2 MET

# 自定义列名(如果自动检测失败)
python3 skills/bubble-plot/bubble_plot.py \x3Cdata.tsv> --genes FOLR1 MET --cell-col CellType --cancer-col Disease

# 不按组织类型拆分
python3 skills/bubble-plot/bubble_plot.py \x3Cdata.tsv> --no-split-tissue

# 自定义输出目录和分辨率
python3 skills/bubble-plot/bubble_plot.py \x3Cdata.tsv> -o my_plots --dpi 600

4. 输出文件

  • 默认输出到 bubble_plots/ 目录
  • 每个基因 × 组织类型 = 1 个 PNG(300dpi)+ 1 个 PDF
  • 文件命名:{基因}_dotplot_{Normal|Tumor}.{png|pdf}

5. 向用户报告结果

  • 列出生成的文件清单和大小
  • 如果有基因在数据中不存在,明确告知并跳过
  • 展示 1-2 张关键图的预览

参数说明

参数 默认值 说明
input 必填 输入 TSV 或 CSV 文件路径
--genes / -g 自动检测 要画的基因名列表
--cell-col 自动检测 细胞类型列名
--cancer-col 自动检测 癌种/疾病列名
--tissue-col 自动检测 组织类型列名
--split-tissue True 按组织类型拆分画图
--no-split-tissue - 不拆分,所有数据画一张
--outdir / -o bubble_plots 输出目录
--dpi 300 PNG 分辨率

图例说明

  • 气泡颜色:标准化平均表达量(0-1,红=高,蓝=低,RdBu_r 色谱)
  • 气泡大小:阳性细胞百分比(该细胞类型中表达量 > 0 的比例)

自检

  • 数据文件是否已确认下载到本地
  • 基因列名是否与数据中一致(区分大小写)
  • tissue 列中 Adjacent 是否已映射为 Normal
  • 输出是否包含 PNG 和 PDF 两种格式
  • 缺失的基因是否已告知用户
安全使用建议
This skill appears to do what it says: generate bubble/dot plots from a TSV/CSV gene-expression matrix. Before running it: (1) review the included bubble_plot.py (already present) and confirm you trust it — it only reads the provided file and writes PNG/PDF outputs; (2) avoid running the suggested pip command with --break-system-packages on a production/system Python — prefer a virtual environment (python -m venv) or conda to install pandas/matplotlib; (3) ensure the input file does not contain sensitive data you don't want processed or stored on the machine where you run the script; (4) run the skill in an isolated environment if you have any doubt about package changes or file permissions. If you need the agent to run this automatically, note it can execute the local script but has no network exfiltration code included.
功能分析
Type: OpenClaw Skill Name: bubble-plot Version: 1.0.0 The bubble-plot skill is a legitimate bioinformatics tool designed to visualize gene expression data from TSV/CSV files using pandas and matplotlib. The Python script (bubble_plot.py) and instructions (SKILL.md) focus entirely on data processing and plot generation without any indicators of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description, SKILL.md, and the included Python script are consistent: the script reads a TSV/CSV expression matrix, auto-detects metadata and numeric gene columns, and writes PNG/PDF bubble plots. Requiring python3 (and pandas/matplotlib) is proportional to the stated purpose.
Instruction Scope
SKILL.md restricts actions to checking for a local input file, ensuring Python libraries are installed, running the included script, and returning generated plot files. One operational note: the suggested pip command uses --break-system-packages (modifies system Python installation), which may be undesirable — using a virtualenv/conda environment would be safer. Otherwise the instructions do not attempt to read unrelated files or transmit data externally.
Install Mechanism
There is no install spec (instruction-only skill) and the code is included. The script depends on common Python libraries (pandas, matplotlib) and there are no downloads from external URLs or archive extraction steps in the skill package itself.
Credentials
The skill declares no environment variables, no credentials, and no config paths. The code only reads the user-supplied input file path and writes output images, which is appropriate for its function.
Persistence & Privilege
always is false and the skill does not request persistent or elevated platform privileges. It does not attempt to modify other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bubble-plot
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bubble-plot 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
plot_test
元数据
Slug bubble-plot
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

bubble_plot 是什么?

在需要基于基因表达数据画气泡图(dot plot)时使用。适用于单细胞 RNA-seq、空间转录组等场景,按细胞类型 × 癌种展示基因表达比例和均值。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 133 次。

如何安装 bubble_plot?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bubble-plot」即可一键安装,无需额外配置。

bubble_plot 是免费的吗?

是的,bubble_plot 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

bubble_plot 支持哪些平台?

bubble_plot 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 bubble_plot?

由 FmaxY(@fmaxy)开发并维护,当前版本 v1.0.0。

💬 留言讨论