MetaboAnalystR cannot download compound_db.rds during CrossReferencing

Dear MetaboAnalyst developers,

I am trying to use MetaboAnalystR to run a simple enrichment analysis. Although installation was not straightforward, I finally managed to install the package in two different environments:

  • Windows 11, R 4.5 (installed via devtools::install_github)

  • Ubuntu 24.04 (WSL2), R 4.3 (installed from the older .tar.gz release)

I am attempting to replicate the enrichment example from the vignette (and from the auto-generated R code on the website). However, in both systems the analysis fails at the ‘CrossReferencing step where the package does not seem to be able to download the required database file.

Here is the code I am running:

mSet <- InitDataObjects("conc", "pathora", FALSE)
cmpd.vec <- c("Acetoacetic acid","Beta-Alanine","Creatine","Dimethylglycine","Fumaric acid",
              "Glycine","Homocysteine","L-Cysteine","L-Isolucine","L-Phenylalanine","L-Serine","L-Threonine","L-Tyrosine","L-Valine","Phenylpyruvic acid","Propionic acid", "Pyruvic acid","Sarcosine","Arsenic","Benzene","Caffeic acid","Cotinine", "Cadmium","Lead","Thiocyanate")

mSet <- Setup.MapData(mSet, cmpd.vec)
mSet <- CrossReferencing(mSet, "name")

The output in both systems is the same:

[1] "Reading data unsuccessful, attempting to re-download file..."
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1046  100  1046    0     0   1371      0 --:--:-- --:--:-- --:--:--  1372
[1] "Loading files from server unsuccessful. Ensure curl is downloaded on your computer."
Error in .read.metaboanalyst.lib("compound_db.rds") : 
  object 'my.lib' not found

In both systems curl is installed and works normally. I tried manually downloading compound_db.rds from GitHub and placing it in the working directory, but the function still fails to detect or load it.

What can I do to solve this issue? Is there a recommended way to provide the required database files for offline/local use?

Thanks in advance for your help.

My sessionInfo() output, just in case:

sessionInfo()
R version 4.5.1 (2025-06-13)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.3 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.12.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 3.12.0

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

time zone: Europe/Berlin
tzcode source: system (glibc)

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

other attached packages:
[1] MetaboAnalystR_3.0.3

loaded via a namespace (and not attached):
[1] splines_4.5.1 bitops_1.0-9
[3] tibble_3.3.0 hardhat_1.4.2
[5] preprocessCore_1.70.0 graph_1.86.0
[7] pROC_1.19.0.1 XML_3.99-0.19
[9] rpart_4.1.24 lifecycle_1.0.4
[11] Rdpack_2.6.4 edgeR_4.6.3
[13] doParallel_1.0.17 globals_0.18.0
[15] lattice_0.22-5 MASS_7.3-65
[17] scrime_1.3.5 MultiAssayExperiment_1.34.0
[19] magrittr_2.0.4 limma_3.64.3
[21] plotrix_3.8-4 qqconf_1.3.2
[23] sn_2.1.1 cowplot_1.2.0
[25] MsCoreUtils_1.20.0 DBI_1.2.3
[27] RColorBrewer_1.1-3 lubridate_1.9.4
[29] multcomp_1.4-28 abind_1.4-8
[31] GenomicRanges_1.60.0 purrr_1.1.0
[33] AnnotationFilter_1.32.0 BiocGenerics_0.54.0
[35] nnet_7.3-20 TH.data_1.1-4
[37] sandwich_3.1-1 ipred_0.9-15
[39] lava_1.8.1 GenomeInfoDbData_1.2.14
[41] IRanges_2.42.0 S4Vectors_0.46.0
[43] listenv_0.9.1 TFisher_0.2.0
[45] MSnbase_2.34.1 parallelly_1.45.1
[47] ncdf4_1.24 codetools_0.2-20
[49] DelayedArray_0.34.1 tidyselect_1.2.1
[51] Spectra_1.18.2 UCSC.utils_1.4.0
[53] farver_2.1.2 matrixStats_1.5.0
[55] stats4_4.5.1 mathjaxr_1.8-0
[57] jsonlite_2.0.0 caret_7.0-1
[59] multtest_2.64.0 emmeans_1.11.2-8
[61] survival_3.8-3 iterators_1.0.14
[63] rsm_2.10.6 foreach_1.5.2
[65] tools_4.5.1 progress_1.2.3
[67] Rcpp_1.1.0 glue_1.8.0
[69] mnormt_2.1.1 prodlim_2025.04.28
[71] SparseArray_1.8.1 BiocBaseUtils_1.10.0
[73] metap_1.12 MatrixGenerics_1.20.0
[75] GenomeInfoDb_1.44.3 crmn_0.0.21
[77] dplyr_1.1.4 withr_3.0.2
[79] numDeriv_2016.8-1.1 BiocManager_1.30.26
[81] fastmap_1.2.0 caTools_1.18.3
[83] digest_0.6.37 estimability_1.5.1
[85] timechange_0.3.0 R6_2.6.1
[87] Cairo_1.6-5 gtools_3.9.5
[89] RSQLite_2.4.3 tidyr_1.3.1
[91] generics_0.1.4 pls_2.8-5
[93] data.table_1.17.8 recipes_1.3.1
[95] class_7.3-23 prettyunits_1.2.0
[97] PSMatch_1.12.0 httr_1.4.7
[99] S4Arrays_1.8.1 ModelMetrics_1.2.2.2
[101] pkgconfig_2.0.3 gtable_0.3.6
[103] timeDate_4041.110 blob_1.2.4
[105] S7_0.2.0 siggenes_1.82.0
[107] impute_1.82.0 XVector_0.48.0
[109] htmltools_0.5.8.1 fgsea_1.34.2
[111] RBGL_1.84.0 MALDIquant_1.22.3
[113] ProtGenerics_1.40.0 clue_0.3-66
[115] scales_1.4.0 Biobase_2.68.0
[117] gower_1.0.2 MetaboCoreUtils_1.16.1
[119] reshape2_1.4.4 nlme_3.1-168
[121] cachem_1.1.0 zoo_1.8-14
[123] stringr_1.5.2 KernSmooth_2.23-26
[125] parallel_4.5.1 mzID_1.46.0
[127] vsn_3.76.0 pillar_1.11.1
[129] grid_4.5.1 reshape_0.8.10
[131] vctrs_0.6.5 gplots_3.2.0
[133] pcaMethods_2.0.0 xtable_1.8-4
[135] cluster_2.1.8.1 mvtnorm_1.3-3
[137] cli_3.6.5 locfit_1.5-9.12
[139] compiler_4.5.1 rlang_1.1.6
[141] crayon_1.5.3 future.apply_1.20.0
[143] mutoss_0.1-13 QFeatures_1.18.0
[145] affy_1.86.0 plyr_1.8.9
[147] fs_1.6.6 stringi_1.8.7
[149] BiocParallel_1.42.2 lazyeval_0.2.2
[151] Matrix_1.7-4 hms_1.1.3
[153] bit64_4.6.0-1 future_1.67.0
[155] ggplot2_4.0.0 statmod_1.5.1
[157] SummarizedExperiment_1.38.1 rbibutils_2.3
[159] mzR_2.42.0 igraph_2.1.4
[161] memoise_2.0.1 affyio_1.78.0
[163] fastmatch_1.1-6 bit_4.6.0

This is because you are using old version MetaboAnalystR 3.0.3 - - both the function and database names have been updated. You need to install the current version (MetaboAnalystR 4.0 and above)

This topic was automatically closed after 6 days. New replies are no longer allowed.