Communitygithub.com

depmap

查詢癌症依賴性圖譜 (DepMap) 的癌細胞株基因依賴性分數 (CRISPR Chronos)、藥物敏感性資料與基因效應輪廓,用於識別癌症特異性弱點、合成致死相互作用以及驗證腫瘤藥物標靶。

depmap 是什麼?

此技能可讓 AI 代理程式查詢由 Broad Institute 維護的 Cancer Dependency Map (DepMap) 資料庫,用於尋找癌症細胞株中的基因依賴性。它支援多種資料查詢與分析工作流程,包括取得 CRISPR 基因效應分數 (Chronos)、RNAi 依賴性 (DEMETER2)、化合物敏感性 (PRISM) 以及細胞株註釋。主要功能包括通過 DepMap API 或直接下載 CSV 檔案 (例如CRISPRGeneEffect.csv、sample_info.csv) 來取得資料,並以 Python (pandas, scipy) 實作常見的生物資訊分析:尋找選擇性依賴性、生物標記分析 (基因效應 vs 突變)、共必需性分析以及合成致死性篩選。該技能強調最佳實踐,例如使用 Chronos 分數、區分泛必需基因與選擇性必需基因,以及在分析拷貝數變異時進行校正。它支援在 Cursor、Claude Code 和 Codex 等開發工具中直接使用,協助研究人員驗證腫瘤藥物標靶、發現生物標記以及探索合成致死相互作用。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

DepMap — 癌症依賴性圖譜

概述

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),欄 = 基因 (GeneSymbol (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):
    """
    檢驗 biomarker_gene 的突變是否可預測對 target_gene 的依賴性。

    參數:
        gene_effect_df: CRISPR 基因效應資料框
        mutation_df: 二元突變資料框 (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)

# 共必需基因通常共享生物複合物或 pathways

查詢工作流程

工作流程 1:針對特定癌症類型的標靶驗證

  1. 下載 CRISPRGeneEffect.csv 和 sample_info.csv
  2. 按癌症類型篩選細胞株
  3. 計算目標基因在該癌症與所有其他癌症中的平均基因效應
  4. 計算選擇性:依賴性對癌症類型的特異性有多高?
  5. 交叉比對突變、表現或 CNA 資料作為生物標記

工作流程 2:合成致死性篩選

  1. 識別帶有目標基因突變/缺失的細胞株(例如 BRCA1 突變株)
  2. 計算突變株與野生株中所有基因的基因效應分數
  3. 識別在突變株中顯著更必需的基因(合成致死夥伴)
  4. 根據選擇性和效應大小進行過濾

工作流程 3:化合物敏感性分析

  1. 下載 PRISM 化合物敏感性資料 (primary-screen-replicate-treatment-info.csv)
  2. 將化合物 AUC/log2(倍數變化) 與基因組特徵進行相關性分析
  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/ 下載所有檔案。

最佳實踐

  • 使用 Chronos 分數(非 DEMETER2)進行當前 CRISPR 分析 — 對切割效率有更好的校正
  • 區分泛必需與選擇性必需:變異度低的目標基因(所有細胞株皆必需)是不良的藥物標靶
  • 以表現資料驗證:在細胞株中未表現的基因無論其實際功能為何,都會被評為非必需
  • 使用 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.

相關技能