small bug in extractGPRs subfunction of createTissueSpecificModel #4
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.
The function [parsedGPR,corrRxn] = extractGPRs(model) is buggy, as it does not check whether the last row only contains empty cells.
To showcase what spurious results this leads to, with my model, corrRxn was a 7160x1 cell array with the final 2 entries being 'URIt5le' , 'URIt5le'. parsedGPR was a 7160x45 cell with the last entry row containing only empty cells and the row just before it containing the cell '64078.1'. (Note that the GPR for the reaction 'URIt5le' is (64078.1).)
Now, the truth is that I was only interested in using the extractGPRs function (which I had copied into a new file to be able to use it) and not the createTissueSpecificModel function. Thus, I am not too sure, if by fixing this bug, other bugs in createTissueSpecificModel could show up. I did successfully run the unit test (testTissueModel), but as it is really minimal and only checks if a model with less reactions than the original is returned, I am not too confident about it.