This is a test version of Biostars. For the public version, visit https://www.biostars.org.
pathview R package not working

Hi!

I cannot make any useful plots in pathviews. Where am I going wrong?

library(pathview)
a= c( -2,4)
names(a) =c('MDM2', 'TP53')
pathview(gene.data = a, pathway.id = "04115", species = "hsa")

there is no highlighting of either p53 or mdm2 in the resulting fig.

pathview r

I think the answers is on the warnings you get:

Warning: None of the genes or compounds mapped to the pathway!
Argument gene.idtype or cpd.idtype may be wrong.

2 answers

You can't use the gene names (symbols), but have to use ENTREZ gene IDs.

library(pathview)
a= c( -2,4)
names(a) =c("4193", "7157")
pathview(gene.data = a, pathway.id = "04115", species = "hsa")

To get these entrez IDs you can use org.Hs.eg.db in R.

library(org.Hs.eg.db)
symbols = c("MDM2","TP53") 
names(a) <- mget(symbols, revmap(org.Hs.egSYMBOL),ifnotfound=NA)

Thank you.....FOR KEGG RESULTS HIGHLIGHTED THE TARGETED GENES

Log in to answer this question.