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

Remove the boundary compartment from Human-GEM #172

Closed
1 task done
JonathanRob opened this issue May 21, 2020 · 10 comments
Closed
1 task done

Remove the boundary compartment from Human-GEM #172

JonathanRob opened this issue May 21, 2020 · 10 comments
Assignees

Comments

@JonathanRob
Copy link
Collaborator

JonathanRob commented May 21, 2020

Description of the issue:

The default Human-GEM model currently contains a boundary compartment [x], used to close mass balances on exchange reactions. For example, the exchange of oxygen between the extracellular compartment [s] and the boundary is formulated as:

O2[s] <=> O2[x]

However it is generally more common among the modeling community to formulate exchange reactions without the balancing boundary metabolite:

O2[s] <==>

I propose that we change the "default" state of the model such that the boundary compartment is removed. Users can then choose to add it back when needed (e.g., for checkTasks or running tINIT) using the addBoundaryMets function:

model = addBoundaryMets(model);

The reason for my suggestions is that the boundary compartment is not really standard practice in the modeling community, and is often a source of confusion and compatibility problems. For example, if FBA is run on the model with boundary metabolites still present, flux through the biomass reaction (biomass_human) will be zero because the model is essentially in "closed" form. Users therefore need to go through the extra step of removing the boundary metabolites before running FBA and many other common analysis methods.

I hereby confirm that I have:

  • Checked that a similar issue does not exist already
@JonathanRob JonathanRob self-assigned this May 21, 2020
@haowang-bioinfo
Copy link
Member

@JonathanRob sounds good. How about start with a to-do list regarding this change?

@JonathanRob
Copy link
Collaborator Author

It's actually pretty straightforward; just need to run simplifyModel and remove the empty compartment. I've implemented it on the removeBoundaryComp branch, but I will wait to make a pull request until we've taken a bit of time to consider other potential necessary changes/effects, and to complete existing PRs.

@haowang-bioinfo
Copy link
Member

I wonder if this removal affects any model manipulation and simulation functions from RAVEN?

@JonathanRob
Copy link
Collaborator Author

I'm only aware of two affected functions that rely on the presence of boundary metabolites (an unconstrained field): checkTasks and getINITModel. The checkTasks function gives a warning if its missing, and the getINITModel function gives an error.

Maybe @edkerk can confirm, but as far as I am aware, RAVEN is designed to work without boundary metabolites.

@edkerk
Copy link
Member

edkerk commented Jun 9, 2020

RAVEN simulations indeed assume that no boundary compartment is present. @simas232 I remember there was an exercise at a course that relied on the boundary compartment being included, do you remember which RAVEN function was not working without boundary?

Regardless, we can also write a small function that adds a boundary compartment, takes the output of getExchangeRxns and add the corresponding metabolite in the new boundary compartment. Will be super easy to code, as metabolite ID for the [b] metabolite we could take the metabolite ID that is already present in the exchange reaction and append _b?

@JonathanRob
Copy link
Collaborator Author

JonathanRob commented Jun 9, 2020

Ok, that's what I thought, thanks @edkerk.

We actually have a function in this Human-GEM repo that adds boundary metabolites: addBoundaryMets. One option is to move this function into RAVEN instead.

@simas232
Copy link
Collaborator

simas232 commented Jun 9, 2020

@JonathanRob, @edkerk, RAVEN already has a function which adds a boundary compartment (i.e. closes the model), called closeModel.

@edkerk, I think that only tINIT related functionalities, including fitTasks require a boundary compartment. So we may simply enable closeModel automatically, if an input GEM does not have a boundary compartment.

@edkerk
Copy link
Member

edkerk commented Jun 9, 2020

@simas232 Excellent, closeModel does exactly what I had in mind. So the changes @simas232 suggested can be applied to RAVEN, and then there is no problem whatsoever to remove boundary mets from Human-GEM.

@JonathanRob
Copy link
Collaborator Author

Ah ok, I didn't even know about closeModel, nice.

@edkerk, I'm not sure it's necessary to make any changes to RAVEN to accommodate the change. Or maybe simply update the existing error/warning messages that are thrown when the unconstrained field is missing so that they mention the closeModel function.

@JonathanRob
Copy link
Collaborator Author

Addressed in #179.

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

No branches or pull requests

4 participants