-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Even though I installed libSBML, rbsml does not see it #415
Comments
thank you for letting us know. We can definitely add a package config file in the next version. To provide you the information right now, so you can fix it on your system. could you let me know you you installed libSBML? I see that the library(libSBML) command succeeded, that indicates, that you already have the libSBML R Bindings installed. Can i ask what you try to achieve with rsbml, that you couldnt achieve using the libSBML R bindings directly? |
That's what I get when I look at the result of lsphaer=readSBML("M_Lysinibacillus_sphaericus_C3_41__44____32__AGORA__32__version__32__1__46__03.sbml")
An object of class "_p_SBMLDocument"
Slot "ref":
<pointer: 0x3603d1400>
…--------------
I guess I'm used to reading in a matlab model, and it has attributes that I can look at right away.
I need more examples of how to work with libSBML so i know. It looked like RSBML offered an easier interface.
thanks,
Gail
________________________________________
From: Frank Bergmann ***@***.***>
Sent: Thursday, January 30, 2025 5:04 AM
To: sbmlteam/libsbml
Cc: Rosen,Gail; Author
Subject: Re: [sbmlteam/libsbml] Even though I installed libSBML, rbsml does not see it (Issue #415)
External.
thank you for letting us know. We can definitely add a package config file in the next version. To provide you the information right now, so you can fix it on your system. could you let me know you you installed libSBML?
I see that the
library(libSBML)
command succeeded, that indicates, that you already have the libSBML R Bindings installed. Can i ask what you try to achieve with rsbml, that you couldnt achieve using the libSBML R bindings directly?
—
Reply to this email directly, view it on GitHub<#415 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABHZROIWQ5IX57NZEB5QUKD2NH2JBAVCNFSM6AAAAABWD27LTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRUGAZTQNBTHA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
We have quite a number of examples that would show you how to use libSBML from R. They show how to go through the model and interrogate it, or create new ones. we can work on getting a basic vignette installed with the libSBML R bindings. |
If you let me know what you would like to do, then I could create a new example for you. The libSBML R bindings return, either functions that you can call in the form analogous to the C language: doc <- readSBML(filename);
model <- SBMLDocument_getModel(document);
... or the object structure is exposed as S3 functions: doc <- readSBML(filename);
model <- doc$getModel(); |
Hi,
Thank you for the pointers. Maybe something is wrong with my SBML file. Because I tried both ways:
lsphaer_doc<- readSBML("/Users/gailrosen/Documents/ukri/M_Lysinibacillus_sphaericus_C3_41__44____32__AGORA__32__version__32__1__46__03.sbml")
lsphaer <- lsphaer_doc$getModel();
View(lsphaer)
lsphaer2 <- SBMLDocument_getModel(lsphaer_doc)
View(lsphaer2))
that you suggested and do
str(lsphaer)
Formal class '_p_Model' [package "libSBML"] with 1 slot
..@ ref:Formal class 'externalptr' [package ""] with 0 slots
list()
str(lsphaer2)
Formal class '_p_Model' [package "libSBML"] with 1 slot
..@ ref:Formal class 'externalptr' [package ""] with 0 slots
list()
This is the beginning of my SBML file:
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" xmlns:groups="http://www.sbml.org/sbml/level3/version1/groups/version1" level="3" version="1" fbc:required="false" groups:required="false">
<model metaid="Lysinibacillus_sphaericus_C3_41.mat" id="M_Lysinibacillus_sphaericus_C3_41__44____32__AGORA__32__version__32__1__46__03" name="Lysinibacillus sphaericus C3-41" fbc:strict="true">
<listOfUnitDefinitions>
<unitDefinition id="mmol_per_gDW_per_hr">
<listOfUnits>
<unit kind="mole" exponent="1" scale="-3" multiplier="1"/>
<unit kind="gram" exponent="-1" scale="0" multiplier="1"/>
<unit kind="second" exponent="-1" scale="0" multiplier="3600"/>
</listOfUnits>
</unitDefinition>
</listOfUnitDefinitions>
<listOfCompartments>
<compartment metaid="c" id="c" name="Cytoplasm" constant="false"/>
<compartment metaid="e" id="e" name="Extracellular" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species metaid="M_10fthf5glu__91__c__93__" id="M_10fthf5glu__91__c__93__" name="10-formyltetrahydrofolate-[Glu](5)" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-6" fbc:chemicalFormula="C40H45N11O19"/>
<species metaid="M_10fthf__91__c__93__" id="M_10fthf__91__c__93__" name="10-Formyltetrahydrofolate" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-2" fbc:chemicalFormula="C20H21N7O7">
<annotation xmlns:sbml="http://www.sbml.org/sbml/level3/version1/core">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:vCard4="http://www.w3.org/2006/vcard/ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Description rdf:about="#M_10fthf__91__c__93__">
<bqbiol:is>
<rdf:Bag>
<rdf:li rdf:resource="http://identifiers.org/hmdb/HMDB00972%22/>
<rdf:li rdf:resource="http://identifiers.org/kegg.compound/C00234%22/>
<rdf:li rdf:resource="http://identifiers.org/pubchem.compound/122347%22/>
</rdf:Bag>
</bqbiol:is>
</rdf:Description>
</rdf:RDF>
</annotation>
</species>
<species metaid="M_10m3hddcaACP__91__c__93__" id="M_10m3hddcaACP__91__c__93__" name="10-methyl-3-hydroxy-dodecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H45N2O9PRS"/>
<species metaid="M_10m3hundecACP__91__c__93__" id="M_10m3hundecACP__91__c__93__" name="10-methyl-3-hydroxy-undecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C23H43N2O9PRS"/>
<species metaid="M_10m3oddcaACP__91__c__93__" id="M_10m3oddcaACP__91__c__93__" name="10-methyl-3-oxo-dodecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H43N2O9PRS"/>
<species metaid="M_10m3oundecACP__91__c__93__" id="M_10m3oundecACP__91__c__93__" name="10-methyl-3-oxo-undecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C23H41N2O9PRS"/>
<species metaid="M_10mddcaACP__91__c__93__" id="M_10mddcaACP__91__c__93__" name="10-methyl-dodecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H45N2O8PRS"/>
<species metaid="M_10mtddec2eACP__91__c__93__" id="M_10mtddec2eACP__91__c__93__" name="10-methyl-trans-dodec-2-enoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H43N2O8PRS"/>
<species metaid="M_10mtundec2eACP__91__c__93__" id="M_10mtundec2eACP__91__c__93__" name="10-methyl-trans-undec-2-enoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C23H41N2O8PRS"/>
<species metaid="M_10mundecACP__91__c__93__" id="M_10mundecACP__91__c__93__" name="10-methyl-undecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C23H43N2O8PRS"/>
<species metaid="M_11m3hddcaACP__91__c__93__" id="M_11m3hddcaACP__91__c__93__" name="11-methyl-3-hydroxy-dodecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H45N2O9PRS"/>
<species metaid="M_11m3oddcaACP__91__c__93__" id="M_11m3oddcaACP__91__c__93__" name="11-methyl-3-oxo-dodecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H43N2O9PRS"/>
<species metaid="M_11mddcaACP__91__c__93__" id="M_11mddcaACP__91__c__93__" name="11-methyl-dodecanoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H45N2O8PRS"/>
<species metaid="M_11mtddec2eACP__91__c__93__" id="M_11mtddec2eACP__91__c__93__" name="11-methyl-trans-dodec-2-enoyl-ACP" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="-1" fbc:chemicalFormula="C24H43N2O8PRS"/>
<species metaid="M_12daihdglyc__91__c__93__" id="M_12daihdglyc__91__c__93__" name="1,2-Dianteisoheptadecanoyl-sn-glycerol" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="0" fbc:chemicalFormula="C37H72O5"/>
<species metaid="M_12daipdglyc__91__c__93__" id="M_12daipdglyc__91__c__93__" name="1,2-Dianteisopentadecanoyl-sn-glycerol" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="0" fbc:chemicalFormula="C33H64O5"/>
<species metaid="M_12dgr120__91__c__93__" id="M_12dgr120__91__c__93__" name="1,2-Diacyl-sn-glycerol (didodecanoyl, n-C12:0)" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="0" fbc:chemicalFormula="C27H52O5">
<notes>
…________________________________________
From: Frank Bergmann ***@***.***>
Sent: Friday, January 31, 2025 6:14 AM
To: sbmlteam/libsbml
Cc: Rosen,Gail; Author
Subject: Re: [sbmlteam/libsbml] Even though I installed libSBML, rbsml does not see it (Issue #415)
External.
If you let me know what you would like to do, then I could create a new example for you. The libSBML R bindings return, either functions that you can call in the form analogous to the C language:
doc <- readSBML(filename);
model <- SBMLDocument_getModel(document);
...
or the object structure is exposed as S3 functions:
doc <- readSBML(filename);
model <- doc$getModel();
—
Reply to this email directly, view it on GitHub<#415 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABHZROJV7XQHH65GWLXZD2L2NNLH5AVCNFSM6AAAAABWD27LTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRWHE2TONRRGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I've just tried it with the AGORA model from: using the following R snippet (Note that i had to use the full path to the file): library(libSBML);
doc <- readSBMLFromFile('/Users/Frank/Desktop/Lysinibacillus_sphaericus_C3_41.xml');
doc$printErrors();
model <- doc$getModel();
print (paste('Loaded', model$getName()));
for (i in 0:(model$getNumSpecies()-1)) {
species <- model$getSpecies(i)
print(paste("Species", i, ":", species$getName()))
}
that gives me the output i wanted:
|
from my understanding, it is because there is no libsbml.pc made when it is compiled. Can you help me get the libsbml.pc file -- it is nowhere that I can find. (https://support.bioconductor.org/p/90197/)
trying URL 'https://bioconductor.org/packages/3.20/bioc/src/contrib/rsbml_2.64.0.tar.gz'
Content type 'application/x-gzip' length 684593 bytes (668 KB)
downloaded 668 KB
** package ‘rsbml’ successfully unpacked and MD5 sums checked
** using staged installation
checking for pkg-config... /opt/homebrew/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSBML... no
configure: error: Package requirements (libsbml >= 3.0.2) were not met:
Package 'libsbml' not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBSBML_CFLAGS
and LIBSBML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: configuration failed for package ‘rsbml’
The downloaded source packages are in
‘/private/var/folders/nd/skrfkw1d11scqbyc524s1q0r0000gn/T/Rtmpt8oo7B/downloaded_packages’
Warning message:
In install.packages(...) :
installation of package ‘rsbml’ had non-zero exit status
The text was updated successfully, but these errors were encountered: