kth_hpalisted
Install: claude install-skill Agents365-ai/kth_hpa
# 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).
```bash
# Per-gene record by symbol or Ensembl ID. --fields summary (default) gives a
# compact subset; --fields all gives the full ~100-field record.
python3 scripts/hpa.py entry EGFR TP53 ENSG00000141510 --fields summary
# Full record as TSV or XML (returned verbatim):
python3 scripts/hpa.py entry EGFR --format tsv --out egfr.tsv
# Multi-gene query with chosen columns (codes in references/columns.md):
python3 scripts/hpa.py search --query "EGFR" --columns "g,eg,scl,rnats,rnascs" --format tsv
# Write JSON to a file:
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