WalhoutLab / MERGE

A new computational pipeline that can be used to convert expression (RNA-seq) data into predicted flux potentials that indicate metabolic function
MIT License
1 stars 0 forks source link

Issue in MolMass #2

Closed kamoors closed 2 years ago

kamoors commented 2 years ago

Hi, again!

Another issue popped up that I cannot understand. As always, I try to fix these myself in the functions, but here I am a bit lost with what is happening. Any help will be appreciated!


Error using eval
Unrecognized function or variable 'X'.

Error in MolMass (line 159)
         substance_mass(ei) = eval(substance_char(ei).first);

Error in IMATplusplus (line 423)
        FluxDistribution(strcmp(worm.rxns,{'EXC0051'})) * MolMass(model.metFormulas{strcmp(model.mets,'protein_BAC[e]')})+...

Error in iMAT_Plus (line 73)
    = IMATplusplus(model,epsilon_f,epsilon_r, ExpCateg, modelType);

I could not find anywhere a mention to 'X', so I assume it is some sort of string that is ''created'' within the function. Any ideas?

kamoors commented 2 years ago

Just for more info, I am using the iCEL1314 model but with our own trancriptomics values. I created the categories with makeGeneCategories.m, and generated the epsilon values myself (with the function). And where it throws most errors is at the ''%% Run the integration function'' part

XuhangLi commented 2 years ago

Hi,

My apologies that you encountered an error again. This bug is not quite expected. It looks that in the model, the chemical formula of 'protein_BAC[e]' is not defined (so its formula is 'X'). I am wondering if you loaded a wrong version of the iCEL model - we know in some versions, we put 'X' as the formula for artificial metabolites like 'protein_BAC[e]'. For integration, we should use the model file 'input/iCEL1314.mat'.

For a test of the model, please see what you get with model.metFormulas(strcmp(model.mets,'protein_BAC[e]')) here is what it should be: ans =

1×1 cell array

{'C4.793H7.694N1.3704O1.3964S0.0459'}

Please let me know what happens. Thanks,

XuhangLi commented 2 years ago

Just for more info, I am using the iCEL1314 model but with our own trancriptomics values. I created the categories with makeGeneCategories.m, and generated the epsilon values myself (with the function). And where it throws most errors is at the ''%% Run the integration function'' part

yes, that makes sense. Please don't hesitate to share problems you encounter. It would be sad for us if others cannot use the tool. So we will try to help. Your feedback will be valuable.

kamoors commented 2 years ago

Thank you for helping! And I am going through the whole process now, so I will notify you of any additional errors I encounter. When I run model.metFormulas(strcmp(model.mets,'protein_BAC[e]'))

I do get 'X'.

I am using the model version obtained from the iCEL1314 authors' website, interesting... So I guess I should use the version on your git.

I will comment if it works!

kamoors commented 2 years ago

Yes! Using the input model you provide solves the issue. Maybe you could make a not that it's not the same as the one provided by the authors (I assume you made changes, then..)

XuhangLi commented 2 years ago

Yes! Using the input model you provide solves the issue. Maybe you could make a not that it's not the same as the one provided by the authors (I assume you made changes, then..)

I am glad it helps! You are correct - we need to make the a note on this. The model is modified a little for the annotation fields (such as the formula of metabolites)

Thanks for helping us discover this!