Generated banner for Encode Ccres Database
Generated logo for Encode Ccres Database

Encode Ccres Database

Google DeepMindOfficialPublished by Google DeepMind

  • Skill
  • Tool integration
  • Science and research
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

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.
— the description by Google DeepMind

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides an interface to query the ENCODE Registry of candidate cis-Regulatory Elements (cCREs) using the SCREEN GraphQL API. It also supports custom queries to the ENCODE Portal REST API for raw experimental data, such as ChIP-seq peaks. The skill includes helper scripts to manage API interactions and provides methods to filter results, identify high-confidence biosamples, and retrieve genomic annotations or gene expression data.

What it does

  • Search for cCREs by genomic coordinates or accessions.
  • Retrieve metadata for biosamples and identify high-confidence Type A samples.
  • Find nearby or linked genes for specific regulatory elements.
  • Query gene expression data across various biosamples.
  • Access raw experimental data and ChIP-seq peaks via the ENCODE Portal.
  • Retrieve orthologous cCREs across different genome assemblies.

When to use it

  • When you need to identify functional non-coding DNA elements like promoters or enhancers.
  • When you are analyzing biochemical signatures across human cell types.
  • When you need to link regulatory elements to specific genes or GWAS studies.
  • When you require raw experimental data from the ENCODE Portal for custom analysis.

Advantages

  • Automated rate limiting for API requests.
  • Support for multiple genome assemblies including GRCh38 and mm10.
  • Enriched output with biosample confidence flags.
  • Integration with standard bioinformatics workflows using JSON-based outputs.

Usage examples

“Find cCREs on chromosome 11 between positions 5205263 and 5207263.”
The agent runs the search command and saves the results to a JSON file, which can then be parsed to identify regulatory elements in that region.
“List all high-confidence Type A biosamples.”
The agent queries the biosamples endpoint and filters the output to display only those biosamples marked as Type A.
“Get gene expression data for GAPDH.”
The agent resolves the gene symbol to an Ensembl ID and retrieves TPM values across available biosamples.
“Search for ZNF549 experiments in the ENCODE portal.”
The agent uses the REST API script to query and return a list of experiments matching the specified target.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/google-deepmind/encode-ccres-database/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip encode-ccres-database.zip -d .agents/skills

Documentation by Google DeepMind

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
# 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

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.

    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.

    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.

    uv run scripts/screen_api.py details EH38E2941922 \
        --output /tmp/details.json
  • biosamples: Get biosample metadata for an assembly.

    uv run scripts/screen_api.py biosamples \
        --output /tmp/biosamples.json
  • orthologs: Get orthologous cCREs in another assembly.

    uv run scripts/screen_api.py orthologs EH38E2941922 \
        --output /tmp/orthologs.json
  • linked-genes: Find linked genes via methods like HiC or eQTLs.

    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.

    uv run scripts/screen_api.py gene-expression GAPDH \
        --output /tmp/gene_expr.json
  • entex: Get ENTEx data for a cCRE or genomic region.

    uv run scripts/screen_api.py entex \
        --accession EH38E1310345 \
        --output /tmp/entex.json
    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.

    uv run scripts/screen_api.py gwas studies \
        --output /tmp/gwas.json
    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
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.

Files

scripts/encode_portal_api.py

# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""A tool to query the ENCODE Portal REST API."""

# /// script
# requires-python = ">=3.10"
# dependencies = [
#   "polite-http",
# ]
# ///

import argparse
import json

from polite_http import http_client

BASE_URL = "https://www.encodeproject.org"
_CLIENT = http_client.HttpClient(BASE_URL, qps=10)


def cmd_search(args):
  """Searches the ENCODE Portal API and saves the results.

  Args:
    args: An argparse namespace containing:
      * query: The search query string.
      * output: Optional path to save the JSON output.
  """
  query = args.query
  if not query.startswith("?"):
    query = "?" + query
  if "format=json" not in query:
    query += "&format=json"

  url = f"{BASE_URL}/search/{query}"
  print(f"[*] Querying: {url}")
  data = _CLIENT.fetch_json(url)

  print(f"[*] Found {data.get('total', 'unknown')} results.")

  # Save output
  output_path = args.output or "encode_search_output.json"
  with open(output_path, "w") as f:
    json.dump(data, f, indent=2)
  print(f"[*] Results saved to {output_path}")


def main():
  parser = argparse.ArgumentParser(description="Query ENCODE Portal API.")
  sub = parser.add_subparsers(dest="command", required=True)

  p = sub.add_parser("search", help="Search ENCODE Portal.")
  p.add_argument(
      "query", help="Query string (e.g., 'type=Experiment&target.label=ZNF549')"
  )
  p.add_argument("--output", help="Output file path")
  p.set_defaults(func=cmd_search)

  args = parser.parse_args()
  args.func(args)


if __name__ == "__main__":
  main()

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google DeepMind
Publisher
Google DeepMind (Official)
Source
google-deepmind/science-skills · skills/encode_ccres_database · commit 4de6786
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google DeepMind or Google DeepMind.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download encode-ccres-database.zip