Bulk Rnaseq logo

Bulk Rnaseq

Community
ssinder
bulk-rnaseq

This skill should be used when running bulk RNA-seq differential expression analysis: FastQC/trimming, Salmon quantification, counts matrix construction, DESeq2 statistics, GO/KEGG enrichment and publication figures. 用于 bulk 转录组(RNA-seq)差异表达分析全流程。

Overview

Publisherssinder
Repositorybioinformatics-agent-skills
Skill namebulk-rnaseq
Stars
75
Forks
2
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ssinder on GitHub. Read the source before you install it.

Installation

Install the Bulk Rnaseq AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/bulk-rnaseq
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ssinder/bioinformatics-agent-skills.git /tmp/bioinformatics-agent-skills
mkdir -p .claude/skills
cp -r /tmp/bioinformatics-agent-skills/skills/bulk-rnaseq .claude/skills/bulk-rnaseq
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bulk Rnaseq in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bulk Rnaseq on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bulk Rnaseq is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Overview

本技能把 bulk RNA-seq 的原始 FASTQ 一路处理到可发表的差异表达结论:先做质控与接头去除,再用 Salmon 做转录本定量并汇总成基因水平整数 counts,随后运行 DESeq2 风格负二项 Wald 检验得到差异基因列表,接着做 GO/KEGG 超几何富集,最后输出火山图、MA 图、PCA 图、热图与文字报告。

差异表达统计提供 双后端:--backend python 使用内置的纯 NumPy/SciPy 实现(size factor 归一化、Cox-Reid 离散度估计、趋势拟合、MAP 收缩、Wald 检验、BH 校正),--backend r 调用 Rscript 上的 Bioconductor DESeq2。两者输出同一套列名的结果表,可直接互换对比。

When to Use This Skill

  • 用户要做 bulk 转录组差异表达分析(关键词:RNA-seq、bulk RNA-seq、转录组、差异表达、DEG、DESeq2、Salmon、counts matrix)
  • 用户已有 Salmon/STAR 的定量结果,需要构建 counts 矩阵并做差异表达
  • 用户需要 GO / KEGG 富集分析(关键词:GO 富集、KEGG 富集、pathway enrichment、功能富集)
  • 用户需要 RNA-seq 的标准发表级图表(火山图、MA 图、PCA、热图)
  • 用户想在没有 R / Bioconductor 的环境里得到可靠的 DESeq2 风格结果

不适用:单细胞数据(用 single-cell-rnaseq)、仅做原始 reads 可视化、蛋白组与代谢组分析。

上游衔接:如果还没有 FASTQ 文件,可先用 ena-download 技能按 SRA/ENA accession 下载原始测序数据(支持断点续传与 MD5 校验),再交给本技能做定量与差异分析。

Quick Start

bash
# 完整流程(需要 fastqc / fastp / salmon 在 PATH 中)
export PYTHONPATH="$PWD/packages"
python skills/bulk-rnaseq/scripts/run_pipeline.py \
    --input  /data/fastq \
    --output /results/rnaseq \
    --transcriptome /ref/transcriptome.fa \
    --tx2gene /ref/tx2gene.tsv \
    --metadata /data/metadata.csv \
    --go-annotation /ref/go_annotation.csv \
    --group-a treated --group-b control

# 跳过外部工具,直接从已有 Salmon 结果开始
python skills/bulk-rnaseq/scripts/run_pipeline.py \
    --input /data/fastq --output /results/rnaseq \
    --skip-qc --skip-trimming --skip-quant \
    --quant-dir /results/rnaseq/03_salmon \
    --tx2gene /ref/tx2gene.tsv \
    --metadata /data/metadata.csv \
    --group-a treated --group-b control --backend python

# 单独构建 counts 矩阵
python skills/bulk-rnaseq/scripts/build_counts_matrix.py \
    --quant-dir /results/rnaseq/03_salmon \
    --tx2gene /ref/tx2gene.tsv \
    --output /results/counts

Workflow

  1. FastQC 质控 — 对每个 .fastq.gz 生成 HTML/ZIP 报告,可选 MultiQC 汇总。关注 per-base quality、adapter content、GC 分布。
  2. fastp 过滤 — 质量过滤(默认 Phred Q20)、PE 自动检测接头、最短长度 36 bp;同时输出 JSON/HTML 报告。
  3. Salmon 定量 — salmon index 构建转录组索引,salmon quant 带 --gcBias --seqBias --validateMappings 输出转录本级 TPM / NumReads / Length。
  4. counts 矩阵构建 — 用 tx2gene.tsv 把转录本汇总到基因;counts 取整(NumReads 四舍五入),TPM/FPKM 同步输出;生成元数据模板。
  5. DESeq2 差异表达 — size factor 归一化 → 基因离散度估计 → 趋势拟合 → MAP 离散度 → Wald 检验 → BH FDR。按 padj 与 |log2FC| 双阈值标注 Up / Down / NS。
  6. GO/KEGG 富集 — 单侧超几何检验 + BH FDR,按 BP / CC / MF 分别输出。
  7. 可视化 — 火山图、MA 图、富集条形图、样本 PCA、Top DEG 热图(PDF + PNG,300 DPI)。
  8. 报告 — 汇总实验设计、DEG 列表、富集结果、方法说明与产出清单。

Parameters

参数默认说明
--input必填原始 FASTQ 目录
--output<results>输出根目录,下设 8 个步骤子目录
--transcriptome无转录组 FASTA,用于构建 Salmon 索引
--tx2gene无转录本-基因映射 TSV(列 transcript_id / gene_id)
--metadata无样本元数据 CSV,需含 sample 与 condition 列
--go-annotation无本地 GO/KEGG 注释 CSV
--backendpython差异表达后端:python(内置)或 r(Rscript + DESeq2)
--group-a / --group-btreated / control分子组与分母组标签
--design~conditionR 后端的设计公式
--alpha0.05FDR 阈值
--lfc-threshold1.0`
--min-counts10低表达基因过滤阈值
--min-gene-set / --max-gene-set5 / 500富集分析的基因集大小范围
--threads8外部工具并行线程数
--skip-qc / --skip-trimming / --skip-quant关跳过对应步骤,复用已有中间结果

Outputs

文件说明
04_counts/counts.csv基因水平整数 counts(行=基因,列=样本)
04_counts/tpm.csv / fpkm.csv基因水平 TPM / FPKM
04_counts/metadata_template.csv样本元数据模板(需人工确认 condition)
05_deseq2/deseq2_results_full.csv全基因结果:baseMean/log2FoldChange/lfcSE/stat/pvalue/padj/significant/direction
05_deseq2/deseq2_results_significant.csv显著差异基因子集
05_deseq2/size_factors.csv每个样本的 size factor
05_deseq2/dispersions.csv每个基因的 MAP 离散度
05_deseq2/dispersion_trend.json离散度趋势参数 a0/a1/sigma2
06_enrichment/enrichment_{BP,CC,MF}.csv各本体的富集结果
06_enrichment/enrichment_summary_all.csv合并富集结果
07_figures/Figure{1..5}_*.{pdf,png}火山图、MA 图、富集条形图、PCA、热图
08_report/analysis_report.txt完整分析报告
run_manifest.json运行元数据(输入路径、后端、对比方向)

Validation

  • counts 矩阵:检查 counts.csv 各样本列和是否接近(差异过大说明测序深度差异大,需检查 size factor);确认 gene ID 与注释文件 ID 空间一致。
  • size factor:应集中在 1 附近(0.5–2)。出现极端值通常意味着某样本建库或测序异常。
  • 火山图:显著点应呈对称的双翼分布;MA 图应大致平坦。大量点集中在 log2FC = 0 附近是正常现象。
  • p 值分布:期望绝大多数基因 padj > 0.05;若几乎全部显著,多半是分组标签写反或存在批次混杂。
  • 离散度:dispersions.csv 中落在下限(1e-8 附近)说明该基因数据量不足,其 p 值不可用。
  • 富集:检查 Overlap_Genes 与 Term_Genes 的比例与背景基因数;min_gene_set 太小会得到大量无意义的极小 term。
  • 交叉验证:同一数据用 --backend python 与 --backend r 各跑一次,比较 log2FC 排序与显著基因集合是否基本一致。

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bulk Rnaseq AI skill do?

This skill should be used when running bulk RNA-seq differential expression analysis: FastQC/trimming, Salmon quantification, counts matrix construction, DESeq2 statistics, GO/KEGG enrichment and publication figures. 用于 bulk 转录组(RNA-seq)差异表达分析全流程。

Why use Bulk Rnaseq on TypingMind?

Because you install it once and use it with any model. Bulk Rnaseq is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bulk Rnaseq in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/bulk-rnaseq. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bulk Rnaseq?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bulk Rnaseq?

As many as you like. As long as a model supports skills, you can use Bulk Rnaseq with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bulk Rnaseq AI skill free?

Yes. It is published on GitHub by ssinder under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇