tellurium.teconverters package¶
Submodules¶
tellurium.teconverters.antimony_regex module¶
- tellurium.teconverters.antimony_regex.getFunctionSBORegex()[source]¶
Return the regex string for a function SBO term. Matches whole line.
- tellurium.teconverters.antimony_regex.getFunctionStartRegex()[source]¶
Return the regex string for Antimony model start. Matches whole line.
- tellurium.teconverters.antimony_regex.getModelEndRegex()[source]¶
Return the regex string for Antimony model end. Matches whole line.
tellurium.teconverters.antimony_sbo module¶
Helpers to work with SBO terms in antimony.
- class tellurium.teconverters.antimony_sbo.antimonySBOConverter(doc)[source]¶
Bases:
object
- class tellurium.teconverters.antimony_sbo.antimonySBOParser(antimony_str)[source]¶
Bases:
object
- addSBOsToSBML(sbml_str)[source]¶
Add SBO terms to an SBML string. Must have called elideSBOTerms first to populate self.sbo_map.
- elideSBOTerms()[source]¶
Remove SBO terms from self.antimony_str. Remove SBO terms for functions. See https://github.com/sys-bio/tellurium/issues/340.
- Returns:
Antimony string without SBO terms.
tellurium.teconverters.convert_antimony module¶
- class tellurium.teconverters.convert_antimony.antimonyConverter[source]¶
Bases:
object
- antimonyToSBML(sb_str, SBO=False)[source]¶
Converts an Antimony string to raw SBML.
- Parameters:
sb_str – The raw Antimony string
- Returns:
A 2-tuple (module_name, raw_sbml)
- cellmlFileToAntimony(sbml_path)[source]¶
Converts a CellML file to Antimony source.
- Parameters:
sbml_path – The path to the CellML file
- Returns:
A 2-tuple (module_name, antimony_source)
- sbmlFileToAntimony(sbml_path, addSBO=False)[source]¶
Converts a SBML file to Antimony source.
- Parameters:
sbml_path – The path to the SBML file
- Returns:
A 2-tuple (module_name, antimony_source)
tellurium.teconverters.convert_omex module¶
Class for working with omex files.
- class tellurium.teconverters.convert_omex.Omex(description='', creator=None)[source]¶
Bases:
object
Wrapper for Combine archives.
- class tellurium.teconverters.convert_omex.SbmlAsset(location, content, master=False)[source]¶
Bases:
OmexAsset
- class tellurium.teconverters.convert_omex.SedmlAsset(location, content, master=False)[source]¶
Bases:
OmexAsset
- class tellurium.teconverters.convert_omex.inlineOmexImporter(omex)[source]¶
Bases:
object
- formatPhrasedmlResource(path)[source]¶
Normalizes path, strips xml extension, and normalizes fs separator.
- classmethod fromFile(path)[source]¶
Initialize from a combine archive.
- Parameters:
path – The path to the omex file
Makes a header for an entry.
- Parameters:
entry – Entry in Combine archive (class CaContent)
type – Can be ‘sbml’ or ‘sedml’
tellurium.teconverters.convert_phrasedml module¶
tellurium.teconverters.inline_omex module¶
Working with inline omex. This is used in the notebook to provide functionality to the cells.
- class tellurium.teconverters.inline_omex.inlineOmex(sources)[source]¶
Bases:
object
- classmethod fromString(omex_str, comp=False)[source]¶
Given mixed Antimony/PhraSEDML, separates out the constituent parts. Assumes that Antimony and PhraSEDML are not mixed on the same line.
- Parameters:
instr – The input string containing mixed Antimony/PhraSEDML
- Returns:
2-tuple containing a list of Antimony parts and a list of PhraSEDML parts as strings