Skip to main content
skill CX Codex

jaspar-database — Claude Code skill: what it does, how to install

Queries the JASPAR database for transcription factor binding profiles. Useful when fetching PFM or PWM matrices and converting gene names into stable matrix IDs.

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

What jaspar-database does

The skill queries the JASPAR database through a bundled Python wrapper via uv. It retrieves raw Position Frequency Matrices (PFMs) and computes log-odds Position Weight Matrices (PWMs). The tool also predicts binding profiles from protein sequences and exports results in formats such as meme, transfac, yaml, and json.

The wrapper automatically enforces JASPAR rate limits. It breaks genomic regions larger than 100,000 bp into chunks so requests remain within API limits.

Running a motif lookup directly with a gene name fails. You must resolve symbols like JUN to a Matrix ID first using resolve_tf_id with an explicit --tax-id. JASPAR reports potential binding rather than tissue-specific chromatin availability, and it cannot predict the effects of specific protein mutations.

What it helps with

  • resolve gene symbols to stable JASPAR Matrix IDs
  • retrieve Position Frequency Matrices and calculate log-odds PWMs
  • export motif profiles to MEME or TRANSFAC formats
  • infer binding matrix profiles from protein sequences

Example prompts for the agent

  • Resolve the JASPAR Matrix ID for human transcription factor JUN using tax-id 9606
  • Fetch the PFM motif for matrix MA0488.2 in meme format
  • Calculate the PWM for matrix MA0488.2 with a pseudocount of 0.1

How to install jaspar-database

1Skills CLI (Vercel)

npx skills add google-deepmind/science-skills --skill jaspar-database -a claude-code
npx skills add google-deepmind/science-skills --skill jaspar_database -a claude-code

2Manually: put the files in place

~/.claude/skills/jaspar_database/SKILL.md

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

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

Questions about jaspar-database

How do I install jaspar-database in Claude Code?

Run npx skills add google-deepmind/science-skills --skill jaspar-database -a claude-code. Ensure uv is installed and accessible on your PATH.

What does jaspar-database do?

It provides a script-based workflow to query JASPAR via scripts/jaspar_api.py. It fetches motif matrices, metadata, and flexible models (TFFMs) in formats like JSON, MEME, and YAML.

Why does get_tf_motif reject gene names?

Motif retrieval commands require a stable JASPAR Matrix ID such as MA0488.2. You must convert gene symbols with resolve_tf_id using the appropriate organism taxonomy ID first.

Source text

SKILL.md · Apache-2.0
---
name: jaspar-database
description: >
    Query the JASPAR database for Transcription Factor (TF) binding profiles.
    Use when retrieving Position Frequency Matrices (PFMs) or Position Weight
    Matrices (PWMs) for specific TFs, resolving gene symbols to JASPAR Matrix
    IDs, or getting TF metadata. Supports multiple output formats (MEME,
    TRANSFAC, PFM, JASPAR, YAML).
---

# JASPAR Skill

JASPAR is the definitive open-access database for Transcription Factor (TF)
binding profiles, stored as Position Frequency Matrices (PFMs).

Use this skill to map abstract sequence motifs or genomic regions to specific
biological regulators (e.g., "what TFs bind here?" or "what is the motif for
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/jaspar_database_LICENSE.txt does not
    already exist in the workspace root directory then (1) prominently notify
    the user to check the terms at https://jaspar.elixir.no/ and
    https://jaspar.elixir.no/api/, then (2) create the file recording the
    notification text and timestamp.

## Core Rules

**CRITICAL**: You MUST respect the JASPAR API Terms of Use by adhering to the
following:

-   **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.
-   **Maximum API Window Size**: The genomic window for a single API query MUST
    NOT exceed 100,000 bp (100kb). The `jaspar_api.py` script automatically
    chunks larger requests for you to bypass this limitation when querying
    larger regions.
-   **Valid Matrix IDs**: `get_tf_motif`, `get_tf_metadata`, and `get_tf_pwm`
    require a stable JASPAR Matrix ID (e.g., `MA0488.2`). If a user provides a
    gene symbol (e.g., `JUN`), you must resolve it first using `resolve_tf_id`.
-   **Taxonomy Required**: Resolving IDs requires a `tax_id` to ensure targeted
    searches. Common IDs: Human=9606, Mouse=10090.
-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.

## Utility Scripts

Run all commands using the bundled Python script:

### 1. Resolve TF to Matrix ID

Maps a transcription factor name to a stable Matrix ID. Required step before
fetching motifs if only a gene name is provided.

```bash
uv run scripts/jaspar_api.py resolve_tf_id --name "JUN" --tax-id 9606
```

### 2. Get TF Motif (PFM)

Retrieves the raw Position Frequency Matrix for a specific TF. Supports
`--format` flag.

```bash
uv run scripts/jaspar_api.py get_tf_motif --matrix-id "MA0488.2"
uv run scripts/jaspar_api.py get_tf_motif --matrix-id "MA0488.2" --format meme
```

### 3. Get TF Metadata

Retrieves TF class, family, and links to external databases (e.g., UniProt).
Supports `--format` flag.

```bash
uv run scripts/jaspar_api.py get_tf_metadata --matrix-id "MA0488.2"
uv run scripts/jaspar_api.py get_tf_metadata --matrix-id "MA0488.2" --format yaml
```

### 4. Compute PWM (Position Weight Matrix)

Fetches the PFM for a matrix and converts it to log-odds scores (PWM).

```bash
uv run scripts/jaspar_api.py get_tf_pwm --matrix-id "MA0488.2"
uv run scripts/jaspar_api.py get_tf_pwm --matrix-id "MA0488.2" --pseudocount 0.1
```

### 5. Infer Matrix from Protein Sequence

Infers potential JASPAR matrix profiles from a raw transcription factor protein
sequence.

```bash
uv run scripts/jaspar_api.py infer_from_sequence --sequence "QAQLLPSHHVG"
```

### 6. Get TF Flexible Model (TFFM)

Retrieves metadata for a JASPAR TF Flexible Model. (Note: The JASPAR TFFM
endpoints occasionally experience 500 Internal Server errors).

```bash
uv run scripts/jaspar_api.py get_tffm --tffm-id "TFFM0001.1"
```

### Output Formats

The `get_tf_motif` and `get_tf_metadata` commands accept an optional `--format`
flag. Supported formats: `json` (default), `jsonp`, `jaspar`, `meme`,
`transfac`, `pfm`, `yaml`.

## Anti-Patterns

*   **DON'T** pass gene symbols (e.g., `JUN`) to `get_tf_motif`. You must pass
    the `MA...` Matrix ID.
*   **DON'T** forget the `--tax-id` when resolving a TF name.
*   **DON'T** use this skill for determining tissue-specific epigenetic
    availability (JASPAR shows *potential* binding, not *actual* tissue
    expression context).
*   **DON'T** use this skill to model how a specific protein mutation affects
    binding.

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

Similar skills

Everything for Science and research →

From the same set39

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 encode-ccres-database Queries the ENCODE Registry of cis-regulatory elements using the SCREEN GraphQL API and REST API. It identifies promoters or enhancers across cell types. 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 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 foldseek-structural-search Sends a protein 3D structure file to the Foldseek API and returns structurally similar proteins. Built for cases where you have coordinates, not just a sequence. CX Codex +1 2,100installs interpro-database Queries protein domains, families, and functional sites through the InterPro API. Integrates 14 member databases and automates genome annotations with GO terms. CX Codex +1 2,100installs string-database This skill queries STRING for protein interactions, functional enrichment, and homology. Use it when protein evidence or pathway analysis is needed. 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