Communitygithub.com

depmap

查询癌症依赖图谱 (Cancer Dependency Map, DepMap) 中的癌细胞系基因依赖评分 (CRISPR Chronos)、药物敏感性数据和基因效应图谱。适用于识别癌症特异性脆弱性、合成致死相互作用以及验证肿瘤药物靶点。

depmap 是什么?

DepMap技能使AI助手能够查询癌症依赖图谱(DepMap),这是博德研究所策划的大规模开放数据集。它提供了数千种癌细胞系的CRISPR Chronos基因效应数据、PRISM药物敏感性数据、RNAi依赖评分以及详细的细胞系注释。该技能支持多种工作流程,包括使用DepMap API获取特定基因的依赖分数,或下载整个数据集进行本地分析。用户可以识别选择性依赖性,执行 biomarker 分析(例如,将基因效应与体细胞突变相关联),并进行共必需性分析以发现共享的生物学通路。最佳实践强调区分泛必需基因(不良靶点)和癌症选择性基因,使用 DepMap_ID 进行准确的细胞系识别,以及解释拷贝数伪影。该技能涵盖从数据下载、预处理到统计分析(如用于biomarker发现的Mann-Whitney U检验)的整个流程。

兼容平台~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),列 = 基因 (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):
    """
    检验 biomarker_gene 的突变是否能预测对 target_gene 的依赖性。

    参数:
        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. 野生型细胞系中的基因效应评分
  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.

相关技能