EnzymeML / PyEnzyme

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

`exportMeasurementData` cannot export both proteins and reactants #28

Closed fbergmann closed 2 years ago

fbergmann commented 2 years ago

If both reactants and proteins are set to True no data is exported. Because of

                if reactants:
                    measurement_data.update(data["reactants"])
                if proteins:
                    measurement_data.update(data["proteins"])

the dictionary with data set from reactants gets replaced with the data from the proteins. Locally i resolved this with:


                if reactants:
                    measurement_data.update(data["reactants"])
                if proteins:
                    if 'initConc' in measurement_data and 'initConc' in data['proteins']:
                        measurement_data['initConc'] |= data["proteins"]['initConc']
                    else:
                        measurement_data.update(data["proteins"])