Bio Chipseq Chromatin State Segmentationのロゴ

Bio Chipseq Chromatin State Segmentation

組織
PKU-YuanGroup
bio-chipseq-chromatin-state-segmentation

Segments the genome into chromatin states from combinatorial histone modification and chromatin factor ChIP-seq data. Uses ChromHMM (multivariate HMM on binarized signal, v1.27), Segway (Dynamic Bayesian Network on continuous signal), EpiSegMix (flexible-distribution HMM with duration modeling, 2024), EpiLogos (multi-biosample visualization), IDEAS (cell-type-aware joint), and full-stack ChromHMM (Vu Ernst 2022) for cross-cell-type segmentations. Handles state-count selection (15 vs 18 vs 25 states), binarization choice, OverlapEnrichment / NeighborhoodEnrichment downstream analysis, and cross-biosample integration. Use when learning chromatin states from a histone mark panel, characterizing learned states by genomic feature enrichment, or comparing chromatin landscapes across cell types.

概要

公開者PKU-YuanGroup
リポジトリOpenAI4S
スキル名bio-chipseq-chromatin-state-segmentation
スター
622
フォーク
72
同梱ファイル
2
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 2個の同梱ファイル

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PKU-YuanGroup/OpenAI4S.git /tmp/OpenAI4S
mkdir -p .claude/skills
cp -r /tmp/OpenAI4S/skills/bioskills/bio-chip-seq-chromatin-state-segmentation .claude/skills/bio-chipseq-chromatin-state-segmentation
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあるとすぐに、モデルが自動的にBio Chipseq Chromatin State Segmentationを読み込みます。

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

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

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

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

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

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

スキルの指示

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

Version Compatibility

Reference examples tested with: ChromHMM 1.27+, Segway 3.0+, EpiSegMix 1.0+, EpiLogos (Meuleman lab), IDEAS 1.20+, samtools 1.19+, bedtools 2.31+. ChromHMM requires Java 8+; runs as java -mx<MEMORY> -jar ChromHMM.jar <command>.

Chromatin State Segmentation

"Integrate multiple histone modification ChIP-seq tracks into chromatin states" -> Learn a small set of recurring combinatorial patterns of histone marks (active promoter, active enhancer, poised enhancer, polycomb-repressed, heterochromatic, transcribed, etc.) and segment the genome by which state each region belongs to. Output: per-state genomic intervals, state-by-mark emission matrix, and state-state transition matrix.

  • CLI (canonical): ChromHMM BinarizeBam -> LearnModel -> OverlapEnrichment / NeighborhoodEnrichment
  • CLI (continuous signal): Segway train -> posterior -> annotate
  • CLI (flexible distributions): EpiSegMix (2024)
  • Visualization across biosamples: EpiLogos (Meuleman lab)
  • Cell-type-aware joint: IDEAS

Chromatin state segmentation requires a panel of histone marks; minimum 4-5 marks (e.g., H3K4me3, H3K27ac, H3K4me1, H3K36me3, H3K27me3) for meaningful states. With fewer marks, simpler peak-based annotation (chipseq/peak-annotation) is more appropriate.

Tool Taxonomy

ToolMethodStrengthFails when
ChromHMM (Ernst & Kellis 2012; v1.27 current)Multivariate HMM on binarized 200 bp binsCanonical; widely used; integrated with Roadmap Epigenomics 15-state model; mature toolchainBinarization throws away signal quantitation; default 200 bp bins may be too coarse for sharp boundaries
Segway (Hoffman 2012)Dynamic Bayesian Network on continuous signalHigher resolution; uses signal magnitudes not binarizedMore complex setup; slower; less standardized output
EpiSegMix (Schmitz, Aggarwal, Laufer, Walter, Salhab, Rahmann 2024 Bioinformatics 40:btae178)HMM with flexible read-count distributions + duration modelingModern; handles both narrow and broad mark distributions in one modelNewer; smaller user base
EpiLogos (Meuleman lab)Multi-biosample visualization toolBuilt on top of ChromHMM/Segway segmentations; compare ChromHMM states across 100s of biosamplesVisualization tool, not a segmentation method itself
IDEAS (Zhang 2016)Cell-type-aware joint inferenceAcross-cell-type segmentation respecting cell-type identitySlower; complex parameter tuning
EpiCSeg (Mammana 2015)Negative binomial mixtureRead-count-based; doesn't need binarizationLess standardized output
GenoSTANHMM with various emission distributionsFlexibleLess actively developed
Roadmap 25-state model (Kundaje 2015)ChromHMM 25-state precomputed modelReference for cross-cell-type interpretationRequires the Roadmap imputed 12-mark panel
Full-stack ChromHMM (Vu Ernst 2022)100-state segmentation across 1032 datasets / 127 reference epigenomesComprehensive cross-tissue annotationComputationally intensive to retrain

ChromHMM Workflow

ChromHMM is the de facto standard. The workflow has 4 stages:

Step 1: Binarize ChIP-seq signal

bash
# Build cellMarkFileTable: cell_type<TAB>mark<TAB>file<TAB>(optional control)
cat > cellMarkFileTable.txt << EOF
GM12878	H3K4me3	gm12878_h3k4me3.bam	gm12878_input.bam
GM12878	H3K27me3	gm12878_h3k27me3.bam	gm12878_input.bam
GM12878	H3K27ac	gm12878_h3k27ac.bam	gm12878_input.bam
GM12878	H3K4me1	gm12878_h3k4me1.bam	gm12878_input.bam
GM12878	H3K36me3	gm12878_h3k36me3.bam	gm12878_input.bam
EOF

# Binarize BAMs into 200 bp bins; emission = whether mark exceeds Poisson threshold
java -mx16G -jar ChromHMM.jar BinarizeBam \
    -b 200 \
    chromsizes_hg38.txt \
    bam_dir/ \
    cellMarkFileTable.txt \
    binarized_output/

Output: per-chromosome _binary.txt files, one row per 200 bp bin, columns = marks, values 0/1.

Step 2: Learn model

bash
# Train HMM with N states; common choices: 15, 18, 25
# 15 states: Ernst & Kellis 2011 model; canonical
# 18 states: extends with additional regulatory states
# 25 states: Roadmap Epigenomics extended model
java -mx16G -jar ChromHMM.jar LearnModel \
    -p 8 \
    binarized_output/ \
    model_15state/ \
    15 \
    hg38

# Output: model_15state.txt (emission + transition matrices),
# emissions_15.png (visualization), transitions_15.png,
# per-chromosome _segments.bed (state assignments)
# AND automatically runs OverlapEnrichment + NeighborhoodEnrichment

Step 3: Interpret states from emission matrix

Roadmap 15-state assignments (canonical)
1_TssA — Active TSS (high H3K4me3, H3K27ac)
2_TssAFlnk — Flanking TSS (H3K4me3, H3K27ac, lower)
3_TxFlnk — Transcript flanking
4_Tx — Strong transcription (H3K36me3, H3K79me2 if available)
5_TxWk — Weak transcription
6_EnhG — Enhancer in gene body (H3K4me1, H3K27ac)
7_Enh — Generic enhancer (H3K4me1, H3K27ac)
8_ZNF/Rpts — Zinc-finger / repeats
9_Het — Heterochromatin (H3K9me3)
10_TssBiv — Bivalent TSS (H3K4me3 + H3K27me3)
11_BivFlnk — Bivalent flanking
12_EnhBiv — Bivalent enhancer (H3K4me1 + H3K27me3)
13_ReprPC — Polycomb-repressed (H3K27me3)
14_ReprPCWk — Weak Polycomb
15_Quies — Quiescent (no signal)

Step 4: Functional enrichment of states

bash
# OverlapEnrichment: enrichment of each state for external feature sets.
# Options (e.g. -labels) MUST precede the three positional args.
java -mx16G -jar ChromHMM.jar OverlapEnrichment \
    -labels \
    model_15state/GM12878_15_segments.bed \
    /path/to/anchor_files/ \
    enrichment_output/GM12878

# NeighborhoodEnrichment: enrichment relative to anchor positions (e.g., TSS)
java -mx16G -jar ChromHMM.jar NeighborhoodEnrichment \
    -labels \
    model_15state/GM12878_15_segments.bed \
    /path/to/tss_anchors.txt \
    enrichment_output/GM12878_TSS

Anchor files: BED files of features (CGIs, repeats, conserved elements, etc.) for OverlapEnrichment; position files for NeighborhoodEnrichment.

Choosing State Count

StatesUse caseMark panel size
8-10Initial exploration; small mark panel (3-4 marks)3-5 marks
15Roadmap Epigenomics canonical5 core (H3K4me3, H3K4me1, H3K36me3, H3K27me3, H3K9me3)
18Roadmap extended (adds H3K27ac -> fine enhancer subtypes)6 marks (core 5 + H3K27ac)
25Roadmap Epigenomics extended; cross-cell-type compatibility12 imputed marks
50+Full-stack model (Vu Ernst 2022)Many marks across many cell types

Practical workflow: Train at N=15, 18, 25; compare emission matrices; choose the smallest N where biology is interpretable. Higher N risks over-segmentation (state splitting random variation).

Segway Workflow

bash
# Segway reads only the Genomedata format, so first pack the signal tracks
# (one track per bigWig) plus the genome sequence into an archive.
genomedata-load \
    -s hg38.fa \
    -t h3k4me3=h3k4me3.bw \
    -t h3k27ac=h3k27ac.bw \
    -t h3k4me1=h3k4me1.bw \
    -t h3k36me3=h3k36me3.bw \
    -t h3k27me3=h3k27me3.bw \
    signal.genomedata

# Train Segway model; GENOMEDATA and TRAINDIR are positional
segway train \
    --num-labels=25 \
    --num-instances=3 \
    --resolution=100 \
    signal.genomedata traindir/

# Posterior probabilities + hard-call annotation (GENOMEDATA TRAINDIR OUTDIR, positional)
segway posterior signal.genomedata traindir/ posteriordir/
segway annotate signal.genomedata traindir/ identifydir/

# Output: identifydir/segway.bed.gz (state assignments)

Segway uses continuous signal (from the genomedata archive) vs ChromHMM's binarized bins. Trade-off: more information per region (continuous) but more complex training.

EpiLogos Visualization

EpiLogos doesn't perform segmentation; it visualizes existing ChromHMM/Segway segmentations across many biosamples (epilogos.org).

bash
# Use precomputed ChromHMM segmentations across multiple cell types
# Web interface: https://epilogos.altius.org/
# Local: github.com/meuleman/epilogos

Useful for: cross-cell-type comparison; identifying tissue-specific regulatory states; cohort-level chromatin landscape summaries.

Full-Stack ChromHMM (Vu Ernst 2022)

The full-stack model trained on 1032 datasets / 127 reference epigenomes:

bash
# Use precomputed model from Ernst lab
# github.com/ernstlab/full_stack_ChromHMM_annotations
# Annotate new sample by applying model to binarized data
java -mx16G -jar ChromHMM.jar MakeSegmentation \
    full_stack_model_100states.txt \
    binarized_sample/ \
    full_stack_output/

Useful for: applying a comprehensive cross-tissue annotation to a new sample; comparing to canonical Roadmap states.

Per-Tool Failure Modes

ChromHMM -- Bin size 200 bp too coarse for sharp boundaries

Trigger: Studying TF binding boundaries or sharp enhancer transitions at 200 bp resolution.

Mechanism: ChromHMM default 200 bp bins; biology may shift within a bin.

Fix: Reduce to -b 100 or -b 50 (smaller bin); increases memory and compute time but improves boundary resolution. Re-train model at finer resolution.

ChromHMM -- Binarization throws away signal quantitation

Trigger: Distinguishing low- from high-signal regions of the same state.

Mechanism: ChromHMM binarizes each 200 bp bin to 0/1 per mark; state assignment uses combinatorial pattern, not magnitude.

Fix: Use Segway (continuous signal) or EpiSegMix (flexible distributions) for magnitude-aware segmentation.

ChromHMM / Segway -- Wrong state count

Trigger: Training with N=50 states on a 4-mark panel; or N=10 on a 7-mark panel.

Mechanism: Excess states fragment biology; insufficient states force unrelated regions into the same state.

Symptom: Emission matrix shows redundant states (multiple states with same emission profile) at high N; or biologically distinct regions lumped together at low N.

Fix: Train at N=15, 18, 25; inspect emission matrix similarity; choose the smallest N where states are interpretable as distinct biology.

Mark panel mismatch with model

Trigger: Applying Roadmap 25-state model to a sample with different mark panel.

Mechanism: Model was trained on specific marks; emission probabilities are mark-specific. Applying to different mark panel produces nonsensical state assignments.

Fix: Either train a new model on the available mark panel; OR ensure the exact same marks (and ordering) as used in the model.

IgG control instead of input

Trigger: Using IgG controls in BinarizeBam for histone marks.

Mechanism: ChromHMM's binarization compares mark signal to control; histone mark biology assumes input (sonicated chromatin) as background, not IgG.

Fix: Use sonicated input as control for histone mark ChIP. IgG is not appropriate for ChromHMM binarization of histone marks.

Cross-cell-type state mapping

Trigger: Training separate models per cell type and trying to compare state assignments.

Mechanism: State 5 in cell type A may not correspond to state 5 in cell type B if trained independently.

Fix: Train one model on concatenated data from all cell types (joint segmentation); or apply a single precomputed model (Roadmap 15-state, full-stack) to all samples for consistent state labels.

Reconciliation

PatternLikely causeAction
ChromHMM and Segway segments differDifferent bin sizes / binarization vs continuousBoth can be valid; inspect emission matrices; pick the tool matching the resolution needs
State assignment varies wildly between replicatesInsufficient marks; over-binnedIncrease mark panel; reduce state count
Active TSS state overlaps polycomb state at promotersBivalent biology (Bernstein 2006)Expected for ESC-like cells; not an error; consider bivalent-specific state in N=18 model
Roadmap 25-state model annotates unknown cell typeCross-cell-type generalizationUse cautiously; verify against tissue-specific tracks
Heterochromatin (H3K9me3) state has too many binsH3K9me3 covers large fraction of genomeExpected; heterochromatin is genome-wide

Common Errors

Error / symptomCauseSolution
java.lang.OutOfMemoryErrorInsufficient JVM heapjava -mx32G -jar ChromHMM.jar ...
BinarizeBam very slowLarge BAMs without indexsamtools index all BAMs first
All states have similar emissionsMark panel too smallNeed at least 5 marks for canonical 15-state model
Segments file empty for some chromosomesChromosome not in chromsizes fileAdd or use -chrom flag to restrict
State labels don't match RoadmapTrained model independentlyUse Roadmap precomputed model OR map states by emission similarity
ChromHMM "no signal in marks"All bins binarized to 0Check signal quality; verify control normalization

References

  • Ernst J & Kellis M 2012 Nat Methods 9:215 (ChromHMM v1)
  • Ernst J & Kellis M 2017 Nat Protoc 12:2478 (ChromHMM protocol)
  • Hoffman MM et al 2012 Nat Methods 9:473 (Segway)
  • Schmitz JE, Aggarwal N, Laufer L, Walter J, Salhab A, Rahmann S 2024 Bioinformatics 40:btae178 (EpiSegMix)
  • Meuleman W et al 2020 Nature 584:244 (EpiLogos / DHS index)
  • Zhang Y & Hardison 2016 Nucleic Acids Res 44:6721 (IDEAS)
  • Mammana A & Chung HR 2015 Genome Biol 16:151 (EpiCSeg)
  • Roadmap Epigenomics Consortium 2015 Nature 518:317 (Roadmap 25-state model)
  • Vu H & Ernst J 2022 Genome Biol 23:9 (full-stack ChromHMM)
  • Kundaje A et al 2015 Nature 518:317 (Roadmap integrative analysis)

Related Skills

  • chip-seq/peak-calling - Peak calling per mark before segmentation
  • chip-seq/chipseq-qc - Replicate concordance per mark; QC before integration
  • chip-seq/peak-annotation - cCRE classification (PLS/pELS/dELS) complementary to chromatin states
  • chip-seq/spike-in-normalization - Spike-in normalize per-mark BAMs before binarization for cross-condition state comparison
  • atac-seq/single-cell-atac - scATAC + ChIP integration via multimodal methods
  • machine-learning/model-validation - Model selection (state count); cross-validation
  • data-visualization/genome-tracks - Visualize state segmentations
  • gene-regulatory-networks/coexpression-networks - Cross-reference chromatin states with co-expression modules

同梱ファイル

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

よくある質問

AIスキル「Bio Chipseq Chromatin State Segmentation」では何ができますか?

Segments the genome into chromatin states from combinatorial histone modification and chromatin factor ChIP-seq data. Uses ChromHMM (multivariate HMM on binarized signal, v1.27), Segway (Dynamic Bayesian Network on continuous signal), EpiSegMix (flexible-distribution HMM with duration modeling, 2024), EpiLogos (multi-biosample visualization), IDEAS (cell-type-aware joint), and full-stack ChromHMM (Vu Ernst 2022) for cross-cell-type segmentations. Handles state-count selection (15 vs 18 vs 25 states), binarization choice, OverlapEnrichment / NeighborhoodEnrichment downstream analysis, and cr...

TypingMindでBio Chipseq Chromatin State Segmentationを使うメリットは何ですか?

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

TypingMindにBio Chipseq Chromatin State Segmentationをインストールするにはどうすればよいですか?

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

Bio Chipseq Chromatin State Segmentationを使えるAIモデルはどれですか?

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

Bio Chipseq Chromatin State Segmentationで使えるAIモデルの数に制限はありますか?

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

AIスキル「Bio Chipseq Chromatin State Segmentation」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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