Skill

Access and Analyze UniProt Protein Data

Skill for querying UniProt's protein database via REST API: search, FASTA retrieval, ID mapping, and batch/streaming access.


79
Spark score
out of 100
Updated last month
Version 13.4.0

Add to Favorites

Why it matters

Leverage the UniProt database to search for protein entries, retrieve sequences, map identifiers across various biological databases, and access detailed annotations for protein analysis.

Outcomes

What it gets done

01

Search proteins by name, gene, accession, or organism.

02

Retrieve protein sequences in FASTA or other specified formats.

03

Map identifiers between UniProt and external databases like Ensembl, RefSeq, and PDB.

04

Access protein annotations including GO terms, domains, and functional descriptions.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-uniprot-database | bash

Overview

UniProt Database

A skill for querying UniProt's REST API - protein search, FASTA sequence retrieval, cross-database ID mapping, and streaming large result sets - with a Python client wrapper. Use it for any programmatic protein-data lookup, batch retrieval, or ID mapping task; use the stream endpoint instead of search when a result set exceeds pagination limits.

What it does

This skill accesses UniProt, the leading comprehensive protein sequence and functional information resource, via its REST API. It searches proteins by name, gene, accession, or organism; retrieves sequences in FASTA or other formats; maps identifiers across external databases (Ensembl, RefSeq, PDB, and more); and accesses Swiss-Prot (reviewed) versus TrEMBL (unreviewed) protein annotations including GO terms, domains, and functional descriptions.

When to use - and when NOT to

Use it for searching protein entries by name/gene symbol/accession/organism, retrieving sequences in FASTA or other formats, mapping identifiers between UniProt and external databases, accessing GO-term/domain/functional annotations, batch-retrieving multiple entries efficiently, distinguishing reviewed Swiss-Prot from unreviewed TrEMBL data, streaming large datasets past pagination limits, or building field-specific structured queries.

Inputs and outputs

Search uses the endpoint https://rest.uniprot.org/uniprotkb/search?query={query}&format={format}, supporting JSON, TSV, Excel, XML, FASTA, RDF, and TXT output, with structured query syntax like gene:BRCA1 AND reviewed:true, taxonomy_id:9606 for human proteins, length:[100 TO 500], or go:0005515 for a specific GO term. Individual entries are retrieved by accession (classic 6-character format like P12345, or extended 10-character format like A0A022YWF9) via https://rest.uniprot.org/uniprotkb/{accession}.{format}. ID mapping is a three-step job workflow - submit to /idmapping/run, poll /idmapping/status/{jobId}, retrieve from /idmapping/results/{jobId} - supporting UniProtKB AC/ID, gene names, Ensembl, RefSeq, EMBL, PDB, AlphaFoldDB, KEGG, and GO terms, capped at 100,000 IDs per job with results stored for 7 days. Large result sets exceeding pagination use the /uniprotkb/stream endpoint instead. Retrieved fields can be scoped precisely (accession, id, gene_names, organism_name, protein_name, sequence, length, go_*, cc_*, ft_*) for efficient transfer.

Integrations

A Python helper script, scripts/uniprot_client.py, wraps the API with search_proteins(query, format), get_protein(accession, format), map_ids(ids, from_db, to_db), batch_retrieve(accessions, format), and stream_results(query, format). Full field and mapping-database references are documented separately in /references/api_fields.md and /references/id_mapping_databases.md.

Query syntax supports boolean operators (kinase AND organism_name:human, (diabetes OR insulin) AND reviewed:true, cancer NOT lung), field-specific searches (gene:BRCA1, organism_id:9606, annotation:(type:signal)), range queries (length:[100 TO 500], mass:[50000 TO 100000]), and wildcards (gene:BRCA*). Two alternative Python packages are noted for programmatic use beyond the bundled client: Unipressed (a modern, typed UniProt REST client) and bioservices (a broader bioinformatics web-services client).

Who it's for

Bioinformaticians and researchers who need programmatic access to protein sequence, annotation, and cross-database identifier data without hand-building UniProt REST queries each time. Best practice guidance built into the skill: prefer reviewed:true Swiss-Prot entries over unreviewed TrEMBL predictions when curated data matters, request only the fields actually needed to reduce bandwidth, cache frequently accessed results locally, and rate-limit large batch operations out of respect for the API.

Source README

UniProt is the world's leading comprehensive protein sequence and functional information resource. Search proteins by name, gene, or accession, retrieve sequences in FASTA format, perform ID mapping across databases, access Swiss-Prot/TrEMBL annotations via REST API for protein analysis.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.