Skip to content

Add uniprot backend for gene annotation - #524

Open
ivokwee wants to merge 3 commits into
develfrom
feat-uniprot-annot
Open

ivokwee wants to merge 3 commits into
develfrom
feat-uniprot-annot

Conversation

@ivokwee

@ivokwee ivokwee commented Sep 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds UniProt as a third gene annotation backend (alongside AnnotationHub and g:Profiler), used as a fallback for organisms/probe types the other two backends don't cover well (e.g. hamster).

  • getGeneAnnotation.UNIPROT(): annotates probes via UniProt.ws::mapUniProt(). Detects probe type (Ensembl gene/transcript/protein, RefSeq protein, UniProt accession, Entrez ID) via regex sniffing (detect_probetype.UNIPROT()), then filters results to the target organism since mapUniProt() has no taxId argument.
  • getExampleFeatures.UNIPROT(): last-resort fallback for example features when an organism has no OrgDb package and no g:Profiler entry — samples UniProt accessions directly via UniProt.ws::UniProt.ws().
  • Wires "uniprot" into the methods list for getGeneAnnotation() and getProbeAnnotation().
  • .map_gprofiler_id.SPECIES_TABLE(): looks up the g:Profiler species ID from the bundled SPECIES_TABLE before falling back to the remote g:Profiler organism list API call.
  • Fixes a copy-paste bug in getGeneAnnotation.ANNOTHUB() that nulled ortholog/orthologs twice instead of human_ortholog/human_orthologs.

Test plan

  • make test filter=pgx-annot
  • Manually verify annotation for a hamster (or other OrgDb-less) dataset resolves gene symbols via the UniProt backend

🤖 Generated with Claude Code

@ivokwee
ivokwee requested a review from phisanti September 16, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant