Skip to content
Back to skills

Query Interpro

ASecurity

Query InterPro for protein domains and families. Use when user asks about protein domains, functional sites, protein families, domain architecture, or motifs. Triggers on "interpro", "protein domain", "domain architecture", "protein family", "functional site", "motif".

  • 171 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
ai-agentspythongoapidatabase

Works with

  • api

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add BioTender-max/awesome-bio-agent-skills --skill query-interpro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Query Interpro?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Query Interpro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/biotender-max-query-interpro/badge)](https://www.skillsdirectory.com/skills/biotender-max-query-interpro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: query-interpro
description: Query InterPro for protein domains and families. Use when user asks about protein domains, functional sites, protein families, domain architecture, or motifs. Triggers on "interpro", "protein domain", "domain architecture", "protein family", "functional site", "motif".
---

# InterPro Protein Domain Database

Query the InterPro REST API for protein domains, families, and functional sites.

## When to Use

- User asks about domains in a protein
- User wants to know what family a protein belongs to
- User asks about functional sites or motifs
- User wants domain architecture visualization

## How to Execute

```python
import requests
import json

BASE_URL = "https://www.ebi.ac.uk/interpro/api"

# 1. Get protein annotation (domains/families for a UniProt ID)
def get_protein_domains(uniprot_id):
    url = f"{BASE_URL}/protein/uniprot/{uniprot_id}"
    r = requests.get(url, headers={"Accept": "application/json"})
    r.raise_for_status()
    return r.json()

# 2. Get InterPro entry details
def get_interpro_entry(interpro_id):
    url = f"{BASE_URL}/entry/interpro/{interpro_id}"
    r = requests.get(url, headers={"Accept": "application/json"})
    r.raise_for_status()
    return r.json()

# 3. Search InterPro by text
def search_interpro(query, max_results=10):
    url = f"{BASE_URL}/entry/interpro"
    params = {"search": query, "page_size": max_results}
    r = requests.get(url, params=params, headers={"Accept": "application/json"})
    r.raise_for_status()
    return r.json()

# 4. Get domain matches for a protein
def get_domain_matches(uniprot_id):
    url = f"{BASE_URL}/protein/uniprot/{uniprot_id}/entry/interpro"
    r = requests.get(url, headers={"Accept": "application/json"})
    r.raise_for_status()
    return r.json()

# Example: TP53 domains
domains = get_domain_matches("P04637")
for result in domains.get("results", []):
    meta = result.get("metadata", {})
    name = meta.get("name", "N/A")
    ipr_type = meta.get("type", "N/A")
    accession = meta.get("accession", "N/A")
    proteins = result.get("proteins", [])
    if proteins:
        locations = proteins[0].get("entry_protein_locations", [])
        for loc in locations:
            for frag in loc.get("fragments", []):
                start = frag.get("start", "?")
                end = frag.get("end", "?")
                print(f"{accession} ({ipr_type}): {name} [{start}-{end}]")
```

## Entry Types

- `domain` — Structural/functional domain
- `family` — Protein family
- `homologous_superfamily` — Distant homologs
- `repeat` — Repeated motif
- `site` — Active/binding site

## Follow-up Suggestions

- "Want me to compare domains across species?"
- "Should I map these domains onto the 3D structure?"
- "Want me to find other proteins with the same domain?"

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…