-
Notifications
You must be signed in to change notification settings - Fork 3
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
Normalize function #75
Comments
I think what you are asking for can be accomplished by the following:
|
Unfortunately, that does not seem to be the case:
|
Is this what you are looking for?
|
That's looking along the right lines, but I'm still a bit mystified, because
Is there any function that I can give |
From an SBOL perspective, I think your natural inclination would be to assume that the In any case, I could go ahead and implement a public |
Whatever makes sense under the hood is fine by me. The key that I need is for the results of Implementing that function would be great! You can currently find my workaround version in the SBOL utilities workarounds at https://github.com/SynBioDex/SBOL-utilities/blob/2b8d6289cf2ed818deb95a34b27d7ea25567982c/sbol_utilities/workarounds.py#L24-L37 |
Do you want it to throw an error if the given URI is not a member of the ontology, e.g., https://nonsense.uri ? |
I'm fine with either throwing a lookup exception or returning None. For my first specific use case, it would be a little more convenient if it returned None, but I can make it work either way, so I think you should do what you think makes most sense from a tyto-centric perspective. Maybe you could even have it be an optional argument to switch between the two behaviors that defaults to throwing an exception, but can be overridden to return none instead (sort of like directory creating has the |
I often want to put a URI into "normal form", i.e., the recommended form.
Currently, this is done by
tyto.X.get_uri_by_term(tyto.X.get_term_by_uri(term))
It would be nice to have normalization as an efficient convenience method.
The text was updated successfully, but these errors were encountered: