Communitygithub.com

deepTools

NGSデータ解析ツールキット。BAMからbigWigへの変換、QC(相関解析、PCA、フィンガープリント)、ヒートマップ/プロファイル(TSS、ピーク)を作成し、ChIP-seq、RNA-seq、ATAC-seqの可視化を支援します。

deepTools とは?

deepToolsは、ハイスループットシーケンシングデータの処理と解析のための包括的なPythonコマンドラインツール群です。BAMアラインメントを正規化されたカバレッジトラック(bigWig/bedGraph)に変換する機能、品質管理(フィンガープリント、相関、カバレッジ)の評価、サンプル間の比較・相関解析、ゲノム特徴周辺のヒートマップやプロファイルプロットの作成、エンリッチメント解析やピーク領域の可視化を提供します。ChIP-seq、RNA-seq、ATAC-seq、MNase-seqなど、さまざまなNGS実験に対応し、`bamCoverage`、`plotFingerprint`、`computeMatrix`、`plotHeatmap`などの強力なツールを備えています。このスキルは、Claude Code、Cursor、CodexなどのAIエージェント環境で、ユーザーのNGSデータ解析ワークフローを効率的にサポートし、ファイル変換、品質管理、可視化、サンプル比較などの多様なタスクを実行できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/deeptools

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

deepTools: NGSデータ解析ツールキット

概要

deepToolsは、ハイスループットシーケンシングデータの処理と解析のために設計された、Pythonコマンドラインツールの包括的なスイートです。deepToolsを使用して、品質管理、データの正規化、サンプル比較、ChIP-seq、RNA-seq、ATAC-seq、MNase-seq、およびその他のNGS実験のための出版品質の可視化を生成します。

主要な機能:

  • BAMアラインメントを正規化されたカバレッジトラック(bigWig/bedGraph)に変換
  • 品質管理評価(フィンガープリント、相関、カバレッジ)
  • サンプル比較と相関解析
  • ゲノム特徴周辺のヒートマップとプロファイルプロットの生成
  • エンリッチメント解析とピーク領域の可視化

このスキルを使用すべき場合

このスキルは次のような場合に使用します:

  • ファイル変換: 「BAMをbigWigに変換」、「カバレッジトラックを生成」、「ChIP-seqデータを正規化」
  • 品質管理: 「ChIP品質を確認」、「リプリケートを比較」、「シーケンシング深度を評価」、「QC解析」
  • 可視化: 「TSS周辺のヒートマップを作成」、「ChIPシグナルをプロット」、「エンリッチメントを可視化」、「プロファイルプロットを生成」
  • サンプル比較: 「処理とコントロールを比較」、「サンプルを相関」、「PCA解析」
  • 解析ワークフロー: 「ChIP-seqデータを解析」、「RNA-seqカバレッジ」、「ATAC-seq解析」、「完全なワークフロー」
  • 特定のファイルタイプの操作: ゲノミクスコンテキストでのBAMファイル、bigWigファイル、BED領域ファイル

クイックスタート

deepToolsを初めて使用する場合は、ファイルの検証と一般的なワークフローから始めてください:

1. 入力ファイルの検証

解析を開始する前に、検証スクリプトを使用してBAM、bigWig、BEDファイルを検証します:

python scripts/validate_files.py --bam sample1.bam sample2.bam --bed regions.bed

これにより、ファイルの存在、BAMインデックス、および形式の正確性がチェックされます。

2. ワークフローテンプレートの生成

標準的な解析には、ワークフロー生成ツールを使用してカスタマイズされたスクリプトを作成します:

# 利用可能なワークフローを一覧表示
python scripts/workflow_generator.py --list

# ChIP-seq QCワークフローを生成
python scripts/workflow_generator.py chipseq_qc -o qc_workflow.sh \
    --input-bam Input.bam --chip-bams "ChIP1.bam ChIP2.bam" \
    --genome-size 2913022398

# 実行可能にして実行
chmod +x qc_workflow.sh
./qc_workflow.sh

3. 最も一般的な操作

よく使用されるコマンドとパラメータについては、assets/quick_reference.md を参照してください。

インストール

uv pip install deepTools==3.5.6

上流では、特に共有HPCシステムでは、完全な依存関係解決のためにconda/biocondaを推奨しています:

conda install -c conda-forge -c bioconda deeptools

Apple Siliconでは、上流のドキュメントでは、上記のPyPIルートか、ネイティブのcondaパッケージが利用できない場合の osx-64 conda環境のいずれかを説明しています。

コアワークフローとツールカテゴリ

ChIP-seq QC、完全なChIP-seq解析、RNA-seqカバレッジ、およびATAC-seq解析のための完全なコマンドシーケンス — さらにBAM/bigWig処理、品質管理、および可視化ツールカテゴリ — は、references/core_workflows.md および references/workflows.md にあります。ツールごとのオプションは references/tools_reference.md にあります。

正規化方法

正しい正規化の選択は、有効な比較にとって重要です。包括的なガイダンスについては、references/normalization_methods.md を参照してください。

クイック選択ガイド:

  • ChIP-seqカバレッジ: RPGCまたはCPMを使用
  • ChIP-seq比較: log2とreadCountを指定してbamCompareを使用
  • RNA-seqビン: CPMを使用
  • RNA-seq遺伝子: RPKMを使用(遺伝子長を考慮)
  • ATAC-seq: RPGCまたはCPMを使用

正規化方法:

  • RPGC: 1×ゲノムカバレッジ(--effectiveGenomeSizeが必要)
  • CPM: マッピングされたリード100万あたりのカウント
  • RPKM: キロベース百万あたりのリード(ビン長およびライブラリサイズスケーリング)
  • BPM: 百万あたりのビン。ビン化されたシグナルに対するTPMスタイルのスケーリングに類似
  • なし: 生カウント(比較には非推奨)

完全な説明: references/normalization_methods.md

有効なゲノムサイズ

RPGC正規化には有効なゲノムサイズが必要です。一般的な値:

生物アセンブリサイズ使用法
ヒトGRCh38/hg382,913,022,398--effectiveGenomeSize 2913022398
ヒトT2T/CHM13CAT_v23,117,292,070--effectiveGenomeSize 3117292070
マウスGRCm39/mm392,654,621,783--effectiveGenomeSize 2654621783
マウスGRCm38/mm102,652,783,500--effectiveGenomeSize 2652783500
ゼブラフィッシュGRCz111,368,780,147--effectiveGenomeSize 1368780147
キイロショウジョウバエdm6142,573,017--effectiveGenomeSize 142573017
C. elegansce10/ce11100,286,401--effectiveGenomeSize 100286401

リード長固有の値を含む完全な表: references/effective_genome_sizes.md

ツール間で共通のパラメータ

多くのdeepToolsコマンドはこれらのオプションを共有しています:

パフォーマンス:

  • --numberOfProcessors, -p: 並列処理を有効にする(常に利用可能なコアを使用)
  • max / max/2: --numberOfProcessors でサポートされる値。最近のdeepToolsリリースではCPUアフィニティがより注意深く検出されるため、スケジューラの下で有用
  • --region: テスト用に特定の領域を処理(例: chr1:1-1000000)

リードフィルタリング:

  • --ignoreDuplicates: PCR重複を除去(ほとんどの解析で推奨)
  • --minMappingQuality: アライメント品質でフィルタリング(例: --minMappingQuality 10)
  • --minFragmentLength / --maxFragmentLength: 断片長の範囲
  • --samFlagInclude / --samFlagExclude: SAMフラグフィルタリング

リード処理:

  • --extendReads: 断片長に拡張(ChIP-seq: はい、RNA-seq: いいえ)
  • --centerReads: よりシャープなシグナルのために断片の中点を中心に配置

ベストプラクティス

ファイル検証

解析を開始する前に、scripts/validate_files.py を使用して常にファイルを検証し、以下を確認します:

  • ファイルの存在と読み取り可能性
  • BAMインデックスが存在するか(.baiファイル)
  • BED形式の正確性
  • ファイルサイズが妥当か

解析戦略

  1. QCから開始: 相関、カバレッジ、フィンガープリント解析を先に実行してから進む
  2. 小さな領域でテスト: パラメータテストには --region chr1:1-10000000 を使用
  3. コマンドを記録: 再現性のために完全なコマンドラインを保存
  4. 一貫した正規化を使用: 比較内のすべてのサンプルに同じ方法を適用
  5. ゲノムアセンブリを確認: BAMファイルとBEDファイルが一致するゲノムビルドを使用していることを確認

ChIP-seq固有

  • ChIP-seqでは常にリードを拡張: --extendReads 200
  • 重複を除去: ほとんどの場合 --ignoreDuplicates を使用
  • 最初にエンリッチメントを確認: 詳細な解析の前にplotFingerprintを実行
  • GC補正: 有意なバイアスが検出された場合のみ適用。GC補正後に --ignoreDuplicates を使用しないでください

RNA-seq固有

  • RNA-seqではリードを拡張しない(スプライスジャンクションにまたがる可能性がある)
  • 鎖特異的: 一般的なdUTPスタイルの鎖特異的ライブラリには --filterRNAstrand forward/reverse を使用。鎖ラベルを解釈する前にライブラリの方向を確認
  • 正規化: ビンにはCPM、遺伝子にはRPKM

ATAC-seq固有

  • Tn5補正を適用: --ATACshift を指定してalignmentSieveを使用
  • シフトには適切なペアのみを使用: --ATACshift は --shift 4 -5 5 -4 と同等であり、適切にペアリングされた断片にフィルタリングします
  • 断片フィルタリング: 適切な最小/最大断片長を設定
  • ヌクレオソームパターンを確認: 断片サイズプロットにラダーパターンが表示されるはずです

パフォーマンス最適化

  1. 複数のプロセッサを使用: --numberOfProcessors 8(または利用可能なコア)
  2. ビンサイズを大きくすると、処理が高速化され、ファイルサイズが小さくなります
  3. メモリ制限のあるシステムでは染色体を個別に処理
  4. alignmentSieveを使用してBAMファイルを事前フィルタリングし、再利用可能なフィルタリング済みファイルを作成
  5. bedGraphよりもbigWigを使用: 圧縮され、処理が高速

トラブルシューティング

一般的な問題

BAMインデックスが見つからない:

samtools index input.bam

メモリ不足: --region を使用して染色体を個別に処理:

bamCoverage --bam input.bam -o chr1.bw --region chr1

処理が遅い: --numberOfProcessors を増やすか、--binSize を増やす

bigWigファイルが大きすぎる: ビンサイズを大きくする: --binSize 50 またはそれ以上

検証エラー

検証スクリプトを実行して問題を特定:

python scripts/validate_files.py --bam *.bam --bed regions.bed

よくあるエラーとその解決方法は、スクリプトの出力で説明されています。

リファレンスドキュメント

このスキルには包括的なリファレンスドキュメントが含まれています:

references/tools_reference.md

カテゴリ別に整理されたすべてのdeepToolsコマンドの完全なドキュメント:

  • BAMおよびbigWig処理ツール(9ツール)
  • 品質管理ツール(6ツール)
  • 可視化ツール(3ツール)
  • その他のツール(3ツール、bigwigAverageを含む)

各ツールには以下が含まれます:

  • 目的と概要
  • 説明付きの主要パラメータ
  • 使用例
  • 重要な注意事項とベストプラクティス

このリファレンスを使用する場合: ユーザーが特定のツール、パラメータ、または詳細な使用方法について尋ねたとき。

references/workflows.md

一般的な解析のための完全なワークフローの例:

  • ChIP-seq品質管理ワークフロー
  • ChIP-seq完全解析ワークフロー
  • RNA-seqカバレッジワークフロー
  • ATAC-seq解析ワークフロー
  • マルチサンプル比較ワークフロー
  • ピーク領域解析ワークフロー
  • トラブルシューティングとパフォーマンスのヒント

このリファレンスを使用する場合: ユーザーが完全な解析パイプラインやワークフローの例を必要とするとき。

references/normalization_methods.md

正規化方法の包括的なガイド:

  • 各方法の詳細な説明(RPGC、CPM、RPKM、BPMなど)
  • 各方法を使用すべき場合
  • 公式と解釈
  • 実験タイプ別の選択ガイド
  • 一般的な落とし穴と解決策
  • クイックリファレンス表

このリファレンスを使用する場合: ユーザーが正規化、サンプル比較、または使用する方法について尋ねたとき。

references/effective_genome_sizes.md

有効なゲノムサイズの値と使用法:

  • 一般的な生物の値(ヒト、マウス、ショウジョウバエ、線虫、ゼブラフィッシュ)
  • リード長固有の値
  • 計算方法
  • コマンドでいつ、どのように使用するか
  • カスタムゲノムの計算手順

このリファレンスを使用する場合: ユーザーがRPGC正規化またはGCバイアス補正のためにゲノムサイズを必要とするとき。

ヘルパースクリプト

scripts/validate_files.py

deepTools解析のためにBAM、bigWig、BEDファイルを検証します。ファイルの存在、インデックス、および形式をチェックします。

使用法:

python scripts/validate_files.py --bam sample1.bam sample2.bam \
    --bed peaks.bed --bigwig signal.bw

使用する場合: 解析を開始する前、またはエラーのトラブルシューティング時。

scripts/workflow_generator.py

一般的なdeepToolsワークフローのカスタマイズ可能なbashスクリプトテンプレートを生成します。

利用可能なワークフロー:

  • chipseq_qc: ChIP-seq品質管理
  • chipseq_analysis: 完全なChIP-seq解析
  • rnaseq_coverage: 鎖特異的RNA-seqカバレッジ
  • atacseq: Tn5補正を伴うATAC-seq

使用法:

# ワークフローを一覧表示
python scripts/workflow_generator.py --list

# ワークフローを生成
python scripts/workflow_generator.py chipseq_qc -o qc.sh \
    --input-bam Input.bam --chip-bams "ChIP1.bam ChIP2.bam" \
    --genome-size 2913022398 --threads 8

# 生成されたワークフローを実行
chmod +x qc.sh
./qc.sh

使用する場合: ユーザーが標準ワークフローを要求するか、カスタマイズするためのテンプレートスクリプトを必要とするとき。

アセット

assets/quick_reference.md

最も一般的なコマンド、有効なゲノムサイズ、および典型的なワークフローパターンを含むクイックリファレンスカード。

使用する場合: ユーザーが詳細なドキュメントなしでクイックコマンドの例を必要とするとき。

ユーザーリクエストの処理

新規ユーザーの場合

  1. インストールの確認から開始
  2. scripts/validate_files.py を使用して入力ファイルを検証
  3. 実験タイプに基づいて適切なワークフローを推奨
  4. scripts/workflow_generator.py を使用してワークフローテンプレートを生成
  5. カスタマイズと実行をガイド

経験豊富なユーザーの場合

  1. 要求された操作に対して特定のツールコマンドを提供
  2. references/tools_reference.md の該当セクションを参照
  3. 最適化とベストプラクティスを提案
  4. 問題のトラブルシューティングを提供

特定のタスクの場合

「BAMをbigWigに変換」:

  • 適切な正規化を指定してbamCoverageを使用
  • ユースケースに基づいてRPGCまたはCPMを推奨
  • 生物の有効なゲノムサイズを提供
  • 関連パラメータを提案(extendReads、ignoreDuplicates、binSize)

「ChIP品質を確認」:

  • 完全なQCワークフローを実行するか、具体的にplotFingerprintを使用
  • 結果の解釈を説明
  • 結果に基づいてフォローアップアクションを提案

「ヒートマップを作成」:

  • 2段階のプロセスをガイド: computeMatrix → plotHeatmap
  • 適切なマトリックスモード(reference-point vs scale-regions)の選択を支援
  • 可視化パラメータとクラスタリングオプションを提案

「サンプルを比較」:

  • 2サンプル比較にはbamCompareを推奨
  • 複数サンプルにはmultiBamSummary + plotCorrelationを推奨
  • 正規化方法の選択をガイド

ドキュメントの参照

ユーザーが詳細な情報を必要とする場合:

  • ツールの詳細: references/tools_reference.md の特定のセクションに誘導
  • ワークフロー: 完全な解析パイプラインには references/workflows.md を使用
  • 正規化: 方法の選択には references/normalization_methods.md を参照
  • ゲノムサイズ: references/effective_genome_sizes.md を参照

対話例

ユーザー: 「ChIP-seqデータを解析する必要があります」

応答アプローチ:

  1. 利用可能なファイルについて尋ねる(BAMファイル、ピーク、遺伝子)
  2. 検証スクリプトを使用してファイルを検証
  3. chipseq_analysisワークフローテンプレートを生成
  4. 特定のファイルと生物に合わせてカスタマイズ
  5. スクリプトの実行中に各ステップを説明

ユーザー: 「どの正規化を使用すればよいですか?」

応答アプローチ:

  1. 実験タイプについて尋ねる(ChIP-seq、RNA-seqなど)
  2. 比較の目標について尋ねる(サンプル内またはサンプル間)
  3. references/normalization_methods.md の選択ガイドを参照
  4. 根拠とともに適切な方法を推奨
  5. パラメータを含むコマンド例を提供

ユーザー: 「TSS周辺のヒートマップを作成してください」

応答アプローチ:

  1. bigWigと遺伝子アノテーションファイルを確認
  2. computeMatrixのスコア領域オプションを説明
  3. 適切なパラメータを選択するのを支援(アップストリーム/ダウンストリーム、ビンサイズ)
  4. computeMatrixを実行
  5. plotHeatmapを使用してヒートマップを生成し、クラスタリングオプションを説明

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

関連スキル