Rarely, UniProt.ws select seems to return missing values, although there should be a result. Consider
library(UniProt.ws)
database <- UniProt.ws(taxId = 9606)
select(x = database, keys = c("P01613", "P01861"), columns = "GENES", keytype = "UNIPROTKB")
Getting extra data for P01861
'select()' returned 1:1 mapping between keys and columns
UNIPROTKB GENES
1 P01613 <NA>
2 P01861 IGHG4
If you check the UniProt website both P01613 and P01861 have a gene symbol. Why do I get NA
for P01613?
So, is there a way to convert the IDs from such legacy data sets automatically? Is there backwards compatibility built into the R package?
If there were a simple way around this I would have told you rather than explain why it doesn't do what you expect. I mean, what's the profit in telling you why it doesn't do what you want if I can just say 'do it this way'?
You are free to fork the UniProt.ws package and then modify lines 116-120 to ignore any keys that aren't current (or from the species you are querying on) and then it will be 'backward compatible'.