Hi all,
I'm trying to perform a Gene Set Enrichment Analysis using Reporter Metabolites using piano
that depends on rsbml
and libSBML
.
So, I try to install rsbml using the code
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("rsbml", lib = "~/Documents/Rpackages", version = "3.8")
Additionally after downloading the stable version of the libSBML R source package for Mac OS X from SourceForge, I install libSBML using
install.packages("~/Downloads/libSBML_5.17.0.tar.gz", repos = NULL, type = "source", lib = "~/Documents/Rpackages")
Both seems to installs without any error message and there does not seem to be a problem to load libSBML
using library(libSBML, lib.loc = "~/Documents/Rpackages")
.
However, when trying to load rsbml
with library(rsbml, lib.loc = "~/Documents/Rpackages"), I get:
Error: package or namespace load failed for ‘rsbml’:
.onLoad failed in loadNamespace() for 'rsbml', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Users/jstrauss/Documents/Rpackages/rsbml/libs/rsbml.so':
dlopen(/Users/jstrauss/Documents/Rpackages/rsbml/libs/rsbml.so, 6): Library not loaded: /usr/local/opt/libsbml/lib/libsbml.5.dylib
Referenced from: /Users/jstrauss/Documents/Rpackages/rsbml/libs/rsbml.so
Reason: image not found
With my limited code literacy, I'm unable to properly trace the error and eliminate it but to me it appears that at least part of my problem seems to be that rsbml doesn't know where to find libSMBL.
I would appreciate any help and/or directions how to solve the issue including the best way to install libSBML and rsbml.
Many thanks in advance,
Jan
P.S.: I am using Bioconductor version 3.8 (BiocManager 1.30.3)
and BiocManager::valid(lib.loc = "~/Documents/Rpackages")
returns TRUE
The output of session.info()
is:
R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] parallel stats graphics grDevices utils datasets methods base other attached packages: [1] libSBML_5.17.0 graph_1.60.0 plier_1.52.0 affy_1.60.0 Biobase_2.42.0 BiocGenerics_0.28.0 [7] piano_1.22.0 crayon_1.3.4 limma_3.38.2 loaded via a namespace (and not attached): [1] Rcpp_0.12.19 BiocManager_1.30.3 compiler_3.5.1 pillar_1.3.0 plyr_1.8.4 [6] zlibbioc_1.28.0 bitops_1.0-6 sets_1.0-18 tools_3.5.1 preprocessCore_1.44.0 [11] tibble_1.4.2 gtable_0.2.0 lattice_0.20-38 pkgconfig_2.0.2 rlang_0.3.0.1 [16] Matrix_1.2-15 fastmatch_1.1-0 igraph_1.2.2 fgsea_1.8.0 gridExtra_2.3 [21] cluster_2.0.7-1 relations_0.6-8 gtools_3.8.1 caTools_1.17.1.1 stats4_3.5.1 [26] grid_3.5.1 data.table_1.11.8 marray_1.60.0 BiocParallel_1.16.0 gdata_2.18.0 [31] ggplot2_3.1.0 magrittr_1.5 gplots_3.0.1 scales_1.0.0 colorspace_1.3-2 [36] KernSmooth_2.23-15 lazyeval_0.2.1 munsell_0.5.0 slam_0.1-43 affyio_1.52.0
While not an answer to the original question I still want to point out that for the final purpose (running "reporter metabolites", i.e. gene-set analysis using metabolite gene-sets, and as a part of this parsing out gene-metabolite associations from an sbml model) it would probably be easier and quicker to parse out the needed information on your own, depending on how this is annotated in the given model, rather than fighting with libSBML and varying model formats.
I'd caution against taking on the technical debt of a custom parser, but SBML is just XML, so the XML parser would get you most of the way there. libSBML mostly gives validation and in principle integration with modeling tools (but the SUNDIALS integration has been broken for a long time).