cdanielmachado / smetana

SMETANA: a tool to analyse interactions in microbial communities
Other
57 stars 11 forks source link

CarveMe Models without Gap Filling for Smetana #39

Open pbelmann opened 1 year ago

pbelmann commented 1 year ago

Thank you for developing smetana! I just have a general question. I'm currently building models with carveme by using the default command (carve genome.faa) without specifying any media via --gapfill. I use these models then as input for smetana (smetana -g --flavor bigg), again without specifying any media with -m. My question is now, how reliable are the MRO and MIP metrics if I can not specify the media at all?

franciscozorrilla commented 3 months ago

Gapfilling the models prior to running SMETANA global metrics should result in some changes to the calculated scores (depending on how much metabolism was gapfilled), but you cannot actually specify media when running the global metrics due to the way they are implemented. You can only specify the media when running SMETANA detailed interactions, whch should indeed result in different metabolic exchanges.

CODRbio commented 3 months ago

Gapfilling the models prior to running SMETANA global metrics should result in some changes to the calculated scores (depending on how much metabolism was gapfilled), but you cannot actually specify media when running the global metrics due to the way they are implemented. You can only specify the media when running SMETANA detailed interactions, whch should indeed result in different metabolic exchanges.

does that mean even I provide -m parameter, it will not influence the results of the global mip?

franciscozorrilla commented 3 months ago

This is a good question. The idea of the global metrics is that they are inherent to the community, please have a look at the original SMETANA paper for implementation details, as well as this more recent study:

The MIP indicates the number of metabolites that can be exchanged among the community members to decrease their dependency on the abiotic environment. In this work, we use the MIP value as a proxy measure for cooperative metabolism. MRO and MIP estimate the respective interaction metrics at their theoretical limit and therefore do not require information on the resources actually available in the habitat. The operating degree of competition and cooperation in a given community will therefore be habitat dependent. The context-independent nature of MRO and MIP makes them suitable for application to co-occurring communities spanning multiple and diverse habitats. Furthermore, the presence of several co-occurring groups of species in diverse habitats suggests that these communities are to some extent independent of their abiotic environment. We also evaluated the ability of MIP to capture biologically meaningful interactions from a systematic screen of pairwise cultures of Escherichia coli mutants with engineered amino acid auxotrophies28. We observe that the MIP score is positively associated with higher co-culture growth yields (Supplementary Fig. 1). This result, together with the previous comparisons of experimental data15,29, support the relevance of the SMETANA simulations.

However, based on the actual code, it looks like the function to calculate scores can indeed take in a medium composition. Like I mentioned in my other response, I have not used the global metrics too much in my research compared to the detailed metrics, so I would recommend you to try out small experiments with media specification vs not, to see how it may affect your results.

https://github.com/cdanielmachado/smetana/blob/d2b10434df6d13741614420b933b0870ea598222/smetana/smetana.py#L234-L251

I would also recommend you to keep an eye on this newly developed tool SteadierCom, still unpublished, but will be a drop-in replacement for SMETANA, developed by Daniel Machado (CarveMe, SMETANA dev).

CODRbio commented 3 months ago

Thanks! I'll try to go through all the papers and try the new toolkit.

ABU789456 commented 3 months ago

Thank you for developing smetana! I used carveme to create a metabolic model of the genome with the following code: carve --dna OceanDNA-b14820.fasta --solver scip Use smetana to calculate mip and mro simultaneously, the code is as follows: *smetana xml -c community.tsv -o finalresult** The following warning appears: /project/wujp/miniconda3/envs/cplex/lib/python3.8/site-packages/smetana/smetana.py:351: UserWarning: MRO: Failed to find a valid solution for: OceanDNA-b27576 warn('MRO: Failed to find a valid solution for: ' + org_id) /project/wujp/miniconda3/envs/cplex/lib/python3.8/site-packages/smetana/smetana.py:351: UserWarning: MRO: Failed to find a valid solution for: OceanDNA-b27519 warn('MRO: Failed to find a valid solution for: ' + org_id) /project/wujp/miniconda3/envs/cplex/lib/python3.8/site-packages/smetana/smetana.py:351: UserWarning: MRO: Failed to find a valid solution for: OceanDNA-b27518 warn('MRO: Failed to find a valid solution for: ' + orgid) mip showed a lot of n/a, but mro calculated normally. I also tried to add --flavor bigg and fbc2, --molweight, mip still shows n/a, and --mediadb is not specified.I would appreciate it if you could give me a solution. Thank you!

ABU789456 commented 3 months ago

Use this code, which says there is a problem: smetana *xml-c community.tsv-o final_result

CODRbio commented 3 months ago

However, based on the actual code, it looks like the function to calculate scores can indeed take in a medium composition. Like I mentioned in my https://github.com/franciscozorrilla/metaGEM/issues/163#issuecomment-2200239128, I have not used the global metrics too much in my research compared to the detailed metrics, so I would recommend you to try out small experiments with media specification vs not, to see how it may affect your results.

After conducting some experiments, I suggest not using the -m option during stimulation when you only need global MIP and MRO. Including this parameter prompts the solver to verify whether the microbiome can survive on the given media, and it will terminate if the species fails this check. However, what we require is a statistical analysis. For gapping, it might be reasonable to use full media gapping for MAGs without manual adjustment. As franciscozorrilla mentioned, higher mips will be generated with poorer media.

ABU789456 commented 3 months ago

Thank you for your suggestion, I did not add the -m option, but the result of mip is n/a, how should I solve this problem?