JoshDG JoshDG - 2 months ago 15
R Question

Getting a SwissProt ID from Gene Symbol and Vice Versa

I'm new to Bioconductor and trying to find the right package to be able to do what I want to..which is give a SwissProt ID and give me the Gene Symbol or vice versa.

There's a lot of packages and I don't know which one I want, anyone have a quick answer?


One approach you can take is to use the organism packages this:


Suppose my gene symbols are like the ones in keys here:

keys <- c("A1BG","A2M","A2MP1","NAT1","NAT2","AACP")

Then you can just use the select() method (this works for R-2.14 and higher).

select(, cols=c("SYMBOL", "UNIPROT"), keys= keys, keytype="SYMBOL")

Hope this helps!