Skip to main content
skill CX Codex

encode-ccres-database — Claude Code skill: how to install

Queries the ENCODE Registry of cis-regulatory elements using the SCREEN GraphQL API and REST API. It identifies promoters or enhancers across cell types.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add google-deepmind/science-skills --skill encode-ccres-database -a claude-code
npx skills add google-deepmind/science-skills --skill encode_ccres_database -a claude-code
Open on GitHub

What encode-ccres-database does

This skill queries the ENCODE Registry of candidate cis-Regulatory Elements (cCREs) via scripts/screen_api.py. It inspects functional non-coding DNA like promoters and enhancers based on core epigenetic marks: DNase, H3K4me3, H3K27ac, and CTCF. For raw experimental runs such as ChIP-seq peaks, it accesses the ENCODE Portal REST API through scripts/encode_portal_api.py. Targets default to assembly grch38 with automatic fallback to mm10.

All helper scripts write raw JSON responses to disk, typically into /tmp/. Loading entire JSON files directly into context with cat will bloat context windows; parse fields using jq or an inline Python script instead. The wrapper handles rate limits automatically.

Running queries requires uv on PATH. On first execution, the tool checks for .licenses/encode_ccres_database_LICENSE.txt in the workspace root. If missing, it alerts you about the ENCODE REST API license terms and records a timestamped file before proceeding.

What it helps with

  • locate cCREs and enhancers within specific genomic coordinates
  • extract gene expression values across diverse human biosamples
  • filter Type A high-confidence cell types using jq
  • retrieve raw ChIP-seq experiment data from the ENCODE REST API

Example prompts for the agent

  • Search for cCREs on chr11 between 5205263 and 5207263 and save output to /tmp/search.json
  • Get gene expression data for GAPDH across all biosamples using screen_api.py
  • Query the ENCODE REST API for ZNF549 experiments and filter results with jq

How to install encode-ccres-database

1Skills CLI (Vercel)

npx skills add google-deepmind/science-skills --skill encode-ccres-database -a claude-code
npx skills add google-deepmind/science-skills --skill encode_ccres_database -a claude-code

2Manually: put the files in place

~/.claude/skills/encode_ccres_database/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/encode_ccres_database/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about encode-ccres-database

How to install encode-ccres-database in Claude Code?

Run npx skills add google-deepmind/science-skills --skill encode-ccres-database -a claude-code.

What does encode-ccres-database do?

It queries the ENCODE cCRE registry through the SCREEN GraphQL API and searches raw experiments via REST API. It retrieves regulatory DNA regions, nearby genes, and cell-specific epigenetic data.

What prerequisites are needed to run queries?

You must have uv installed and available on your PATH. Also, jq or Python is required to parse output JSON files because reading them raw with cat risks overflowing context.

Source text

SKILL.md · Apache-2.0
---
name: encode-ccres-database
description: >
    Query the ENCODE Registry of cis-Regulatory Elements (cCREs) via the SCREEN
    GraphQL API, or make custom queries to the ENCODE Portal REST API for
    experiments and files (ChIP-seq peaks, etc.). Use when you want to query
    regulatory annotations or raw experimental data across human cell types.
---

# ENCODE Database Skill

This skill allows you to query the ENCODE Registry of cCREs (candidate
cis-Regulatory Elements) via the SCREEN GraphQL API. It helps identify
functional non-coding DNA elements (like Promoters, Enhancers, and insulators)
by analyzing biochemical signatures (DNase, H3K4me3, H3K27ac, CTCF).

## Prerequisites

1.  **`uv`**: Read the `uv` skill and follow its Setup instructions to ensure
    `uv` is installed and on PATH.
2.  **User Notification**: If .licenses/encode_ccres_database_LICENSE.txt does
    not already exist in the workspace root directory then (1) prominently
    notify the user to check the terms at
    https://www.encodeproject.org/help/rest-api/, then (2) create the file
    recording the notification text and timestamp.

## Core Rules

-   **Use the Wrapper**: ALWAYS execute the provided helper scripts to query the
    database rather than accessing the database directly. The scripts
    automatically enforce the required rate limit gracefully.
-   **Parsing Output**: Do NOT use `cat` to read the entire JSON output file
    into context, as it can be extremely large. You MUST use `jq` to efficiently
    parse and extract relevant fields.
-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.

### Quick Start

```bash
# Search cCREs by coordinates
uv run scripts/screen_api.py search --chromosome chr11 \
  --start 5205263 --end 5207263 \
  --output /tmp/search.json

# Get details for a specific cCRE
uv run scripts/screen_api.py details EH38E2941922 \
  --output /tmp/details.json
```

All subcommands write JSON to disk. Always save output in a temporary location
like `/tmp/`.

### Identifying High-Confidence ("Type A") Biosamples

Biosamples in ENCODE are often categorized by their data completeness. **"Type
A"** (or high-confidence) biosamples are those that have experimental data for
all four core epigenetic markers: **DNase, H3K4me3, H3K27ac, and CTCF**.

The `biosamples` and `details` commands automatically enrich their output with
an `is_type_a` boolean flag for each biosample.

**Example: Finding high-confidence cell types**

```bash
uv run scripts/screen_api.py biosamples --output /tmp/biosamples.json
# Use jq to filter for Type A biosamples
jq '.data.ccREBiosampleQuery.biosamples[] | select(.is_type_a == true) | .displayname' /tmp/biosamples.json
```

### Parsing Output (CRITICAL)

**Do NOT use `cat` to read the entire JSON output file into context, as it**
**can be extremely large.** Instead, you MUST use `jq` to efficiently parse and
extract the relevant fields from the JSON file saved by the script. If `jq` is
not available on the system, write your own Python filtering code (e.g.,
`python3 -c "import json..."`) to extract the necessary data.

For a complete reference of the JSON structure returned by eachmcommand (so you
know which fields to query with `jq`), read
`references/json_output_structure.md`.

### Available Commands

-   `search`: Search cCREs by coordinates, accessions, or epigenetic signals.

    ```bash
    uv run scripts/screen_api.py search \
        --chromosome chr11 --start 5205263 --end 5207263 \
        --output /tmp/search.json
    ```

-   `nearby-genes`: Find nearby genes for given cCRE accessions.

    ```bash
    uv run scripts/screen_api.py nearby-genes \
        EH38E1516972 --output /tmp/nearby.json
    ```

-   `details`: Get detailed information and biosample-specific max Z-scores for
    a specific cCRE.

    ```bash
    uv run scripts/screen_api.py details EH38E2941922 \
        --output /tmp/details.json
    ```

-   `biosamples`: Get biosample metadata for an assembly.

    ```bash
    uv run scripts/screen_api.py biosamples \
        --output /tmp/biosamples.json
    ```

-   `orthologs`: Get orthologous cCREs in another assembly.

    ```bash
    uv run scripts/screen_api.py orthologs EH38E2941922 \
        --output /tmp/orthologs.json
    ```

-   `linked-genes`: Find linked genes via methods like HiC or eQTLs.

    ```bash
    uv run scripts/screen_api.py linked-genes \
        EH38E1516972 --output /tmp/linked.json
    ```

-   `gene-expression`: Get gene expression (TPM) across all biosamples for a
    named gene. Internally resolves the gene symbol to an Ensembl gene ID, then
    queries per-biosample RNA-seq quantifications.

    ```bash
    uv run scripts/screen_api.py gene-expression GAPDH \
        --output /tmp/gene_expr.json
    ```

-   `entex`: Get ENTEx data for a cCRE or genomic region.

    ```bash
    uv run scripts/screen_api.py entex \
        --accession EH38E1310345 \
        --output /tmp/entex.json
    ```

    ```bash
    uv run scripts/screen_api.py entex \
        --region chr1:1000068:1000409 \
        --output /tmp/entex.json
    ```

-   `gwas`: Query genome-wide association studies, SNPs, or enrichment data.

    ```bash
    uv run scripts/screen_api.py gwas studies \
        --output /tmp/gwas.json
    ```

    ```bash
    uv run scripts/screen_api.py gwas snps --study \
        Ahola-Olli_AV-27989323-Eotaxin_levels \
        --output /tmp/gwas_snps.json
    ```

You can supply the `--assembly mm10` or `--assembly grch38` flag to explicitly
request a specific assembly for most commands. By default, the script targets
`grch38` but will automatically fall back to `mm10` if no results are found or
if the query fails.

## ENCODE Portal REST API (Direct Access)

For accessing raw experiments, ChIP-seq peaks, or other datasets that are not
represented as cCREs in SCREEN, use the `scripts/encode_portal_api.py` script.
It allows custom queries to the ENCODE Portal REST API.

### Usage

```bash
uv run scripts/encode_portal_api.py search "type=Experiment&target.label=ZNF549" --output /tmp/znf549_experiments.json
```

### Data Analysis Tips

When analyzing `.bed` or `.bigBed` files downloaded from ENCODE, standard
bioinformatics tools are highly recommended for finding overlaps (e.g., between
gene promoters and peaks):

-   **`bedtools`**: For fast mathematical operations on genomic intervals.
-   **`bigBedToBed`**: For converting binary BigBed files to readable BED
    format.
-   **`pybedtools`**: A Python wrapper for `bedtools`.

Write custom logic if these tools are not pre-installed.

## Custom Queries (SCREEN GraphQL)

If you need to make a complex GraphQL query that the script does not support,
read `references/graphql_schema.md` for a reference of available queries,
arguments, and return fields in the SCREEN GraphQL API.

© google-deepmind · Apache-2.0 · google-deepmind/science-skills

Similar skills

Everything for Science and research →

From the same set39

alphafold-database-fetch-and-analyze Pulls AlphaFold predicted structures by UniProt ID and works out what they mean: pLDDT confidence, disordered regions, rigid domain boundaries. CX Codex +1 2,200installs pdb-database Searches and downloads experimental 3D structures of biomolecules from RCSB PDB using sequence similarity, structure comparisons, or chemical attributes. CX Codex +1 2,200installs unibind-database This skill queries UniBind for experimentally validated transcription-factor binding sites and downloads BED or FASTA coordinates for local analysis. CX Codex +1 2,100installs ucsc-conservation-and-tfbs Pulls evolutionary conservation scores (phyloP, phastCons) and transcription factor binding sites out of the UCSC Genome Browser. Handy when you are reading non-coding variants. CX Codex +1 2,100installs gnomad-database This skill queries gnomAD for variant frequencies, gene constraint metrics, and regional variant searches. Use it for genetics research workflows. CX Codex +1 2,100installs quickgo-database Queries the QuickGO and ECO REST API to link genes to biological processes, molecular functions and cellular components. Useful when working through gene annotations. CX Codex +1 2,100installs jaspar-database Queries the JASPAR database for transcription factor binding profiles. Useful when fetching PFM or PWM matrices and converting gene names into stable matrix IDs. CX Codex +1 2,100installs gtex-database Retrieves RNA expression and eQTL data from GTEx across 54 non-diseased human tissue sites. Use it to query genes, variants, or tissue-specific expression. CX Codex +1 2,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor