Exemplo n.º 1
0
from pathlib import Path
import pkg_resources

from libsbml_draw.model.sbml_layout import SBMLlayout

model_file_name = "model.xml"

model_file = Path(
    pkg_resources.resource_filename("libsbml_draw",
                                    "model/data/" + model_file_name))

sl = SBMLlayout()

sl.loadSBMLFile(str(model_file))

sl._describeModel()

sl.drawNetwork()

sl_str = sl.getSBMLString()

ss = SBMLlayout()

ss.loadSBMLString(sl_str)

ss._describeModel()

ss.drawNetwork()
Exemplo n.º 2
0
from libsbml_draw.model.sbml_layout import SBMLlayout

model_file_name = "model.xml"

model_file = Path(
    pkg_resources.resource_filename("libsbml_draw",
                                    "model/data/" + model_file_name))

sl = SBMLlayout()

sl.loadSBMLFile(str(model_file))

sl._describeModel()

sl.drawNetwork()

ss = SBMLlayout()

sbmlString = sl.getSBMLString()

ss.loadSBMLString(sbmlString)

ss._describeModel()

ss.drawNetwork()

ss.regenerateLayoutAndNetwork()

ss.drawNetwork()
Exemplo n.º 3
0
  Node9 = 0;
  Node10 = 0;
  Node11 = 0;
  Node12 = 0;
  Node13 = 0;
  Node14 = 0;
end
''')

from libsbml_draw.model.sbml_layout import SBMLlayout

sl = SBMLlayout(r.getSBML())

sl._describeModel()

sl.drawNetwork()

assert sl.getNumberOfNodes() == 12
assert sl.getNumberOfReactions() == 8

slsl = SBMLlayout()

slsl.loadSBMLString(r.getSBML())

slsl._describeModel()

slsl.drawNetwork()

assert slsl.getNumberOfNodes() == 12
assert slsl.getNumberOfReactions() == 8