Skip to content
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

Retrieving Differential Equations from Copasi File, Antimony String, etc., using Pycotools3 #7

Closed
VitaminBrad opened this issue Jun 2, 2020 · 3 comments

Comments

@VitaminBrad
Copy link

Hello!

I was wondering if it is possible to retrieve the differential equations, e.g. as is done here in COPASI:

using Pycotools3.

This is very important for me, because I would like to pipeline these equations directly into a "scientific machine learning" platform that will using the equations alongside experimental data to determine missing parts of the diff eqs for my master's thesis in bioinformatics.

Thank you very much for your time and attention! And thanks for the great tool!

Best,
Brad

@CiaranWelsh
Copy link
Owner

Hi Brad, unfortunately pycotools3 doesn't support this. For rendering the equations for publication you might be interested in SBML2Latex but sounds like you want to pull out the equations programatically so you can store, manmanipulate etc... I wonder if your best bet is straight antimony?

i.e. download tellurium for sbml and import your sbml model. Then you can autogenerate the antimony model which has the equations in string format. After some string progressing (regexes or whatever) you could pull the equations out yourself.

Just an idea, good luck.

@VitaminBrad
Copy link
Author

Hi Ciaran,

thanks so much for your response!

The antimony model I have generated from pycotools3 for my model has the following:

`function Henri_Michaelis_Menten__irreversible__6(TauN4R, k45, k46)
k45*TauN4R/(k46 + TauN4R);
end

// Reactions:
r77: TauH3RUb + Agg33 => $Ap; Braink90TauH3RUbAgg33;
r82: TauH4RUb + Agg43 => $Bp; Brain
k92TauH4RUbAgg43;
r1: => Tau03R; Brain*Constant_flux__irreversible(k1);
`
Are you saying that the antimony model generated from tellurium will have the differential equations for each species listed explicitly (in string format)? And if so, is there any chance you could show me an example where this is done. I am very unfamiliar with the world of antimony strings at the moment still. Thanks so much!!!!

Best,
Brad

@CiaranWelsh
Copy link
Owner

CiaranWelsh commented Jun 3, 2020

Not exactly. The antimony model (as you see) is reaction oriented and each reaction is a term in the differential equations, right? So with a bit of string processing, you could have a string representation for each term of each differential equation. Then with the help if a stiociometry matrix (also available in tellurium) you should be able to put the equations together yourself.

However, I suspect this might be overkill. Tellurium is the python front end of another library called roadrunner. Roadrunner actually executes the model so there might be a way to get the equations directly from roadrunner. I don't know off the top of my head exactly how to do this, and don't have time to spend figureing it out. However, the tellurium/roadrunner guys are very helpful and quite responsive - I would suggest posting a similar question on their github page (either tellurium or roadrunner).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants