deg-mixed-design

deg-mixed-design is a skill for Claude Code from GGbond-bo/MemOmics-Agent. It costs 100 tokens per session (24,003 once invoked), scanned A, original, MIT.

A statistical guide for differential gene expression analysis with independent groups and repeated measurements, such as samples taken before and after exercise. It explains how to test group effects, time effects, and group-by-time interactions while accounting for each person.

In plain words
What is it for?
Use it to design pseudobulk or cell-level models, include subject effects, test interactions, choose between mixed models and MAST, and write the methods and evidence for a study.
Why use it?
Ignoring the pairing between measurements from the same person can give unreliable uncertainty estimates and weaker conclusions. The guide also helps avoid treating individual cells as independent biological samples when the real repeats are people or specimens.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Use it to design pseudobulk or cell-level models, include subject effects, test interactions, choose between mixed models and MAST, and write the methods and evidence for a study.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ggbond-bo/memomics-agent/deg-mixed-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add GGbond-bo/MemOmics-Agent --skill deg-mixed-design
Clone the repo
git clone --depth 1 https://github.com/GGbond-bo/MemOmics-Agent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deg-mixed-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/deg-mixed-design/github.svg)](https://agentmods.dev/skills/ggbond-bo/memomics-agent/deg-mixed-design)
Your own site
<a href="https://agentmods.dev/skills/ggbond-bo/memomics-agent/deg-mixed-design"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/deg-mixed-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deg-mixed-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/ggbond-bo/memomics-agent/deg-mixed-design"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/deg-mixed-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 24,003 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.24003
Opus 5.5 $0.00040 $0.09601
Sonnet 5.5 $0.00020 $0.04801
Haiku 4.5 $0.00010 $0.02400

Measured 1mo ago against content hash b84db99acde7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deg-mixed-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/audit_group_effects.py, scripts/axis_level_aggregation_perm_test.py, scripts/caliber_switch_impact.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

memomics_home/skills/bioinformatics/deg-mixed-design/SKILL.md · 748 lines

How it starts

The opening of the file, as written. The whole thing — 748 lines — stays where its author put it; the contents beside it link to each section on GitHub.

混合设计 DEG:组间独立 + 组内配对(split-plot / repeated measures)

何时用本 skill

实验结构 = 多个独立组 + 组内重复测量(前后配对/多时间点),需要同时回答:

  1. 组间主效应(独立比较,如 aging: Old_pre vs Young_pre;diabetes: T2D_pre vs Old_pre)
  2. 时间/处理主效应(配对比较,如每组 post vs pre)
  3. 组×时间交互(各组对处理/运动的响应是否不同 —— 往往是研究亮点)

典型:3 组(健康/老年/老年糖尿病)× 运动前后 = 24 个体 × 2 = 48 样本。

核心原则(不可违反)

  1. 生物学重复 = 个体,不是细胞。n≥5/组时 pseudobulk(每个体×条件聚合 counts)是默认选择;逐细胞模型在「不带任何样本层校正」时 = 伪重复(pseudoreplication),是审稿人第一攻击点。
    • ⚠️ 2026-09-26 更正:这句曾被读成「细胞级不能用」,那是过度推广。红线是样本层变异必须进模型, 机制任选(见 §方案 C)。官方先例:Zhang X et al. Cell 2026(PMID 42612631)用细胞级 MAST 做主 DEG, 但先用样本级 pseudobulk 估 RUV 因子再作协变量 —— 完整依据见姊妹 skill mixed-design-deg 的 「细胞级方法的合法性条件」及其 references/celllevel-inference-unit-and-sample-structure.md。
    • 金标准:Squair et al. 2022 Nat Commun "Confronting false discoveries in single-cell differential expression"。
  2. 配对必须建模。同一人 pre/post 高度相关,忽略配对 → 功效损失 + SE 估计错误。用 (1|subject) 随机效应或 block 吸收。
  3. 优先统一模型,不拆碎片化 t 检验。能直接检验组×时间交互,且避免多重比较碎片化。
  4. 编辑口径交付:先结论(交互/主效应是否显著)后证据;来源必须带 PMID/DOI;给方法与源码出处。
  5. 别把辩论当默认动作(2026-09-25 用户明确纠正) —— 用户原话:"不要辩论了,这么麻烦干什么? 不要什么都辩论啊"。本类任务里只有"结论要进报告定稿/入库且 ≥2 个活选项会改变下一步动作" 以及"参数选择会改变结果口径(FDR 族、阈值、方法族)"才辩;整理既有结果表、出展示清单、 格式转换、元数据/列名探查、用户已确认方向的执行 —— 一律直接做,不辩、不追问。 判据:辩完必须能改变下一步的动作。改变不了就不辩,并在汇报里一句带过 ("按你的要求跳过辩论")。用户说"不要辩"时用户指令优先于 debate_gate 门禁提示, 忽略门控继续干活即可(门控不会阻塞后续工具)。详见 debate-core。在 skill 执行步骤 6 ("关键结论走 debate_analysis")之前,先过一遍本条。
  6. 用户逼问方法学时:第一句给结论,再给「文献逐字 + 代码行号 + 落盘表实值」三件证据(2026-09-28 实测)。 本类任务用户会连问三连:「有文献参考吗?」「你真的按独立和配对进行计算了吗?」「所以,结论是什么呢?」。
    • 前两问要逐字核实:⛔ 不许凭记忆转述 PMID 内容,要下载全文核原句(本例 Lakens 2013 的 d_z 不可跨设计比较 / d_av 与独立 d_s 同尺度 / Hedges' g = d 的偏差校正版,均引自原文)。 PubMed 未收录的经典(Mann-Whitney 1947、Wilcoxon 1945、BH 1995、Hedges 1981)要主动声明 "未收录、不当已核验条目报给你" —— 主动划边界比含糊带过可信。
    • 代码证据给到 文件:行号(如 build_effect5_v3.py:52-75 独立/配对两条分支)+ 落盘表实值 (J=0.9492、配对组 n1≡n2、aux2 r 中位 0.322、d_z/d_av 实测 0.828 vs 理论 0.859), 并对每处自己的口径疏漏显式点名撤回。
    • 第三问是风格纠正信号:说明前几轮把结论埋在证据里了。⇒ 每次回答第一句就是结论(1–3 句), 证据/代码/表格全部放后面。⛔ 不要用"先方法后结论"的论文顺序 —— 那是把读者的工作留给了用户。
    • 🔴 第一问「有文献参考吗」的正确应答顺序 = 先 search_papers,再开口(2026-09-26 实测,用户 当场发火:「我要你去网上找DEG的方法呀,文章」)。我当时在本地翻文件、算模拟、绕圈子,而用户要的 是文献原文。⇒ 凡「哪个方法更适合 / 为什么不能用 X / 别人怎么就能用 X」类问题,第一步就是 search_papers(检索词用「工具名 + benchmark / 工具名 + 原文标题」,拿 PMID/DOI 并尽量定位 官方代码仓库),本地探查一律排在检索之后。核不到的(PubMed 未收录的经典)主动声明"未收录、 不当已核验条目报给你"。⚠️ 被用户指出"绕圈子/不查文献"时,不要解释,直接开查。
  7. 🔴 产出落盘后,回合不许以「正文问句」收尾(2026-09-28 实测,用户当场发火:「你到底在干什么? 这么久不出结果」)。根因:图早已出完并落盘(17:43),我却把「要不要做视觉区分」当成正文末尾的 问句,用户看到的是一个没有结论的回合 ⇒ 判定为"卡住了/这么久不出结果"。⇒ 三条硬规定:
    • 先给交付事实,再谈待决项:回合开头就是「已出图 + 路径 + 字节数/尺寸 + 星号计数」,让"已完成" 不可误读;待决项放最后,且必须走 ask_user(带选项),⛔ 不用正文问句(正文问句的答复无法 与问题绑定,用户答"要"会丢失所指 —— 这也是平台硬规则)。
    • 被问「你在干什么 / 怎么这么久」时,第一步是核验磁盘再回答(ls -la 产物 + 时间戳 + 用 vision_describe 证明不是空图),⛔ 不要凭记忆复述"我做了 X"。用户要的是「产物在哪、能不能用」。
    • "图已存在但我卡在等你拍板"这类状态必须显式命名("图已交付,没在跑任何东西,只等你选 A/B/C"), ⛔ 不许让用户靠猜。沉默 ≠ 交付:零新增文件时也要写清"本轮无新产物,属确认型收尾"。
    • 🔴 「图片健康检查通过」只能在"回读像素的真数字"存在时说出口(2026-09-28 被 rail_review(post) 抓包): 我汇报「两图健康检查通过(762 KB 13.1% 非白 / 242 KB 30.1% 非白)」,而被我点名的那张 MAST_celllevel_PureTypeIIA_FDR05.png 实为 100% 纯白(非白 0.0%、唯一色 1 种) —— 那个 30.1% 是另一张图(fig_sig_genes_heatmap)的数字。⚠️ 61.9 KB 的体积毫无警示作用。 ⇒ 一次只断言一个路径、数字与路径同锚;⛔ 禁止跨图复述指标、禁止凭"上次好像过了"写通过。 两个必须一起记住的事实: ① 空白根因是「出图从被内核重启清空的变量取数」(内核重启只提示"变量已清空",出图脚本不报错、exit 0) ⇒ 出图的数据源必须是磁盘产物(CSV/结果表),不是内核内存变量;原图空白时修数据路径,不是调绘图参数。 ② 中文全变方框(tofu)能通过全部像素闸门(实测非白 18.8% / 275 色 / 104 KB 全"正常",因为方框也是像素), 唯一信号是 stderr 的 Glyph … missing from font(s) DejaVu Sans(每个汉字一条 UserWarning) ⇒ 出图自检必须同时看「回读像素」+「stderr 字体警告」,并显式设 plt.rcParams["font.family"] = ["Microsoft YaHei", "SimHei", "DejaVu Sans"] + axes.unicode_minus=False。 完整配方(含末尾回读断言代码、Windows CJK 字体清单、R 侧对照)→ platform-execution-pitfalls 的 references/figure-blank-false-pass-and-cjk-font.md。

Read the full file on GitHub · 748 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +126 lines b84db99acde7
  2. 1mo ago First seen · 622 lines · 100 tokens per session scan A 9b4482351ead

Subscribe to this mod's changes

deg-mixed-design is a skill published in the GitHub repository GGbond-bo/MemOmics-Agent (33 stars, last pushed 14d ago), licensed MIT. It adds 100 tokens to every session and 24,003 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

deg-mixed-design compared with skills from other repositories

deg-mixed-design next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
deg-mixed-designGGbond-bo/MemOmics-AgentSkill3314d agoMITA100Claude Code
instrument-data-to-allotropeanthropics/knowledge-work-pluginsSkill37k4d agoApache-2.0A123Claude Code
matlabK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA44Claude Code
exploratory-data-analysisK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA83Claude Code
phylogeneticsK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA71Claude Code, Codex
research-engineerdavila7/claude-code-templatesSkill34ktodayMITA43Claude Code, Codex
mapping-to-snomedmaziyarpanahi/openmedSkill5.9ktodayApache-2.0A205Claude Code