Open Hemant27031999 opened 4 years ago
Yes, this is a known problem with the annotations. The main problem is that the storage of the annotations is much to restrictive in cobrapy at the moment (this comes mainly from the JSON model exchange format which only allows simple list of annotation terms). The issue is discussed in https://github.com/opencobra/cobrapy/issues/684. We basically need a much richer internal annotation format in cobrapy which supports all the relationships.
Problem Description
If we read a SBML model, from the corresponding XML file and write it back, then, if the annotation field of some component had more than one relation elements like "is" and "hasTaxon", they are lost and only one relation element exists in the newly written model, with all resources listed under it.
Code Sample
I took the e_coli_core.xml model present inside the data directory, read it using
and when I wrote it back using,
the annotation format changed as follows :
Annotation in the actual model :
Annotation after writing the model :
Expected output :
The resources listed under different relational elements should not have changed. They should be like in the actual format.
Output of
python -c "from cobra import show_versions; show_versions()"
: