erobeng-master
/install erobeng-master
\r \r
DepMap — Cancer Dependency Map\r
\r
Overview\r
\r 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:\r
- Identifying which genes are essential for specific cancer types\r
- Finding cancer-selective dependencies (therapeutic targets)\r
- Validating oncology drug targets\r
- Discovering synthetic lethal interactions\r \r Key resources:\r
- DepMap Portal: https://depmap.org/portal/\r
- DepMap data downloads: https://depmap.org/portal/download/all/\r
- Python package:
depmap(or access via API/downloads)\r - API: https://depmap.org/portal/api/\r \r
When to Use This Skill\r
\r Use DepMap when:\r \r
- Target validation: Is a gene essential for survival in cancer cell lines with a specific mutation (e.g., KRAS-mutant)?\r
- Biomarker discovery: What genomic features predict sensitivity to knockout of a gene?\r
- Synthetic lethality: Find genes that are selectively essential when another gene is mutated/deleted\r
- Drug sensitivity: What cell line features predict response to a compound?\r
- Pan-cancer essentiality: Is a gene broadly essential across all cancer types (bad target) or selectively essential?\r
- Correlation analysis: Which pairs of genes have correlated dependency profiles (co-essentiality)?\r \r
Core Concepts\r
\r
Dependency Scores\r
\r | Score | Range | Meaning |\r |-------|-------|---------|\r | Chronos (CRISPR) | ~ -3 to 0+ | More negative = more essential. Common essential threshold: −1. Pan-essential genes ~−1 to −2 |\r | RNAi DEMETER2 | ~ -3 to 0+ | Similar scale to Chronos |\r | Gene Effect | normalized | Normalized Chronos; −1 = median effect of common essential genes |\r \r Key thresholds:\r
- Chronos ≤ −0.5: likely dependent\r
- Chronos ≤ −1: strongly dependent (common essential range)\r \r
Cell Line Annotations\r
\r Each cell line has:\r
DepMap_ID: unique identifier (e.g.,ACH-000001)\rcell_line_name: human-readable name\rprimary_disease: cancer type\rlineage: broad tissue lineage\rlineage_subtype: specific subtype\r \r
Core Capabilities\r
\r
1. DepMap API\r
\r
import requests\r
import pandas as pd\r
\r
BASE_URL = "https://depmap.org/portal/api"\r
\r
def depmap_get(endpoint, params=None):\r
url = f"{BASE_URL}/{endpoint}"\r
response = requests.get(url, params=params)\r
response.raise_for_status()\r
return response.json()\r
```\r
\r
### 2. Gene Dependency Scores\r
\r
```python\r
def get_gene_dependency(gene_symbol, dataset="Chronos_Combined"):\r
"""Get CRISPR dependency scores for a gene across all cell lines."""\r
url = f"{BASE_URL}/gene"\r
params = {\r
"gene_id": gene_symbol,\r
"dataset": dataset\r
}\r
response = requests.get(url, params=params)\r
return response.json()\r
\r
# Alternatively, use the /data endpoint:\r
def get_dependencies_slice(gene_symbol, dataset_name="CRISPRGeneEffect"):\r
"""Get a gene's dependency slice from a dataset."""\r
url = f"{BASE_URL}/data/gene_dependency"\r
params = {"gene_name": gene_symbol, "dataset_name": dataset_name}\r
response = requests.get(url, params=params)\r
data = response.json()\r
return data\r
```\r
\r
### 3. Download-Based Analysis (Recommended for Large Queries)\r
\r
For large-scale analysis, download DepMap data files and analyze locally:\r
\r
```python\r
import pandas as pd\r
import requests, os\r
\r
def download_depmap_data(url, output_path):\r
"""Download a DepMap data file."""\r
response = requests.get(url, stream=True)\r
with open(output_path, 'wb') as f:\r
for chunk in response.iter_content(chunk_size=8192):\r
f.write(chunk)\r
\r
# DepMap 24Q4 data files (update version as needed)\r
FILES = {\r
"crispr_gene_effect": "https://figshare.com/ndownloader/files/...",\r
# OR download from: https://depmap.org/portal/download/all/\r
# Files available:\r
# CRISPRGeneEffect.csv - Chronos gene effect scores\r
# OmicsExpressionProteinCodingGenesTPMLogp1.csv - mRNA expression\r
# OmicsSomaticMutationsMatrixDamaging.csv - mutation binary matrix\r
# OmicsCNGene.csv - copy number\r
# sample_info.csv - cell line metadata\r
}\r
\r
def load_depmap_gene_effect(filepath="CRISPRGeneEffect.csv"):\r
"""\r
Load DepMap CRISPR gene effect matrix.\r
Rows = cell lines (DepMap_ID), Columns = genes (Symbol (EntrezID))\r
"""\r
df = pd.read_csv(filepath, index_col=0)\r
# Rename columns to gene symbols only\r
df.columns = [col.split(" ")[0] for col in df.columns]\r
return df\r
\r
def load_cell_line_info(filepath="sample_info.csv"):\r
"""Load cell line metadata."""\r
return pd.read_csv(filepath)\r
```\r
\r
### 4. Identifying Selective Dependencies\r
\r
```python\r
import numpy as np\r
import pandas as pd\r
\r
def find_selective_dependencies(gene_effect_df, cell_line_info, target_gene,\r
cancer_type=None, threshold=-0.5):\r
"""Find cell lines selectively dependent on a gene."""\r
\r
# Get scores for target gene\r
if target_gene not in gene_effect_df.columns:\r
return None\r
\r
scores = gene_effect_df[target_gene].dropna()\r
dependent = scores[scores \x3C= threshold]\r
\r
# Add cell line info\r
result = pd.DataFrame({\r
"DepMap_ID": dependent.index,\r
"gene_effect": dependent.values\r
}).merge(cell_line_info[["DepMap_ID", "cell_line_name", "primary_disease", "lineage"]])\r
\r
if cancer_type:\r
result = result[result["primary_disease"].str.contains(cancer_type, case=False, na=False)]\r
\r
return result.sort_values("gene_effect")\r
\r
# Example usage (after loading data)\r
# df_effect = load_depmap_gene_effect("CRISPRGeneEffect.csv")\r
# cell_info = load_cell_line_info("sample_info.csv")\r
# deps = find_selective_dependencies(df_effect, cell_info, "KRAS", cancer_type="Lung")\r
```\r
\r
### 5. Biomarker Analysis (Gene Effect vs. Mutation)\r
\r
```python\r
import pandas as pd\r
from scipy import stats\r
\r
def biomarker_analysis(gene_effect_df, mutation_df, target_gene, biomarker_gene):\r
"""\r
Test if mutation in biomarker_gene predicts dependency on target_gene.\r
\r
Args:\r
gene_effect_df: CRISPR gene effect DataFrame\r
mutation_df: Binary mutation DataFrame (1 = mutated)\r
target_gene: Gene to assess dependency of\r
biomarker_gene: Gene whose mutation may predict dependency\r
"""\r
if target_gene not in gene_effect_df.columns or biomarker_gene not in mutation_df.columns:\r
return None\r
\r
# Align cell lines\r
common_lines = gene_effect_df.index.intersection(mutation_df.index)\r
scores = gene_effect_df.loc[common_lines, target_gene].dropna()\r
mutations = mutation_df.loc[scores.index, biomarker_gene]\r
\r
mutated = scores[mutations == 1]\r
wt = scores[mutations == 0]\r
\r
stat, pval = stats.mannwhitneyu(mutated, wt, alternative='less')\r
\r
return {\r
"target_gene": target_gene,\r
"biomarker_gene": biomarker_gene,\r
"n_mutated": len(mutated),\r
"n_wt": len(wt),\r
"mean_effect_mutated": mutated.mean(),\r
"mean_effect_wt": wt.mean(),\r
"pval": pval,\r
"significant": pval \x3C 0.05\r
}\r
```\r
\r
### 6. Co-Essentiality Analysis\r
\r
```python\r
import pandas as pd\r
\r
def co_essentiality(gene_effect_df, target_gene, top_n=20):\r
"""Find genes with most correlated dependency profiles (co-essential partners)."""\r
if target_gene not in gene_effect_df.columns:\r
return None\r
\r
target_scores = gene_effect_df[target_gene].dropna()\r
\r
correlations = {}\r
for gene in gene_effect_df.columns:\r
if gene == target_gene:\r
continue\r
other_scores = gene_effect_df[gene].dropna()\r
common = target_scores.index.intersection(other_scores.index)\r
if len(common) \x3C 50:\r
continue\r
r = target_scores[common].corr(other_scores[common])\r
if not pd.isna(r):\r
correlations[gene] = r\r
\r
corr_series = pd.Series(correlations).sort_values(ascending=False)\r
return corr_series.head(top_n)\r
\r
# Co-essential genes often share biological complexes or pathways\r
```\r
\r
## Query Workflows\r
\r
### Workflow 1: Target Validation for a Cancer Type\r
\r
1. Download `CRISPRGeneEffect.csv` and `sample_info.csv`\r
2. Filter cell lines by cancer type\r
3. Compute mean gene effect for target gene in cancer vs. all others\r
4. Calculate selectivity: how specific is the dependency to your cancer type?\r
5. Cross-reference with mutation, expression, or CNA data as biomarkers\r
\r
### Workflow 2: Synthetic Lethality Screen\r
\r
1. Identify cell lines with mutation/deletion in gene of interest (e.g., BRCA1-mutant)\r
2. Compute gene effect scores for all genes in mutant vs. WT lines\r
3. Identify genes significantly more essential in mutant lines (synthetic lethal partners)\r
4. Filter by selectivity and effect size\r
\r
### Workflow 3: Compound Sensitivity Analysis\r
\r
1. Download PRISM compound sensitivity data (`primary-screen-replicate-treatment-info.csv`)\r
2. Correlate compound AUC/log2(fold-change) with genomic features\r
3. Identify predictive biomarkers for compound sensitivity\r
\r
## DepMap Data Files Reference\r
\r
| File | Description |\r
|------|-------------|\r
| `CRISPRGeneEffect.csv` | CRISPR Chronos gene effect (primary dependency data) |\r
| `CRISPRGeneEffectUnscaled.csv` | Unscaled CRISPR scores |\r
| `RNAi_merged.csv` | DEMETER2 RNAi dependency |\r
| `sample_info.csv` | Cell line metadata (lineage, disease, etc.) |\r
| `OmicsExpressionProteinCodingGenesTPMLogp1.csv` | mRNA expression |\r
| `OmicsSomaticMutationsMatrixDamaging.csv` | Damaging somatic mutations (binary) |\r
| `OmicsCNGene.csv` | Copy number per gene |\r
| `PRISM_Repurposing_Primary_Screens_Data.csv` | Drug sensitivity (repurposing library) |\r
\r
Download all files from: https://depmap.org/portal/download/all/\r
\r
## Best Practices\r
\r
- **Use Chronos scores** (not DEMETER2) for current CRISPR analyses — better controlled for cutting efficiency\r
- **Distinguish pan-essential from cancer-selective**: Target genes with low variance (essential in all lines) are poor drug targets\r
- **Validate with expression data**: A gene not expressed in a cell line will score as non-essential regardless of actual function\r
- **Use DepMap ID** for cell line identification — cell_line_name can be ambiguous\r
- **Account for copy number**: Amplified genes may appear essential due to copy number effect (junk DNA hypothesis)\r
- **Multiple testing correction**: When computing biomarker associations genome-wide, apply FDR correction\r
\r
## Additional Resources\r
\r
- **DepMap Portal**: https://depmap.org/portal/\r
- **Data downloads**: https://depmap.org/portal/download/all/\r
- **DepMap paper**: Behan FM et al. (2019) Nature. PMID: 30971826\r
- **Chronos paper**: Dempster JM et al. (2021) Nature Methods. PMID: 34349281\r
- **GitHub**: https://github.com/broadinstitute/depmap-portal\r
- **Figshare**: https://figshare.com/articles/dataset/DepMap_24Q4_Public/27993966\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install erobeng-master - 安装完成后,直接呼叫该 Skill 的名称或使用
/erobeng-master触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
erobeng-master 是什么?
Query the Cancer Dependency Map (DepMap) for cancer cell line gene dependency scores (CRISPR Chronos), drug sensitivity data, and gene effect profiles. Use f... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 100 次。
如何安装 erobeng-master?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install erobeng-master」即可一键安装,无需额外配置。
erobeng-master 是免费的吗?
是的,erobeng-master 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
erobeng-master 支持哪些平台?
erobeng-master 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 erobeng-master?
由 ERISON ROSA DE OLIVEIRA BARROS(@erisonbarros)开发并维护,当前版本 v1.0.0。