Pathview None of the genes or compounds mapped to the pathway
2
1
Entering edit mode
Dani ▴ 20
@dani-9429
Last seen 9.0 years ago

Hi,

I'm a bio informatics student, who is just starting with R and pathview. I normalised an expression dataset, to the point where i only have to columns (one is the gene_id, and one the fold change).

My file looks like this:

ORF FC
YHR007C 1.969895926
YBR218C 0.318703864
YAL051W 0.868867047
YAL053W 0.939446662
YAL054C 0.056384598
YAL055W 0.384607722
YAL056W 0.634274866
YAL058W 1.046516078
YOL109W 0.4155513
YAL065C 0.691971851
YAL066W 0.727562231
YAL067C 0.465548065
YAR002AC 1.127408184

I've tried to read this into R, with this code.

> dataFC<-read.csv("D:/Users/Dani/Documents/School/OWE6B/readTopathview.csv",header = T, sep =";")
> head(dataFC)
> keggcode <- "sce"
> data(gene.idtype.list)
> gene.idtype.list
> library(KEGGREST)
> pathways <- keggList("pathway", keggcode)
> head(pathways)

> pv.out <- pathview(gene.data = dataFC, gene.idtype = "KEGG", 
                   pathway.id = "00620", species = keggcode, out.suffix = "00620", keys.align = "y", kegg.native = TRUE, key.pos = "topright")

The result however is that no genes are mapped. i get this message

Note: None of the genes or compounds mapped to the pathway!
Argument gene.idtype or cpd.idtype may be wrong.
Info: Working in directory D:/Users/Dani/Documents
Info: Writing image file sce00620.00620.png
Warning message:
In colnames(plot.data)[c(1, 3, 9:ncs)] = c("kegg.names", "all.mapped",  :
  number of items to replace is not a multiple of replacement length

How do I fix this, What am I doing wrong ( i have read the corresponsing pathview guide, but i just can't figure out why it's not working)

thanks in advance,

Dani

pathview pathways KEGG empty map • 5.4k views
ADD COMMENT
1
Entering edit mode
Dani ▴ 20
@dani-9429
Last seen 9.0 years ago

Well I solved it myself. Maybe i can help someone with it. Pathview only accepts genes as row names so not as a column. I didn't find it in the guide so maybe this is worth adding?

Sadly i had a file with duplicate genes so what i decided to do was the following:

dataFC<-read.csv("D:/Users/Dani/Documents/School/OWE6B/readTopathview.csv",header = T, sep =";")
head(dataFC)
keggcode <- "sce"
library(pathview)
library(KEGGREST)
datagene <- subset(dataFC, select = "ORF")
dataFold <- subset(dataFC, select = "FC")
df <- data.frame(matrix(ncol = 2, nrow = 6153))
datageneORF <-unlist(datagene)
dataFoldun = unlist(dataFold)
df[1] = datagene
df[2] = dataFoldun
rownames(df) = make.names(df[,1], unique=TRUE)
df[,1] <- NULL

pv.out <- pathview(gene.data = df, gene.idtype = "KEGG", 
                   pathway.id = "sce00010", species = keggcode, out.suffix = "Glycolysis", keys.align = "y", 
                   kegg.native = TRUE, key.pos = "topright")
pv.out <- pathview
ADD COMMENT
0
Entering edit mode

thank you a lot for your solution.

ADD REPLY
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 18 months ago
United States
You can see the input data format by doing: data(gse16873.d) head(gse16873.d) for more details check the gene.data or cpd.data arguments: ?pathview
ADD COMMENT

Login before adding your answer.

Traffic: 842 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6