[BioC] how to map affy SNP ID to pubmed ID

Marc Carlson mcarlson at fhcrc.org
Sat Oct 23 00:26:24 CEST 2010

Hi Liu,

The thing you want to use for this is an annotation package.  If you
have gene symbols that implies that there are genes, so that would mean
that you could use the appropriate organism annotation package like this:

symbols = c("A25","ACA7B")

## extract the entrez gene IDs (central ID for these packages)
egids = unlist(mget(symbols, org.Hs.egALIAS2EG, ifnotfound=NA))
## then get the PMIDs for each EG
mget(egids, org.Hs.egPMID, ifnotfound=NA)

## or if you like data.frames
egids = unlist(mget(symbols, org.Hs.egALIAS2EG, ifnotfound=NA))
egTab = toTable(org.Hs.egALIAS2EG[symbols])
pmidTab = toTable(org.Hs.egPMID[egids])
merge(egTab, pmidTab)

Of course, using gene symbols is fraught with peril as they are not
guaranteed to be unique!  So I would really not recommend using them
that way.  If you have a real ID like an entrex gene ID or an ensembl
ID, I would recommend using that instead.

You can read more about these by looking at the AnnotationDbi vignette here:


Let us know if you need more help,


On 10/22/2010 08:42 AM, Qian Liu wrote:
> Hi I am trying to get all the abstracts of a list of SNPs from pubmed. I
> have got gene symbol for each SNP ID.
> I am not extractly sure which annotation package should I use to map to
> What is the function I can use to map from gene symbol (or affy snp id) to
> Thank you.
> Liu
> 	[[alternative HTML version deleted]]
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

More information about the Bioconductor mailing list