Hi all,
I am using CobraToolbox on MAC OS and gurobi. I tried to use the command 'singleGeneDeletion(model, 'FBA')', but I had the following error message :
>>[grRatio, grRateKO, grRateWT, hasEffect, delRxns, fluxSolution] = singleGeneDeletion(model1, 'FBA')
Single gene deletion analysis in progress ...
1% [ ]Error using deleteModelGenes (line 86)
Error: This statement is incomplete.
Error in singleGeneDeletion (line 137)
[modelDel,hasEffect(i),constrRxnNames] = deleteModelGenes(model,geneList{i});
Then. I tried to look for when the function stopped to work using :
>>i = 1;
for i = 1:length(model.genes)
disp(i)
[grRatio, grRateKO, grRateWT, hasEffect, delRxns, fluxSolution] = singleGeneDeletion(model1, 'FBA', model1.genes(i));
end
I found that the function stopped working at model1.genes(11). I looked at the genes associated with this using :
>>model1.genes(11)
ans =
1×1 cell array
{'149227'}
Then, I looked at the grRules and .rules field using :
Index = strfind(model1.genes, '149227');
find(not(cellfun('isempty',Index)))
Index = find(contains(model1.rules,'x(11)'));
Index
model1.rules(Index)
Index = strfind(model1.grRules, '149227');
Index = find(not(cellfun('isempty',Index)))
model1.grRules(Index)
I don't understand why the function stop working at model1.genes(11). This gene has a model1.grRules field = {'(149227)'} and a model1.rules field = {'( x(11) )'}. All .grRules and .rules field have parenthesis, but .genes field has no parenthesis. I ran the command 'generateRules(model1)' before running singleGeneDeletion() so all rules should be ok. Would anyone know what I should do so that the singleGeneDeletion() function work?
Thanks,
Michel