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)
| Tool |
Args |
Returns |
Description |
| download_uniprot_search_by_query |
query (UniProt query syntax, e.g. organism_id:9606 AND reviewed:true), out_path, optional format |
rich JSON envelope |
Search UniProtKB; results saved to file. |
| download_uniprot_retrieve_by_id |
uniprot_id (e.g. P04637), out_path, optional frmt (fasta default) |
rich JSON envelope |
Retrieve one entry in the chosen format. |
| download_uniprot_mapping |
fr (from db, e.g. PDB), to (to db, e.g. UniProtKB_AC-ID), query (comma-separated IDs), out_path |
rich JSON envelope |
Cross-database ID mapping (PDB↔UniProt, gene name↔accession, etc.). |
| download_uniprot_seq_by_id |
uniprot_id, out_path |
rich JSON envelope; FASTA file |
Sequence FASTA only. |
| download_uniprot_meta_by_id |
uniprot_id, out_path |
rich JSON envelope; JSON file |
Full metadata (function, taxonomy, GO, xrefs, etc.). |
| download_uniprot_sparql_by_query |
query (SPARQL string), out_dir (required), timeout (default 120s) |
rich JSON envelope; SPARQL JSON file at file_info.file_path; biological_metadata.row_count + head_vars |
Run an arbitrary SPARQL query against https://sparql.uniprot.org/sparql. |
When to Use Which Tool
| Goal |
Tool |
| You have a UniProt accession, want sequence |
download_uniprot_seq_by_id |
| You have a UniProt accession, want everything else |
download_uniprot_meta_by_id |
| You have a gene name / PDB ID, want UniProt |
download_uniprot_mapping |
| You have a free-text query, want a list |
download_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
1---2name: uniprot-database3description: 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).4license: Unknown5---67# UniProt Database89## Overview1011UniProt 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.1213## Project Tools (VenusFactory2)1415| Tool | Args | Returns | Description |16|------|------|---------|--------------|17| **download_uniprot_search_by_query** | `query` (UniProt query syntax, e.g. `organism_id:9606 AND reviewed:true`), `out_path`, optional `format` | rich JSON envelope | Search UniProtKB; results saved to file. |18| **download_uniprot_retrieve_by_id** | `uniprot_id` (e.g. `P04637`), `out_path`, optional `frmt` (`fasta` default) | rich JSON envelope | Retrieve one entry in the chosen format. |19| **download_uniprot_mapping** | `fr` (from db, e.g. `PDB`), `to` (to db, e.g. `UniProtKB_AC-ID`), `query` (comma-separated IDs), `out_path` | rich JSON envelope | Cross-database ID mapping (PDB↔UniProt, gene name↔accession, etc.). |20| **download_uniprot_seq_by_id** | `uniprot_id`, `out_path` | rich JSON envelope; FASTA file | Sequence FASTA only. |21| **download_uniprot_meta_by_id** | `uniprot_id`, `out_path` | rich JSON envelope; JSON file | Full metadata (function, taxonomy, GO, xrefs, etc.). |22| **download_uniprot_sparql_by_query** | `query` (SPARQL string), `out_dir` (required), `timeout` (default `120`s) | rich JSON envelope; SPARQL JSON file at `file_info.file_path`; `biological_metadata.row_count` + `head_vars` | Run an arbitrary SPARQL query against https://sparql.uniprot.org/sparql. |2324## When to Use Which Tool2526| Goal | Tool |27|---|---|28| You have a UniProt accession, want sequence | `download_uniprot_seq_by_id` |29| You have a UniProt accession, want everything else | `download_uniprot_meta_by_id` |30| You have a gene name / PDB ID, want UniProt | `download_uniprot_mapping` |31| You have a free-text query, want a list | `download_uniprot_search_by_query` |32| You need a complex cross-resource graph query (e.g. all enzymes in pathway X catalyzing reaction Y) | `download_uniprot_sparql_by_query` |3334## SPARQL Quick Examples3536**Top 5 proteins by name:**37```sparql38PREFIX up: <http://purl.uniprot.org/core/>39SELECT ?p ?name WHERE {40 ?p a up:Protein .41 ?p up:recommendedName / up:fullName ?name .42} LIMIT 543```4445**Proteins in human, with a specific GO term:**46```sparql47PREFIX up: <http://purl.uniprot.org/core/>48PREFIX taxon: <http://purl.uniprot.org/taxonomy/>49SELECT ?protein ?name50WHERE {51 ?protein a up:Protein .52 ?protein up:organism taxon:9606 .53 ?protein up:classifiedWith <http://purl.obolibrary.org/obo/GO_0003700> .54 ?protein up:recommendedName / up:fullName ?name .55} LIMIT 2056```5758## Common Mistakes5960- **Passing an unreviewed entry's accession when you need curated info**: filter with `reviewed:true` in your search.61- **Mapping in the wrong direction**: `fr=PDB to=UniProtKB_AC-ID` for "PDB → UniProt"; flip for the reverse.62- **SPARQL timeout on broad queries**: add `LIMIT N`; default endpoint timeout is harsh. Bump `timeout` parameter if your query is legitimately heavy.6364## References6566- [UniProt REST API](https://www.uniprot.org/help/api_queries)67- [UniProt query syntax](https://www.uniprot.org/help/query-fields)68- [UniProt SPARQL endpoint](https://sparql.uniprot.org/) — interactive query editor with examples69- [ID mapping db list](https://www.uniprot.org/help/id_mapping)