Microbe-microbe metabolic interactions not working with custom model built in DEMETER

102 views
Skip to first unread message

Ari Ufondu

unread,
Jan 25, 2023, 4:51:27 PMJan 25
to COBRA Toolbox
Dear community,

I have used the microbe-microbe interaction tutorial to successfully perform pairwise interaction analysis on AGORA microbes numerous times. However, whenever I try to include my own custom-built reconstruction (my reconstruction was done following the DEMETER pipeline), I keep running into this error message:

Error using addReaction (line 212)
No stoichiometry found! Set stoichiometry either by 'reactionFormula' or by 'metaboliteList' parameters.\nModel was not modified.

Error in removeFutileCycles (line 770)
                        model = addReaction(model, addedRxns{j, k}, database.reactions{find(ismember(database.reactions(:, 1), addedRxns{j, k})),
                        3});

Error in createMultipleSpeciesModel (line 165)
    model = removeFutileCycles(model, biomassReaction, database,unionRxns);

Error in joinModelsPairwiseFromList (line 123)
    parfor k = i + 1:size(modelList, 1)

I should point out that my model runs just fine on its own. It only runs into problems when trying to be joined to other AGORA models. I don't know how to solve this issue. Please I would appreciate any help in figuring this out from the community.

Thanks!
Ari
COBRAconfigReport.log

Almut Heinken

unread,
Jan 26, 2023, 3:58:22 AMJan 26
to cobra-...@googlegroups.com
Dear Ari,
this looks like it is trying to add a reaction it cannot find in the database. Is the COBRA.papers folder (where the database is located, see https://github.com/opencobra/COBRA.papers/tree/master/2021_demeter/input) up to date?
If that is not the issue, I can have a closer look to solve the problem.
Best regards,
Almut

--

---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/8aab2b36-e870-45e2-996c-b1d18917bc67n%40googlegroups.com.

Ari Ufondu

unread,
Jan 26, 2023, 4:40:05 PMJan 26
to COBRA Toolbox
Dear Almut,

Thank you very much for the quick response! I really appreciate your time and effort in helping me with this problem.

As to your question, I believe I have the latest version of the COBRA.papers folder because I frequently run the 'initCobraToolbox.m' script. I am led to believe that this automatically updates the files within CobraToolbox. If there is a different way I should be updating the Demeter input files, please let me know. 

Could it be that there are untranslated reactions/metabolites within my model that are causing issues with the AGORA models? I would be happy to share the models in question with you if you need to take a closer look at them. 

Best regards,
Ari

Almut Heinken

unread,
Jan 27, 2023, 3:46:32 AMJan 27
to cobra-...@googlegroups.com
Dear Ari,
sure, you can send me the models. I will have a look.
Best regards,
Almut

Ari Ufondu

unread,
Jan 27, 2023, 6:05:21 PMJan 27
to COBRA Toolbox
Dear Almut,

Thank you very much!

I have attached the model in question, the command list that I am running (I indicate the point in the code where I got the error message), the list of microbes that I intend to join for the pairwise interaction (tf2.xlsx), and the info file with the new model I am using included within. 

Please let me know if you have any questions regarding the materials I sent. 

Best,
Ari

Microbe_microbe_interaction_COMMANDS.txt
AGORA_infoFile_changed.xlsx
tf2.xlsx
Acetatifactor_muris_GP69.mat

Almut Heinken

unread,
Jan 30, 2023, 10:58:07 AMJan 30
to cobra-...@googlegroups.com
Dear Ari,
I found the issue, it was due to a combination of reactions that I had not seen before. I submitted a solution for this particular problem to the open pull request on GitHub.
In the future, the part that removes futile cycles will be optional instead of automatic, though it should be done when AGORA/AGORA2 is used.
By the way, the reconstructed microbe is also present in the recently published AGORA2.
Best regards,
Almut

Ari Ufondu

unread,
Jan 31, 2023, 12:14:05 PMJan 31
to COBRA Toolbox
Dear Almut,

That is excellent news! Thank you so much for your help however, I have a few questions. 

As to the solution for the problem, how do I access this on GitHub? I suspect that my lack of familiarity with how GitHub works is the problem here. Will the option to refuse the removal of futile cycles be automatically updated in the CobraToolbox when I run 'initCobraToolbox.m'? If so, what alterations to the commands I'm running will I need to make to take advantage of this? 

If it is not automatically updated, how do I manually access your solution? 

Also thank you for informing me about the AGORA2 paper! I am very excited to read it. I assume that the expanded collection of microbial models in AGORA2 have been made public. If so, I would gladly use the AGORA2 model for the microbe as it will likely not have any of the issues my model currently has. 

Best,
Ari

Almut Heinken

unread,
Feb 1, 2023, 4:46:13 AMFeb 1
to cobra-...@googlegroups.com
Dear Ari,
before the pull request has been merged, it will not be updated automatically, unfortunately. You can try to check out the branch (https://github.com/almut-heinken/cobratoolbox/tree/editPairwiseModule) through git. Otherwise, you will have to download the files manually.
Best regards,
Almut

Ronan M.T. Fleming

unread,
Feb 1, 2023, 10:16:52 AMFeb 1
to cobra-...@googlegroups.com
https://github.com/opencobra/cobratoolbox has had the relevant PR merged.



--
--
Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.
----------------------------------------------------------------------------
Associate Professor,
School of Medicine,
National University of Ireland, Galway.
&
Assistant Professor,
Division of Systems Biomedicine and Pharmacology,
Leiden Academic Centre for Drug Research,
Faculty of Science,
Leiden University.
&
Coordinator of the Horizon Europe project "Reconstruction and Computational Modelling for Inherited Metabolic Diseases" (Recon4IMD)
----------------------------------------------------------------------------
Peer-reviewed publications: https://goo.gl/FZPG23
Mobile:  +353 852 109 806
Skype: ronan.fleming
----------------------------------------------------------------------------
(This message is confidential and may contain privileged information. It is intended for the named recipient only. If you receive it in error please notify me and permanently delete the original message and any copies.)

Ari Ufondu

unread,
Feb 2, 2023, 6:08:11 PMFeb 2
to COBRA Toolbox
Dear Almut,

Thank you for the info. The AGORA2 model works perfectly and I am able to perform the pairwise interaction now, however, a secondary issue arose. 

The AGORA2 reconstruction for the microbe of interest (Acetatifactor_muris_GP69) doesn't have the capacity to metabolize bile acids. There is quite a bit of literature, and personal experience in the lab, that indicates that this microbe is in fact an active metabolizer of conjugated primary bile acids. I am wondering if you have any ideas about the best way for me to modify this microbe to include the relevant bile acid deconjugation and transformation reactions. I have read your paper on this topic (Systematic assessment of secondary bile acid metabolism in gut microbes reveals distinct metabolic capabilities in inflammatory bowel disease), and as such have access to the supplementary files where you detail the various reactions included in the bile acid metabolism subsystem. My current idea is to use the 'addReaction' command to modify the model to now include the necessary reactions. 

I am wondering if you believe this to be a good way of going about this. If so, do you have any advice or things I should keep in mind? Also, if there is a better way of doing this please let me know!

Best,
Ari

Almut Heinken

unread,
Feb 3, 2023, 11:53:24 AMFeb 3
to cobra-...@googlegroups.com
Dear Ari,
these reactions are absent because comparative genomics were not performed for this particular organism, but you can easily add them.
The bile acid reactions and metabolites are present in the database files in the demeter folder in COBRA.papers. You can load the database into Matlab by running database=loadVMHDatabase. The easiest way is to retrieve the formulas directly from the database like in this function towards the bottom: https://github.com/opencobra/cobratoolbox/blob/master/src/reconstruction/demeter/src/refinement/carbonSourceGapfill.m
Best,
Almut


Ari Ufondu

unread,
Feb 3, 2023, 1:59:58 PMFeb 3
to COBRA Toolbox
Dear Almut, 

Thank you for the instruction. I am able to load the reactions and metabolites from the database using the command you showed, however, I am still a bit confused about how to actually add the relevant bile acids metabolites and reactions into the model. 

The function you posted a link to in GitHub seems to be used to add the metabolites and reactions to a model to reflect the carbon sources this model can use. Please correct me if I am wrong, but I imagine the steps to properly use this function will be to:
1. Make the appropriate changes to the 'CarbonSourcesTable.txt' file located in cobratoolbox\papers\2021_demeter\input
2. Run the function as indicated to automatically gapfill the relevant metabolites and reactions to allow the model to utilize the intended carbon sources

I can see how a similar method could be applied to gapfilling a model to include relevant bile acid metabolism metabolites and reactions after the 'BileAcidTable.txt',  'secretionProductTable.txt' and 'uptakeTable.txt' have been altered. However, I'm still not sure what function I would need to automatically gapfill the changes made in the text files.

Please let me know if I have misunderstood the function you were pointing out. Also, perhaps rBioNet could be used to load in the metabolites and reactions from the database directly on to the Acetatifactor_muris_GP69 model? 

Best,
Ari

Almut Heinken

unread,
Feb 3, 2023, 2:53:14 PMFeb 3
to cobra-...@googlegroups.com
Hi Ari,
you just define the list of desired reactions as a variable addRxns and run the loop from line 343-349. No need to run the entire function. You can also add a second column with GPRs if available, in that case, you need to modify the geneRule input accordingly.
Best,
Almut


Reply all
Reply to author
Forward
0 new messages