本文へスキップ
Skillpedia
分析とスプレッドシート51k · #3462

flowkit

できること

FlowKitは、フローサイトメトリーのデータを分析するためのツールです。「ゲート」と呼ばれる分析ルールを適用したり作成したりできます。複数のデータファイルをまとめて処理することも、FlowJoという別のプログラムで行った分析を再現することもできます。

使う場面

  • ✓定義済みの分析ルールを使って、フローサイトメトリーのサンプル群を分析したいとき。
  • ✓独自の分析ルールを作成し、サンプル内の特定の集団を特定したいとき。
  • ✓以前FlowJoで行ったデータ分析を再現したいとき。

スキルのリンク

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/flowkit/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/flowkit/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“提供したGatingMLのルールを使って、このフローサイトメトリーのデータファイルを分析してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

FlowKitはフローサイトメトリーのデータを読み込み、ユーザーが定義したルールや、ファイルから読み込んだルールを適用します。その後、各ルールに当てはまる細胞の数を計算し、詳細なレポートを出力します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

FlowKit

When to use

Use FlowKit to apply or build cytometry gating strategies, analyze batches of FCS samples, or reproduce supported FlowJo workspace analyses. It supports GatingML 2.0 and a subset of FlowJo 10 features. Import success alone does not establish agreement with FlowJo.

The examples and bundled helper target FlowKit 1.3.2 on Python 3.13. Upstream supports additional Python versions; those were not exercised here. The helper and examples were tested on synthetic FCS data, including a public FlowJo 10.7.1 synthetic workspace fixture. They are not biological validation.

Install

Use a separate environment; FlowKit 1.3.2 requires NumPy >2 and pandas <3:

uv venv --python 3.13 .venv-flowkit
uv pip install --python .venv-flowkit/bin/python "flowkit==1.3.2"
.venv-flowkit/bin/python -c "import flowkit; print(flowkit.__version__)"

The scientific package is BSD-3-Clause licensed; this skill is MIT licensed.

Workflow

  1. Identify the analysis definition. Use Session for a programmatic or GatingML strategy; use Workspace for FlowJo sample-specific gates, compensation, and transforms. Request the actual strategy or controls when biological thresholds have not been supplied.
  2. Inspect samples and channel identities. Match detector/PnN labels to compensation matrices and gate dimensions; PnS marker names may be empty or repeated. Verify sample IDs: the default is FCS $FIL, which can differ from the current filename. Reject ID collisions before loading a batch.
  3. Establish the coordinate system. Determine whether the supplied events are already compensated. Apply compensation before nonlinear transforms; match gate thresholds to the same transformed or untransformed coordinates. See compensation and gating.
  4. Check the hierarchy. Preserve parent gates and full gate paths, including root. For a study, review acquisition/time stability, debris exclusion, singlets, viability, and phenotype gates as appropriate to its panel. Use single-stain controls for compensation and suitable negative/FMO controls for positivity; demonstration thresholds are not transferable biology.
  5. Analyze and inspect. Run on all events, then check gate overlays and sample-level QC. A plot's subsample is not the population denominator. Review warnings and compare representative imported results to FlowJo.
  6. Export counts with denominators and provenance. Keep gate paths, sample IDs, total event counts, input hashes, package versions, and the analysis definition. Keep biological replicates identifiable; events from one specimen are not independent experimental replicates.

Apply an existing strategy

Set FLOWKIT_SKILL_DIR to this skill's installed directory. From the repository root it is skills/flowkit. Paths below represent the user's local inputs.

FLOWKIT_SKILL_DIR="skills/flowkit"
uv run --no-project --python 3.13 --with "flowkit==1.3.2" \
  python "$FLOWKIT_SKILL_DIR/scripts/analyze_gates.py" \
  --gatingml gates.xml --fcs sample.fcs --output-dir results-gatingml

For a FlowJo workspace, supply every FCS file in the selected group:

uv run --no-project --python 3.13 --with "flowkit==1.3.2" \
  python "$FLOWKIT_SKILL_DIR/scripts/analyze_gates.py" \
  --workspace study.wsp --group "Study" \
  --fcs sample-a.fcs sample-b.fcs --output-dir results-workspace

The helper writes gate_report.csv and provenance.json to a new directory. Each row includes sample_event_count, parent_event_count, and a full population_path; empty-parent percentages are blank and flagged with relative_percent_defined=False. It rejects duplicate sample IDs, missing/extra workspace-group samples, zero-event samples, and strategies without gates. It uses explicit input files, does not follow paths embedded in the workspace, and runs without multiprocessing or transformed-event caching. It still loads each sample into memory; use manageable batches via the Python API for large studies.

--filename-as-id deliberately switches from $FIL to file basenames. Use it only when those names match the analysis definition. See workspace analysis for partial-group analysis, result interpretation, and fluorescence summaries.

Build a strategy in Python

This runnable example uses sample.fcs with FSC-A, FL1-A, and FL2-A.

…

よくある質問

フローサイトメトリーの「ゲート」とは何ですか?

「ゲート」は、データ上に描く仮想の境界線のようなものです。異なる細胞の種類や集団を区別するために使います。例えば、生細胞だけを切り出したり、特定のタンパク質を発現している細胞だけを切り出したりするゲートを作成できます。

FlowKitはFlowJoとまったく同じように動作しますか?

FlowJoでの多くの分析を再現できますが、すべてではありません。対応しているのはFlowJo 10の特定の機能に限られ、結果にわずかな違いが出る場合があります。

FlowKitを使う前に、何かインストールする必要がありますか?

はい。Pythonのプログラミング環境にインストールする必要があります。「uv」と「pip」を使ったインストールの具体的なコマンドが、ドキュメントに記載されています。

詳細

作者による元の説明

Analyzes flow cytometry data with FlowKit, including spillover compensation, logicle and biexponential transforms, hierarchical gating, GatingML strategies, and supported FlowJo 10 workspaces. Use for reproducible gate counts, population percentages, gated fluorescence summaries, or reproducing a FlowJo analysis in Python. For FCS metadata inspection or file-format repair alone, use FlowIO.

repo: K-Dense-AI/scientific-agent-skills

人気

GitHubのスター
51k
ランキング
#3462
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル