$npx -y skills add K-Dense-AI/scientific-agent-skills --skill depmapQuery the Cancer Dependency Map (DepMap) for cancer cell line gene dependency scores (CRISPR Chronos), drug sensitivity data, and gene effect profiles. Use for identifying cancer-specific vulnerabilities, synthetic lethal interactions, and validating oncology drug targets.
| 1 | # DepMap — Cancer Dependency Map |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | The 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: |
| 6 | - Identifying which genes are essential for specific cancer types |
| 7 | - Finding cancer-selective dependencies (therapeutic targets) |
| 8 | - Validating oncology drug targets |
| 9 | - Discovering synthetic lethal interactions |
| 10 | |
| 11 | **Key resources:** |
| 12 | - DepMap Portal: https://depmap.org/portal/ |
| 13 | - DepMap data downloads: https://depmap.org/portal/download/all/ |
| 14 | - Python package: `depmap` (or access via API/downloads) |
| 15 | - API: https://depmap.org/portal/api/ |
| 16 | |
| 17 | ## When to Use This Skill |
| 18 | |
| 19 | Use DepMap when: |
| 20 | |
| 21 | - **Target validation**: Is a gene essential for survival in cancer cell lines with a specific mutation (e.g., KRAS-mutant)? |
| 22 | - **Biomarker discovery**: What genomic features predict sensitivity to knockout of a gene? |
| 23 | - **Synthetic lethality**: Find genes that are selectively essential when another gene is mutated/deleted |
| 24 | - **Drug sensitivity**: What cell line features predict response to a compound? |
| 25 | - **Pan-cancer essentiality**: Is a gene broadly essential across all cancer types (bad target) or selectively essential? |
| 26 | - **Correlation analysis**: Which pairs of genes have correlated dependency profiles (co-essentiality)? |
| 27 | |
| 28 | ## Core Concepts |
| 29 | |
| 30 | ### Dependency Scores |
| 31 | |
| 32 | | Score | Range | Meaning | |
| 33 | |-------|-------|---------| |
| 34 | | **Chronos** (CRISPR) | ~ -3 to 0+ | More negative = more essential. Common essential threshold: −1. Pan-essential genes ~−1 to −2 | |
| 35 | | **RNAi DEMETER2** | ~ -3 to 0+ | Similar scale to Chronos | |
| 36 | | **Gene Effect** | normalized | Normalized Chronos; −1 = median effect of common essential genes | |
| 37 | |
| 38 | **Key thresholds:** |
| 39 | - Chronos ≤ −0.5: likely dependent |
| 40 | - Chronos ≤ −1: strongly dependent (common essential range) |
| 41 | |
| 42 | ### Cell Line Annotations |
| 43 | |
| 44 | Each cell line has: |
| 45 | - `DepMap_ID`: unique identifier (e.g., `ACH-000001`) |
| 46 | - `cell_line_name`: human-readable name |
| 47 | - `primary_disease`: cancer type |
| 48 | - `lineage`: broad tissue lineage |
| 49 | - `lineage_subtype`: specific subtype |
| 50 | |
| 51 | ## Core Capabilities |
| 52 | |
| 53 | ### 1. DepMap API |
| 54 | |
| 55 | ```python |
| 56 | import requests |
| 57 | import pandas as pd |
| 58 | |
| 59 | BASE_URL = "https://depmap.org/portal/api" |
| 60 | |
| 61 | def depmap_get(endpoint, params=None): |
| 62 | url = f"{BASE_URL}/{endpoint}" |
| 63 | response = requests.get(url, params=params) |
| 64 | response.raise_for_status() |
| 65 | return response.json() |
| 66 | ``` |
| 67 | |
| 68 | ### 2. Gene Dependency Scores |
| 69 | |
| 70 | ```python |
| 71 | def get_gene_dependency(gene_symbol, dataset="Chronos_Combined"): |
| 72 | """Get CRISPR dependency scores for a gene across all cell lines.""" |
| 73 | url = f"{BASE_URL}/gene" |
| 74 | params = { |
| 75 | "gene_id": gene_symbol, |
| 76 | "dataset": dataset |
| 77 | } |
| 78 | response = requests.get(url, params=params) |
| 79 | return response.json() |
| 80 | |
| 81 | # Alternatively, use the /data endpoint: |
| 82 | def get_dependencies_slice(gene_symbol, dataset_name="CRISPRGeneEffect"): |
| 83 | """Get a gene's dependency slice from a dataset.""" |
| 84 | url = f"{BASE_URL}/data/gene_dependency" |
| 85 | params = {"gene_name": gene_symbol, "dataset_name": dataset_name} |
| 86 | response = requests.get(url, params=params) |
| 87 | data = response.json() |
| 88 | return data |
| 89 | ``` |
| 90 | |
| 91 | ### 3. Download-Based Analysis (Recommended for Large Queries) |
| 92 | |
| 93 | For large-scale analysis, download DepMap data files and analyze locally: |
| 94 | |
| 95 | ```python |
| 96 | import pandas as pd |
| 97 | import requests, os |
| 98 | |
| 99 | def download_depmap_data(url, output_path): |
| 100 | """Download a DepMap data file.""" |
| 101 | response = requests.get(url, stream=True) |
| 102 | with open(output_path, 'wb') as f: |
| 103 | for chunk in response.iter_content(chunk_size=8192): |
| 104 | f.write(chunk) |
| 105 | |
| 106 | # DepMap 24Q4 data files (update version as needed) |
| 107 | FILES = { |
| 108 | "crispr_gene_effect": "https://figshare.com/ndownloader/files/...", |
| 109 | # OR download from: https://depmap.org/portal/download/all/ |
| 110 | # Files available: |
| 111 | # CRISPRGeneEffect.csv - Chronos gene effect scores |
| 112 | # OmicsExpressionProteinCodingGenesTPMLogp1.csv - mRNA expression |
| 113 | # OmicsSomaticMutationsMatrixDamaging.csv - mutation binary matrix |
| 114 | # OmicsCNGene.csv - copy number |
| 115 | # sample_info.csv - cell line metadata |
| 116 | } |
| 117 | |
| 118 | def load_depmap_gene_effect(filepath="CRISPRGeneEffect.csv"): |
| 119 | """ |
| 120 | Load DepMap CRISPR gene effect matrix. |
| 121 | Rows = cell lines (DepMap_ID), Columns = genes (Symbol (EntrezID)) |
| 122 | """ |
| 123 | df = pd.read_csv(filepath, index_col=0) |
| 124 | # Rename columns to gene symbols only |
| 125 | df.columns = [col.split(" ")[0] for col in df.columns] |
| 126 | return df |
| 127 | |
| 128 | def load_cell_line_i |