def get_parameters_from_model(model): """Get all the SBML parameters from the model""" params = outline_sbml.get_elements_from_lists_of_list("listOfParameters", "parameter", get_parameter_of_element, model) return [ p for p in params if p is not None ]
def get_assignment_rules_from_model(model): """Get all the assignment rules from the model""" arules = outline_sbml.get_elements_from_lists_of_list("listOfRules", "assignmentRule", get_assign_rule_from_element, model) return arules
def params_from_param_histories(model): """Get all the parameter histories in the model file and parse these into parameter descriptions suitable for creating an init params file """ annotations = model.getElementsByTagName("annotation") params = [] for annotation in annotations: list_name = "listOfParameterHistories" annot_params = outline_sbml.get_elements_from_lists_of_list(list_name, "parameterHistory", get_param_of_history, annotation) params += [ p for p in annot_params if p.use ] return params