Question: gage and pathview : genes are not mapped
0
gravatar for Sharon
16 months ago by
Sharon420
Sharon420 wrote:

Hi Everyone

I am new to using gage and pathway view to get some view about my genes. My edgeR genes are using symbols like this: INSM1, LTF, JAK2, ..etc. I tried to change the DB to EnsDb but still doesn't work with me. I don't think the figures generated are for the genes I have as it seems they fail to be mapped to pathway. Any help please? Thanks

#edgeR code here 
#in summary the final two steps are: 
et <- exactTest(dge, pair=c("Control", "treated"))
etp <- topTags(et, n= 100000)
#Gage and pathview 
kegg.sets.hs = kegg.sets.hs[sigmet.idx.hs]
head(kegg.sets.hs, 3)
res = etp$table
foldchanges = res$logFC
names(foldchanges) = res$symbol
keggres = gage(foldchanges, gsets=kegg.sets.hs, same.dir=TRUE)
lapply(keggres, head)
keggrespathways = data.frame(id=rownames(keggres$greater), keggres$greater) %>%
  tbl_df() %>%
  filter(row_number()<=10) %>%
  .$id %>%
  as.character()
keggrespathways
keggresids = substr(keggrespathways, start=1, stop=8)
keggresids
data(go.sets.hs)
data(go.subs.hs)
gobpsets = go.sets.hs[go.subs.hs$BP]
gobpres = gage(foldchanges, gsets=gobpsets, same.dir=TRUE)
lapply(gobpres, head)

# Define plotting function for applying later
plot_pathway = function(pid) pathview(gene.data=foldchanges,gene.idtype="SYMBOL", pathway.id=pid, species="hsa")
# plot multiple pathways (plots saved to disk and returns a throwaway list object)
tmp = sapply(keggresids, function(pid) pathview(gene.data=foldchanges,gene.idtype="SYMBOL", pathway.id=pid, species="hsa"))

These are the warnings and the generated pathway figures don't include any of my interesting genes.

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

select()' returned 1:1 mapping between keys and columns Info: Working in directory Info: Writing image fil hsa00232.pathview.png Warning: None of the genes or compounds mapped to the pathway! Argument gene.idtype or cpd.idtype may be wrong.

'select()' returned 1:1 mapping between keys and columns Info: Working in directory Info: Writing image file hsa00983.pathview.png Warning: None of the genes or compounds mapped to the pathway! Argument gene.idtype or cpd.idtype may be wrong.

'select()' returned 1:1 mapping between keys and columns Info: Working in directory /.. Info: Writing image file hsa00230.pathview.png Warning: None of the genes or compounds mapped to the pathway! Argument gene.idtype or cpd.idtype may be wrong.

'select()' returned 1:1 mapping between keys and columns Info: Working in directory Info: Writing image file hsa04514.pathview.png Warning: None of the genes or compounds mapped to the pathway! Argument gene.idtype or cpd.idtype may be wrong.

'select()' returned 1:1 mapping between keys and columns Info: Working in directory Info: Writing image file hsa04010.pathview.png There were 50 or more warnings (use warnings() to see the first 50)

pathway analysis rnaseq • 1.0k views
ADD COMMENTlink modified 16 months ago • written 16 months ago by Sharon420

Thank you. Do you have an example please? This works but triggers 1:many mapping between keys and columns.

select(org.Hs.eg.db, rownames(res), c("ENTREZID","SYMBOL"), "ALIAS")
ADD REPLYlink modified 16 months ago • written 16 months ago by Sharon420
1
gravatar for h.mon
16 months ago by
h.mon24k
Brazil
h.mon24k wrote:

Default KEGG mapping uses ENTREZID, so you have to map your symbol or Ensembl IDs to Entrez IDs. Pathview provides the function id2eg() to perform such conversion, or you can use BioMart.

ADD COMMENTlink written 16 months ago by h.mon24k
0
gravatar for Sharon
16 months ago by
Sharon420
Sharon420 wrote:

For the sake of any one who needs to solve this, it is solved this way:

res$symbol <- mapIds(org.Hs.eg.db,
                     keys=row.names(res),
                     column="SYMBOL",
                     keytype="ALIAS",
                     multiVals="first")
res$entrez <- mapIds(org.Hs.eg.db,
                     keys=row.names(res),
                     column="ENTREZID",
                     keytype="ALIAS",
                     multiVals="first")
ADD COMMENTlink modified 16 months ago • written 16 months ago by Sharon420
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 819 users visited in the last hour