doublet-detection

doublet-detection is a skill for Claude Code from GGbond-bo/MemOmics-Agent. It costs 125 tokens per session (2,334 once invoked), scanned A, original, MIT.

A workflow for finding doublets in single-cell data. A doublet is one sequencing droplet or cell entry that contains material from two cells, which can create misleading cell types.

In plain words
What is it for?
It helps choose and run scDblFinder, DoubletFinder, or Scrublet, inspect doublet counts and rates, make diagnostic plots, and decide whether to remove detected doublets.
Why use it?
It helps estimate whether doublets are present, how their rate varies across samples or groups, and whether removing them is justified. It also avoids unreliable per-sample estimates when samples contain very few cells.

Skill for Claude Code

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

Good fit It helps choose and run scDblFinder, DoubletFinder, or Scrublet, inspect doublet counts and rates, make diagnostic plots, and decide whether to remove detected doublets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ggbond-bo/memomics-agent/doublet-detection
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 doublet-detection
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 doublet-detection

README.md
[![agentmods](https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/doublet-detection/github.svg)](https://agentmods.dev/skills/ggbond-bo/memomics-agent/doublet-detection)
Your own site
<a href="https://agentmods.dev/skills/ggbond-bo/memomics-agent/doublet-detection"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/doublet-detection/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 doublet-detection

Your own site · 80×15
<a href="https://agentmods.dev/skills/ggbond-bo/memomics-agent/doublet-detection"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/doublet-detection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,334 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.00125 $0.02334
Opus 5.5 $0.00050 $0.00934
Sonnet 5.5 $0.00025 $0.00467
Haiku 4.5 $0.00013 $0.00233

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

Security

Grade A, and why

doublet-detection 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.

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/doublet-detection/SKILL.md · 100 lines

How it starts

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

双细胞检测与判定

用户的问题通常是三件套:「有没有双细胞 / 比例高不高 / 要不要剔除」。 回答必须给到:① 数字(总体 + 按组 + 按样本)② 图 ③ 明确建议。只丢一个「X%」不算答完。

Step 0:开工前三个事实核查(不许跳、不许猜)

要查什么 为什么 怎么查
每样本细胞数分布 决定检测策略(能否按样本单独跑) table(obj$samplename) → median / min / max
counts 是否还在(整数、未归一化) scDblFinder / DoubletFinder / scrublet 全部要求 raw counts all(m@x == round(m@x)) + range(Matrix::colSums(m))
流程走到哪一步(已注释?已去过双胞?) 已去过双胞的数据重跑会二次剔除 metadata 列 + 是否存在 doublet / predicted_doublet 列

实测案例:某 Seurat 对象 2132 cells × 51227 genes、48 个样本、6 组 → ≈44 细胞/样本。 这个数字直接判死「按样本单独检测」(见下)。

Step 1:策略决策表(按每样本细胞数选)

每样本细胞数 策略 说明
≥ 200 按样本单独检测(samples= / batch_key=) 最准,每样本各得一个双细胞率
100–200 按样本单独检测 + 整体检测对照 模拟双细胞数偏少,估计噪声大
< 100(最常见) ⛔ 不要按样本单独跑。改:① 整体合并检测(推荐)② 按组(如 6 组)合并检测 交付口径改成「总数 + 按样本/组的分布」;不要报「每样本双细胞率」——分母 44 的比率没有意义

合并检测的已知代价:样本间异质性会被当成类间差异 → 可能把跨样本边界误判为双细胞。 所以必须同时看「双细胞是否集中在少数样本」——富集于单样本 = 该样本的技术问题,不是普遍污染。

Step 2:方法与可用性(先探再写)

方法 本机实测位置(2026-09-24) 结论
scDblFinder C:/Users/<u>/AppData/Local/R/R-4.4.2/library 不在 R-4.5.3 库 ⇒ 要用 R-4.4.2 的 Rscript 绝对路径直调
DoubletFinder 同上(R-4.4.2 用户库) 依赖 Seurat,跨版本更麻烦;优先 scDblFinder
Seurat E:/R-libs/R-4.5.3 读 .rds 用 R-4.5.3 内核(execute_r)
scanpy + scrublet Python(check_env 实测 installed) ✅ 推荐路线:Python scrublet,免跨版本桥接

⚠️ 禁混库:把 4.4.2 编译的包挂进 4.5.3 内核会在 loadNamespace 阶段炸 DLL(svglite.dll: LoadLibrary failure)。 跨版本一律用该版本的 Rscript 绝对路径直调,不改 .libPaths() 硬挂。 ⚠️ 先扫盘再断言"包没装":search_files(target='files', path=<库目录>, pattern='*Dbl*') 逐库扫, 比 requireNamespace 可靠(内核只看自己那套 libPaths,报 not found ≠ 机器上没有)。

Step 3:判定区间(答「比例高不高」)

双细胞率 判读 动作
< 5% 低 可保留,记入报告
5–10% 正常区间(10x 常规) 建议剔除,影响也小
10–15% 偏高 建议剔除,同时查是否集中在某样本/某簇
> 15–20% 很高 先查根因(多核/解离过度/nExp·pK 设错),再剔

Read the full file on GitHub · 100 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 First seen · 100 lines · 125 tokens per session scan A dbdcc97fdc59

Subscribe to this mod's changes

doublet-detection is a skill published in the GitHub repository GGbond-bo/MemOmics-Agent (33 stars, last pushed 14d ago), licensed MIT. It adds 125 tokens to every session and 2,334 once invoked, about $0.0005 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-12.

Related

doublet-detection compared with skills from other repositories

doublet-detection next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
doublet-detectionGGbond-bo/MemOmics-AgentSkill3314d agoMITA125Claude 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