-
Notifications
You must be signed in to change notification settings - Fork 54
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: disable adding prefix M_, R_, C_ and G_ in exportModel function #360
Conversation
(cherry picked from commit 202087d)
As discussed in #353, this commit introduce regular expressions for checking whether the IDs are in compliance with libSBML specification.
- Enable throwing errors when running `checkModelStruct` in `exportModel` - Provide informative error message when reporting invalid ids
Line 118-132 should be removed, no longer required as invalid IDs would already have thrown an error. Lines 118 to 132 in a459d6c
|
agree |
@edkerk this got me thinking - are invalid reported throwing errors for all import formats, including |
@mihai-sysbio What I meant is that |
Should not be merged before #364 is merged and pushed from |
Resolving the conflict and the merging of #364 brings this PR in a merge-able state.
I guess we then expect one more PR that releases |
I'm still hesitant with this, as it can break backwards compatibility with people's scripts. It changes the identifier representation (e.g. edit: I moved my further discussion to issue #353. |
I tried to test this PR with the iAL1006 model from |
Good catch @simas232.
To me, this sounds very much like a problem with the GEMs themselves not being SBML-compatible. The main question who's responsibility it is to address it. I could imagine a version of the tutorial that starts with a Colab notebook with |
This PR has been automatically tested with GH Actions. Here is the output of the tests: > Installation type Advanced (via git)
|
in all genes
# Conflicts: # doc/core/checkModelStruct.html # doc/io/importModel.html # io/importModel.m
This has been a long time in the works, great job @edkerk ! |
Main improvements in this PR:
Duplicate of #356, reverting the revert by #359 :) (see explanation there).
The changes made in PR are based on the discussion and consensus in #353
checkModelStruct
checks if any metabolite, reaction, gene or compartment identifier starts with a digit, and provides instructions on how to proceed.exportModel
no longer addsM_
,R_
,G_
, andC_
to metabolite, reaction, gene and compartment identifiers by default. The option still exists, by setting theCOBRAstyle
flag astrue
.importModel
no longer removesM_
,R_
,G_
, andC_
to metabolite, reaction, gene and compartment identifiers by default. The option still exists, by setting theCOBRAstyle
flag astrue
. A warning is thrown if it appears that the model is of COBRA style butCOBRAstyle
was not set astrue
.exportForGit
also has newCOBRAstyle
flag.dispEM
wraps warnings text into command window.readYAMLmodel
correct parsing ofec.rxnEnzMat
if last row is empty.checkModelStruct
only warns about irreversible reactions if bounds indicate reversibility, and not the other way around.I hereby confirm that I have:
devel
as a target branch