Question: How can we find the list of genes involved in each pathway using Gage?
0
gravatar for Tania
15 months ago by
Tania120
Tania120 wrote:

Hi all
If we detected the pathways using gage, how can I find the list of genes involved in each pathway? I mean how to output the genes enriched significanlty in each pathway that was in my list of genes?

res$symbol <- mapIds(org.Hs.eg.db,
                         keys=row.names(res),
                         column="SYMBOL",
                         keytype="SYMBOL",
                         multiVals="first")
    res$entrez <- mapIds(org.Hs.eg.db,
                         keys=row.names(res),
                         column="ENTREZID",
                         keytype="SYMBOL",
                         multiVals="first")
    foldchanges = res$logfc
    names(foldchanges) = res$entrez
    #---------------Use Kegg and gage to get upregulated and downregulated pathways
    datakegg.gs)
    keggres = gage(foldchanges, gsets =kegg.gs, same.dir =,True,  compare="unpaired" )

    lapply(keggres, head)
    keggrespathwaysup = data.frame(id=rownames(keggres$greater), keggres$greater) %>%
      tbl_df() %>%
      filter(row_number()<=5) %>%
      .$id %>%
      as.character()
    keggrespathwaysdn = data.frame(id=rownames(keggres$less), keggres$less) %>%
      tbl_df() %>%
      filter(row_number()<=5) %>%
      .$id %>%
      as.character()
    write.csv(keggrespathwaysup, "keggspathsup.csv")
    write.csv(keggrespathwaysdn, "keggspathsdn.csv")
    #-------------------------------------------------------
    keggresidsup = substr(keggrespathwaysup, start=1, stop=8)
    keggresidsup
    keggresidsdn = substr(keggrespathwaysdn, start=1, stop=8)
    gobpres = gage(foldchanges, gsets=kegg.gs, same.dir =TRUE, compare ="unpaired")
    lapply(gobpres, head)
    plot_pathway = function(pid) pathview(gene.data=foldchanges,gene.idtype="ENTREZID", pathway.id=pid, 
    species="hsa", new.signature=FALSE)

    #------------------------------plot multiple pathways ups and downs
     tmpup = sapply(keggresidsup, function(pid) pathview(gene.data=foldchanges,gene.idtype="ENTREZID", pathway.id=pid, species="hsa"))
    tmpdn = sapply(keggresidsdn, function(pid) pathview(gene.data=foldchanges,gene.idtype="ENTREZID", pathway.id=pid, species="hsa"))
gage rna-seq pathways • 548 views
ADD COMMENTlink written 15 months ago by Tania120
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: 707 users visited in the last hour