This is a test version of Biostars. For the public version, visit https://www.biostars.org.
clusterprofiler: id conversion & the problem of package "org.Hs.eg.db"

I want to implement id conversion using clusterProfiler. But I met a bug as following: org.Hs.eg.db I successfully library package org.Hs.eg.db, but I couldn't load it to implement ID conversion using function bitr in R package clusterProfiler. What's wrong with it? I couldn't figure it out and please help.

clusterprofile id conversion

Did you load the package? Library() It would helpful for if you could provide some more information.

enter image description here I have loaded the package, but it didn't work.

1 answer

You should use the database without quotation marks:

orgDb=org.Hs.eg.db

Or you can try:

library(org.Hs.eg.db)
library(ensembldb)

genelist <- c("TSPAN6", "OPTN", "XIST")
ensembldb::select(
  x = org.Hs.eg.db,
  keys = genelist,
  keytype = "SYMBOL",
  columns = c("ENTREZID", "ENSEMBL")
)

====
  SYMBOL ENTREZID         ENSEMBL
1 TSPAN6     7105 ENSG00000000003
2   OPTN    10133 ENSG00000123240
3   XIST     7503 ENSG00000229807
====

Other nice packages to do these things are AnnotationDbi & biomaRt

Best, Tom

Thanks! It worked!

Log in to answer this question.