-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support for merging sbml models #65
Comments
There is not yet an API that would make model merging easier. But i verified that it would work, just as in the COPASI graphical userinterface. The key idea is
So i would invite you to try that out in COPASI first. in basico you could either do that yourself (merging the dictionaries / dataframes obtained from get_species / get_reactions) or use the underlying C++ API that has now been exposed. If you have an example of which models you would like to see merged, and a list of what in the model you would like to have treated the same, then i can produce one. |
Sure, I will it give a brief try on it.
This also seems sensible to do, I will try this method as well. Thank you for suggesting and offering help. |
I've created a colab notebook, that shows how it would currently be done in basico: https://colab.research.google.com/drive/1XhiF1NzeEZ8ZLR1TNnUhzVPVj3EoHSMv?usp=sharing If you have an idea how that API should be simplified please let me know, i can certainly hide the calls better and combine them perhaps using the element names to simplify the merging. Any feedback would be appreciated. |
I cannot thank you enough for this support. The note is comprehensive and is very helpful. API looks really extensive, I love to explore and play with this. Just that Thank you for taking your time and efforts on this. This issue can be closed i guess. |
Hi @fbergmann I have a doubt, sorry that I'm novice in systems biology. I was trying to run genome-scale metabolic model for accessing flux and concentration levels. Eg: https://www.ebi.ac.uk/biomodels/MODEL1402200001#Files Maybe I know the reason why it does seem to change in time course? Edit: Code to reproduce from basico import *
adipo = load_model("MODEL1402200001_url.xml")
tc = run_time_course(100)
print(tc)
# all values are unchanged https://colab.research.google.com/drive/1Gi4Py0nfBetiBtAxX6_6pzV9CU57bqLh?usp=sharing colab notebook for reference |
For genome scale models that is entirely expected. Those models mainly define the network structure, meaning what species takes part in what reaction. As compared to ODE based modelling, where for each reaction you will have a mechanistic kinetic law, for genome scale networks you mainly have the model structure. instead of getting information about time trajectories, you can only get information about the steady state behavior. While the specific model contains some kinetic, they are of the form, that it describes the network structure, with a fixed flux value for each reaction. For genome scale models I would suggest, that you use another python package for simulation for example cobrapy or cbmpy. For this specific model, with the initial concentrations of the species all being 0, and the constraints on the reaction (lower bound, upper bound, value) also 0. I don't think you will be able to get any other answer. |
Okay that explains it. As I deep dive I realize the logic. Wish I knew calculus and ODE more. |
Hi fbergmann,
Thank you for extending basico, its simple and makes copasi workflow even better.
The API is straight forward and easy to use.
May I know if there is a recommended way to merge sbml models.
I have found one paper explaining on merging models using copasi (add to model) option
https://www.mdpi.com/2079-7737/12/8/1133#app1-biology-12-01133
There is https://github.com/matthiaskoenig/sbmlutils/ (sbmlutils) which has merge option (https://sbmlutils.readthedocs.io/en/stable/notebooks/sbml_merge.html)
But that again gives lots of validation errors.
or would it be same if we simulate same input in multiple models each separately and add or average the resulting report together?
Thank you
The text was updated successfully, but these errors were encountered: