Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N/A from MIP but value from MRO. #22

Open
BurchamLab opened this issue Jun 7, 2021 · 17 comments
Open

N/A from MIP but value from MRO. #22

BurchamLab opened this issue Jun 7, 2021 · 17 comments

Comments

@BurchamLab
Copy link

Hello,

I am running smetana global on models with '--flavor cobra' and '--molweight'. I am getting values for MRO but my MIP values are only coming back as N/A. Is this normal and interpreted that the solver could not determine if any cooperative interactions take place?

Thank you

@cdanielmachado
Copy link
Owner

Hello,

This means that something in the simulation failed. If there were no possible interactions the value would be 0 and not NA.

It is hard to debug this without further details. Does it happen for some communities? All communities? Are you specifying a growth medium ?

@BurchamLab
Copy link
Author

I am giving it communities of co-occuring pairs. It gives n/a for about half my communities. I do not specify a growth medium. This is my command:

smetana *.xml -c size_2_part_1.tsv -g -v --flavor cobra --molweight -o out

@BurchamLab
Copy link
Author

I can send a 2 model community if that helps.

@lklaksvik
Copy link

lklaksvik commented Jun 24, 2021

Hi,

I am experiencing the same issue. I am running communities of 2 species with specified growth media and --solver gurobi. MIP comes out as n/a for 63/66 communities. In one case it reutrns a MIP value but not MRO. It fails to find a valid solution for MRO for about half of the communities. Everything seems to work fine in --detailed mode.

I have also tried running with --molweight. It then returns fewer MIP and MRO values and only a fraction of the interactions in --detailed.

@cdanielmachado
Copy link
Owner

Sorry for the late reply. Can you both send me some examples to debug ?

@lklaksvik
Copy link

I have tried running the communities in "pairwise.tsv" with the "M9glu" media specified in M9media.tsv.

Files are here:
https://www.dropbox.com/sh/fqm2sle6r7axiis/AABTcbxuTFHZpvp7bxKT8KvMa?dl=0

@BurchamLab
Copy link
Author

Thanks, Daniel. Here is a Google Drive to 2 models I used as a community that can't calculate the MIP.

https://drive.google.com/drive/folders/1-hhxj8YojrdHeoBTXbIL90YOyxrSFfoh?usp=sharing

@cdanielmachado
Copy link
Owner

@zburcham I found the problem.

Please use --flavor ucsd instead of --flavor cobra. It is essentially the same except for the way sink reactions are distinguished from exchange reactions (uses the reaction id instead of reaction balance).

By the way, if you ever update CarveMe to the latest version, please use --flavor bigg instead.

@cdanielmachado
Copy link
Owner

@liseklaks your case is more complicated, your models use mixed ids (from BiGG and KEGG) and have a few strange features...

For example in B_cenocepacia metabolite M_C0009 is in the cytosol compartment, but has an associated exchange reaction R_EX_C0009.

This really breaks our code when merging species into a community and creating mappings between extracellular compartments and exchange reactions.

To be honest, I don't really see a way to solve this... It is not possible to support all models with unexpected structures and maintain a biologically meaningful outcome...

@lklaksvik
Copy link

Okay, I see. Thank you for looking into it and finding where the issue was!

@BurchamLab
Copy link
Author

Thank you @cdanielmachado , that seemed to fix the problem with MIP calculation. I am having an issue with a few models now working with MRO calculation now but that is only a few.

@iuliachiciudean
Copy link

Hi guys,

I have a similar problem, but the solutions mention above do not seem to fix it.

I run SMETANA on a single community with 7 species and I get N/A MIP.
Considering that I only have 7 sp. models in my community I started running SMETANA with a combination of the community members and apparently 2 models are at fault.
If I exclude the 2 models I get a MIP value for the community.

Any suggestions on why might this happen and how to fix it?
Thank you.
iulia

@iuliachiciudean
Copy link

P.S. I also tried adding "--flavor cobra/ucsd", but I get:

> .........................................

File "/home/iulia/miniconda3/envs/py3.7/lib/python3.7/site-packages/smetana/legacy.py", line 271, in
models_missing_biomass = [m.id for m in self._organisms.values() if not m.biomass_reaction]
File "/home/iulia/miniconda3/envs/py3.7/lib/python3.7/site-packages/reframed/core/cbmodel.py", line 190, in biomass_reaction
self._detect_biomass_reaction()
File "/home/iulia/miniconda3/envs/py3.7/lib/python3.7/site-packages/reframed/core/cbmodel.py", line 213, in _detect_biomass_reaction
raise RuntimeError(f"No biomass reaction identified from model objective.")
RuntimeError: No biomass reaction identified from model objective.

iulia

@iuliachiciudean
Copy link

Hi again,

I really need your opinion on this.

My actual community is bigger than what I previously tried (but not more than 25 MAG's) and the MIP is still N/A for all the communities I have.

I really need this to work (or at least understand the problem) in order to move forward with my analysis.

I will be very grateful for your help.
Best regards,
i

@cdanielmachado
Copy link
Owner

Hi Iulia,

Are you specifying a growth medium when you calculate MIP ?

If you specify a growth medium it is only possible to calculate MIP if every species can grow alone in that medium, because we compare growth alone vs growth in community to estimate the interaction potential.

@iuliachiciudean
Copy link

Hi Daniel,
No growth media specified.
The solution was --flavor bigg.

But the growth media specification vs. MIP calculation explanation is welcomed.

Thank you.
iulia

@jotech
Copy link

jotech commented May 30, 2022

hi @cdanielmachado
I'm still struggling with this 'n/a' value when calculating the MIP
I used carveme 1.5.1 to create the models (default settings) and tried all the mentioned flavor flags but still no MIP, although the other scores can be calculated.
Do you have any hints what could go wrong here?

model1.xml.gz
model2.xml.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants