Search
Question: Pathview -- Error in korg[ridx, coln] : subscript out of bounds
0
gravatar for aacevedo
9 weeks ago by
aacevedo0
aacevedo0 wrote:

I am trying to run the pathview tutorial and am getting the error below. Please let me know how you addressed this error within pathview. Results of sessionInfo() are also posted below if needed.

Thank you for your help,

Alison

#################Code#########################3

biocLite("pathview")

library(pathview)

#load data
data(gse16873.d)
data(demo.paths)
#KEGG view: gene data only
i <- 1
pv.out <- pathview(gene.data = gse16873.d[, 1], pathway.id =
                     demo.paths$sel.paths[i], species = "hsa", out.suffix = "gse16873",
                   kegg.native = TRUE)

#################Error Returned#####################

Error in korg[ridx, coln] : subscript out of bounds

 

 

################sessionInfo#########################

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
[1] gage_2.26.1          pathview_1.16.5      org.Hs.eg.db_3.4.1   AnnotationDbi_1.38.2 IRanges_2.10.3       S4Vectors_0.14.4    
[7] Biobase_2.36.2       BiocGenerics_0.22.0  BiocInstaller_1.26.1

loaded via a namespace (and not attached):
 [1] graph_1.54.0      Rcpp_0.12.12      KEGGgraph_1.38.1  XVector_0.16.0    zlibbioc_1.22.0   bit_1.1-12        R6_2.2.2         
 [8] rlang_0.1.2       httr_1.3.1        blob_1.1.0        tools_3.4.0       grid_3.4.0        png_0.1-7         DBI_0.7          
[15] class_7.3-14      bit64_0.9-7       digest_0.6.12     tibble_1.3.4      Rgraphviz_2.20.0  KEGGREST_1.16.1   memoise_1.1.0    
[22] RSQLite_2.0       compiler_3.4.0    Biostrings_2.44.2 XML_3.98-1.9      pkgconfig_2.0.1  

ADD COMMENTlink modified 7 weeks ago by Luo Weijun1.4k • written 9 weeks ago by aacevedo0
0
gravatar for Luo Weijun
8 weeks ago by
Luo Weijun1.4k
United States
Luo Weijun1.4k wrote:

I ran the exact same code with pathview_1.16.5 and couldn’t replicate the problem you see.

BTW, the demo code in the vignette/tutorial has been fully tested on Bioconductor servers with no error:

http://bioconductor.org/checkResults/release/bioc-LATEST/pathview/

 

I am not sure what happened exactly on your side, there could be some problem with your R session, or installation issue with your copy of R/BioC. You may try to restart a new R session, or another computer/installation. You may always use pathview web server as an alternative:

https://pathview.uncc.edu/

ADD COMMENTlink written 8 weeks ago by Luo Weijun1.4k
0
gravatar for Paulson, Ariel
7 weeks ago by
United States
Paulson, Ariel10 wrote:

I have also just started to get this error, and I have been using pathview for a long time.  I don't know why it began now.  It comes from calling kegg.species.code() with code.only=FALSE.  When this function is called, it somehow populates the 'korg' matrix in the global environment.  In some way, this matrix can get altered and the number of columns reduced to less than 10.  This will cause the function call above to fail, because if code.only=FALSE, it will ask for 'korg' columns c(3,6:10).

Long story short, just run "rm(korg)".  You should be back to normal.

 

ADD COMMENTlink modified 7 weeks ago • written 7 weeks ago by Paulson, Ariel10
0
gravatar for Luo Weijun
7 weeks ago by
Luo Weijun1.4k
United States
Luo Weijun1.4k wrote:

Thanks for reporting the problem. Indeed, current korg data has a few more columns than the old version. it seems that some old copy of korg data was loaded before you call kegg.species.code(). When you do rm(korg) and then call kegg.species.code(), the updated korg was loaded and it works fine.

One scenario is that you have an older version of gage or another package that store an copy of korg, which were also loaded in your session. Can you check on three things:

#check the korg in gage package

data(korg, package="gage")

dim(korg)

 

#check the korg in pathview package

data(korg, package="pathview")

dim(korg)

 

#check exactly what packages/versions have been loaded in your R session?

sessionInfo()

 

ADD COMMENTlink modified 7 weeks ago • written 7 weeks 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: 115 users visited in the last hour