pyenzyme.enzymeml.tools.enzymemlwriter module#
- class pyenzyme.enzymeml.tools.enzymemlwriter.EnzymeMLWriter[source]#
Bases:
object
- appendInitConcData(measurement_annot: XMLNode, measurement_data_dict: Dict[str, MeasurementData], species_type: str)[source]#
Adds individual intial concentration data to the enzymeml:measurement annotation.
- Parameters
measurement_annot (XMLNode) – The SBML XMLNode for the measurement annotation.
measurement_data_dict (Dict[str, MeasurementData]) – The EnzymeMLDocument measurement data.
species_type (str) – The type of species in the measurement_data_dict.
- appendReplicateData(species: Dict[str, MeasurementData], format_annot: XMLNode, data_columns: Dict[str, List[float]]) Dict[str, List[float]] [source]#
Extracts all time course data from the replicate objects and adds them to the the enzymeml:format annotation.
- Parameters
species (Dict[str, MeasurementData]) – Reactant/Protein measurement data.
format_annot (XMLNode) – The SBML XMLNode representing the format annotation.
- Returns
The time course data from the replicate objects.
- Return type
List[List[float]]
- convertEnzymeMLToSBML(model: Model, enzmldoc)[source]#
Manages the conversion of EnzymeML to SBML.
- Parameters
model (libsbml.Model) – The blank SBML model, where the EnzymeML document is converted to.
enzmldoc (EnzymeMLDocument) – The EnzymeML document to be converted.
- toFile(enzmldoc, path: str, name: Optional[str] = None)[source]#
Writes EnzymeMLDocument object to an .omex container
- Parameters
enzmldoc (String) – Previously created instance of an EnzymeML document
path (String) – EnzymeML file is written to this destination
name (String) – Name of the target EnzymeML file. Defaults to ‘None’ and thus uses the doc name.
- toSBML(enzmldoc)[source]#
Returns libSBML model.
- Parameters
enzmldoc (EnzymeMLDocument) – Previously created instance of an EnzymeML document
- toXMLString(enzmldoc)[source]#
Converts EnzymeMLDocument to XML string.
- Parameters
enzmldoc (EnzymeMLDocument) – Previously created instance of an EnzymeML document
- writeElements(reaction_elements: List[ReactionElement], createFunction: Callable)[source]#
Writes SpeciesReference elements to the SBML document.
- Parameters
reaction_elements (List[ReactionElement]) – List of reaction elements containing information on stoichiometry, species_id and ontology.
createFunction (Callable) – Function that creates either an educt, product or modifier list to the SBML document.
- writeMeasurementData(measurement: Measurement, measurement_annot: XMLNode, format_annot: XMLNode, data_columns: Dict[str, List[float]]) None [source]#
Writes measurement metadata as columns to the SBML document annotation enzymeml:column.
- Parameters
measurement (Measurement) – EnzymeML measurement that is written to SBML.
measurement_annot (XMLNode) – The SBML XMLNode the measurement metadata is written to.
format_annot (XMLNode) – The SBML XMLNode the column information is written to.
- Returns
The time course data from the replicate objects.
- Return type
List[List[float]]
- writeReplicateData(replicate: Replicate, format_annot: XMLNode) None [source]#
Writes column information to the enzymeml:format annotation.
- Parameters
replicate (Replicate) – Replicate holding the time course data.
format_annot (XMLNode) – The enzymeml:format annotation node.
- writeTimeData(measurement: Measurement, format_annot: XMLNode, data_columns: dict)[source]#