Mapping protein refseq to Gene ID I have a protein refseq (eg, NP_000029). How can I get the corresponding gene ID (ag, APC) from NCBI using an R package?
You can do this with the reutils package, which provides an API to NCBI's E-utilities. Here's an example for your specific question:
install.packages(&quot;reutils&quot;)
library(reutils)

# Get universal identifier
uid &lt;- esearch(&quot;NP_000029&quot;, db = &quot;gene&quot;)
# Fetch summary
sm &lt;- esummary(uid, db = &quot;gene&quot;)
# Extract specific tag
sm$xmlValue(&quot;//Name&quot;)