Search
Question: Questions about Pathview, maybe also gage
0
gravatar for ChIP-Tease
2.2 years ago by
ChIP-Tease0
Germany
ChIP-Tease0 wrote:

Hello everybody,

Today i found the R Pathview package and could already produce some output pictures.
Nevertheless i have some problems and hope that someone might help me out.

1. There is a difference between the original KEGG picture and the modified Pathview picture.
   I guess this is not supposed to be this way? I don’t really know what to do about this!?
 This happens for all the exported pictures.

http://pic-hoster.net/view/64307/hsa04514.png.htm

http://pic-hoster.net/view/64308/hsa04514.Down.png.htm

2. I would love to change the color, since there are people how cannot distinguish red and green, but i don’t find anything, which might help.

 

3. When i spilt up my genes to up and downregulated genes and only check the significantly upregulated ones, i don’t get any result. Only NAs. Is there a way to change the p.value threshold somehow?
    In contrast to gage the Webgestalt (http://bioinfo.vanderbilt.edu/webgestalt/option.php) tool finds an enrichment for my upregulated genes (92 genes)

4. I’m not really sure, what the shortcuts should tell me. I’d be happy for an explanation:
    p.geomean   stat.mean        p.val       q.val set.size         exp1

 

My R code

library(dplyr)
library(pathview)

library("AnnotationDbi")
library("org.Hs.eg.db")

load(„myData.RData")

my_df <- data.frame(my_data)


UPDOWN <- „Up"
UpReg <- my_df[my_df $log2FoldChange < log2(0.4) & my_df $baseMean > 20 & my_df $padj < 0.05, ]

UpReg$symbol <- mapIds(org.Hs.eg.db,
                     keys=row.names(UpReg),
                     column="SYMBOL",
                     keytype="SYMBOL",
                     multiVals="first")

UpReg$entrez <- mapIds(org.Hs.eg.db,
                    keys=row.names(UpReg),
                    column="ENTREZID",
                    keytype="SYMBOL",
                    multiVals="first")

UpReg$name =   mapIds(org.Hs.eg.db,
                    keys=row.names(UpReg),
                    column="GENENAME",
                    keytype="SYMBOL",
                    multiVals="first")

library(gage)
library(gageData)
data(kegg.sets.hs)
data(sigmet.idx.hs)
kegg.sets.hs = kegg.sets.hs[sigmet.idx.hs]


foldChange <- UpReg$log2FoldChange
names(foldChange) <- UpReg$entrez

keggres = gage(foldChange, gsets=kegg.sets.hs, same.dir=TRUE)
lapply(keggres, head, 15)


library(dplyr)
keggrespathways <- data.frame(id=rownames(keggres$less), keggres$less) %>% tbl_df() %>%filter(row_number()<=5) %>% .$id %>%  as.character()
keggrespathways

keggresids <- substr(keggrespathways, start = 1, stop = 8)
keggresids

plot_pathway <- function(pid) pathview(gene.data = foldChange, pathway.id = pid, species = „hsa“, new.signature = FALSE, out.suffix = UPDOWN)
detach(„package:dplyr“, unload=TRUE)# otherwise a get an error message discussed ion another thread
tmp <- sapply(keggresids, plot_pathway) # exports the original KEGG pig, pathview pic and some xml file

 

Thanks a lot, Alex

ADD COMMENTlink modified 21 months ago by bioinf10 • written 2.2 years ago by ChIP-Tease0
0
gravatar for bioinf
21 months ago by
bioinf10
bioinf10 wrote:

Hello there,

Did you find the explanation? If so, it would be nice if you can share it.

Thanks!

 

 

ADD COMMENTlink written 21 months ago by bioinf10

comments deleted

ADD REPLYlink modified 20 months ago • written 20 months ago by Luo Weijun1.4k
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.2.0
Traffic: 327 users visited in the last hour