EnzymeML / PyEnzyme

🧬 - Data management and modeling framework based on EnzymeML.
BSD 2-Clause "Simplified" License
23 stars 9 forks source link

Adapted PySCeS Thin Layer to BaseThinLayer #20

Closed JR-1991 closed 2 years ago

JR-1991 commented 2 years ago

The PySCeS Thin Layer has been adapted to the BaseThinLayer class and utilizes the __init__-method given in the class.

Example usage:

tl = ThinLayerPysces("Path/To/OMEX", "init_file="Path/To/inifile.yaml")
tl.optimize(model_dir="ModelDir")

enzmldoc = tl.write()
enzmldoc.toFile()

This change is Reviewable

fbergmann commented 2 years ago

ideally the same things would apply to the COPASI thin layer as well, could we find a way to have the same methods be present on the base class, so that things just work for every modelling tool?

JR-1991 commented 2 years ago

ideally the same things would apply to the COPASI thin layer as well, could we find a way to have the same methods be present on the base class, so that things just work for every modelling tool?

I agree, that would be great to have a similar structure in the COPASI thin layer. Are you thinking about to adapt the optimization preparation or complete process in terms of methods? Should we implement this into the base class as well?

JR-1991 commented 2 years ago

We should also think about to allow an EnzymeMLDocument object as an alternative input. Currently some tests are failing due to files not found and providing a document object as fixture would help.

fbergmann commented 2 years ago

currently the method you introduced here into the base class write, is in the COPASI TL as def update_enzymeml_doc(self): there i also did not return the enzymeml document in optimize and the update method, as it is available from the class at any point.

And yes, having a constructor that takes an enzyme ml document, instead to always have to read from archive would be a good idea.