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
exchanges not identified correctly in CarveME models #9
Comments
Hi, fluxes for individual taxa and exchange fluxes for the external medium have different units in micom. For an individual taxon the unit is mmol/[gDW taxon * h] but for the external medium the unit is mmol/[gDW total biomass * h]. This is done so that fluxes for individual taxa are comparable. So in order to get that to line up you have to scale all individual taxon fluxes by their abundance. So in your case: |
Hello, Sincerely, |
Cool, happy that helped. Will close the issue for now. Feel free to reopen if there are more issues. |
Good morning, Sincerely, |
For the AGORA models exchange fluxes are usually directed towards import, ergo |
Thank you very much for previous support! I am using models created with carveme and I am thinking it works the other way around because in my simulation archaea do produce methane (flux >0). For the second point I fear I wasn't clear enough. This is a column of my output file. Sincerely, |
Hi Anna, you are absolutely right, I confused the direction. In AGORA as well as CarveMe exhanges are directed towards export so negative flux means import and positive export. I was confusing it with the output of For the second part I am still not entirely sure if I get what you mean, so let me try to understand better. For total metabolite consumption do you mean the overall import flux (sum of all import fluxes for the specific taxon)? In that case it can definitely happen that the total import flux is larger than the total export flux since individual taxa produce biomass which consumes metabolites. There may also be sink reactions consuming internal metabolites to fulfill a maintenance requirement. For instance sometimes one knows the total ATP need of a bacterium and may insert an additional reaction that consumes/destroys ATP to compensate for missing pathways in the model. The opposite is generally not possible (total export > total import) unless you have source reactions in your model (reactions that create mass from nothing, usually not the case). |
Thank you for clarification for the first part of the question. Sincerely, |
Again this would have to be scaled by the abundances first since those would denote exchange fluxes. Also the community can take up metabolites from the environment. This is dictated by the media exchanges with names like |
I am trying to apply my own growth medium as you suggested but I am having some issues. I tried many media files but nothing seems to work properly.
to import it as a pandas.core.series.Series and then I am trying to use it as my medium with
But it seems not to work properly since I get the following error
Thank you in advance for your help. |
Hi Arianna, the names of the exchange reactions depend a lot on the original models you put in the community construction and need to match the global import names of your model. You can see a list of all global imports by using In [1]: import micom
In [2]: tax = micom.data.test_taxonomy()
In [3]: com = micom.Community(tax)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:02<00:00, 2.43models/s]
In [4]: com.exchanges
Out[4]:
[<Reaction EX_ac_m at 0x7f9da9d5be48>,
<Reaction EX_acald_m at 0x7f9da9d5b710>,
<Reaction EX_akg_m at 0x7f9da9d6c390>,
<Reaction EX_co2_m at 0x7f9da9d6c588>,
<Reaction EX_etoh_m at 0x7f9da9d6c748>,
<Reaction EX_for_m at 0x7f9da9d6c908>,
<Reaction EX_fru_m at 0x7f9da9d6cac8>,
<Reaction EX_fum_m at 0x7f9da9d6cc88>,
<Reaction EX_glc__D_m at 0x7f9da9d6cdd8>,
<Reaction EX_gln__L_m at 0x7f9da9d6cf60>,
<Reaction EX_glu__L_m at 0x7f9da9d80128>,
<Reaction EX_h_m at 0x7f9da9d80320>,
<Reaction EX_h2o_m at 0x7f9da9d80518>,
<Reaction EX_lac__D_m at 0x7f9da9d80668>,
<Reaction EX_mal__L_m at 0x7f9da9d807f0>,
<Reaction EX_nh4_m at 0x7f9da9d809b0>,
<Reaction EX_o2_m at 0x7f9da9d80b70>,
<Reaction EX_pi_m at 0x7f9da9d80d68>,
<Reaction EX_pyr_m at 0x7f9da9d80f98>,
<Reaction EX_succ_m at 0x7f9da9d87198>] The reaction names in your medium have to correspond exactly to those IDs you see there. One common pitfall is that the model may no have import for some of the metabolites. So I usually do something like that in my workflows (here ex_ids = [r.id for r in com.exchanges]
logger.info(
"%d/%d import reactions found in model.",
diet.index.isin(ex_ids).sum(),
len(diet)
)
com.medium = diet[diet.index.isin(ex_ids)] If the log tells you that no imports were found something is going awry. I haven't really used CarveME reconstructions so there might be some issues there with reaction IDs. But I would be interested to support those more and would be happy to help if you send me one of the community reconstructions to investigate. You can do so in private by saving the community model with |
Thank you for your fast and accurate answer. I tried what you proposed and
gives me an empty dictionary so yes I think there is a problem. I gave a glance also to
and I spotted some reactions with the ID starting with "EX_" flag so I am trying changing the bounds to those reactions. Sincerely, |
I played around with some CarveME models and MICOM does indeed not identify exchange reactions correctly there. I added a fix and it now seems to work:
(before com.exchanges would return []). This was due to CarveME using a different naming scheme for compartments so for instance the compartment for This fix will be released in version 0.10.1 of MICOM. So an update via pip should be enough. |
The weird name doesn't seem a problem to me. Thank you very much, Christian. :) Sincerely, |
Goodmorning.
I have recently used your program to analyze metabolic exchanges in a community. I have only a question: in the output, I have for each metabolite two columns one called, for example, EX_but_e and the other EX_but_m. The EX_but_m appears only in one row which is the medium one. I supposed that summing the EX_but_e for all the microbes in my community I should have got the value in the medium row at EX_but_m column. But it is not the case. Why?
Sincerely,
Arianna Basile
The text was updated successfully, but these errors were encountered: