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

Extracted model reactions #3

Closed kamoors closed 2 years ago

kamoors commented 2 years ago

Hi!

Still working with your iMAT++ extraction algorithm, and a question arose - can I somehow use the MILP values to constrain a 'regular' iCEL1314 model?

I am currently working with a merged worm-bacterium model, and I would need to test different conditions (thus the iMAT++), but I don't know how (or even if) I can use the output of iMAT++ on my merged model.

The output has many more entries in ub and lb (and not exactly double, went from 2230 to 5571), so I'm not sure how to get the reaction-specific constraints..

Thank you in advance!

XuhangLi commented 2 years ago

Hi,

Thanks for your interest again!

This is an interesting question. The short answer is yes, you will be able to use iMAT++ on any custom model. The question remains 'how'. I am not sure what you mean by 'use the MILP value to constrain a model', supposing you are not writing a custom 'iMAT++' function.

if you use our iMATplusplus function for the flux fitting as well as the FVA function for network reconstruction, you should be ready to go with your merged model. I would recommend first trying to run with the 'regular C. elegans model' option (modelType = 2) and see if the program can finish (i.e., using your merged model as input). If it gives you error, you can shift to modelType=3 that is for general COBRA models.

By merged model, I would suppose you will have both worm genes and bacterial genes in the same model, you will want to make sure the gene IDs are unique and worm gene IDs are matched with the gene IDs in your input expression profiles.

Since I didn't see the necessity of running iMAT++ separately on the worm model, maybe you don't need to worry about the expansion of reaction entries?

please let me know if this makes sense!

Thanks!

kamoors commented 2 years ago

What I did was run the iMat++ with 3 x n RNA-seq results (from n treatments). I was wondering if I can somehow use directly the ouput of this extraction (like lb and ub values) to directly constraint my 3 x n models without re-running tje iMat++ algorithm.

e.g.

1) get ub and lb values for each sample 2) apply the ub and lb values to the (single) merged model (yes, one combined model with worm and bacterial rxn IDs, where the exchange reactions feed into a common compartment: met_e <-> met_common <-> []) 3) run FBA 4) repeat this for the number of samples (3 x n)

Is this possible? Or can I only run FVA?

XuhangLi commented 2 years ago

I see. I think it should be doable, but the complexity of this depends on what constriants you would like to transfer to your merged model.

if you want to transfer the FVA results (i.e., outputs from 'FVA_MILP' function), it is straightforward. As you see in the tutorial, each of your sample will have a set of FVA result (a pair of ub and lb). You will just want to use them as the ub and lb for the same reactions in your merged model. This operation also applies to the reaction status - in the walkthrough section 'Step 3: generate reaction status for FPA (level tables)', we parsed FVA boundaries to qualitative assignments of the flux status of each reaction (not carry flux, carry flux, etc). You can constrain your merged model with these parsed levels, i.e., block all reactions that are in the status of "not carry flux in SLNS". After constraining the worm reactions in the merged model, you can run FBA analysis accordingly. You will do this constraining process sample by sample, since each sample will give you a set of FVA result.

The OFD values can also be transfered, while probably will be less meaningful for downstream FBA analysis.

The complicated case is you want to constrain your merged model with the MILP constriants that serve as internal constraints of iMAT++ and FVA calculation. To this end, you will need to engineer the function, and undertsand the intermediate variables. I don't recommend doing this. However, if you want to do some FBA under the MILP constriants on your merged model, the best way is to run the iMATplusplus again using your merged model and expression profiles as the inputs. The function will return you a variable called 'MILP' - that is the fully MILP constrained merged model for you to perform any downstream modeling. Since iMAT++ without FVA is fast, I think it would be reasonable to rerun with merged model.

Hope this would help!

Hang

kamoors commented 2 years ago

Thanks, I was thinking to use some sort of blocked/not blocked boolean as the constraint, so that is a great suggestions! Thank you very much :)

And I really don't want to run iMAT++ again on the merged model, because it is the original iCEL1314 model that is merged.. so I would have to redo that as well..

Thank you very much!

Karlis

XuhangLi commented 2 years ago

cool!

PS. for the model issues, in fact, it is easy to work around. You can either (1) override the formulas of all metabolites with the formulas in the Github model version, or (2) use the modelType=3 to omit the calculation of bacteria waste (so you will get rid of the bug with formulas).

Good luck!