-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rxnGeneMat is consistent with standardized grRules for all cases
- Loading branch information
1 parent
a24209e
commit 8d6a909
Showing
2 changed files
with
43 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
8d6a909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IVANDOMENZAIN I'm not sure what findLogicalErrors exactly does (the comment is not correct). I have a model that gives errors, but I'm not sure why.
8d6a909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edkerk, I rechecked it now and it is not properly commented. This function shows an error when it finds the pattern
) and (
in a given grRule. After discussing it with @BenjaSanchez we decided to display an error because the presence of this pattern may lead to ambiguous or wrong grRules. It may be present on the rule for indicating either a complex of complexes (in this case internal brackets are redundant) or a complex of isoenzymes which would be a complicated case and it would require a manual revision by the user/modeller.But thanks for pointing this out, it should be modified, either by giving a much more descriptive error, or a warning instead because the function is now called by some others in the RAVEN toolbox. We want to give the user the chance to analyze this manually for avoiding weird modifications to the grRule by the standardization algorithm, do you have any suggestion?
8d6a909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then it will always give an error if there is an
and
relationship, and you can never run any function that includesstandardizeGrRules
if your model has complexes? That seems counter productive...First, I thought that your approach of making a logical structure was purposely written for being able to deal with
and
relationships? Please clarify this, otherwise it's unclear to me what's the novelty?Now I'm not 100% certain anymore on what the point of this function is, but if it always gives error messages when there is an
and
relationship, maybe the function should have a silent option. Users should be motivated to first run standardizeGrRules stand-alone on their model, to make sure that it complies. When doing this, you'd want to throw useful output, perhaps also instructions on what should be checked if an 'error' occurs. Then, when standardizeGrRules is run as part of other functions it should maybe be silent and not complain aboutand
relationship, but rather assume that those have been fixed already?8d6a909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of the function is to standardize the strings of the grRules avoiding unbalanced and redundant brackets and the mixture of upper and lowercase characters in the
and
&or
that may cause problems with other functions or toolboxes that use this field as an input (such as GECKO). We had this idea because after having dealt with different models constructed by different people, I've found different errors, different formats, unbalanced brackets and ambiguity in the field grRules.Regarding its functioning, it does not give an error when it simply finds the pattern "
and
" (any complex) rather it does this when it finds the pattern ") and (
" this is a potential sign of error and the only justified reason for this would be the presence of a complex of isoenzymes, which due to its complexity would require some manual revision to be sure that the grRule is properly representing the gene association.The function is able to deal with complexes and even with complexes of isoenzymes "
((G1 or G2) and (G2 or G3))
" that are present in several models, however I thought that these require further attention because they are rare cases, so that's the reason of the error display. But I agree and the current state is unpractical for RAVEN. I will incorporate your suggestion of the silent option and block it when it is called from other internal functions and also to give useful and descriptive error or warning output when the option is on. Thanks for the feedback!8d6a909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8d6a909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IVANDOMENZAIN Thanks for the clarification, the confusion was about the difference of
and
and) and (
.At the same time, making it completely silent might not be preferred, because maybe the user hasn't run standardizeGrRules on their model before, stand-alone. So what about the following:
) and (
relationships, make it give an output like") and (" relationships are found in the model. Ensure that these are correct by running standardizeGrRules. If ") and (" relationships in grRules have been curated, then please ignore this message
.A problem with that approach would be if standardizeGrRules is repeatedly run, as the functions it contains might be repeatedly run as part of some other function (some reconstruction pipeline?).
Please let me know your thoughts :)
8d6a909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edkerk, that's a good solution. Ideally the function should be called just once in any reconstruction (this can be included as a suggestion in the header comments), however in RAVEN it may not be the case cause it was already incorporated in several functions and I'm not sure if it might appear several times in a given pipeline. If the output message is given as a final warning instead of as an error or a simple message then the problem is not so bad, if the user has already checked the pointed grRules manually the it would be a matter of ignoring the warning every time it shows up again.