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:  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  LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C  LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  STRINGdb_2.2.2 loaded via a namespace (and not attached):  igraph_1.2.6 hash_126.96.36.199 Rcpp_1.0.6 magrittr_2.0.1 bit_4.0.4 rlang_1.0.1 fastmap_1.1.0  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  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  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  compiler_4.0.3 gplots_3.1.1 chron_2.3-56 sqldf_0.4-11 proto_1.0.0 pkgconfig_2.0.3
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():
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:
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.