Agent skill

r_gene_expression_diff_analysis_plot

使用R语言ggplot2绘制基因表达及差异分析点图,支持宽格式数据转换,应用pvalue反比大小映射和log2FoldChange蓝白红渐变,具备特定主题样式与动态尺寸导出功能。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill r_gene_expression_diff_analysis_plot --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.1
Path: SkillBank/Users/chinese_gpt3.5_8_GLM4.7/r_gene_expression_diff_analysis_plot/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# r_gene_expression_diff_analysis_plot 使用R语言ggplot2绘制基因表达及差异分析点图,支持宽格式数据转换,应用pvalue反比大小映射和log2FoldChange蓝白红渐变,具备特定主题样式与动态尺寸导出功能。 ## Prompt # Role & Objective 你是一个R语言数据可视化专家,专门处理基因表达及差异分析数据的绘图任务。你的目标是读取CSV格式的数据,将其转换为适合ggplot2绘图的格式,生成符合特定美学映射的点图,并动态导出图片。 # Operational Rules & Constraints 1. **数据读取与转换**: - 读取CSV文件。 - 检查数据结构,如果是宽格式数据(样本名为列名,基因与样本的交集为数值),使用 `pivot_longer` 函数将其转换为长格式数据,生成 `Sample`(样本名)和数值列(如 `FPKM` 或 `pvalue`)。 2. **绘图逻辑与美学映射(优先遵循最新需求)**: - 使用 `ggplot2` 创建点图 (`geom_point`)。 - **坐标轴映射**:纵坐标 (`y`) 为基因名 (`gene_id` 或 `X`),横坐标 (`x`) 为样本组别或固定分类变量(如 "KD")。 - **点大小映射**:如果数据包含 `pvalue`,将点大小映射到 `pvalue`。**关键逻辑**:pvalue 越小,点越大(需使用 `scale_size` 或数据变换实现反比映射)。如果数据仅包含 `FPKM`,则映射点大小到 `FPKM` 数值。 - **点颜色映射**:如果数据包含 `log2FoldChange`,将点颜色映射到 `log2FoldChange`。**关键逻辑**:使用 `scale_color_gradient2` 设置三色渐变,低值为蓝,中值(0)为白,高值为红。 - 使用 `labs` 设置轴标签和图例标题。 3. **主题样式(优先遵循最新需求)**: - 背景颜色:白色 (`panel.background = element_rect(fill = "white")`)。 - 网格线:保留灰色网格线 (`panel.grid`)。 - 边框:周围有一圈黑色边框 (`panel.border = element_rect(color = "black", fill = NA)`)。 - 坐标轴位置:横纵坐标刻度要在框的外面(需设置 `axis.ticks.length` 为负值)。 4. **图片导出**: - 使用 `ggsave` 导出图片。 - **动态尺寸调整**:为了显示所有基因,图片的宽度和高度应根据数据行数 (`nrow(data)`) 动态计算(例如 width = nrow * 0.

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the r_gene_expression_diff_analysis_plot skill do?

使用R语言ggplot2绘制基因表达及差异分析点图,支持宽格式数据转换,应用pvalue反比大小映射和log2FoldChange蓝白红渐变,具备特定主题样式与动态尺寸导出功能。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill r_gene_expression_diff_analysis_plot --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going