domains / science / depmap-data-analysis / depmap

depmap

Skill card

combined

The two skills cover the same domain (DepMap cancer dependency data) but diverge significantly on methodology and data access. The K-Dense-AI skill is a rigorous, release-aware procedure that explicitly warns against using the API endpoints suggested by the FreedomIntelligence skill, mandates checksum verification, and provides a detailed file contract table. The FreedomIntelligence skill provides a simpler, API-first approach with specific Python helper functions for selective dependency analysis and defines specific score thresholds (e.g., Chronos <= -0.5) that are absent in the K-Dense-AI skill. Because the K-Dense-AI skill explicitly states that the API endpoints used by the FreedomIntelligence skill are not verified or supported, and the FreedomIntelligence skill lacks the critical data integrity checks (MD5, release pinning) found in the K-Dense-AI skill, neither is a complete reproduction of the other. A combined skill is needed to provide the robust data acquisition and integrity checks from K-Dense-AI with the specific analytical workflows and thresholds from FreedomIntelligence.

Repositories

RepositoryPath
K-Dense-AI/scientific-agent-skillsskills/depmap/SKILL.md
FreedomIntelligence/OpenClaw-Medical-Skillsskills/depmap/SKILL.md

Other copies

RoleRepositoryPath
peerK-Dense-AI/scientific-agent-skillsskills/depmap/SKILL.md
peerFreedomIntelligence/OpenClaw-Medical-Skillsskills/depmap/SKILL.md

Combined skill

---
name: depmap
description: Retrieves and analyzes Cancer Dependency Map (DepMap) release data, including CRISPR Chronos gene effects, cancer model annotations, omics biomarkers, and PRISM drug sensitivity. Supports cancer-selective dependency, co-essentiality, and candidate synthetic-lethality analyses with release-aware identifiers and statistical checks.
license: CC-BY-4.0
compatibility: Requires Python 3.10+ with numpy, pandas, and scipy>=1.11. Network access is needed for release discovery.
metadata:
  version: "1.3"
  skill-author: Kuan-lin Huang
  last-reviewed: "2026-09-30"
---

# DepMap — Cancer Dependency Map

## When to use

Use this skill to rank dependencies in cancer models, compare prespecified biomarker cohorts, inspect co-essentiality, or relate genetic dependencies to PRISM compound response. These analyses generate target and synthetic-lethality hypotheses; they do not establish clinical efficacy.

## 1. Discover a release, then obtain its files

**Do not use the legacy API endpoints** (`/api/gene`, `/api/data/gene_dependency`) as they are not verified for current releases. Instead, use the verified public endpoint to discover the latest release and file metadata.

1. **Fetch Catalogue**: Use `GET https://depmap.org/portal/api/no-captcha/download/files` to get the CSV catalogue.
2. **Select Release**: Identify the latest `DepMap Public` release (e.g., 26Q1). Note that recent releases may have blank `url` fields in the catalogue; you must obtain files via the DepMap Portal UI if direct links are missing.
3. **Verify Integrity**: Always verify the `md5_hash` of downloaded files against the catalogue. If a checksum is missing, record a local SHA-256 and note the discrepancy.

```python
from scripts.depmap_data import fetch_catalogue, select_file, verify_md5

catalogue = fetch_catalogue()
public = catalogue[catalogue["release"].str.startswith("DepMap Public ")]
release = public["release"].iloc[0] # Select latest
record = select_file(catalogue, release, "CRISPRGeneEffect.csv")
# Download file from portal if record['url'] is blank
# verify_md5("CRISPRGeneEffect.csv", record["md5_hash"])
```

## 2. Inspect File Contracts

Key files in the release:
- `CRISPRGeneEffect.csv`: Integrated Chronos effects. Rows are `ModelID`, columns are `Symbol (EntrezID)`.
- `Model.csv`: Metadata keyed by `ModelID` (includes `CellLineName`, `OncotreeLineage`, etc.).
- `OmicsExpressionTPMLogp1HumanProteinCodingGenes.csv`: Expression data. Exclude metadata columns from calculations.

## 3. Analyze Dependencies

Load the local CSVs into pandas. 

**Score Interpretation:**
- **Chronos**: More negative = more essential.
- **Thresholds**: 
  - `<= -0.5`: Likely dependent.
  - `<= -1.0`: Strongly dependent (common essential range).

### Identifying Selective Dependencies

```python
import pandas as pd
import numpy as np

def find_selective_dependencies(gene_effect_df, model_df, target_gene, 
                                 cancer_type=None, threshold=-0.5):
    """Find cell lines selectively dependent on a gene."""
    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({
        "ModelID": dependent.index,
        "gene_effect": dependent.values
    }).merge(model_df[["ModelID", "CellLineName", "OncotreePrimaryDisease"]], on="ModelID")

    if cancer_type:
        result = result[result["OncotreePrimaryDisease"].str.contains(cancer_type, case=False, na=False)]

    return result.sort_values("gene_effect")
```

## 4. Output

Save the selected metadata, retrieval date, release citation, local checksum, and analysis outputs together. Record source dataset terms separately from this skill's license.