EnzymeMLDocument

pydantic model pyenzyme.enzymeml.core.enzymemldocument.EnzymeMLDocument[source]

Bases: pyenzyme.enzymeml.core.enzymemlbase.EnzymeMLBase

Show JSON schema
{
   "title": "EnzymeMLDocument",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "description": "Title of the EnzymeML Document.",
         "type": "string"
      },
      "level": {
         "title": "Level",
         "description": "SBML evel of the EnzymeML XML.",
         "default": 3,
         "inclusiveMinimum": 1,
         "inclusiveMaximum": 3,
         "type": "integer"
      },
      "version": {
         "title": "Version",
         "description": "SBML version of the EnzymeML XML.",
         "default": 2,
         "type": "integer"
      },
      "pubmedid": {
         "title": "Pubmedid",
         "description": "Pubmed ID reference.",
         "type": "string"
      },
      "url": {
         "title": "Url",
         "description": "Arbitrary type of URL that is related to the EnzymeML document.",
         "type": "string"
      },
      "doi": {
         "title": "Doi",
         "description": "Digital Object Identifier of the referenced publication or the EnzymeML document.",
         "type": "string"
      },
      "created": {
         "title": "Created",
         "description": "Date the EnzymeML document was created.",
         "type": "string"
      },
      "modified": {
         "title": "Modified",
         "description": "Date the EnzymeML document was modified.",
         "type": "string"
      },
      "creators": {
         "title": "Creators",
         "description": "Dictionary mapping from creator IDs to creator describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/Creator"
         }
      },
      "vessels": {
         "title": "Vessels",
         "description": "Dictionary mapping from vessel IDs to vessel describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/Vessel"
         }
      },
      "proteins": {
         "title": "Proteins",
         "description": "Dictionary mapping from protein IDs to protein describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/Protein"
         }
      },
      "complexes": {
         "title": "Complexes",
         "description": "Dictionary mapping from complex IDs to complex describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/Complex"
         }
      },
      "reactants": {
         "title": "Reactants",
         "description": "Dictionary mapping from reactant IDs to reactant describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/Reactant"
         }
      },
      "reactions": {
         "title": "Reactions",
         "description": "Dictionary mapping from reaction IDs to reaction describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/EnzymeReaction"
         }
      },
      "units": {
         "title": "Units",
         "description": "Dictionary mapping from unit IDs to unit describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/UnitDef"
         }
      },
      "measurements": {
         "title": "Measurements",
         "description": "Dictionary mapping from measurement IDs to measurement describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/Measurement"
         }
      },
      "files": {
         "title": "Files",
         "description": "Dictionary mapping from protein IDs to protein describing objects.",
         "type": "object",
         "additionalProperties": {
            "type": "object"
         }
      },
      "global_parameters": {
         "title": "Global Parameters",
         "description": "Dictionary mapping from parameter IDs to global kinetic parameter describing objects.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/KineticParameter"
         }
      },
      "log": {
         "title": "Log",
         "default": "",
         "type": "string"
      }
   },
   "required": [
      "name"
   ],
   "definitions": {
      "Creator": {
         "title": "Creator",
         "type": "object",
         "properties": {
            "given_name": {
               "title": "Given Name",
               "description": "Given name of the author or contributor.",
               "type": "string"
            },
            "family_name": {
               "title": "Family Name",
               "description": "Family name of the author or contributor.",
               "type": "string"
            },
            "mail": {
               "title": "Mail",
               "description": "Email address of the author or contributor.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier of the protein.",
               "pattern": "a[\\d]+",
               "type": "string"
            }
         },
         "required": [
            "given_name",
            "family_name",
            "mail"
         ]
      },
      "Vessel": {
         "title": "Vessel",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the used vessel.",
               "template_alias": "Name",
               "type": "string"
            },
            "volume": {
               "title": "Volume",
               "description": "Volumetric value of the vessel.",
               "template_alias": "Volume value",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "unit": {
               "title": "Unit",
               "description": "Volumetric unit of the vessel.",
               "template_alias": "Volume unit",
               "type": "string"
            },
            "constant": {
               "title": "Constant",
               "description": "Whether the volume of the vessel is constant or not.",
               "default": true,
               "type": "boolean"
            },
            "meta_id": {
               "title": "Meta Id",
               "description": "Unique meta identifier of the vessel.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier of the vessel.",
               "pattern": "v[\\d]+",
               "template_alias": "ID",
               "type": "string"
            },
            "uri": {
               "title": "Uri",
               "description": "URI of the vessel.",
               "type": "string"
            },
            "creator_id": {
               "title": "Creator Id",
               "description": "Unique identifier of the author.",
               "type": "string"
            }
         },
         "required": [
            "name"
         ]
      },
      "SBOTerm": {
         "title": "SBOTerm",
         "description": "String enumeration used to assign ontologies derived from SBOTerms.",
         "enum": [
            "SBO:0000176",
            "SBO:0000208",
            "SBO:0000181",
            "SBO:0000182",
            "SBO:0000179",
            "SBO:0000180",
            "SBO:0000209",
            "SBO:0000377",
            "SBO:0000177",
            "SBO:0000200",
            "SBO:0000672",
            "SBO:0000252",
            "SBO:0000251",
            "SBO:0000247",
            "SBO:0000327",
            "SBO:0000328",
            "SBO:0000336",
            "SBO:0000015",
            "SBO:0000011",
            "SBO:0000013",
            "SBO:0000020",
            "SBO:0000461",
            "SBO:0000462",
            "SBO:0000021",
            "SBO:0000296",
            "SBO:0000297",
            "SBO:0000607",
            "SBO:0000028",
            "SBO:0000025",
            "SBO:0000027",
            "SBO:0000186"
         ],
         "type": "string"
      },
      "Protein": {
         "title": "Protein",
         "description": "Due to inheritance and type-checking issues, the dataclass has to be mixed in.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the protein",
               "template_alias": "Name",
               "type": "string"
            },
            "meta_id": {
               "title": "Meta Id",
               "description": "Unique meta identifier of the protein.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier of the protein.",
               "pattern": "p[\\d]+",
               "template_alias": "ID",
               "type": "string"
            },
            "vessel_id": {
               "title": "Vessel Id",
               "description": "Identifier of the vessel in which the protein was stored.",
               "pattern": "v[\\d.]+",
               "template_alias": "Vessel",
               "type": "string"
            },
            "init_conc": {
               "title": "Init Conc",
               "description": "Initial concentration of the protein.",
               "type": "number"
            },
            "constant": {
               "title": "Constant",
               "description": "Whether the proteins concentration remains constant or not.",
               "default": true,
               "template_alias": "Constant",
               "type": "boolean"
            },
            "boundary": {
               "title": "Boundary",
               "description": "Whether the protein is under any boundary conditions (SBML Technicality, better leave it to default)",
               "default": false,
               "type": "boolean"
            },
            "unit": {
               "title": "Unit",
               "description": "Unit of the proteins intial concentration.",
               "type": "string"
            },
            "ontology": {
               "description": "Ontology describing the characteristic of the protein.",
               "default": "SBO:0000252",
               "allOf": [
                  {
                     "$ref": "#/definitions/SBOTerm"
                  }
               ]
            },
            "uri": {
               "title": "Uri",
               "description": "URI of the protein.",
               "type": "string"
            },
            "creator_id": {
               "title": "Creator Id",
               "description": "Unique identifier of the author.",
               "type": "string"
            },
            "sequence": {
               "title": "Sequence",
               "description": "Amino acid sequence of the protein",
               "template_alias": "Sequence",
               "type": "string"
            },
            "ecnumber": {
               "title": "Ecnumber",
               "description": "EC number of the protein.",
               "pattern": "(\\d+.)(\\d+.)(\\d+.)(\\d+)",
               "template_alias": "EC Number",
               "type": "string"
            },
            "organism": {
               "title": "Organism",
               "description": "Organism the protein was expressed in.",
               "template_alias": "Source organism",
               "type": "string"
            },
            "organism_tax_id": {
               "title": "Organism Tax Id",
               "description": "Taxonomy identifier of the expression host.",
               "type": "string"
            },
            "uniprotid": {
               "title": "Uniprotid",
               "description": "Unique identifier referencing a protein entry at UniProt. Use this identifier to initialize the object from the UniProt database.",
               "template_alias": "UniProt ID",
               "type": "string"
            }
         },
         "required": [
            "vessel_id"
         ]
      },
      "Complex": {
         "title": "Complex",
         "description": "Due to inheritance and type-checking issues, the dataclass has to be mixed in.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the complex",
               "type": "string"
            },
            "meta_id": {
               "title": "Meta Id",
               "description": "Unique meta identifier of the protein.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier of the protein.",
               "pattern": "c[\\d]+",
               "type": "string"
            },
            "vessel_id": {
               "title": "Vessel Id",
               "description": "Identifier of the vessel in which the protein was stored.",
               "pattern": "v[\\d]+",
               "type": "string"
            },
            "init_conc": {
               "title": "Init Conc",
               "description": "Initial concentration of the protein.",
               "inclusiveMinimum": 0.0,
               "type": "number"
            },
            "constant": {
               "title": "Constant",
               "description": "Whether the proteins concentration remains constant or not.",
               "default": false,
               "type": "boolean"
            },
            "boundary": {
               "title": "Boundary",
               "description": "Whether the protein is under any boundary conditions (SBML Technicality, better leave it to default)",
               "default": false,
               "type": "boolean"
            },
            "unit": {
               "title": "Unit",
               "description": "Unit of the proteins intial concentration.",
               "type": "string"
            },
            "ontology": {
               "description": "Ontology describing the characteristic of the protein.",
               "default": "SBO:0000296",
               "allOf": [
                  {
                     "$ref": "#/definitions/SBOTerm"
                  }
               ]
            },
            "uri": {
               "title": "Uri",
               "description": "URI of the protein.",
               "type": "string"
            },
            "creator_id": {
               "title": "Creator Id",
               "description": "Unique identifier of the author.",
               "type": "string"
            },
            "participants": {
               "title": "Participants",
               "description": "Array of IDs the complex contains",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "name",
            "vessel_id"
         ]
      },
      "Reactant": {
         "title": "Reactant",
         "description": "Due to inheritance and type-checking issues, the dataclass has to be mixed in.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the reactant.",
               "template_alias": "Name",
               "type": "string"
            },
            "meta_id": {
               "title": "Meta Id",
               "description": "Unique meta identifier of the protein.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier of the protein.",
               "pattern": "s[\\d]+",
               "template_alias": "ID",
               "type": "string"
            },
            "vessel_id": {
               "title": "Vessel Id",
               "description": "Identifier of the vessel in which the reactant was stored.",
               "template_alias": "Vessel",
               "type": "string"
            },
            "init_conc": {
               "title": "Init Conc",
               "description": "Initial concentration of the reactant.",
               "type": "number"
            },
            "constant": {
               "title": "Constant",
               "description": "Whether the reactants concentration remains constant or not.",
               "default": false,
               "template_alias": "Constant",
               "type": "boolean"
            },
            "boundary": {
               "title": "Boundary",
               "description": "Whether the reactant is under any boundary conditions (SBML Technicality, better leave it to default)",
               "default": false,
               "type": "boolean"
            },
            "unit": {
               "title": "Unit",
               "description": "Unit of the reactant intial concentration.",
               "type": "string"
            },
            "ontology": {
               "description": "Ontology describing the characteristic of the reactant.",
               "default": "SBO:0000247",
               "allOf": [
                  {
                     "$ref": "#/definitions/SBOTerm"
                  }
               ]
            },
            "uri": {
               "title": "Uri",
               "description": "URI of the protein.",
               "type": "string"
            },
            "creator_id": {
               "title": "Creator Id",
               "description": "Unique identifier of the author.",
               "type": "string"
            },
            "smiles": {
               "title": "Smiles",
               "description": "Simplified Molecular Input Line Entry System (SMILES) encoding of the reactant.",
               "template_alias": "SMILES",
               "type": "string"
            },
            "inchi": {
               "title": "Inchi",
               "description": "International Chemical Identifier (InChI) encoding of the reactant.",
               "template_alias": "InCHI",
               "type": "string"
            },
            "chebi_id": {
               "title": "Chebi Id",
               "description": "Unique identifier of the CHEBI database. Use this identifier to initialize the object from the CHEBI database.",
               "type": "string"
            }
         },
         "required": [
            "vessel_id"
         ]
      },
      "KineticParameter": {
         "title": "KineticParameter",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the estimated parameter.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Numerical value of the estimated parameter.",
               "type": "number"
            },
            "unit": {
               "title": "Unit",
               "description": "Unit of the estimated parameter.",
               "type": "string"
            },
            "initial_value": {
               "title": "Initial Value",
               "description": "Initial value that was used for the parameter estimation.",
               "type": "number"
            },
            "upper": {
               "title": "Upper",
               "description": "Upper bound of the estimated parameter.",
               "type": "number"
            },
            "lower": {
               "title": "Lower",
               "description": "Lower bound of the estimated parameter.",
               "type": "number"
            },
            "is_global": {
               "title": "Is Global",
               "description": "Specifies if this parameter is a global parameter.",
               "default": false,
               "type": "boolean"
            },
            "stdev": {
               "title": "Stdev",
               "description": "Standard deviation of the estimated parameter.",
               "type": "number"
            },
            "constant": {
               "title": "Constant",
               "description": "Specifies if this parameter is constant",
               "default": false,
               "type": "boolean"
            },
            "ontology": {
               "description": "Type of the estimated parameter.",
               "allOf": [
                  {
                     "$ref": "#/definitions/SBOTerm"
                  }
               ]
            }
         },
         "required": [
            "name"
         ]
      },
      "KineticModel": {
         "title": "KineticModel",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the kinetic law.",
               "type": "string"
            },
            "equation": {
               "title": "Equation",
               "description": "Equation for the kinetic law.",
               "type": "string"
            },
            "parameters": {
               "title": "Parameters",
               "description": "List of estimated parameters.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/KineticParameter"
               }
            },
            "ontology": {
               "description": "Type of the estimated parameter.",
               "allOf": [
                  {
                     "$ref": "#/definitions/SBOTerm"
                  }
               ]
            }
         },
         "required": [
            "name",
            "equation"
         ]
      },
      "ReactionElement": {
         "title": "ReactionElement",
         "description": "Describes an element of a chemical reaction.",
         "type": "object",
         "properties": {
            "species_id": {
               "title": "Species Id",
               "description": "Internal identifier to either a protein or reactant defined in the EnzymeMLDocument.",
               "type": "string"
            },
            "stoichiometry": {
               "title": "Stoichiometry",
               "description": "Positive float number representing the associated stoichiometry.",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "constant": {
               "title": "Constant",
               "description": "Whether or not the concentration of this species remains constant.",
               "type": "boolean"
            },
            "ontology": {
               "description": "Ontology defining the role of the given species.",
               "allOf": [
                  {
                     "$ref": "#/definitions/SBOTerm"
                  }
               ]
            }
         },
         "required": [
            "species_id",
            "stoichiometry",
            "constant",
            "ontology"
         ]
      },
      "EnzymeReaction": {
         "title": "EnzymeReaction",
         "description": "Describes an enzyme reaction by combining already defined\nreactants/proteins of an EnzymeML document. In addition,\nthis class provides ways to integrate reaction conditions\nas well. It is also possible to add a kinetic law to this\nobject by using the KineticModel class.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the reaction.",
               "template_alias": "Name",
               "type": "string"
            },
            "reversible": {
               "title": "Reversible",
               "description": "Whether the reaction is reversible or irreversible",
               "template_alias": "Reversible",
               "type": "boolean"
            },
            "temperature": {
               "title": "Temperature",
               "description": "Numeric value of the temperature of the reaction.",
               "template_alias": "Temperature value",
               "type": "number"
            },
            "temperature_unit": {
               "title": "Temperature Unit",
               "description": "Unit of the temperature of the reaction.",
               "pattern": "kelvin|Kelvin|k|K|celsius|Celsius|C|c",
               "template_alias": "Temperature unit",
               "type": "string"
            },
            "ph": {
               "title": "Ph",
               "description": "PH value of the reaction.",
               "template_alias": "pH value",
               "inclusiveMinimum": 0,
               "inclusiveMaximum": 14,
               "type": "number"
            },
            "ontology": {
               "description": "Ontology defining the role of the given species.",
               "default": "SBO:0000176",
               "allOf": [
                  {
                     "$ref": "#/definitions/SBOTerm"
                  }
               ]
            },
            "meta_id": {
               "title": "Meta Id",
               "description": "Unique meta identifier for the reaction.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier of the reaction.",
               "pattern": "r[\\d]+",
               "template_alias": "ID",
               "type": "string"
            },
            "uri": {
               "title": "Uri",
               "description": "URI of the reaction.",
               "type": "string"
            },
            "creator_id": {
               "title": "Creator Id",
               "description": "Unique identifier of the author.",
               "type": "string"
            },
            "model": {
               "title": "Model",
               "description": "Kinetic model decribing the reaction.",
               "allOf": [
                  {
                     "$ref": "#/definitions/KineticModel"
                  }
               ]
            },
            "educts": {
               "title": "Educts",
               "description": "List of educts containing ReactionElement objects.",
               "template_alias": "Educts",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/ReactionElement"
               }
            },
            "products": {
               "title": "Products",
               "description": "List of products containing ReactionElement objects.",
               "template_alias": "Products",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/ReactionElement"
               }
            },
            "modifiers": {
               "title": "Modifiers",
               "description": "List of modifiers (Proteins, snhibitors, stimulators) containing ReactionElement objects.",
               "template_alias": "Modifiers",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/ReactionElement"
               }
            }
         },
         "required": [
            "name",
            "reversible"
         ]
      },
      "BaseUnit": {
         "title": "BaseUnit",
         "description": "Base unit description including kind, exponent, scale and multiplier",
         "type": "object",
         "properties": {
            "kind": {
               "title": "Kind",
               "description": "Unit kind used to write SBML.",
               "type": "string"
            },
            "exponent": {
               "title": "Exponent",
               "description": "Unit exponent.",
               "type": "number"
            },
            "scale": {
               "title": "Scale",
               "description": "Unit scale.",
               "type": "integer"
            },
            "multiplier": {
               "title": "Multiplier",
               "description": "Unit multiplier.",
               "type": "number"
            }
         },
         "required": [
            "kind",
            "exponent",
            "scale",
            "multiplier"
         ]
      },
      "UnitDef": {
         "title": "UnitDef",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the SI unit.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Interal Identifier of the SI unit.",
               "type": "string"
            },
            "meta_id": {
               "title": "Meta Id",
               "description": "Interal meta identifier of the SI unit.",
               "type": "string"
            },
            "units": {
               "title": "Units",
               "description": "List of SI baseunits.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/BaseUnit"
               }
            },
            "ontology": {
               "title": "Ontology",
               "description": "Ontology of the SI unit.",
               "type": "string"
            }
         }
      },
      "DataTypes": {
         "title": "DataTypes",
         "description": "String enumeration used to assign replicate type ontologies",
         "enum": [
            "conc",
            "abs",
            "feed",
            "biomass"
         ],
         "type": "string"
      },
      "Replicate": {
         "title": "Replicate",
         "type": "object",
         "properties": {
            "id": {
               "title": "Id",
               "description": "Unique identifier of the replicate",
               "type": "string"
            },
            "species_id": {
               "title": "Species Id",
               "description": "Unique identifier of the species that has been measured.",
               "pattern": "[s|r|p][\\d]+",
               "type": "string"
            },
            "measurement_id": {
               "title": "Measurement Id",
               "description": "Unique identifier of the measurement that the replicate is part of.",
               "pattern": "m[\\d]+",
               "type": "string"
            },
            "data_type": {
               "description": "Type of data that was measured (e.g. concentration)",
               "default": "conc",
               "allOf": [
                  {
                     "$ref": "#/definitions/DataTypes"
                  }
               ]
            },
            "data_unit": {
               "title": "Data Unit",
               "description": "SI unit of the data that was measured.",
               "type": "string"
            },
            "time_unit": {
               "title": "Time Unit",
               "description": "Time unit of the replicate.",
               "type": "string"
            },
            "time": {
               "title": "Time",
               "description": "Time steps of the replicate.",
               "type": "array",
               "items": {
                  "type": "number"
               }
            },
            "data": {
               "title": "Data",
               "description": "Data that was measured.",
               "type": "array",
               "items": {
                  "type": "number"
               }
            },
            "is_calculated": {
               "title": "Is Calculated",
               "description": "Whether or not the data has been generated by simulation.",
               "default": false,
               "type": "boolean"
            },
            "uri": {
               "title": "Uri",
               "description": "URI of the protein.",
               "type": "string"
            },
            "creator_id": {
               "title": "Creator Id",
               "description": "Unique identifier of the author.",
               "type": "string"
            }
         },
         "required": [
            "id",
            "species_id",
            "data_unit",
            "time_unit"
         ]
      },
      "MeasurementData": {
         "title": "MeasurementData",
         "description": "Helper class to organize elements",
         "type": "object",
         "properties": {
            "init_conc": {
               "title": "Init Conc",
               "description": "Initial concentration of the measurement data.",
               "type": "number"
            },
            "unit": {
               "title": "Unit",
               "description": "The unit of the measurement data.",
               "type": "string"
            },
            "measurement_id": {
               "title": "Measurement Id",
               "description": "Unique measurement identifier this dataset belongs to.",
               "type": "string"
            },
            "reactant_id": {
               "title": "Reactant Id",
               "description": "The identifier for the described reactant.",
               "type": "string"
            },
            "protein_id": {
               "title": "Protein Id",
               "description": "The identifier for the described protein.",
               "type": "string"
            },
            "replicates": {
               "title": "Replicates",
               "description": "A list of replicate objects holding raw data of the measurement.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/Replicate"
               }
            }
         },
         "required": [
            "init_conc",
            "unit"
         ]
      },
      "Measurement": {
         "title": "Measurement",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Name of the measurement",
               "type": "string"
            },
            "temperature": {
               "title": "Temperature",
               "description": "Numeric value of the temperature of the reaction.",
               "template_alias": "Temperature value",
               "type": "number"
            },
            "temperature_unit": {
               "title": "Temperature Unit",
               "description": "Unit of the temperature of the reaction.",
               "pattern": "kelvin|Kelvin|k|K|celsius|Celsius|C|c",
               "type": "string"
            },
            "ph": {
               "title": "Ph",
               "description": "PH value of the reaction.",
               "inclusiveMinimum": 0,
               "inclusiveMaximum": 14,
               "type": "number"
            },
            "species_dict": {
               "title": "Species Dict",
               "description": "Species of the measurement.",
               "default": {
                  "proteins": {},
                  "reactants": {}
               },
               "type": "object",
               "additionalProperties": {
                  "type": "object",
                  "additionalProperties": {
                     "$ref": "#/definitions/MeasurementData"
                  }
               }
            },
            "global_time": {
               "title": "Global Time",
               "description": "Global time of the measurement all replicates agree on.",
               "type": "array",
               "items": {
                  "type": "number"
               }
            },
            "global_time_unit": {
               "title": "Global Time Unit",
               "description": "Unit of the global time.",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier of the measurement.",
               "pattern": "m[\\d]+",
               "type": "string"
            },
            "uri": {
               "title": "Uri",
               "description": "URI of the reaction.",
               "type": "string"
            },
            "creator_id": {
               "title": "Creator Id",
               "description": "Unique identifier of the author.",
               "type": "string"
            }
         },
         "required": [
            "name"
         ]
      }
   }
}

Config
  • validate_all: bool = True

  • validate_assignment: bool = True

Fields
Validators
field complex_dict: Dict[str, pyenzyme.enzymeml.core.complex.Complex] [Required] (alias 'complexes')

Dictionary mapping from complex IDs to complex describing objects.

field created: Optional[str] = None

Date the EnzymeML document was created.

field creator_dict: Dict[str, pyenzyme.enzymeml.core.creator.Creator] [Required] (alias 'creators')

Dictionary mapping from creator IDs to creator describing objects.

field doi: Optional[str] = None

Digital Object Identifier of the referenced publication or the EnzymeML document.

field file_dict: Dict[str, dict] [Required] (alias 'files')

Dictionary mapping from protein IDs to protein describing objects.

field global_parameters: Dict[str, pyenzyme.enzymeml.models.kineticmodel.KineticParameter] [Required]

Dictionary mapping from parameter IDs to global kinetic parameter describing objects.

field level: int = 3

SBML evel of the EnzymeML XML.

Constraints
  • inclusiveMinimum = 1

  • inclusiveMaximum = 3

field log: str = ''
Validated by
field measurement_dict: Dict[str, pyenzyme.enzymeml.core.measurement.Measurement] [Required] (alias 'measurements')

Dictionary mapping from measurement IDs to measurement describing objects.

field modified: Optional[str] = None

Date the EnzymeML document was modified.

field name: str [Required]

Title of the EnzymeML Document.

field protein_dict: Dict[str, pyenzyme.enzymeml.core.protein.Protein] [Required] (alias 'proteins')

Dictionary mapping from protein IDs to protein describing objects.

field pubmedid: Optional[str] = None

Pubmed ID reference.

Validated by
field reactant_dict: Dict[str, pyenzyme.enzymeml.core.reactant.Reactant] [Required] (alias 'reactants')

Dictionary mapping from reactant IDs to reactant describing objects.

field reaction_dict: Dict[str, pyenzyme.enzymeml.core.enzymereaction.EnzymeReaction] [Required] (alias 'reactions')

Dictionary mapping from reaction IDs to reaction describing objects.

field unit_dict: Dict[str, pyenzyme.enzymeml.core.unitdef.UnitDef] [Required] (alias 'units')

Dictionary mapping from unit IDs to unit describing objects.

field url: Optional[str] = None

Arbitrary type of URL that is related to the EnzymeML document.

field version: int = 2

SBML version of the EnzymeML XML.

field vessel_dict: Dict[str, pyenzyme.enzymeml.core.vessel.Vessel] [Required] (alias 'vessels')

Dictionary mapping from vessel IDs to vessel describing objects.

addComplex(name: str, participants: List[str], vessel_id: str, init_conc: Optional[float] = None, unit: Optional[str] = None)[source]
addCreator(creator: pyenzyme.enzymeml.core.creator.Creator, log: bool = True) str[source]

Adds a creator object to the EnzymeML document.

Parameters

creator (Creator) – Creator object to be added to the document.

Returns

Unique internal identifier of the creator.

Return type

str

addFile(filepath=None, file_handle=None, description='Undefined') str[source]

Adds any arbitrary file to the document. Please note, that if a filepath is given, any file_handle will be ignored.

Parameters
  • filepath (str, optional) – Path to the file that is added to the document. Defaults to None.

  • file_handle (io.BufferedReader, optional) – File handle that will be read to a bytes string. Defaults to None.

Returns

Internal identifier for the file.

Return type

str

addGlobalParameter(name: str, value: Optional[float] = None, initial_value: Optional[float] = None, unit: Optional[str] = None, constant: bool = False, upper: Optional[float] = None, lower: Optional[float] = None, stdev: Optional[float] = None, ontology: Optional[pyenzyme.enzymeml.core.ontology.SBOTerm] = None)[source]

Adds a global parameter to the model that will be referred by KineticModel objects in reaction models.

Parameters
  • name (str) – Name of the estimated parameter.

  • value (Optional[float], optional) – Numerical value of the estimated parameter. Defaults to None.

  • initial_value (Optional[float], optional) – Initial value that was used for the parameter estimation. Defaults to None.

  • unit (Optional[str], optional) – Unit of the estimated parameter. Defaults to None.

  • stdev (Optional[float], optional) – Standard deviation of the estimated parameter. Defaults to None.

  • ontology (Optional[SBOTerm], optional) – Type of the estimated parameter. Defaults to None.

Returns

Name of the parameter that has been added.

Return type

str

addMeasurement(measurement: pyenzyme.enzymeml.core.measurement.Measurement) str[source]

Adds a measurement to an EnzymeMLDocument and validates consistency with already defined elements of the document.

Parameters

measurement (Measurement) – Collection of data and initial concentrations per reaction

Returns

Assigned measurement identifier.

Return type

measurement_id (String)

addProtein(protein: pyenzyme.enzymeml.core.protein.Protein, use_parser: bool = True) str[source]

Adds a Protein object to the EnzymeML document.

Parameters
  • protein (Protein) – Protein object to be added to the document.

  • use_parser (bool, optional) – Whether to user the unit parser or not. Defaults to True.

Returns

Unique internal identifier of the protein.

Return type

str

addReactant(reactant: pyenzyme.enzymeml.core.reactant.Reactant, use_parser: bool = True) str[source]

Adds a Reactant object to the EnzymeML document.

Parameters
  • reactant (Reactant) – Reactant object to be added to the document.

  • use_parser (bool, optional) – Whether to user the unit parser or not. Defaults to True.

Returns

Unique internal identifier of the reactant.

Return type

str

addReaction(reaction: pyenzyme.enzymeml.core.enzymereaction.EnzymeReaction, use_parser: bool = True) str[source]

Adds EnzymeReaction object to EnzymeMLDocument object. Automatically assigns ID and converts units.

Parameters
  • reaction (EnzymeReaction) – Object describing reaction

  • use_parser (bool, optional) – If set True, will use internal unit parser. Defaults to True.

Returns

Internal identifier for the reaction. Use it for other objects!

Return type

string

addReactions(reactions: List[pyenzyme.enzymeml.core.enzymereaction.EnzymeReaction])[source]

Adds multiple reactions to an EnzymeML document.

Parameters

reactions (List[EnzymeReaction]) – List of EnzymeReaction objects

addVessel(vessel: pyenzyme.enzymeml.core.vessel.Vessel, use_parser: bool = True) str[source]

Adds a Vessel object to the EnzymeML document.

Parameters
  • vessel (Vessel) – Vessel object to be added to the document.

  • use_parser (bool, optional) – Whether to user the unit parser or not. Defaults to True.

Returns

Unique internal identifier of the reactant.

Return type

str

validator add_identifier  »  pubmedid[source]

Adds an identifiers.org link in front of the pubmed ID if not given

applyModelInitialization(path: str, to_values: bool = False) None[source]

Adds initial values per reaction to the model from a YAML config file.

This method loads a YAML that previously generated from the function ‘generateInitialValueTemplate’ and was filled with values. These are then used to populate the ‘initial_value’ fields of KineticParameter objects.

Parameters

path (str) – Path to the YAML file containing the initial values.

checkUnitConsistency(strict: bool = False, return_report: bool = True)[source]

Validates unit consistency in an EnzymeMLDocument.

This method will check whether all (initial) concentration units of a species are consistent throughout the document. Default mode only requires measurements and replicates to comply to the species unit.

This can also be set to ‘strict’, where any species, measurement, replicate and parameter has to comply in a global fashion. To summarise, strict mode checks on:

  • Consistent usage of time

  • Consistent concentration units for ALL concentrations

  • Consistent volumetric unit including vessels

Strict mode is of greates importance for kinetic modeling, differing scales can lead to wrong results. However, the code will still run and only warnings will be given.

Parameters
  • strict (bool, optional) – Enables strict mode. Defaults to False.

  • return_report (bool, optional) – Whether a report should be returned. Defaults to False.

Returns

Report on which units are inconsistent Bool: Whether the document is consistent in units

Return type

Dict

exportKineticParameters(exclude_constant: bool = False, as_dataframe: bool = True)[source]

Exports all kinetic parameters found in the EnzymeMLDocument

Parameters

reactions (List[str]) – Reactions from which the parameters are to be exported.

Returns

Mapping from parameter name to estimated value

Return type

Dict

exportMeasurementData(measurement_ids: Union[str, List[str]] = 'all', species_ids: Union[str, List[str]] = 'all', proteins: bool = True, reactants: bool = True) Dict[str, Dict[str, Union[Tuple, pandas.core.frame.DataFrame]]][source]

Exports either all replicates present in any measurement or the ones specified via ‘species_ids’ or ‘measurement_ids’

Parameters
  • measurement_ids (Union[str, List[str]], optional) – The measurements from which to export the data. Defaults to “all”.

  • species_ids (Union[str, List[str]], optional) – The species from which to export the data. Defaults to “all”.

Returns

The data corresponding to the specified options. The dictionary will still distinguish between meassuremnts.

Return type

Dict[str, Dict[str, Union[tuple, pd.DataFrame]]]

static fromFile(path: str)[source]

Initializes an EnzymeMLDocument from an OMEX container.”

Parameters

path (Path) – Path to the OMEX container.

Returns

The intialized EnzymeML document.

Return type

EnzymeMLDocument

classmethod fromJSON(json_string: str)[source]
classmethod fromTemplate(path: str)[source]

Reads an EnzymeML spreadsheet template to an EnzymeMLDocument object.

Parameters

path (str) – Path to the EnzymeML spreadsheet template.

Returns

Resulting EnzymeML document.

Return type

EnzymeMLDocument

generateInitialValueTemplate(dir: str = '.') None[source]

Generates an initial value template as a YAML file, which can be used for modeling.

Parameters

dir (str, optional) – Dirpath to the output file. Defaults to “.”.

getAny(id: str) pyenzyme.enzymeml.core.abstract_classes.AbstractSpecies[source]

Returns anything associated with the given ID.

Parameters

id (str) – Unique internal ID of the object.

Raises

SpeciesNotFoundError – Raised when the requested object is not found.

Returns

The corresponding file object.

Return type

Dict[str, dict]

getCreator()[source]

Deprecated since version Use: the attribute creators instead.

getDoi() Optional[str][source]

Deprecated since version Use: the attribute doi instead.

getFile(id: str, by_id: bool = True) dict[source]

Returns the file associated with the given ID.

Parameters

id (str) – Unique internal ID of the file.

Raises

SpeciesNotFoundError – Raised when the requested file is not found.

Returns

The corresponding file object.

Return type

Dict[str, dict]

getFileDict()[source]

Deprecated since version Use: the attribute file_dict instead.

getFilesList()[source]

Returns a list of all files in the EnzymeML document.”

Returns

List of all files in the EnzymeML document.

Return type

List[dict]

getLevel()[source]

Deprecated since version Use: the attribute level instead.

getMeasurement(id: str) pyenzyme.enzymeml.core.measurement.Measurement[source]

Returns the measurement associated with the given ID.

Parameters

id (str) – Unique internal ID of the measurement.

Raises

SpeciesNotFoundError – Raised when the requested measurement is not found.

Returns

The corresponding measurement object.

Return type

Measurement

getMeasurementDict()[source]

Deprecated since version Use: the attribute measurement_dict instead.

getModified()[source]

Deprecated since version Use: the attribute modified instead.

getName()[source]

Deprecated since version Use: the attribute name instead.

getProtein(id: str) pyenzyme.enzymeml.core.protein.Protein[source]

Returns the protein associated with the given ID.

Parameters

id (str) – Unique internal ID of the protein.

Raises

SpeciesNotFoundError – Raised when the requested protein is not found.

Returns

The corresponding protein object.

Return type

Protein

getProteinDict()[source]

Deprecated since version Use: the attribute protein_dict instead.

getProteinList() List[pyenzyme.enzymeml.core.protein.Protein][source]

Returns a list of all proteins in the EnzymeML document.”

Returns

List of all proteins in the EnzymeML document.

Return type

List[Protein]

getPubmedID() Optional[str][source]

Deprecated since version Use: the attribute pubmedid instead.

getReactant(id: str) pyenzyme.enzymeml.core.reactant.Reactant[source]

Returns the reactant associated with the given ID.

Parameters

id (str) – Unique internal ID of the reactant.

Raises

SpeciesNotFoundError – Raised when the requested reactant is not found.

Returns

The corresponding reactant object.

Return type

Reactant

getReactantDict()[source]

Deprecated since version Use: the attribute reactant_dict instead.

getReactantList() List[pyenzyme.enzymeml.core.reactant.Reactant][source]

Returns a list of all reactants in the EnzymeML document.”

Returns

List of all reactants in the EnzymeML document.

Return type

List[Reactant]

getReaction(id: str) pyenzyme.enzymeml.core.enzymereaction.EnzymeReaction[source]

Returns the reaction associated with the given ID.

Parameters

id (str) – Unique internal ID of the reaction.

Raises

SpeciesNotFoundError – Raised when the requested reaction is not found.

Returns

The corresponding reaction object.

Return type

EnzymeReaction

getReactionDict()[source]

Deprecated since version Use: the attribute reaction_dict instead.

getReactionList() List[pyenzyme.enzymeml.core.enzymereaction.EnzymeReaction][source]

Returns a list of all reactions in the EnzymeML document.”

Returns

List of all reactions in the EnzymeML document.

Return type

List[EnzymeReaction]

getSpeciesIDs() List[str][source]
getUnitDef(id: str) pyenzyme.enzymeml.core.unitdef.UnitDef[source]

Returns the unit associated with the given ID.

Parameters

id (str) – Unique internal ID of the unit.

Raises

SpeciesNotFoundError – Raised when the requested unit is not found.

Returns

The corresponding unit object.

Return type

UnitDef

getUnitDict()[source]

Deprecated since version Use: the attribute unit_dict instead.

getUnitString(unit_id: Optional[str]) str[source]

Return the unit name corresponding to the given unit ID.

Parameters

unit_id (str) – Unique internal ID of the unit.

Raises

SpeciesNotFoundError – Raised when the requested unit is not found.

Returns

String representation of the unit.

Return type

str

getUrl() Optional[str][source]

Deprecated since version Use: the attribute url instead.

getVersion()[source]

Deprecated since version Use: the attribute version instead.

getVessel(id: str) pyenzyme.enzymeml.core.vessel.Vessel[source]

Returns the vessel associated with the given ID.

Parameters

id (str) – Unique internal ID of the vessel.

Raises

SpeciesNotFoundError – Raised when the requested vessel is not found.

Returns

The corresponding unit object.

Return type

Vessel

get_created()[source]

Deprecated since version Use: the attribute created instead.

static in_ipynb()[source]

Checks whether in an ipynb or not

printDocument(measurements: bool = False, units: bool = False, stdout: bool = True) Optional[str][source]

Prints the document’s content

printMeasurements(stdout: bool = True)[source]

Prints an overview of all measurements

printReactionSchemes(by_name: bool = True)[source]

Prints all reaction equations to inspect the content

validator start_logger  »  log[source]

Starts a logger instance for the document

toDataFrame(measurement_ids: List[str] = ['all'], use_names: bool = False) pandas.core.frame.DataFrame[source]

Transforms exported measurement data to a single DataFrame

Parameters
  • measurement_ids (List[str], optional) – Measurements to include or all of them. Defaults to [“all”].

  • use_names (bool, optional) – Wether names or IDs should be used. Defaults to False.

Returns

Transformed measurement data.

Return type

pd.DataFrame

toFile(path: str, name: Optional[str] = None)[source]

Saves an EnzymeML document to an OMEX container at the specified path

Parameters
  • path (Path) – Path where the document should be saved.

  • verbose (PositiveInt, optional) – Level of verbosity, in order to print a message and the resulting path. Defaults to 1.

toXMLString()[source]

Generates an EnzymeML XML string

unifyMeasurementUnits(kind: str, scale: int, measurement_ids: Union[str, List[str]] = 'all') None[source]

Rescales and unifies the units of either all measurements or those that are provided to the given kind and scale.

Parameters
  • kind (str) – The unit kind from which to rescale. Currently supported: ‘mole’, ‘gram’, ‘litre’.

  • scale (int) – Decade scale to which the values will be rescaled.

  • measurement_ids (Union[str, List[str]], optional) – Measurements that will be rescaled. Defaults to “all”.

uploadToDataverse(dataverse_name: str, base_url: Optional[str] = None, api_token: Optional[str] = None)[source]

Uploads an EnzymeML document to a Dataverse installation of choice.

It should be noted, that the environment variables ‘DATAVERSE_URL’ and ‘DATAVERSE_API_TOKEN’ should be given approriately before the upload. If not, tje upload cant be done.

Parameters
  • dataverse_name (str) – Name of the dataverse to upload the EnzymeML document. You can find the name in the link of your dataverse (e.g. https://dataverse.installation/dataverse/{dataverseName})

  • base_url (str) – Base URL of the dataverse to upload. Defaults to None. If None the URL will be drawn from env vars.

  • api_token (str) – API Token of the dataverse to upload. Defaults to None. If None the API Token will be drawn from env vars.

validate(yaml_path: str) Tuple[Dict, bool][source]

Validates an EnzymeML based on a given YAML file.

The YAML file should be compliant with PyEnzymes template found on Github or generated via the EnzymeMLValidator instance. Ultimately, it can also be derived from a spreadsheet template, which can also be generated via the EnzymeMLValidator instance.

Parameters

yaml_path (str) – Path to the Validation YAML file

Returns

Report on which fields are incompatible Bool: Whether or not the document is valid to the given YAML

Return type

Dict

visualize(measurement_ids: List[str] = ['all'], interactive: bool = False, use_names: bool = False, sharey: bool = True, col_wrap: int = 4, trendline: bool = False, width: int = 1000, height: int = 500, hovermode: str = 'closest', **kwargs)[source]

Visualizes either all or selected measurements found in the EnzymeML document as FacetGrid or interactive.

In order to use this method correctly, make sure to pass nothing to ‘measurement_ids’ when all meassurements should be visualised. Otherwise pass a list or string for multiple or single measurements respectively.

Parameters
  • measurement_ids (List[str], optional) – List of measurements that should be plotted or all. Defaults to [“all”].

  • interactive (bool, optional) – [description]. Whether to return an interatcive or static plot. Defaults to to False.

  • use_names (bool, optional) – Whether names or IDs should be used. Defaults to False.

  • sharey (bool, optional) – Whether all plots in FacetGrid should share the y-axis. Defaults to True.

  • col_wrap (int, optional) – Specifies in FacetGrid at which number of cols to create a new row. Defaults to 4.

  • trendline (bool, optional) – Whether the plot should include a trendline. Defaults to False.

  • width (int, optional) – Interactive plot width. Defaults to 1000.

  • height (int, optional) – Interactive plot height. Defaults to 500.

  • hovermode (str, optional) – Changes behaviour of hovering. Following options are available [‘closest’, ‘x unified’, ‘x’, ‘y’, ‘y unified’]. Defaults to ‘closest’.

Returns

[description]

Return type

[type]