Error in using Pathview package. Do not print the pathways provided by GAGE analysis
3
0
Entering edit mode
@mariebordone-10758
Last seen 7.9 years ago

Hi everyone,

I am using Gage to analyse the pathways that are different between 2 conditions. Everything works fine but when I arrived to the pathview part, I keep getting the same error:

select()' returned 1:1 mapping between keys and columns
Info: Working in directory 
Info: Writing image file hsa03010.pathview.multi.png
 Show Traceback
 
 Rerun with Debug
 Error in array(col.rgb[, i], dim(node.rgb)[3:1]) : 
  negative length vectors are not allowed 

I don't know what is the problem since the gage runs perfectly fine. It returns the up and down regulated pathways... Could you please help me to debug it? 

Here is my code:

ref.idx=1:44 #controls

samp.idx.1=45:73 #pd

cnts_ent.kegg.p=gage(PD.genes.GAGE,gsets=kegg.gs,ref=ref.idx,samp=samp.idx.1,compare = "as.group")

diff.expr=PD.genes.GAGE[,samp.idx.1] - rowMeans(PD.genes.GAGE[,ref.idx])

 

sel=cnts_ent.kegg.p$greater[,"q.val"]< 0.05 & 
  !is.na(cnts_ent.kegg.p$greater[,"q.val"])

path.ids=rownames(cnts_ent.kegg.p$greater)[sel]

path.ids2=substr(path.ids,1,8)

library(pathview)

pv.out.list=sapply(path.ids2[1:length(path.ids2)], function(pid) pathview(gene.data = as.matrix(diff.expr), pathway.id = pid, species = "hsa", gene.idtype="kegg"))

P.s: the version of my pathview package is 1.2 ... 

Thank you in advance! 

gage pathview error • 3.5k views
ADD COMMENT
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 10 months ago
United States
Marie, I would suggest you to update to the current release firs, BioC 3.3 and pathview 1.12.0. you version seem to be quite old, and old versions of BioC cause problems. Let me know if the problem still exists. Weijun
ADD COMMENT
0
Entering edit mode

Dear Weijun, 

My versions are both updated to the ones you suggested... This is not the problem in my case...

ADD REPLY
0
Entering edit mode
Marie, It works with 25 samples (or less) but not 29 samples. That’s because native KEGG graph is a raster image. Each reactangle gene node span a fix number of lines (25 in this case), which can not divide further into more than 25 pieces. Hope this makes sense.
ADD REPLY
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 10 months ago
United States
Hi Marie, I could not see any obvious problem from your description. If would be helpful if you can do something like below: str(diff.expr) head(diff.expr[,1:3]) pv.out=pathview(gene.data = as.matrix(diff.expr[,1:3]), pathway.id = path.ids2[1], species = "hsa", gene.idtype="kegg") what’s the outputs from above lines? did the pathview step work fine this time?
ADD COMMENT
0
Entering edit mode

Dear Weijun, 

Thank you very much for your suggestion. In fact I notice that I can draw the pathway from the columns 1:25 but not from 1:29. However, if I just plot diff.expr[,25:29], the pathways also work... So I do not understand why it works until the column 25 but not with the rest...

Here's the output of str(diff.expr):

'data.frame':    17856 obs. of  29 variables:
 $ PD   : num  -0.190647 -0.000705 -0.292561 -0.172043 -0.106086 ...
 $ PD.1 : num  -0.0854 0.0169 -0.5226 -0.2229 -0.0536 ...
 $ PD.2 : num  -0.1471 0.0326 0.461 0.098 -0.0338 ...
 $ PD.3 : num  0.00522 -0.01139 -0.36758 -0.03355 -0.04368 ...
 $ PD.4 : num  -0.0383 -0.0114 -0.4861 -0.0293 0.1185 ...
 $ PD.5 : num  -0.0394 -0.024 -0.6453 -0.1289 0.0177 ...
 $ PD.6 : num  -0.0185 -0.0114 -0.075 -0.0608 -0.0191 ...
 $ PD.7 : num  -0.187 0.0309 -0.5026 -0.1705 -0.0289 ...
 $ PD.8 : num  0.10254 0.01166 -0.26676 -0.00821 -0.03545 ...
 $ PD.9 : num  -0.07178 0.00107 -0.13531 0.02626 0.05827 ...
 $ PD.10: num  0.522 -0.024 -0.319 0.131 0.429 ...
 $ PD.11: num  0.1575 -0.024 -0.723 -0.1199 0.0225 ...
 $ PD.12: num  0.3679 -0.024 -0.2436 0.0126 -0.0404 ...
 $ PD.13: num  0.0722 -0.024 -0.5442 -0.0959 -0.0387 ...
 $ PD.14: num  -0.14358 -0.02396 -0.21179 -0.00125 -0.06028 ...
 $ PD.15: num  -0.117 -0.024 -0.46 -0.132 -0.052 ...
 $ PD.16: num  0.0844 -0.0114 -0.537 -0.0945 -0.0143 ...
 $ PD.17: num  0.00842 -0.01139 -0.38992 -0.10039 0.08268 ...
 $ PD.18: num  0.2661 0.0117 -0.3899 -0.1138 0.0161 ...
 $ PD.19: num  -0.00446 -0.02396 -0.67457 -0.12438 0.05827 ...
 $ PD.20: num  0.28652 -0.01139 0.33443 -0.07972 -0.00781 ...
 $ PD.21: num  0.0433 -0.024 0.0853 -0.1078 -0.0322 ...
 $ PD.22: num  0.4186 -0.024 -0.0932 -0.3149 -0.047 ...
 $ PD.23: num  0.4449 -0.024 0.2751 -0.0637 -0.0127 ...
 $ PD.24: num  0.1595 -0.0132 0.1286 -0.1457 -0.0322 ...
 $ PD.25: num  0.01482 0.01166 0.29443 -0.15959 0.00181 ...
 $ PD.26: num  -0.00986 -0.02396 0.30399 0.06391 -0.01104 ...
 $ PD.27: num  0.437 -0.024 0.1641 -0.1064 0.0114 ...
 $ PD.28: num  0.74923 -0.00782 -0.13183 0.00429 0.08871 ...

and here's the head(diff.expr[,1:3]:

                PD        PD.1        PD.2
7105  -0.1906467766 -0.08539745 -0.14714514
64102 -0.0007046003  0.01693248  0.03262358
8813  -0.2925605580 -0.52263454  0.46103412
57147 -0.1720432145 -0.22294843  0.09800783
55732 -0.1060860135 -0.05361859 -0.03381011
2268  -0.1723400871  0.24620620 -0.01986866 

Do you have any idea why it does not draw with all my samples ?

Thank you

ADD REPLY
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 10 months ago
United States
Marie, It works with 25 samples (or less) but not 29 samples. That’s because native KEGG graph is a raster image. Each reactangle gene node span a fix number of lines (25 in this case), which can not divide further into more than 25 pieces. Hope this makes sense.
ADD COMMENT

Login before adding your answer.

Traffic: 1135 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