| name | kth_hpa |
| description | Programmatically fetch data from the Human Protein Atlas (proteinatlas.org, the KTH/SciLifeLab resource) — per-gene records (tissue & single-cell RNA expression, subcellular localization, pathology/cancer prognostics, antibody reliability, protein class) and multi-gene search/download queries with chosen columns, as JSON/TSV/XML. Use whenever the user wants to get, download, query, scrape, or batch-pull Human Protein Atlas / HPA / proteinatlas.org data for one or many genes, asks "does proteinatlas have an API", wants HPA tissue or subcellular or single-cell expression for a gene list, needs the HPA record for an Ensembl ID or gene symbol, or wants to know which HPA bulk file to download. Trigger even when they just paste a proteinatlas.org URL or a list of genes and say "get their HPA data". |
| metadata | {"openclaw":{"requires":{"bins":"[Truncated]"},"emoji":"🧬"},"version":"0.1.0"} |
KTH HPA — Human Protein Atlas programmatic access
The Human Protein Atlas (HPA, proteinatlas.org — the KTH / SciLifeLab resource
led by Mathias Uhlén) has no REST-with-docs API, but exposes three reliable
programmatic paths. This skill wraps the two per-request ones in one stdlib
script and points to the third (bulk download) for large jobs.
Pick the access path
- A few genes, want the full record →
entry subcommand (per-gene .json).
- Many genes, only specific fields →
search subcommand (one call, chosen
columns) — or a bulk file if you want the whole atlas.
- Whole-atlas / hundreds+ of genes → download a bulk TSV, don't loop the
API. See
references/columns.md → "Bulk downloads".
Usage
The script is scripts/hpa.py (Python 3, stdlib only — no installs).
python3 scripts/hpa.py entry EGFR TP53 ENSG00000141510 --fields summary
python3 scripts/hpa.py entry EGFR --format tsv --out egfr.tsv
python3 scripts/hpa.py search --query "EGFR" --columns "g,eg,scl,rnats,rnascs" --format tsv
python3 scripts/hpa.py entry EGFR TP53 --fields all --out out.json
entry accepts gene symbols and/or ENSG… IDs mixed freely; symbols are
resolved to Ensembl IDs via the search API first. JSON output for multiple
genes is keyed by the query token.
The raw endpoints (if you need them without the script)
# Per-entry record (json / tsv / xml):
https://www.proteinatlas.org/<ENSG>.json
# Search + download with chosen columns:
https://www.proteinatlas.org/api/search_download.php?search=<query>&format=<json|tsv>&columns=<c1,c2,...>&compress=<no|yes>
Large responses may be gzip-compressed (the script handles this). The
search query supports HPA's advanced search syntax (fields, ranges,
AND/OR), not just gene symbols.
Details on demand
Read references/columns.md for: the verified columns= code table, how to
discover any other code, the bulk-download file list, version-pinning for
reproducibility, and HPA's data license.
Licensing note (state this when handing data to the user)
HPA data is CC BY 4.0 — reuse requires citing a primary HPA publication
and proteinatlas.org (plus a "Human Protein Atlas" credit + direct URL for
specific images/data). No documented rate limit, but the script sleeps between
per-gene calls; for many genes prefer a bulk download over hammering the API.