Remove C_ from importModel if model is COBRA #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, importModel assumed that if the model is COBRA, the compartment IDs do not start with C_, and therefore use the comparment IDs'as is'.
However, if exportModel is used to generate a COBRA model, compartment IDs are appended with C_. If one would repeatedly import and export COBRA models, it would repeatedly add C_ in front of the compartment IDs, resulting in something like: C_C_C_m
Now, if the model is COBRA, importModel checks whether the compartment ID starts with C_ and, if true, discards the first two characters.