-
Notifications
You must be signed in to change notification settings - Fork 28
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
Improve SBO term handling #469
Comments
Very much agreed. I'd like to see the SBO handled in cobrapy, though. |
To get the discussion going about what this will look like for cobrapy and memote, how do you envision cobrapy users interacting with SBO terms? There are many cases that automatic assignment makes sense, e.g. all metabolites should get SBO:0000247 (simple chemical entity), but these still have exceptions that make automation dangerous (e.g. polymers shouldn't have SBO:0000247). Would a set of SBO helper functions be appropriate, such as functions that flag model elements as candidates for SBO terms and then let the user add the terms manually? Or is this getting into the realm of a package dedicated to annotating cobrapy models with SBO terms? On the memote side, it seems like cobrapy-based "checks" could clean things up, e.g. calling |
I like where you're going in terms of functionality. Making it easy for a model reconstruction pipeline to mostly do the right thing is definitely a worthy goal.
In terms of implementation, the first step in my opinion is to find a good package to work with ontologies. There are a couple of options likely candidates are ontobio, owlready, ontospy. Then one could provide a couple of convenience functions around the ontology package. We had done some preliminary tests but discarded using any of them because none of them supports Python 2 & 3. I would start with SBO annotation being part of the main cobrapy package but that depends a bit on the desired feature set. The last cobrapy user survey encouraged me to drop support for Python 2 which would then immediately make any of those ontology packages targets to build on. Overall, I'm afraid good SBO support is a few months down the line, though. There are a number of things to wrap up on the cobrapy side plus a big clean up of the codebase to make it Python 3 only. Fully agree with your last paragraph. Overall it will really help if we can get as clear as possible a picture of the different use-cases involving the SBO. I wonder who else is really interested in this, it'd be great to nail down some requirements with input from different parties. |
It seems to me that my issue ( #721) corresponds to this discussion aswell. Would it make sense to use libSBML to access the SBO tree? If I recall correctly, there is at least a possibility with JSBML so it might be possible with libSBML aswell. JSBML offers a function called |
I commented the difference between JSBML and libSBML implementation of the SBO class on their GitHub: Implementation of SBO term trees Issue number 164 (#164). Maybe that helps. |
Can you provide a link for that, please? |
Here the issue: sbmlteam/libsbml#164 |
Sounds like storing the SBO in a file distributed with cobrapy and using a package to conveniently access the ontology is the way to go for now. |
When storing the SBO file within a distribution of COBRApy, it is crucial to make it exchangeable. The SBO is still growing. New subterms may be added, and all of a sudden, COBRApy may raise errors when users want to check a seemingly non-existing term. Some users might not be able to upgrade their version of COBRApy for various reasons. This will be a great advantage if they have a relatively easy way of simply exchanging the SBO file distributed with COBRApy. Also, if it isn't exchangeable, a new release of COBRApy could become necessary with each new version of SBO. |
Those are great points. With eQuilibrator, we've put data files on Zenodo and then load/update by DOI. That's been a pretty decent experience so far. Added bonus is that one could say model was created with SBO version x and DOI. It'd actually be great if the SBO was released directly to Zenodo rather than us doing it.
Agree completely. I noted a few options above. |
Problem description
We're really specifically checking for a few node SBO terms and not yet for the presence of any children of those nodes. Ideally, we'd have some internal representation of the ontology such that we can check if the the SBO term of an object matches a specific node term or any of its children.
We should also remove the duplicate check for SBO term annotations in our annotations tests as per this issue #447
The text was updated successfully, but these errors were encountered: