Skip to content

Commit 820cc5c

Browse files
authored
feat: checkModelStruct grRules start/end w/ and/or (#591)
1 parent 3c92bf2 commit 820cc5c

6 files changed

Lines changed: 1038 additions & 1029 deletions

File tree

core/checkModelStruct.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ function checkModelStruct(model,throwErrors,trimWarnings)
124124
EM='If "grRules" field exists, the model should also contain a "genes" field';
125125
dispEM(EM,throwErrors);
126126
else
127+
%Erroneous grRules that start/end with OR/AND
128+
EM='The following reaction(s) have grRules that start or end with ''OR'' or ''AND'':';
129+
dispEM(EM,throwErrors,model.rxns(startsWith(model.grRules,{'or ','and '}) | endsWith(model.grRules,{' or',' and'})),trimWarnings);
130+
%grRules that are not in genes field
127131
geneList = getGenesFromGrRules(model.grRules);
128132
geneList = setdiff(unique(geneList),model.genes);
129133
if ~isempty(geneList)

0 commit comments

Comments
 (0)