Question: error when rendering pathway with pathview package
gravatar for holgerbrandl
17 months ago by
holgerbrandl10 wrote:

I'm having a problem with the pathview package and I hope this is the right forum to report it. It generally works fine but struggles for a particular pathway, which is mmu04723. Here's an example:

sliceData = structure(list(d2_vs_d0 = c(-1.52126820312977, 0.451509702732841, 
-0.357707415775446, 0.0538886394780485, -0.91613059033916, -1.65666302756197, 
3.07990760569199, 1.61088957192245, 0.0298639776465162, 1.1818674914575
), d5_vs_d0 = c(-1.79209939342977, 1.03023798515136, -0.518884152603218, 
-0.269016354010149, -2.55895112580875, -1.57045995207602, 3.75481731723878, 
0.867055851582463, -0.680908307130172, 0.854516106406834), d5_vs_d2 = c(-0.0114566210538601, 
0.145209129488457, -0.0233093044019142, -0.494323471926554, -0.54723749239385, 
0.0528599788662098, 0.0606179414970655, -0.341103250802877, -0.774115624502719, 
-0.155734883547379), d10_vs_d0 = c(-1.85624638761165, 0.0684257391328787, 
-0.735950940254694, -0.328340339984723, -2.07050657804697, -0.493816700587297, 
1.03991166799219, 2.64149937256406, 0.150996250190814, 0.539131937451777
), d10_vs_d2 = c(-0.0693161149767165, -0.441650523320962, -0.197796937568372, 
-0.806788055806803, -0.492772746055308, 0.922135798465899, -1.09358755123306, 
0.323715902898929, 0.111474907689674, -0.424562968370272), d10_vs_d5 = c(-0.0498912263318294, 
-1.03398460521623, -0.153553990933353, -0.0558552971314259, 0.058232514693169, 
0.727867555378923, -1.62750599201763, 1.34886604527729, 1.48786273834804, 
-0.114580743319696)), .Names = c("d2_vs_d0", "d5_vs_d0", "d5_vs_d2", 
"d10_vs_d0", "d10_vs_d2", "d10_vs_d5"), row.names = c("ENSMUSG00000000001", 
"ENSMUSG00000000028", "ENSMUSG00000000056", "ENSMUSG00000000058", 
"ENSMUSG00000000078", "ENSMUSG00000000085", "ENSMUSG00000000088", 
"ENSMUSG00000000093", "ENSMUSG00000000120", "ENSMUSG00000000127"
), class = "data.frame")
pathview( = sliceData, = "mmu04723",
    species = "mmu",
    multi.state = ncol(sliceData)>1,


This gives the following error:

Loading required namespace:

'select()' returned 1:1 mapping between keys and columns
Info: Downloading xml files for mmu04723, 1/1 pathways..
Info: Downloading png files for mmu04723, 1/1 pathways..
'select()' returned 1:1 mapping between keys and columns
Info: Working in directory /Users/brandl
Info: Writing image file mmu04723.pathview.multi.png
Info: some node width is different from others, and hence adjusted!
Error in array(col.rgb[, i], dim(node.rgb)[3:1]) :
negative length vectors are not allowed


> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.4

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
[1] pathview_1.16.0   AnnotationDbi_1.38.0
[4] IRanges_2.10.0       S4Vectors_0.14.0     Biobase_2.36.0
[7] BiocGenerics_0.22.0

loaded via a namespace (and not attached):
[1] graph_1.54.0       KEGGgraph_1.34.0   Rcpp_0.12.10       XVector_0.16.0
[5] zlibbioc_1.22.0    R6_2.2.0           httr_1.2.1         tools_3.4.0
[9] grid_3.4.0         png_0.1-7          DBI_0.6-1          digest_0.6.12
[13] Rgraphviz_2.20.0 KEGGREST_1.16.0    memoise_1.1.0
[17] RSQLite_1.1-2      compiler_3.4.0     Biostrings_2.44.0  XML_3.98-1.6      
ADD COMMENTlink modified 16 months ago by Luo Weijun1.4k • written 17 months ago by holgerbrandl10
gravatar for Luo Weijun
16 months ago by
Luo Weijun1.4k
United States
Luo Weijun1.4k wrote:

KEGG made some update to pathway 04723 (both img graph and xml data). In xml data, several bad entries were added as in the example below. Note that the position and size data are obviously wrong (and different from all normal ones), like x="1" y="1" width="1" height="1". This cause the the error in pathview when it tries to locate and modify such nodes. It works after removing these bad entries manually, i.e. from entry id="82" to "88" in the downloaded xml file (mmu04723.xml in your working directory).

We recently developed Pathview Web server: If you have problem, you may always use it as another option.


    <entry id="82" name="mmu:100043507 mmu:100503710 mmu:14677 mmu:14678 mmu:14679 mmu:14681 mmu:14688 mmu:14693 mmu:14695 mmu:14696 mmu:14697 mmu:14699 mmu:14700 mmu:14701 mmu:1470\

2 mmu:14704 mmu:14706 mmu:14707 mmu:14708 mmu:14709 mmu:14710 mmu:64337 mmu:66066" type="gene"



        <graphics name="Gm15776..." fgcolor="#000000" bgcolor="#BFFFBF"

             type="rectangle" x="1" y="1" width="1" height="1"/>


    <entry id="83" name="mmu:12801" type="gene"


        <graphics name="Cnr1, CB-R, CB1, CB1R" fgcolor="#000000" bgcolor="#BFFFBF"

             type="rectangle" x="1" y="1" width="1" height="1"/>


ADD COMMENTlink modified 16 months ago • written 16 months ago by Luo Weijun1.4k
Please log in to add an answer.


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