Promote all local parameters in the model to global parameters.
46 """usage: promoteParameters.py input-filename output-filename 55 if not os.path.exists(infile):
56 print(
"[Error] %s : No such file." % infile)
61 sbmldoc = reader.readSBML(infile)
63 if sbmldoc.getNumErrors() > 0:
64 if sbmldoc.getError(0).getErrorId() == libsbml.XMLFileUnreadable:
67 elif sbmldoc.getError(0).getErrorId() == libsbml.XMLFileOperationError:
77 props.addOption(
"promoteLocalParameters",
True,
"Promotes all Local Parameters to Global ones")
78 if sbmldoc.convert(props) != libsbml.LIBSBML_OPERATION_SUCCESS:
79 print(
"[Error] Conversion failed...")
82 writer.writeSBML(sbmldoc, outfile)
83 print(
"[OK] wrote {}".format(outfile))
85 if __name__ ==
'__main__':