-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: inter-OS issues #96
Comments
@BenjaSanchez |
update: PR #117 modifies |
@BenjaSanchez |
@tpfau I only have windows-generated If you want to do further analysis, the |
I can reproduce this issue on win (00X) vs linux (0X) |
@tpfau thanks for spotting that exception. I have updated |
I would suggest to use if length(regexp(inline,'[0-9]e-?00[0-9]')) == 1 && length(regexp(inline,'e-?00')) == 1
inline = regexprep(inline,'(?<=[0-9]e-?)00(?=[0-9])','0');
end You could even check for the stoichiometry tag, to ensure, that this really only happens with stoichiometries (and thereby skipping the first regexp checks): inline = regexprep(inline,'(?<=stoichiometry="[0-9]+(\.[0-9]+)?e-?)00(?=[0-9])','0'); |
@tpfau thanks for the nice improvement! I have included your first option (minus the second check as it became unnecessary): It might happen in the future that also lower bounds or other properties are introduced in scientific format, so good to prevent those as well. Hopefully we can revert all of this once SBML looks more into it :) |
Description of the issue:
When switching between MAC and Windows machines to save the model, stoichiometric coefficients that use scientific notation are stored differently in the
.xml
file: MAC stores them as, e.g.,6e-05
, but Windows stores them as6e-005
. This creates unnecesary changes in the.xml
file when diffing (example here), eventhough the.txt
file (and now also the.yml
file) remain the same. We could adaptsaveYeastModel()
to fix this after callingwriteCbModel()
, but maybe there is a better way... @tpfau do you know if this is due to COBRA toolbox or libSBML? As the.txt
file remains the same I would think it's due to the latter. Would there be in either case an easy fix?Example:
Trying an IO cycle in Windows and MAC:
I hereby confirm that I have:
master
branch of the repositoryThe text was updated successfully, but these errors were encountered: