Open cdiener opened 3 years ago
Sorry for perhaps the outdated question. I am a graduate student working with MES scores from Marcelino et al., Nature Communications 2023 I am currently implementing MES framework for my metgenome data and confused about the res.exchanges['flux'] from the micom.workflow.grow function. If I want to get the total production flux or consumption flux of a certain metabolite, should I weight each flux of each metabolite with relative abundance of each species? or are the flux of each metabolite already weighted by each species abudance? I looked at CD_focus/MetModels_summarize_total_produc_consump.py and R_scripts_4_figs /sulfur_stats_He2017.R and it seemed to me that it was the former case but I just wanted to be sure.
Yes, exactly it would be scaled by relative abundance, though you can also use the production_rates function that does that for you. Also note that MES scores are part of MICOM since version 0.35.0. See the MES function and new visualizations as well.
This is a proposal for a new format for fluxes slated for MICOM 1.0. Feel free to comment :smile:
Checklist
Current state
The current format for fluxes returned by MICOM is a table in wide format:
This has resulted in some issues:
cobra.Solution.fluxes
which breaks a lot of the cobra functionality like for instance summary methods.Proposed new API for fluxes
CommunitySolution.fluxes
will retain the cobrapy format and will superseded by new accessors that all return fluxes in long format:CommunitySolution.exchange_fluxes
Similar to the previous one but with the taxa annotated.
CommunitySolution.internal_fluxes
This will consolidate
GrowthResults
andCommunitySolution
and gives a more readable format. All those properties are generated on the fly when accessing the property.Additionaly, we may also want to save the annotations in the solution but they may be large, so it might be better to have a property on the model class like
Community.annotations
.Additional context
A similar format change is planned for
Community.knockout_taxa
.elasticities
already uses a long format.