cobratoolbox
cobratoolbox copied to clipboard
verifyModel report an error
- verifyModel reports an error when I run:results = verifyModel(model_original,'simpleCheck',true,'restrictToFields',{'rules'}) error as below:
Undefined unary operator '~' for input arguments of type 'string'.
Error in checkPresentFields (line 93)
if ~propertiesMatched
Error in verifyModel (line 116)
results = checkPresentFields(requiredFields,model,results);
This is caused by the matlab read csv file when there contains "
, it would also read the "
, even though this is for separate cells.
Therefore, it reads the COBRA_structure_fields.csv
as "iscell(x) && all(cellfun(@(y) ischar(y) && verifyRuleSyntax(y) , x))"
for rules
, which cannot be used for the function eval
.
The issue is tested on latest cobra version with matlab2019b and matlab2017b. The issue only happens in matlab2019b.
I hereby confirm that I have:
- [x] Tried to solve the issue on my own
- [x] Retried to run my code with the latest version of The COBRA Toolbox
- [x] Checked that a similar issue has not already been opened