zhanglab / psamm

Curation and analysis of metabolic models
https://zhanglab.github.io/psamm/
GNU General Public License v3.0
34 stars 15 forks source link

Expand ModelEntry with id override and setters #248

Closed jonls closed 7 years ago

jonls commented 7 years ago

Previously, the ID of a model entry could not be modified (by design) even on mutable entries such as DictCompoundEntry, DictReactionEntry. However, this made it difficult to translate model IDs when this was desired (for example, for removing ID prefixes in SBML models). An ID override parameter is added to the constructor so that a new entry can be created from an existing entry but with a different ID.

Additionally some setters are added to the mutable entries to make modifications easier. Documentation of the mutability and rules for ID are expanded.