This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R SBGNview - can't change data ID even though format is correct

I'm using the SBGNview package in R to visualize Reactome pathways, and am having problem with converting my gene IDs to pathwayCommons IDs.

Below is what I'm doing:

library(SBGNview)
library(org.Mmu.eg.db)
data("sbgn.xmls")

A <- matrix(c(1:20), nrow = 10, ncol = 2, byrow = TRUE)
colnames(A) <- c("exp1", "exp2")
rownames(A) <- c(57279, 18673, 11747, 240028, 13200, 67041, 67025, 73130, 54127, 14387)

changeDataId(data.input.id = A, input.type = "entrez", output.type = "pathwayCommons",
         mol.type = "gene", org = "mmu")

This gives me the error:

Error in mol.sum.multiple.mapping(mol.data = data.input.id, id.map = id.map,  : 
  no ID can be mapped!

However, I'm confused because I can find my entrez IDs in the mmu_pathwayCommons_ENTREZID database. For example, if I run the code below, I can find my ID in the database that I believe the changeDataID function uses.

>which(mmu_pathwayCommons_ENTREZID[,2] == "14387")
609645 609647 609649 
609645 609647 609649 

So why am I having trouble with converting the IDs?

pathway sbgnview r

1 answer

As per the documentation for output.type, pathwayCommons is not supported but e.g. ensembl is, and changeDataId(data.input.id = A, input.type = "entrez", output.type = "ensembl", mol.type = "gene", org = "mmu") worked for me. Incidentally, this automatically loaded package org.Mm.eg.db.

Log in to answer this question.