{"id":"depmap","name":"depmap","summary":"がん依存性マップ(DepMap)でがん細胞株の遺伝子依存スコア(CRISPR Chronos)、薬物感受性データ、遺伝子効果プロファイルを検索できます。","body":"# DepMap — Cancer Dependency Map\n\n## Overview\n\nThe Cancer Dependency Map (DepMap) project, run by the Broad Institute, systematically characterizes genetic dependencies across hundreds of cancer cell lines using genome-wide CRISPR knockout screens (DepMap CRISPR), RNA interference (RNAi), and compound sensitivity assays (PRISM). DepMap data is essential for:\n- Identifying which genes are essential for specific cancer types\n- Finding cancer-selective dependencies (therapeutic targets)\n- Validating oncology drug targets\n- Discovering synthetic lethal interactions\n\n**Key resources:**\n- DepMap Portal: https://depmap.org/portal/\n- DepMap data downloads: https://depmap.org/portal/download/all/\n- Python package: `depmap` (or access via API/downloads)\n- API: https://depmap.org/portal/api/\n\n## When to Use This Skill\n\nUse DepMap when:\n\n- **Target validation**: Is a gene essential for survival in cancer cell lines with a specific mutation (e.g., KRAS-mutant)?\n- **Biomarker discovery**: What genomic features predict sensitivity to knockout of a gene?\n- **Synthetic lethality**: Find genes that are selectively essential when another gene is mutated/deleted\n- **Drug sensitivity**: What cell line features predict response to a compound?\n- **Pan-cancer essentiality**: Is a gene broadly essential across all cancer types (bad target) or selectively essential?\n- **Correlation analysis**: Which pairs of genes have correlated dependency profiles (co-essentiality)?\n\n## Core Concepts\n\n### Dependency Scores\n\n| Score | Range | Meaning |\n|-------|-------|---------|\n| **Chronos** (CRISPR) | ~ -3 to 0+ | More negative = more essential. Common essential threshold: −1. Pan-essential genes ~−1 to −2 |\n| **RNAi DEMETER2** | ~ -3 to 0+ | Similar scale to Chronos |\n| **Gene Effect** | normalized | Normalized Chronos; −1 = median effect of common essential genes |\n\n**Key thresholds:**\n- Chronos ≤ −0.5: likely dependent\n- Chronos ≤ −1: strongly dependent (common essential range)\n\n### Cell Line Annotations\n\nEach cell line has:\n- `DepMap_ID`: unique identifier (e.g., `ACH-000001`)\n- `cell_line_name`: human-readable name\n- `primary_disease`: cancer type\n- `lineage`: broad tissue lineage\n- `lineage_subtype`: specific subtype\n\n## Core Capabilities\n\n### 1. DepMap API\n\n```python\nimport requests\nimport pandas as pd\n\nBASE_URL = \"https://depmap.org/portal/api\"\n\ndef depmap_get(endpoint, params=None):\n    url = f\"{BASE_URL}/{endpoint}\"\n    response = requests.get(url, params=params)\n    response.raise_for_status()\n    return response.json()\n```\n\n### 2. Gene Dependency Scores\n\n```python\ndef get_gene_dependency(gene_symbol, dataset=\"Chronos_Combined\"):\n    \"\"\"Get CRISPR dependency scores for a gene across all cell lines.\"\"\"\n    url = f\"{BASE_URL}/gene\"\n    params = {\n        \"gene_id\": gene_symbol,\n        \"dataset\": dataset\n    }\n    response = requests.get(url, params=params)\n    return response.json()\n\n# Alternatively, use the /data endpoint:\ndef get_dependencies_slice(gene_symbol, dataset_name=\"CRISPRGeneEffect\"):\n    \"\"\"Get a gene's dependency slice from a dataset.\"\"\"\n    url = f\"{BASE_URL}/data/gene_dependency\"\n    params = {\"gene_name\": gene_symbol, \"dataset_name\": dataset_name}\n    response = requests.get(url, params=params)\n    data = response.json()\n    return data\n```\n\n### 3. Download-Based Analysis (Recommended for Large Queries)\n\nFor large-scale analysis, download DepMap data files and analyze locally:\n\n```python\nimport pandas as pd\nimport requests, os\n\ndef download_depmap_data(url, output_path):\n    \"\"\"Download a DepMap data file.\"\"\"\n    response = requests.get(url, stream=True)\n    with open(output_path, 'wb') as f:\n        for chunk in response.iter_content(chunk_size=8192):\n            f.write(chunk)\n\n# DepMap 24Q4 data files (update version as needed)\nFILES = {\n    \"crispr_gene_effect\": \"https://figshare.com/ndownloader/files/...\",\n    # OR download from: https://depmap.org/portal/download/all/\n    # Files available:\n    # CRISPRGeneEffect.csv - Chronos gene effect scores\n    # OmicsExpressionProteinCodingGenesTPMLogp1.csv - mRNA expression\n    # OmicsSomaticMutationsMatrixDamaging.csv - mutation binary matrix\n    # OmicsCNGene.csv - copy number\n    # sample_info.csv - cell line metadata\n}\n\ndef load_depmap_gene_effect(filepath=\"CRISPRGeneEffect.csv\"):\n    \"\"\"\n    Load DepMap CRISPR gene effect matrix.\n    Rows = cell lines (DepMap_ID), Columns = genes (Symbol (EntrezID))\n    \"\"\"\n    df = pd.read_csv(filepath, index_col=0)\n    # Rename columns to gene symbols only\n    df.columns = [col.split(\" \")[0] for col in df.columns]\n    return df\n\ndef load_cell_line_info(filepath=\"sample_info.csv\"):\n    \"\"\"Load cell line metadata.\"\"\"\n    return pd.read_csv(filepath)\n```\n\n### 4. Identifying Selective Dependencies\n\n```python\nimport numpy as np\nimport pandas as pd\n\ndef find_selective_dependencies(gene_effect_df, cell_line_info, target_gene,\n                                 cancer_type=None, threshold=-0.5):\n    \"\"\"Find cell lines selectively dependent on a gene.\"\"\"\n\n    # Get scores for target gene\n    if target_gene not in gene_effect_df.columns:\n        return None\n\n    scores = gene_effect_df[target_gene].dropna()\n    dependent = scores[scores <= threshold]\n\n    # Add cell line info\n    result = pd.DataFrame({\n        \"DepMap_ID\": dependent.index,\n        \"gene_effect\": dependent.values\n    }).merge(cell_line_info[[\"DepMap_ID\", \"cell_line_name\", \"primary_disease\", \"lineage\"]])\n\n    if cancer_type:\n        result = result[result[\"primary_disease\"].str.contains(cancer_type, case=False, na=False)]\n\n    return result.sort_values(\"gene_effect\")\n\n# Example usage (after loading data)\n# df_effect = load_depmap_gene_effect(\"CRISPRGeneEffect.csv\")\n# cell_info = load_cell_line_info(\"sample_info.csv\")\n# deps = find_selective_dependencies(df_effect, cell_info, \"KRAS\", cancer_type=\"Lung\")\n```\n\n### 5. Biomarker Analysis (Gene Effect vs. Mutation)\n\n```python\nimport pandas as pd\nfrom scipy import stats\n\ndef biomarker_analysis(gene_effect_df, mutation_df, target_gene, biomarker_gene):\n    \"\"\"\n    Test if mutation in biomarker_gene predicts dependency on target_gene.\n\n    Args:\n        gene_effect_df: CRISPR gene effect DataFrame\n        mutation_df: Binary mutation DataFrame (1 = mutated)\n        target_gene: Gene to assess dependency of\n        biomarker_gene: Gene whose mutation may predict dependency\n    \"\"\"\n    if target_gene not in gene_effect_df.columns or biomarker_gene not in mutation_df.columns:\n        return None\n\n    # Align cell lines\n    common_lines = gene_effect_df.index.intersection(mutation_df.index)\n    scores = gene_effect_df.loc[common_lines, target_gene].dropna()\n    mutations = mutation_df.loc[scores.index, biomarker_gene]\n\n    mutated = scores[mutations == 1]\n    wt = scores[mutations == 0]\n\n    stat, pval = stats.mannwhitneyu(mutated, wt, alternative='less')\n\n    return {\n        \"target_gene\": target_gene,\n        \"biomarker_gene\": biomarker_gene,\n        \"n_mutated\": len(mutated),\n        \"n_wt\": len(wt),\n        \"mean_effect_mutated\": mutated.mean(),\n        \"mean_effect_wt\": wt.mean(),\n        \"pval\": pval,\n        \"significant\": pval < 0.05\n    }\n```\n\n### 6. Co-Essentiality Analysis\n\n```python\nimport pandas as pd\n\ndef co_essentiality(gene_effect_df, target_gene, top_n=20):\n    \"\"\"Find genes with most correlated dependency profiles (co-essential partners).\"\"\"\n    if target_gene not in gene_effect_df.columns:\n        return None\n\n    target_scores = gene_effect_df[target_gene].dropna()\n\n    correlations = {}\n    for gene in gene_effect_df.columns:\n        if gene == target_gene:\n            continue\n        other_scores = gene_effect_df[gene].dropna()\n        common = target_scores.index.intersection(other_scores.index)\n        if len(common) < 50:\n            continue\n        r = target_scores[common].corr(other_scores[common])\n        if not pd.isna(r):\n            correlations[gene] = r\n\n    corr_series = pd.Series(correlations).sort_values(ascending=False)\n    return corr_series.head(top_n)\n\n# Co-essential genes often share biological complexes or pathways\n```\n\n## Query Workflows\n\n### Workflow 1: Target Validation for a Cancer Type\n\n1. Download `CRISPRGeneEffect.csv` and `sample_info.csv`\n2. Filter cell lines by cancer type\n3. Compute mean gene effect for target gene in cancer vs. all others\n4. Calculate selectivity: how specific is the dependency to your cancer type?\n5. Cross-reference with mutation, expression, or CNA data as biomarkers\n\n### Workflow 2: Synthetic Lethality Screen\n\n1. Identify cell lines with mutation/deletion in gene of interest (e.g., BRCA1-mutant)\n2. Compute gene effect scores for all genes in mutant vs. WT lines\n3. Identify genes significantly more essential in mutant lines (synthetic lethal partners)\n4. Filter by selectivity and effect size\n\n### Workflow 3: Compound Sensitivity Analysis\n\n1. Download PRISM compound sensitivity data (`primary-screen-replicate-treatment-info.csv`)\n2. Correlate compound AUC/log2(fold-change) with genomic features\n3. Identify predictive biomarkers for compound sensitivity\n\n## DepMap Data Files Reference\n\n| File | Description |\n|------|-------------|\n| `CRISPRGeneEffect.csv` | CRISPR Chronos gene effect (primary dependency data) |\n| `CRISPRGeneEffectUnscaled.csv` | Unscaled CRISPR scores |\n| `RNAi_merged.csv` | DEMETER2 RNAi dependency |\n| `sample_info.csv` | Cell line metadata (lineage, disease, etc.) |\n| `OmicsExpressionProteinCodingGenesTPMLogp1.csv` | mRNA expression |\n| `OmicsSomaticMutationsMatrixDamaging.csv` | Damaging somatic mutations (binary) |\n| `OmicsCNGene.csv` | Copy number per gene |\n| `PRISM_Repurposing_Primary_Screens_Data.csv` | Drug sensitivity (repurposing library) |\n\nDownload all files from: https://depmap.org/portal/download/all/\n\n## Best Practices\n\n- **Use Chronos scores** (not DEMETER2) for current CRISPR analyses — better controlled for cutting efficiency\n- **Distinguish pan-essential from cancer-selective**: Target genes with low variance (essential in all lines) are poor drug targets\n- **Validate with expression data**: A gene not expressed in a cell line will score as non-essential regardless of actual function\n- **Use DepMap ID** for cell line identification — cell_line_name can be ambiguous\n- **Account for copy number**: Amplified genes may appear essential due to copy number effect (junk DNA hypothesis)\n- **Multiple testing correction**: When computing biomarker associations genome-wide, apply FDR correction\n\n## Additional Resources\n\n- **DepMap Portal**: https://depmap.org/portal/\n- **Data downloads**: https://depmap.org/portal/download/all/\n- **DepMap paper**: Behan FM et al. (2019) Nature. PMID: 30971826\n- **Chronos paper**: Dempster JM et al. (2021) Nature Methods. PMID: 34349281\n- **GitHub**: https://github.com/broadinstitute/depmap-portal\n- **Figshare**: https://figshare.com/articles/dataset/DepMap_24Q4_Public/27993966","author":"@K-Dense-AI","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/depmap","license":"MIT","category":"coding","lang":"en","tokens":2620,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"references/dependency_analysis.md","size":5775,"sha256":"12776bd43a948954d1c3a4265f3796407016af28e6ddc847f4d7b18e09484de6"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["depmap.org","figshare.com"]}}