LewisLabUCSD / StanDep

Code for StanDep Paper
3 stars 2 forks source link

Issue with getSpecialistEnzymes and getPromEnzymes #16

Closed piyushnanda-sysbio closed 4 years ago

piyushnanda-sysbio commented 4 years ago

Hi,

I am using ihuman (HumanGEM) genome scale metabolic model. When I use getSpecialistEnzymes and getPromEnzymes, I am getting the following error:

`spec = getSpecialistEnzymes(ihuman); Error using cellfun Non-scalar in Uniform output, at index 1, output 1. Set 'UniformOutput' to false.

Error in Node/getFunctionalGeneSets (line 230) pos = cellfun(@str2num, childliterals);

Error in GPRparser (line 21) currentSets = head.getFunctionalGeneSets(model.genes)';

Error in getSpecialistEnzymes (line 16) parsedGPR = GPRparser(model);

` I have created a ihuman.rules field because earlier it was not recognizing the inherent 'grRules' field having the GPR information.

Thank you !

cjos238 commented 4 years ago

@piyushnanda-sysbio I got the iHuman model from here. Is this the correct version? Could you please tell me how you converted ihuman.grRules to ihuman.rules; and also if you changed the model in any other way?

cjos238 commented 4 years ago

@piyushnanda-sysbio were you able to get it working? Please let me know if I can help in any way.

piyushnanda-sysbio commented 4 years ago

Hi Chintan, Yes, I was able to get it working. I manually added the 'rules' field to the HumanGEM model and it worked. Thank you so much for your generosity.

Piyush

chloemccreery commented 3 years ago

Hello,

I am encountering this same problem. Currently, I am using the RECON1 genome-scale metabolic model from this website, and renaming the "grRules" field to "rules" led to the same error. I've pasted the error below — any help or advice on this issue would be greatly appreciated. Thank you so much for your help!


spec = getSpecialistEnzymes(RECON1) Error using cellfun Non-scalar in Uniform output, at index 1, output 1. Set 'UniformOutput' to false.

Error in Node/getFunctionalGeneSets (line 287) pos = cellfun(@str2num, childliterals);

Error in GPRparser (line 31) currentSets = head.getFunctionalGeneSets(model.genes,getCNFSets)';

Error in getSpecialistEnzymes (line 16) parsedGPR = GPRparser(model);

cjos238 commented 3 years ago

@chloemccreery renaming alone won't work. Please see the COBRA toolbox for what the rules and grRules fields are. In general, this is what they should look like: For e.g., say the model has 10 genes: geneA, geneB, geneC, geneD...geneJ and are listed in that order. Now, if grRules field for a reaction is (geneA and geneF) or geneH; then, rules field for the reaction should be (x(1) & x(6)) | x(8). If the model doesn't have rules field, you will have to create it on your own. The newer and updated models often don't have this field. However, COBRA toolbox has a generateRules function, which can help you create it. Please let me know if this helps.

chloemccreery commented 3 years ago

Yes, that solved my problem. Thank you so much for your help and a quick response!