Porthmeus / MeMoMe

Metabolic Model Merging - a semiautomated way to merge genome scale metabolic models
Apache License 2.0
0 stars 0 forks source link

Behavior of met.getAnnotationString() #23

Closed Unaimend closed 1 year ago

Unaimend commented 1 year ago

The code at https://github.com/Porthmeus/MeMoMe/blob/7aaf56576e9ccd43dca96ba8dc7702b350f44035/src/parseMetaboliteInfoFromSBML.py#L36-L42

specifically, line 40. What is that supposed to do?

Because for whatever reason the function met.getAnnitationString() returns a list with an empty string i.e. [""] when no annotation source is present. Thus we run into len(urls) >0. I suppose that is not the wanted behavior.

To reproduce load M2_bacter.. and set a breakpoint at L42 in the aforementioned file or look the content of urls for the first metab.

Porthmeus commented 1 year ago

Probably put a simple if url != "" somewhere in the code to circumvent unwanted behavior. However, we want to extract all metabolites in that list, which are also in the model. Thus it makes sense to keep them in the list, even if there is no annotation for in the model. It would be probably better to replace "" with None-type though.

Porthmeus commented 1 year ago

No issue anymore since #41