Re: [Tellurium discuss] Digest for tellurium-discuss@googlegroups.com - 5 updates in 1 topic

8 views
Skip to first unread message

Jalil Nourisa

unread,
Mar 26, 2021, 6:38:05 AM3/26/21
to telluriu...@googlegroups.com, Lucian Smith
Thank you very much, Lucian,
That’s what I was looking for.
Best

On 26. Mar 2021, at 10:35, telluriu...@googlegroups.com wrote:

Jalil Nourisa <jalil....@gmail.com>: Mar 25 09:51PM

Hi,
In my simulation, I have a SBML file of a previous model that I need to extend in certain ways. I wonder, is such a thing possible in Tellurium, and if yes, can you pls give me a hint how to do it?
Best
Jalil Nourisa
Herbert M Sauro <hsa...@uw.edu>: Mar 25 03:04PM -0700

If you have an existing model I would convert the SBML into Antimony format
and then edit that. Antimony will give you a list of
reactions, species,rate laws etc, Any changes you make can be converted
back to SBML, or loaded straight into the tellurium simulator.
 
For example, if you have an SBML file or a string containing some SBML you
can do:
 
import tellurium as te
 
r = te.loadSBMLModel (string or file name of SBML model)
 
To get the Antimony you can use
 
antStr = r.getAntimony ()
 
You can print out the antStr and copy the string to a new editor window.
 
What I generally do is if you're using the Windows spyder distribution of
tellurium, there is an import sbml option in the file menu and that will
convert the SBML to antimony and drop it in the editor windows.
 
Herbert
 
 
On Thu, Mar 25, 2021 at 2:54 PM Jalil Nourisa <jalil....@gmail.com>
wrote:
 
 
--
Herbert Sauro, Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
hsa...@uw.edu
Books: http://books.analogmachine.org/
Lucian Smith <luciano...@gmail.com>: Mar 25 03:09PM -0700

It's also possible to use the functions like 'addReaction' or 'addSpecies'
in roadrunner, i.e.:
 
r = tellurium.loada(antimonyStr)
r.addSpecies("S1", "c", 3.0)
 
would add species S1 in compartment c.
 
There are similar functions for deleting elements, too.
 
https://libroadrunner.readthedocs.io/en/stable/api_reference.html?highlight=addreaction#RoadRunner.RoadRunner.addReaction
 
-Lucian
 
Jalil Nourisa <jalil....@gmail.com>: Mar 25 11:06PM

Thank you very much, Herbert,
I was more looking for a clean way of doing that without opening the SBML model. But, this would do the job.
Best
 
 
Herbert M Sauro <hsa...@uw.edu>: Mar 25 07:16PM -0700

See Lucian reply, I’d forgotten we have a new api to manipulate a model
directly.
 
Herbert
 
On Thu, Mar 25, 2021 at 4:07 PM Jalil Nourisa <jalil....@gmail.com>
wrote:
 
 
> On 25. Mar 2021, at 22:04, Herbert M Sauro <hsa...@uw.edu> wrote:
 
> antStr = r.getAntimony ()
 
> --
Herbert Sauro, Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
hsa...@uw.edu
Books: http://books.analogmachine.org/
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to tellurium-disc...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages