OpenParable
Skip to content
← Back to skills

Uniprot Database

Research
uniprot_database

Uniprot Database is an Agent Skill for research published in the ai4protein/VenusFactory2 repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

UniProt — protein sequence, function, taxonomy, cross-references. Search proteins by query, retrieve a UniProt entry, map IDs between databases (PDB↔UniProt etc.), pull FASTA sequence, fetch metadata, run SPARQL against sparql.uniprot.org. Use whenever the user mentions a UniProt accession (e.g. P04637), asks for protein function/sequence/family info, or needs cross-DB ID mapping. Don't use for AlphaFold structures (use alphafold_database) or PDB structures (use rcsb_database).

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/ai4protein/VenusFactory2/blob/HEAD/src/agent/skills/uniprot_database/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/uniprot-database-3bb2838b, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

UniProt Database

Overview

UniProt KnowledgeBase (UniProtKB) is the central protein-knowledge resource. This skill exposes 6 tools spanning text search, single-entry retrieval, ID mapping, sequence/metadata download, and SPARQL queries.

Project Tools (VenusFactory2)

ToolArgsReturnsDescription
download_uniprot_search_by_queryquery (UniProt query syntax, e.g. organism_id:9606 AND reviewed:true), out_path, optional formatrich JSON envelopeSearch UniProtKB; results saved to file.
download_uniprot_retrieve_by_iduniprot_id (e.g. P04637), out_path, optional frmt (fasta default)rich JSON envelopeRetrieve one entry in the chosen format.
download_uniprot_mappingfr (from db, e.g. PDB), to (to db, e.g. UniProtKB_AC-ID), query (comma-separated IDs), out_pathrich JSON envelopeCross-database ID mapping (PDB↔UniProt, gene name↔accession, etc.).
download_uniprot_seq_by_iduniprot_id, out_pathrich JSON envelope; FASTA fileSequence FASTA only.
download_uniprot_meta_by_iduniprot_id, out_pathrich JSON envelope; JSON fileFull metadata (function, taxonomy, GO, xrefs, etc.).
download_uniprot_sparql_by_queryquery (SPARQL string), out_dir (required), timeout (default 120s)rich JSON envelope; SPARQL JSON file at file_info.file_path; biological_metadata.row_count + head_varsRun an arbitrary SPARQL query against https://sparql.uniprot.org/sparql.

When to Use Which Tool

GoalTool
You have a UniProt accession, want sequencedownload_uniprot_seq_by_id
You have a UniProt accession, want everything elsedownload_uniprot_meta_by_id
You have a gene name / PDB ID, want UniProtdownload_uniprot_mapping
You have a free-text query, want a listdownload_uniprot_search_by_query
You need a complex cross-resource graph query (e.g. all enzymes in pathway X catalyzing reaction Y)download_uniprot_sparql_by_query

SPARQL Quick Examples

Top 5 proteins by name:

PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?p ?name WHERE {
  ?p a up:Protein .
  ?p up:recommendedName / up:fullName ?name .
} LIMIT 5

Proteins in human, with a specific GO term:

PREFIX up: <http://purl.uniprot.org/core/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
SELECT ?protein ?name
WHERE {
  ?protein a up:Protein .
  ?protein up:organism taxon:9606 .
  ?protein up:classifiedWith <http://purl.obolibrary.org/obo/GO_0003700> .
  ?protein up:recommendedName / up:fullName ?name .
} LIMIT 20

Common Mistakes

  • Passing an unreviewed entry's accession when you need curated info: filter with reviewed:true in your search.
  • Mapping in the wrong direction: fr=PDB to=UniProtKB_AC-ID for "PDB → UniProt"; flip for the reverse.
  • SPARQL timeout on broad queries: add LIMIT N; default endpoint timeout is harsh. Bump timeout parameter if your query is legitimately heavy.

References