Fix changeGrRules leaving an unparseable grRule when appending onto an empty one - #701
Merged
Merged
Conversation
…n empty one
model.grRules(idx)=strcat('(',model.grRules(idx),') or (',grRules,')')
ran unconditionally, so appending a new isozyme onto a reaction with no
existing grRule produced "() or (new rule)" -- an empty first clause
that grRuleToDNF, isDnfGrRule, standardizeGrRules and expandModel all
fail to parse. rxnGeneMat came out populated correctly regardless, so
the model looked built successfully until something later re-derived
the DNF from the text.
Reactions with an existing rule still get it wrapped and merged with
'or'; a reaction with none gets the new rule directly, mirroring how
change_gene_reaction_rules already guards this case.
Function test results300 tests 274 ✅ 1m 12s ⏱️ Results for commit 6cf3260. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes SysBioChalmers/raven-gecko-parity#12.
model.grRules(idx)=strcat('(',model.grRules(idx),') or (',grRules,')')ranunconditionally, so appending a new isozyme onto a reaction with no existing
grRule produced
() or (new rule)— an empty first clause thatgrRuleToDNF,isDnfGrRule,standardizeGrRulesandexpandModelall failto parse.
rxnGeneMatcame out populated correctly regardless, so the modellooked built successfully until something later re-derived the DNF from the
text.
Reactions with an existing rule still get it wrapped and merged with
or; areaction with none gets the new rule directly, mirroring how raven-toolbox's
change_gene_reaction_rulesalready guards this case.