How to use the tellurium.executeSEDML function in tellurium

To help you get started, we’ve selected a few tellurium examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sys-bio / tellurium / examples / notebooks-py / phrasedmlExample.py View on Github external
# Run SED-ML file
te.executeSEDML(sedmlStr)


# ### Execute Combine Archive
# Executing the SED-ML from a combine archive.

# In[2]:

import tellurium as te
from tellurium.tests.testdata import sedxDir
import os
omexPath = os.path.join(sedxDir, "BIOMD0000000003.sedx")
print(omexPath)
te.executeSEDML(omexPath)


# ### phrasedml experiment
# Tellurium provides support for simulation descriptions in SED-ML the export in Combine Archive format.

# In[3]:

import tellurium as te

antimony = '''
model myModel
  S1 -> S2; k1*S1
  S1 = 10; S2 = 0
  k1 = 1
end
'''
github sys-bio / tellurium / examples / notebooks-py / phrasedmlExample.py View on Github external
# Applying postprocessing
    plot "Figure 1.3 Timecourse after post-processing" task1.PX/max(task1.PX) vs task1.PZ/max(task1.PZ), \
                                                       task1.PY/max(task1.PY) vs task1.PX/max(task1.PX), \
                                                       task1.PZ/max(task1.PZ) vs task1.PY/max(task1.PY)
""".format(urn)

# convert to SED-ML
sedmlStr = phrasedml.convertString(phrasedmlStr)
if sedmlStr == None:
    print(phrasedml.getLastError())

# Run the SED-ML file with results written in workingDir
import tempfile
import shutil
workingDir = tempfile.mkdtemp(suffix="_sedml")
te.executeSEDML(sedmlStr, workingDir=workingDir)
shutil.rmtree(workingDir)


# ### Execute Combine Archive
# Executing the SED-ML from a combine archive.

# In[2]:

import tellurium as te
from tellurium.tests.testdata import omexDir
import os
omexPath = os.path.join(omexDir, "BIOMD0000000003.sedx")
print(omexPath)
te.executeSEDML(omexPath)

github sys-bio / tellurium / examples / notebooks-py / phrasedmlExample.py View on Github external
# Applying preprocessing
    plot "Figure 1.2 Timecourse after pre-processing" task2.time vs task2.PX, task2.PZ, task2.PY

    # Applying postprocessing
    plot "Figure 1.3 Timecourse after post-processing" task1.PX/max(task1.PX) vs task1.PZ/max(task1.PZ), \
                                                       task1.PY/max(task1.PY) vs task1.PX/max(task1.PX), \
                                                       task1.PZ/max(task1.PZ) vs task1.PY/max(task1.PY)
""".format(urn)

# convert to SED-ML
sedmlStr = phrasedml.convertString(phrasedmlStr)
if sedmlStr == None:
    print(phrasedml.getLastError())

# Run SED-ML file
te.executeSEDML(sedmlStr)


# ### Execute Combine Archive
# Executing the SED-ML from a combine archive.

# In[2]:

import tellurium as te
from tellurium.tests.testdata import sedxDir
import os
omexPath = os.path.join(sedxDir, "BIOMD0000000003.sedx")
print(omexPath)
te.executeSEDML(omexPath)


# ### phrasedml experiment
github sys-bio / tellurium / tellurium / teconverters / convert_omex.py View on Github external
def executeOmex(self):
        """ Executes this Omex instance.

        :return:
        """
        import phrasedml
        phrasedml.clearReferencedSBML()

        workingDir = tempfile.mkdtemp(suffix="_sedml")
        self.writeFiles(workingDir)
        from tellurium import executeSEDML
        for sedml_asset in self.getSedmlAssets():
            if sedml_asset.getMaster():
                sedml_path = os.path.join(workingDir, sedml_asset.getLocation())
                executeSEDML(sedml_path,
                             workingDir=os.path.dirname(sedml_path))
                # shutil.rmtree(workingDir)
github sys-bio / tellurium / examples / notebooks-py / phrasedmlExample.py View on Github external
workingDir = tempfile.mkdtemp(suffix="_sedml")
te.executeSEDML(sedmlStr, workingDir=workingDir)
shutil.rmtree(workingDir)


# ### Execute Combine Archive
# Executing the SED-ML from a combine archive.

# In[2]:

import tellurium as te
from tellurium.tests.testdata import omexDir
import os
omexPath = os.path.join(omexDir, "BIOMD0000000003.sedx")
print(omexPath)
te.executeSEDML(omexPath)


# ### phrasedml experiment
# Tellurium provides support for simulation descriptions in SED-ML the export in Combine Archive format.

# In[3]:

import tellurium as te

antimony = '''
model myModel
  S1 -> S2; k1*S1
  S1 = 10; S2 = 0
  k1 = 1
end
'''