STRINGdb string_db$map error
1
1
Entering edit mode
Jessica ▴ 10
@9faea85b
Last seen 2.7 years ago
United Kingdom

Hello, having a problem with some code which previously worked with version 11 of STRINGdb but now throws an error with version 11.5:

library(STRINGdb)
string_db <- STRINGdb$new(version="11.5", species=9606, score_threshold=150, input_directory=getwd())

symbol <- data.frame(gene=dat$symbol)
string2symbol <- string_db$map(symbol, "gene", takeFirst=F, removeUnmappedRows=F)
Error in `[.data.frame`(x, r, vars, drop = drop) : 
  undefined columns selected

I can potentially work around it using the aliases file from STRINGdb but I'd rather not have to (9606.protein.aliases.v11.5.txt).

Many thanks for any advice.

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /tmp_mnt/filer1/software/R_v4.0.3/lib64/R/lib/libRblas.so
LAPACK: /tmp_mnt/filer1/software/R_v4.0.3/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] STRINGdb_2.2.2

loaded via a namespace (and not attached):
 [1] igraph_1.2.6       hash_2.2.6.1       Rcpp_1.0.6         magrittr_2.0.1     bit_4.0.4          rlang_1.0.1        fastmap_1.1.0     
 [8] blob_1.2.1         plyr_1.8.6         caTools_1.18.2     tools_4.0.3        png_0.1-7          plotrix_3.8-1      KernSmooth_2.23-17
[15] cli_2.3.0          DBI_1.1.1          gtools_3.8.2       bit64_4.0.5        assertthat_0.2.1   RColorBrewer_1.1-2 vctrs_0.3.8       
[22] bitops_1.0-6       RCurl_1.98-1.2     cachem_1.0.1       memoise_2.0.0      glue_1.4.2         RSQLite_2.2.3      gsubfn_0.7        
[29] compiler_4.0.3     gplots_3.1.1       chron_2.3-56       sqldf_0.4-11       proto_1.0.0        pkgconfig_2.0.3
STRINGdb HELP • 2.2k views
ADD COMMENT
0
Entering edit mode
damian.szk ▴ 110
@damianszk-12963
Last seen 4 months ago
Switzerland

Dear Jessica,

You have an old version of the package. STRING v11.5 is enabled starting from version 2.5 of STRINGdb package. You would need to update bioconductor to download the newest package, or you can do it load it directly from the source.

It should have provided better error message, but we cannot update the code for old packages.

Best, Damian.

ADD COMMENT
0
Entering edit mode

Hi Damian,

Thanks for the package! FYI, I am having the same issue as Jessica while running the same code even with the most recent version of STRINGdb. I also had it with R 4.0.3 and a former version of STRINGdb (2.0.2).

My current sessionInfo():

R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS:   /opt/R/4.2.2/lib/R/lib/libRblas.so
LAPACK: /opt/R/4.2.2/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=es_ES.UTF-8       LC_NUMERIC=C               LC_TIME=es_ES.UTF-8        LC_COLLATE=es_ES.UTF-8     LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=es_ES.UTF-8    LC_PAPER=es_ES.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] STRINGdb_2.10.1       org.Mm.eg.db_3.16.0   AnnotationDbi_1.60.0  IRanges_2.32.0        S4Vectors_0.36.1      Biobase_2.58.0        BiocGenerics_0.44.0   clusterProfiler_4.6.0
 [9] ComplexHeatmap_2.14.0 DT_0.27               ggplot2_3.4.0        

loaded via a namespace (and not attached):
  [1] shadowtext_0.1.2       circlize_0.4.15        fastmatch_1.1-3        plyr_1.8.8             igraph_1.3.5           lazyeval_0.2.2         splines_4.2.2          BiocParallel_1.32.5   
  [9] crosstalk_1.2.0        GenomeInfoDb_1.34.9    digest_0.6.31          foreach_1.5.2          yulab.utils_0.0.6      htmltools_0.5.4        GOSemSim_2.24.0        viridis_0.6.2         
 [17] GO.db_3.16.0           fansi_1.0.4            magrittr_2.0.3         memoise_2.0.1          cluster_2.1.4          doParallel_1.0.17      Biostrings_2.66.0      graphlayouts_0.8.4    
 [25] matrixStats_0.63.0     enrichplot_1.18.3      colorspace_2.1-0       blob_1.2.3             ggrepel_0.9.3          xfun_0.37              dplyr_1.1.0            crayon_1.5.2          
 [33] RCurl_1.98-1.10        jsonlite_1.8.4         scatterpie_0.1.8       iterators_1.0.14       ape_5.6-2              glue_1.6.2             hash_2.2.6.2           polyclip_1.10-4       
 [41] gtable_0.3.1           zlibbioc_1.44.0        XVector_0.38.0         GetoptLong_1.0.5       shape_1.4.6            scales_1.2.1           DOSE_3.24.2            DBI_1.1.3             
 [49] Rcpp_1.0.10            plotrix_3.8-2          viridisLite_0.4.1      clue_0.3-64            gridGraphics_0.5-1     tidytree_0.4.2         bit_4.0.5              sqldf_0.4-11          
 [57] htmlwidgets_1.6.1      httr_1.4.4             fgsea_1.24.0           gplots_3.1.3           RColorBrewer_1.1-3     ellipsis_0.3.2         pkgconfig_2.0.3        farver_2.1.1          
 [65] sass_0.4.5             utf8_1.2.3             ggplotify_0.1.0        tidyselect_1.2.0       rlang_1.0.6            reshape2_1.4.4         munsell_0.5.0          tools_4.2.2           
 [73] cachem_1.0.6           downloader_0.4         cli_3.6.0              gsubfn_0.7             generics_0.1.3         RSQLite_2.2.20         gson_0.0.9             evaluate_0.20         
 [81] stringr_1.5.0          fastmap_1.1.0          yaml_2.3.7             ggtree_3.6.2           knitr_1.42             bit64_4.0.5            tidygraph_1.2.3        caTools_1.18.2        
 [89] purrr_1.0.1            KEGGREST_1.38.0        ggraph_2.1.0           nlme_3.1-160           aplot_0.1.9            compiler_4.2.2         png_0.1-8              treeio_1.22.0         
 [97] tibble_3.1.8           tweenr_2.0.2           bslib_0.4.2            stringi_1.7.12         lattice_0.20-45        Matrix_1.5-1           vctrs_0.5.2            pillar_1.8.1          
[105] lifecycle_1.0.3        jquerylib_0.1.4        GlobalOptions_0.1.2    data.table_1.14.6      cowplot_1.1.1          bitops_1.0-7           patchwork_1.1.2        qvalue_2.30.0         
[113] R6_2.5.1               KernSmooth_2.23-20     gridExtra_2.3          codetools_0.2-18       MASS_7.3-58.1          gtools_3.9.4           chron_2.3-59           proto_1.0.0           
[121] rjson_0.2.21           withr_2.5.0            GenomeInfoDbData_1.2.9 parallel_4.2.2         ggfun_0.0.9            tidyr_1.3.0            HDO.db_0.99.1          rmarkdown_2.20        
[129] ggforce_0.4.1       
ADD REPLY
0
Entering edit mode

Hi Rodrigo,

Please follow the vignette example. Does the map function work for you? If so, it is something with the input. You can provide the smallest reproducible error-causing input and I can see why that happens.

If it doesn't work. Please provide the arguments with which you initiate the stirngdb object, basically this line:

string_db <- STRINGdb$new( version="11.5", species=9606, score_threshold=200, input_directory="")

Best, Damian.

ADD REPLY
1
Entering edit mode

Hi Damian,

Thanks a lot. As it happens, I'm stupid and used an unexistent name column :) I got a bit misled because of the warning message.

ADD REPLY

Login before adding your answer.

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