Singlecell Qcのロゴ

Singlecell Qc

コミュニティ人気
xuzhougeng
singlecell-qc

Use when designing, reviewing, or implementing single-cell RNA-seq QC in Python or R with a human-in-the-loop, data-driven approach. Trigger for scRNA QC metrics, per-sample diagnosis, threshold discussion, mitochondrial/ambient/doublet assessment, MAD vs fixed cutoffs, or refactoring automated merge-first QC. The analyst confirms key decisions at each step—agents must inspect data, propose options, and wait for approval before filtering, doublet removal, or merging. Not a turnkey pipeline skill.

概要

公開者xuzhougeng
リポジトリwisp-science
スキル名singlecell-qc
スター
1K
フォーク
104
同梱ファイル
13
ライセンスAGPL-3.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 13個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    xuzhougengがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Singlecell Qc」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/xuzhougeng/wisp-science/tree/main/skills/singlecell-qc
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/xuzhougeng/wisp-science.git /tmp/wisp-science
mkdir -p .claude/skills
cp -r /tmp/wisp-science/skills/singlecell-qc .claude/skills/singlecell-qc
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSinglecell Qcを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSinglecell Qcを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Singlecell Qcは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Single-Cell QC

Overview

Use this skill for data-driven, human-centered single-cell QC. The analyst inspects distributions and confirms decisions; code computes metrics and executes only what was agreed.

text
inspect data → compute metrics → human reviews → confirm thresholds → small action → re-inspect

Not a one-click pipeline. Do not chain calculate → filter → doublet → merge unless the user explicitly requests full execution after reviewing pilot results.

Follow analysis-workflow for module and script layout. Match the user's language.

Read first: references/human-in-the-loop.md

When To Use

  • "帮我看看这个样本 QC"
  • "算一下 QC 指标,阈值我来定"
  • "逐样本诊断,先别过滤"
  • "这个 merge-first QC 太粗,怎么改成人工确认"
  • "参考 GZL metrics 脚本,但要分步做"

Do not use for integration/Harmony, annotation, or spatial QC unless only expression-matrix QC is needed.

Operating Rules (Human-First)

  1. Inspect before acting — matrix type, species, sample metadata, existing checkpoints.
  2. Pilot samples first — default 1–3 samples; expand only after user OK.
  3. Metrics before filters — run 01-calculate_metrics; stop and report.
  4. Propose thresholds, never silently apply — show expected cell loss per sample.
  5. Ask at gates — which metrics next? which thresholds? proceed to filter? merge?
  6. No silent heavy steps — no full-cohort filter, Scrublet, decontX, or merge without explicit approval.
  7. Reversible checkpoints — pre-filter metadata/counts stay intact; filtering writes new files.
  8. Scripts = one stage — owner-editable; thresholds visible at top of filter scripts.

Full gate definitions: references/human-in-the-loop.md

First Pass (Always)

bash
find <project_root> -maxdepth 4 -type f \( -name '*.py' -o -name '*.R' -o -name '*.h5ad' -o -name '*.md' \) | head -60
rg -n "filter_cells|calculate_qc|metadata|mito|n_genes" <project_root>/scripts 2>/dev/null | head -30

Report to the user:

  • input matrix type (raw / filtered / EmptyDrops / h5ad);
  • species; sample count;
  • whether per-sample or merge-first QC exists;
  • recommended next single step (not full pipeline).

Then ask which samples to pilot and which metrics matter for this tissue.

Staged Workflow (Default)

Each stage ends with human confirmation.

StageScript / actionAgent stops until user confirms
AInput inspectionsample list, matrix, species
B01-calculate_metrics (pilot)metric scope (core / hbb / doublet / …)
C02-qc_diagnosis figuresfigures match expectations
DThreshold proposal (table + loss estimate)per-sample cutoffs
E03-filter_cellsfilter summary acceptable
Foptional doublet / ambientmethod and aggressiveness
G04-merge_qc_passedall samples signed off

Stages D–G are skipped until the user says proceed.

Metric tiers (choose with user)

TierMetricsAsk when
Coren_genes, n_UMIs, mito_frac, pct_counts_rbalways unless h5ad already has them
Recommendedhbb_score, doublet_score, cell cycletissue-dependent
ExtendedchrY_frac, ambient_frac, nuclear_fracmetadata / STARsolo available

Details: references/metrics-catalog.md

Project Layout

Optional scaffold — create only stages the user needs:

text
scripts/01-qc/
  01-calculate_metrics.py|R   # metrics only
  02-qc_diagnosis.py|R        # figures from metadata
  03-filter_cells.py|R        # runs only after threshold sign-off
result/01-qc/ ...
figure/01-qc/ ...

references/project-layout.md

Bundled Tools (Not a Pipeline)

ToolRole
scripts/calculate_metrics.pycore metrics → metadata.tsv
scripts/calculate_metrics.Rsame, R/Matrix
scripts/inspect_qc_metadata.pyread-only cohort summary
assets/gene_sets/*hbb / chrY gene lists
assets/qc_thresholds.example.yamltemplate for user-edited thresholds

--run-scrublet on Python script: ask before using.

bash
# Typical pilot — metrics only
python .../calculate_metrics.py \
  --matrix-dir <dir> --sample-id PILOT --species human \
  --output-dir result/01-qc/01-calculate_metrics/PILOT

After Metrics: Report Template

Use the template in references/human-in-the-loop.md:

  • observations (numbers);
  • flags (sex mismatch, high hbb, depth outlier);
  • questions for the user (numbered);
  • optional threshold table with estimated loss — label as not yet applied.

Language Choice

ContextReference
scanpy / h5adreferences/python-scanpy.md
Seuratreferences/r-seurat.md
threshold methodsreferences/filtering-strategies.md

Pick one canonical metadata schema across languages (n_genes, n_UMIs, mito_frac, …).

Anti-Patterns

  • Running full cohort filter + merge in one agent turn
  • Picking thresholds without showing per-sample distributions
  • Treating bundled scripts as end-to-end QC
  • Hiding cutoffs inside opaque helpers
  • Merge-first global QC without per-sample review (legacy atlas reproduction excepted)

Deliverables (Stage-Dependent)

Only produce what the current confirmed stage needs:

After stageDeliverable
Bmetadata.tsv, metrics_summary.json
Cdiagnosis PDFs/PNGs
Dthreshold proposal table (no filter yet)
Efiltered checkpoint + filter_summary
Sign-offQC_summary.tsv + documented per-sample decisions

External References

  • Rich metrics example (R): <project-root>/scripts/calculate_metrics_extended.R
  • Legacy contrast (avoid as default): spatial_data/.../run_merging_samples_and_QC.py

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Singlecell Qc」では何ができますか?

Use when designing, reviewing, or implementing single-cell RNA-seq QC in Python or R with a human-in-the-loop, data-driven approach. Trigger for scRNA QC metrics, per-sample diagnosis, threshold discussion, mitochondrial/ambient/doublet assessment, MAD vs fixed cutoffs, or refactoring automated merge-first QC. The analyst confirms key decisions at each step—agents must inspect data, propose options, and wait for approval before filtering, doublet removal, or merging. Not a turnkey pipeline skill.

TypingMindでSinglecell Qcを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Singlecell Qcはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSinglecell Qcをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/xuzhougeng/wisp-science/tree/main/skills/singlecell-qcを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Singlecell Qcを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Singlecell Qcで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSinglecell Qcを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Singlecell Qc」は無料ですか?

はい。xuzhougengがAGPL-3.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇