Advertisement
Guest User

Untitled

a guest
Jul 15th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. source("http://bioconductor.org/biocLite.R")
  2. biocLite("org.Hs.eg.db")
  3. library("org.Hs.eg.db")
  4.  
  5. # mapped_genes are all the genes that org.HS.egPMID covers (the HS refers to homosapien).  These genes are in Entrez format.
  6. # entrez2Pmid is a list taking entrez gene ids to a vector of Pmids.  
  7.  
  8. mapped_genes <- mappedkeys(org.Hs.egPMID)
  9. entrez2Pmid  <- as.list(org.Hs.egPMID[mapped_genes])
  10.  
  11. # now if you have an entrez gene id you can look up the relevant papers by doing
  12.  
  13. entrez2Pmid[myEntrezGene]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement