segrelab / comets

Computation of Microbial Ecosystems in Time and Space
19 stars 10 forks source link

Sorting exchange reactions when loading model file #25

Open mquintin opened 4 years ago

mquintin commented 4 years ago

When FBAModel.loadModelFromFile() reads in the line of exchange reaction indexes, it sorts them.

But when the reaction parameter lines ("KM_VALUES", "VMAX_VALUES" etc) are read, they are placed in the same order as in the original file.

So if a model file has the exchange reaction indexes out of order, the kinetic parameters will be mismatched.

(This is a "potential" bug which I haven't actually experienced but my reading of the code for something else makes me suspect it to be the case. Making a note here for myself to write a test case to see if it happens.)

djbajic commented 4 years ago

I think this will be more easily sorted out in the toolboxes (py and matlab), any thoughts?