Pathview -- Error in korg[ridx, coln] : subscript out of bounds
3
0
Entering edit mode
aacevedo • 0
@aacevedo-13963
Last seen 6.6 years ago

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  

pathview korg subscript out of bounds Tutorial • 2.3k views
ADD COMMENT
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 10 months ago
United States

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 COMMENT
0
Entering edit mode
@paulson-ariel-6239
Last seen 6.2 years ago
United States

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 COMMENT
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 10 months ago
United States

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 COMMENT

Login before adding your answer.

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