You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now in the source code of SimulationResult.all() the species names are given by
sp_names = ['__s%d' % i for i in range(len(self._model.species))]
(link), which then propagates to SimulationResult.dataframe() as column names. Would it be possible to incorporate more informative species names here, like Component name?
The text was updated successfully, but these errors were encountered:
Hi, thanks for your suggestion. Our original reason for choosing species names like __s1 was for ease of reference. Species can be large complexes of molecules, which would mean their names could run into hundreds of characters, which is not ideal for referencing individual species. That said, I get that there are times when it would be useful to have more meaningful species names, so maybe some kind of user-selected naming option would work. In the meantime, here's how you can achieve what you describe manually:
# Run your simulation, e.g. res = ScipyOdeSimulator(model, ...), then:new_names=list(res.all.dtype.names)
new_names[:len(model.species)] = [str(s) forsinmodel.species]
res.all.dtype.names=new_names
Thank you for the clarification and example! I did not realize the problem with large complexes, and now that design totally makes sense.
I suggest we add this example to the tutorial in the documentation (link) and then close this issue. User-selected naming option doesn't seem to be urgent or essential.
I'm using version 1.9.0
Right now in the source code of SimulationResult.all() the species names are given by
sp_names = ['__s%d' % i for i in range(len(self._model.species))]
(link), which then propagates to SimulationResult.dataframe() as column names. Would it be possible to incorporate more informative species names here, like Component name?
The text was updated successfully, but these errors were encountered: