Communitygithub.com

depmap

Cancer Dependency Map(DepMap)のCRISPR Chronos遺伝子依存性スコア、薬剤感受性データ、遺伝子効果プロファイルを照会します。がん特異的な脆弱性や合成致死相互作用の特定、創薬標的のバリデーションに活用します。

depmap とは?

このスキルは、Broad Instituteが開発・公開するCancer Dependency Map(DepMap)プロジェクトのデータセットを活用し、がん細胞株における遺伝子依存性スコア(CRISPR Chronos、RNAi DEMETER2)や薬剤感受性データ(PRISM)、細胞株アノテーションを効率的に取得・解析するための機能を提供します。ユーザーは、DepMap APIへのクエリ、データファイルのダウンロード、依存性プロファイルの統計解析(選択的依存性、バイオマーカー解析、共必須性解析など)をPythonを使った実践的なコード例とともに実行できます。これにより、特定のがん種に必須な遺伝子の特定、合成致死相互作用の発見、創薬標的の妥当性評価といった研究ワークフローを、コマンドラインやAIエージェント(Claude Code、Cursor、Codexなど)から円滑に進めることが可能です。スキルは、ダウンロードベースの大規模解析を推奨しつつ、APIによる軽量クエリもサポートしており、解析のスケールや目的に応じた柔軟な利用ができます。

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

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

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

ドキュメント

DepMap — Cancer Dependency Map(がん依存性マップ)

概要

Cancer Dependency Map(DepMap)プロジェクトは、Broad Instituteが主導する、ゲノムワイドCRISPRノックアウトスクリーニング(DepMap CRISPR)、RNA干渉(RNAi)、化合物感受性アッセイ(PRISM)を用いて数百のがん細胞株にわたる遺伝子依存性を体系的に特徴付ける取り組みです。DepMapデータは以下の目的に不可欠です:

  • 特定のがん種において必須な遺伝子を特定する
  • がん選択的な依存性(治療標的)を見つける
  • がん治療薬の標的を検証する
  • 合成致死相互作用を発見する

主要リソース:

このスキルを使用するタイミング

以下のような場合にDepMapを使用します:

  • 標的検証:特定の変異(例:KRAS変異)を持つがん細胞株において、遺伝子が生存に必須か?
  • バイオマーカー発見:どのゲノム特徴が遺伝子ノックアウトに対する感受性を予測するか?
  • 合成致死:別の遺伝子が変異・欠失している場合に選択的に必須となる遺伝子を見つける
  • 薬剤感受性:どの細胞株特徴が化合物への応答を予測するか?
  • パンがん必須性:遺伝子はすべてのがん種で広く必須(悪い標的)か、選択的に必須か?
  • 相関解析:どの遺伝子ペアが相関した依存性プロファイル(共必須性)を持つか?

コアコンセプト

依存性スコア

スコア範囲意味
Chronos (CRISPR)~ -3 ~ 0+負の値が大きいほど必須性が高い。一般的な必須閾値:−1。パン必須遺伝子は約−1~−2
RNAi DEMETER2~ -3 ~ 0+Chronosと同様のスケール
Gene Effect正規化済み正規化されたChronos;−1は一般的必須遺伝子の中央値効果

主要閾値:

  • Chronos ≤ −0.5:依存性の可能性あり
  • Chronos ≤ −1:強い依存性(一般的必須遺伝子の範囲)

細胞株アノテーション

各細胞株には以下の情報があります:

  • DepMap_ID: 一意識別子(例:ACH-000001)
  • cell_line_name: 人間が読み取れる名称
  • primary_disease: がん種
  • lineage: 広い組織系統
  • lineage_subtype: 特定のサブタイプ

コア機能

1. DepMap API

import requests
import pandas as pd

BASE_URL = "https://depmap.org/portal/api"

def depmap_get(endpoint, params=None):
    url = f"{BASE_URL}/{endpoint}"
    response = requests.get(url, params=params)
    response.raise_for_status()
    return response.json()

2. 遺伝子依存性スコア

def get_gene_dependency(gene_symbol, dataset="Chronos_Combined"):
    """特定の遺伝子のCRISPR依存性スコアを全細胞株から取得。"""
    url = f"{BASE_URL}/gene"
    params = {
        "gene_id": gene_symbol,
        "dataset": dataset
    }
    response = requests.get(url, params=params)
    return response.json()

# あるいは /data エンドポイントを使用:
def get_dependencies_slice(gene_symbol, dataset_name="CRISPRGeneEffect"):
    """データセットから遺伝子の依存性スライスを取得。"""
    url = f"{BASE_URL}/data/gene_dependency"
    params = {"gene_name": gene_symbol, "dataset_name": dataset_name}
    response = requests.get(url, params=params)
    data = response.json()
    return data

3. ダウンロードベースの解析(大規模クエリに推奨)

大規模解析には、DepMapデータファイルをダウンロードしてローカルで解析します:

import pandas as pd
import requests, os

def download_depmap_data(url, output_path):
    """DepMapデータファイルをダウンロード。"""
    response = requests.get(url, stream=True)
    with open(output_path, 'wb') as f:
        for chunk in response.iter_content(chunk_size=8192):
            f.write(chunk)

# DepMap 24Q4 データファイル(必要に応じてバージョンを更新)
FILES = {
    "crispr_gene_effect": "https://figshare.com/ndownloader/files/...",
    # または https://depmap.org/portal/download/all/ からダウンロード
    # 利用可能なファイル:
    # CRISPRGeneEffect.csv - Chronos遺伝子効果スコア
    # OmicsExpressionProteinCodingGenesTPMLogp1.csv - mRNA発現
    # OmicsSomaticMutationsMatrixDamaging.csv - 変異バイナリ行列
    # OmicsCNGene.csv - コピー数
    # sample_info.csv - 細胞株メタデータ
}

def load_depmap_gene_effect(filepath="CRISPRGeneEffect.csv"):
    """
    DepMap CRISPR遺伝子効果行列を読み込み。
    行 = 細胞株 (DepMap_ID)、列 = 遺伝子 (Symbol (EntrezID))
    """
    df = pd.read_csv(filepath, index_col=0)
    # 列名を遺伝子シンボルのみに変更
    df.columns = [col.split(" ")[0] for col in df.columns]
    return df

def load_cell_line_info(filepath="sample_info.csv"):
    """細胞株メタデータを読み込み。"""
    return pd.read_csv(filepath)

4. 選択的依存性の特定

import numpy as np
import pandas as pd

def find_selective_dependencies(gene_effect_df, cell_line_info, target_gene,
                                 cancer_type=None, threshold=-0.5):
    """特定の遺伝子に選択的に依存する細胞株を特定。"""

    # 対象遺伝子のスコアを取得
    if target_gene not in gene_effect_df.columns:
        return None

    scores = gene_effect_df[target_gene].dropna()
    dependent = scores[scores <= threshold]

    # 細胞株情報を追加
    result = pd.DataFrame({
        "DepMap_ID": dependent.index,
        "gene_effect": dependent.values
    }).merge(cell_line_info[["DepMap_ID", "cell_line_name", "primary_disease", "lineage"]])

    if cancer_type:
        result = result[result["primary_disease"].str.contains(cancer_type, case=False, na=False)]

    return result.sort_values("gene_effect")

# 使用例(データ読み込み後)
# df_effect = load_depmap_gene_effect("CRISPRGeneEffect.csv")
# cell_info = load_cell_line_info("sample_info.csv")
# deps = find_selective_dependencies(df_effect, cell_info, "KRAS", cancer_type="Lung")

5. バイオマーカー解析(遺伝子効果 vs 変異)

import pandas as pd
from scipy import stats

def biomarker_analysis(gene_effect_df, mutation_df, target_gene, biomarker_gene):
    """
    バイオマーカー遺伝子の変異が対象遺伝子への依存性を予測するかを検定。

    Args:
        gene_effect_df: CRISPR遺伝子効果DataFrame
        mutation_df: バイナリ変異DataFrame(1 = 変異あり)
        target_gene: 依存性を評価する遺伝子
        biomarker_gene: 変異が依存性を予測する可能性のある遺伝子
    """
    if target_gene not in gene_effect_df.columns or biomarker_gene not in mutation_df.columns:
        return None

    # 細胞株を揃える
    common_lines = gene_effect_df.index.intersection(mutation_df.index)
    scores = gene_effect_df.loc[common_lines, target_gene].dropna()
    mutations = mutation_df.loc[scores.index, biomarker_gene]

    mutated = scores[mutations == 1]
    wt = scores[mutations == 0]

    stat, pval = stats.mannwhitneyu(mutated, wt, alternative='less')

    return {
        "target_gene": target_gene,
        "biomarker_gene": biomarker_gene,
        "n_mutated": len(mutated),
        "n_wt": len(wt),
        "mean_effect_mutated": mutated.mean(),
        "mean_effect_wt": wt.mean(),
        "pval": pval,
        "significant": pval < 0.05
    }

6. 共必須性解析

import pandas as pd

def co_essentiality(gene_effect_df, target_gene, top_n=20):
    """最も相関の高い依存性プロファイルを持つ遺伝子(共必須パートナー)を特定。"""
    if target_gene not in gene_effect_df.columns:
        return None

    target_scores = gene_effect_df[target_gene].dropna()

    correlations = {}
    for gene in gene_effect_df.columns:
        if gene == target_gene:
            continue
        other_scores = gene_effect_df[gene].dropna()
        common = target_scores.index.intersection(other_scores.index)
        if len(common) < 50:
            continue
        r = target_scores[common].corr(other_scores[common])
        if not pd.isna(r):
            correlations[gene] = r

    corr_series = pd.Series(correlations).sort_values(ascending=False)
    return corr_series.head(top_n)

# 共必須遺伝子はしばしば同じ生物学的複合体や経路を共有する

クエリワークフロー

ワークフロー1: がん種に対する標的検証

  1. CRISPRGeneEffect.csv と sample_info.csv をダウンロード
  2. がん種で細胞株をフィルタリング
  3. 対象遺伝子の平均遺伝子効果をがん種 vs その他で計算
  4. 選択性を計算:そのがん種に対する依存性の特異性はどの程度か?
  5. バイオマーカーとして変異、発現、CNAデータと相互参照

ワークフロー2: 合成致死スクリーニング

  1. 対象遺伝子(例:BRCA1変異)に変異・欠失を持つ細胞株を特定
  2. 変異株 vs WT株ですべての遺伝子の遺伝子効果スコアを計算
  3. 変異株で有意に必須性が高い遺伝子(合成致死パートナー)を特定
  4. 選択性と効果サイズでフィルタリング

ワークフロー3: 化合物感受性解析

  1. PRISM化合物感受性データ(primary-screen-replicate-treatment-info.csv)をダウンロード
  2. 化合物のAUC/log2(fold-change)とゲノム特徴を相関
  3. 化合物感受性の予測バイオマーカーを特定

DepMapデータファイルリファレンス

ファイル説明
CRISPRGeneEffect.csvCRISPR Chronos遺伝子効果(主要依存性データ)
CRISPRGeneEffectUnscaled.csv非スケールCRISPRスコア
RNAi_merged.csvDEMETER2 RNAi依存性
sample_info.csv細胞株メタデータ(系統、疾患など)
OmicsExpressionProteinCodingGenesTPMLogp1.csvmRNA発現
OmicsSomaticMutationsMatrixDamaging.csv有害な体細胞変異(バイナリ)
OmicsCNGene.csv遺伝子ごとのコピー数
PRISM_Repurposing_Primary_Screens_Data.csv薬剤感受性(リパーパシングライブラリ)

すべてのファイルは以下からダウンロード可能:https://depmap.org/portal/download/all/

ベストプラクティス

  • 現在のCRISPR解析にはChronosスコアを使用する(DEMETER2ではなく) — 切断効率をより適切に制御
  • パン必須性とがん選択性を区別する:分散が低い(すべての株で必須)遺伝子は創薬標的として不適切
  • 発現データで検証する:細胞株で発現していない遺伝子は、実際の機能に関わらず非必須としてスコアリングされる
  • 細胞株識別にはDepMap IDを使用する — cell_line_nameは曖昧になる可能性がある
  • コピー数を考慮する:増幅された遺伝子はコピー数効果(ジャンクDNA仮説)により必須に見える場合がある
  • 多重検定補正:ゲノム全体でバイオマーカー関連を計算する場合は、FDR補正を適用する

追加リソース

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.

関連スキル