[bioontology-support] Combine search and property_search endpoints

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[bioontology-support] Combine search and property_search endpoints

John Zobolas

​Hi,


The story:


I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:

http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)


The Questions:

  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] Combine search and property_search endpoints

John Zobolas

​One more question: Are there any obsolete properties? (I don't see any obsolete property defined in the returned JSON when using the `property_search` endpoint)​


From: John Zobolas
Sent: Thursday, July 4, 2019 3:37 PM
To: [hidden email]
Subject: Combine search and property_search endpoints
 

​Hi,


The story:


I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:

http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)


The Questions:

  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] Combine search and property_search endpoints

Michael Dorf
In reply to this post by John Zobolas
Hi John,

Thank you for keeping in touch with us and for continuing to us our API. Before answering your specific questions (or possibly instead), I should explain the difference between the two endpoints in question.

1. The /search endpoint searches for VALUES of properties for a given set of terms. By default, it only searches for the properties that are common across ALL ontologies, such as ID, prefLabel, synonym, and definition. An optional flag allows searching in other, ontology-specific properties, but those are stored in our index as a “bulk” collection rather than each individually. The properties are referenced using their IDs rather than labels. For example:

<a href="http://data.bioontology.org/search?q=base pair&amp;ontologies=OBOREL&amp;include_properties=false&amp;display=prefLabel,synonym,definition,notation,cui,semanticType,properties" class="">http://data.bioontology.org/search?q=base%20pair&ontologies=OBOREL&include_properties=false&display=prefLabel,synonym,definition,notation,cui,semanticType,properties
VS
<a href="http://data.bioontology.org/search?q=base pair&amp;ontologies=OBOREL&amp;include_properties=true&amp;display=prefLabel,synonym,definition,notation,cui,semanticType,properties" class="">http://data.bioontology.org/search?q=base%20pair&ontologies=OBOREL&include_properties=true&display=prefLabel,synonym,definition,notation,cui,semanticType,properties

The latter search match on a property with the ID "http://purl.obolibrary.org/obo/IAO_0000232”. You can use the /properties endpoint from here if you require the label of the property:


Because these ontology-specific properties and their values for each term are stored in bulk, you cannot limit search results to just the value of a specific property.

2. The /property_search endpoint searches for the NAMES (labels) of properties across the entire ontology. It’s not term-specific and it doesn’t take into account the values of these properties for each term. For example:


The data for the /search endpoint is term-specific, where as the data for the /property_search endpoint is ontology-specific; therefore, these two can not be lumped together. They each serve as specific purpose. A possible exception to this rule would be to store the labels of these “unmapped” properties in the index along with their IDs, so that the labels can be searchable. I would still be hesitant to implement this, since the whole point of the /search endpoint is a “value-based” search rather than a “name-based” search.

Your “hacked kind of query” should include the properties (IDs/values) if you explicitly asked to include them in the results:


Hope this clarifies it.

Michael

On Jul 4, 2019, at 6:37 AM, John Zobolas <[hidden email]> wrote:

​Hi,

The story:

I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:
http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)

The Questions:
  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] Combine search and property_search endpoints

Michael Dorf
In reply to this post by John Zobolas
Hi John,

I am not an ontology building expert, so can’t really speak with authority on whether there exists such a thing as an obsolete property. What I can tell for sure is that we don’t track that information in our system. There is no “obsolete” attribute defined on the properties model classes:


Michael


On Jul 4, 2019, at 6:48 AM, John Zobolas <[hidden email]> wrote:

​One more question: Are there any obsolete properties? (I don't see any obsolete property defined in the returned JSON when using the `property_search` endpoint)​

From: John Zobolas
Sent: Thursday, July 4, 2019 3:37 PM
To: [hidden email]
Subject: Combine search and property_search endpoints
 
​Hi,

The story:

I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:
http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)

The Questions:
  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] obsolete properties (was: Combine search and property_search endpoints)

John Graybeal-2
John,

I've created a new thread about your obsolete properties question.

I'm not sure exactly what you're asking (Is an obsolete property possible? Does an instance of an obsolete property exist in BioPortal? Does BioPortal contain code that handles obsolete properties?)  I find the various interpretation of 'property' in this context doesn't help us talk clearly about it either!

I have no idea if any of the ontologies in BioPortal contain obsolete properties; I know some do contain obsolete classes. Our interface allows specification of "obsolete status for ontology classes", as shown below (hope that can be displayed for you, or that you can get the idea), whenever a user creates a new submission (in the Advanced OWL section, under Identify Obsolete Classes). I am 98% sure these settings work for classes.

Optionally enter a property ID that indicates obsolete status for ontology classes (the property value must be set to "true"). Note that by default, BioPortal checks for existence of the owl:deprecated property.
Optionally enter a class ID for the root of an obsolete branch. All classes in the branch will be marked as obsolete, with the exception of the root class.
It so happens that the OWL 2 technique for specifying an obsolete property is the same as for specifying an obsolete class, namely, an annotation for the property that owl:deprecated is "true". I can't tell you today if BioPortal actually makes use of that information for properties (not sure we've had the question come up before, certainly not since my arrival in 2015).

Can you clarify what you'd like to know?  If it's about BioPortal's handling of properties that have been made obsolete, most likely we'll have to review the code and/or write some tests to determine the answer. You're welcome to tell us anything you learn in that regard!

John


On Jul 5, 2019, at 11:58 AM, Michael Dorf <[hidden email]> wrote:

Hi John,

I am not an ontology building expert, so can’t really speak with authority on whether there exists such a thing as an obsolete property. What I can tell for sure is that we don’t track that information in our system. There is no “obsolete” attribute defined on the properties model classes:


Michael


On Jul 4, 2019, at 6:48 AM, John Zobolas <[hidden email]> wrote:

​One more question: Are there any obsolete properties? (I don't see any obsolete property defined in the returned JSON when using the `property_search` endpoint)​

From: John Zobolas
Sent: Thursday, July 4, 2019 3:37 PM
To: [hidden email]
Subject: Combine search and property_search endpoints
 
​Hi,

The story:

I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:
http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)

The Questions:
  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

========================
John Graybeal
Technical Program Manager
Center for Expanded Data Annotation and Retrieval /+/ NCBO BioPortal
Stanford Center for Biomedical Informatics Research
650-736-1632



_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] obsolete properties (was: Combine search and property_search endpoints)

John Graybeal-2
Sorry, I wasn't thinking about Michael's answer in the right context—he is correct, if we aren't tracking the attribute in any of our property classes, we almost certainly can't be doing anything with it.

I've created a ticket to add this feature to BIoPortal (https://github.com/ncbo/ontologies_linked_data/issues/93). It is complex enough to implement that we may not be able to prioritize it in the near future.

John

On Jul 5, 2019, at 5:05 PM, John Graybeal <[hidden email]> wrote:

John,

I've created a new thread about your obsolete properties question.

I'm not sure exactly what you're asking (Is an obsolete property possible? Does an instance of an obsolete property exist in BioPortal? Does BioPortal contain code that handles obsolete properties?)  I find the various interpretation of 'property' in this context doesn't help us talk clearly about it either!

I have no idea if any of the ontologies in BioPortal contain obsolete properties; I know some do contain obsolete classes. Our interface allows specification of "obsolete status for ontology classes", as shown below (hope that can be displayed for you, or that you can get the idea), whenever a user creates a new submission (in the Advanced OWL section, under Identify Obsolete Classes). I am 98% sure these settings work for classes.

Optionally enter a property ID that indicates obsolete status for ontology classes (the property value must be set to "true"). Note that by default, BioPortal checks for existence of the owl:deprecated property.
Optionally enter a class ID for the root of an obsolete branch. All classes in the branch will be marked as obsolete, with the exception of the root class.
It so happens that the OWL 2 technique for specifying an obsolete property is the same as for specifying an obsolete class, namely, an annotation for the property that owl:deprecated is "true". I can't tell you today if BioPortal actually makes use of that information for properties (not sure we've had the question come up before, certainly not since my arrival in 2015).

Can you clarify what you'd like to know?  If it's about BioPortal's handling of properties that have been made obsolete, most likely we'll have to review the code and/or write some tests to determine the answer. You're welcome to tell us anything you learn in that regard!

John


On Jul 5, 2019, at 11:58 AM, Michael Dorf <[hidden email]> wrote:

Hi John,

I am not an ontology building expert, so can’t really speak with authority on whether there exists such a thing as an obsolete property. What I can tell for sure is that we don’t track that information in our system. There is no “obsolete” attribute defined on the properties model classes:


Michael


On Jul 4, 2019, at 6:48 AM, John Zobolas <[hidden email]> wrote:

​One more question: Are there any obsolete properties? (I don't see any obsolete property defined in the returned JSON when using the `property_search` endpoint)​

From: John Zobolas
Sent: Thursday, July 4, 2019 3:37 PM
To: [hidden email]
Subject: Combine search and property_search endpoints
 
​Hi,

The story:

I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:
http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)

The Questions:
  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

========================
John Graybeal
Technical Program Manager
Center for Expanded Data Annotation and Retrieval /+/ NCBO BioPortal
Stanford Center for Biomedical Informatics Research
650-736-1632


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

========================
John Graybeal
Technical Program Manager
Center for Expanded Data Annotation and Retrieval /+/ NCBO BioPortal
Stanford Center for Biomedical Informatics Research
650-736-1632



_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] Combine search and property_search endpoints

John Zobolas
In reply to this post by Michael Dorf

Hi Michael,


Good to hear from you and thanks for the answers!​ I will have to use the `property_search` endpoint to get back the results I want in the end :)


BR, John.


From: Michael Dorf <[hidden email]>
Sent: Friday, July 5, 2019 8:36 PM
To: John Zobolas
Cc: [hidden email]
Subject: Re: [bioontology-support] Combine search and property_search endpoints
 
Hi John,

Thank you for keeping in touch with us and for continuing to us our API. Before answering your specific questions (or possibly instead), I should explain the difference between the two endpoints in question.

1. The /search endpoint searches for VALUES of properties for a given set of terms. By default, it only searches for the properties that are common across ALL ontologies, such as ID, prefLabel, synonym, and definition. An optional flag allows searching in other, ontology-specific properties, but those are stored in our index as a “bulk” collection rather than each individually. The properties are referenced using their IDs rather than labels. For example:

<a href="http://data.bioontology.org/search?q=base pair&amp;ontologies=OBOREL&amp;include_properties=false&amp;display=prefLabel,synonym,definition,notation,cui,semanticType,properties" class="">http://data.bioontology.org/search?q=base%20pair&ontologies=OBOREL&include_properties=false&display=prefLabel,synonym,definition,notation,cui,semanticType,properties
VS
<a href="http://data.bioontology.org/search?q=base pair&amp;ontologies=OBOREL&amp;include_properties=true&amp;display=prefLabel,synonym,definition,notation,cui,semanticType,properties" class="">http://data.bioontology.org/search?q=base%20pair&ontologies=OBOREL&include_properties=true&display=prefLabel,synonym,definition,notation,cui,semanticType,properties

The latter search match on a property with the ID "http://purl.obolibrary.org/obo/IAO_0000232”. You can use the /properties endpoint from here if you require the label of the property:


Because these ontology-specific properties and their values for each term are stored in bulk, you cannot limit search results to just the value of a specific property.

2. The /property_search endpoint searches for the NAMES (labels) of properties across the entire ontology. It’s not term-specific and it doesn’t take into account the values of these properties for each term. For example:


The data for the /search endpoint is term-specific, where as the data for the /property_search endpoint is ontology-specific; therefore, these two can not be lumped together. They each serve as specific purpose. A possible exception to this rule would be to store the labels of these “unmapped” properties in the index along with their IDs, so that the labels can be searchable. I would still be hesitant to implement this, since the whole point of the /search endpoint is a “value-based” search rather than a “name-based” search.

Your “hacked kind of query” should include the properties (IDs/values) if you explicitly asked to include them in the results:


Hope this clarifies it.

Michael

On Jul 4, 2019, at 6:37 AM, John Zobolas <[hidden email]> wrote:

​Hi,

The story:

I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:
http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)

The Questions:
  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] Combine search and property_search endpoints

John Zobolas
In reply to this post by Michael Dorf

​Good to know, thanks.


From: Michael Dorf <[hidden email]>
Sent: Friday, July 5, 2019 8:58 PM
To: John Zobolas
Cc: [hidden email]
Subject: Re: [bioontology-support] Combine search and property_search endpoints
 
Hi John,

I am not an ontology building expert, so can’t really speak with authority on whether there exists such a thing as an obsolete property. What I can tell for sure is that we don’t track that information in our system. There is no “obsolete” attribute defined on the properties model classes:


Michael


On Jul 4, 2019, at 6:48 AM, John Zobolas <[hidden email]> wrote:

​One more question: Are there any obsolete properties? (I don't see any obsolete property defined in the returned JSON when using the `property_search` endpoint)​

From: John Zobolas
Sent: Thursday, July 4, 2019 3:37 PM
To: [hidden email]
Subject: Combine search and property_search endpoints
 
​Hi,

The story:

I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:
http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)

The Questions:
  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support
Reply | Threaded
Open this post in threaded view
|

Re: [bioontology-support] obsolete properties (was: Combine search and property_search endpoints)

John Zobolas
In reply to this post by John Graybeal-2

Hi John,


Michael's answer covered me completely, but your insight into my question has also been helpful. Thanks for putting it as a future feature for BioPortal!


BR, John.


From: John Graybeal <[hidden email]>
Sent: Saturday, July 6, 2019 2:19 AM
To: John Zobolas
Cc: [hidden email]
Subject: Re: [bioontology-support] obsolete properties (was: Combine search and property_search endpoints)
 
Sorry, I wasn't thinking about Michael's answer in the right context—he is correct, if we aren't tracking the attribute in any of our property classes, we almost certainly can't be doing anything with it.

I've created a ticket to add this feature to BIoPortal (https://github.com/ncbo/ontologies_linked_data/issues/93). It is complex enough to implement that we may not be able to prioritize it in the near future.

John

On Jul 5, 2019, at 5:05 PM, John Graybeal <[hidden email]> wrote:

John,

I've created a new thread about your obsolete properties question.

I'm not sure exactly what you're asking (Is an obsolete property possible? Does an instance of an obsolete property exist in BioPortal? Does BioPortal contain code that handles obsolete properties?)  I find the various interpretation of 'property' in this context doesn't help us talk clearly about it either!

I have no idea if any of the ontologies in BioPortal contain obsolete properties; I know some do contain obsolete classes. Our interface allows specification of "obsolete status for ontology classes", as shown below (hope that can be displayed for you, or that you can get the idea), whenever a user creates a new submission (in the Advanced OWL section, under Identify Obsolete Classes). I am 98% sure these settings work for classes.

Optionally enter a property ID that indicates obsolete status for ontology classes (the property value must be set to "true"). Note that by default, BioPortal checks for existence of the owl:deprecated property.
Optionally enter a class ID for the root of an obsolete branch. All classes in the branch will be marked as obsolete, with the exception of the root class.
It so happens that the OWL 2 technique for specifying an obsolete property is the same as for specifying an obsolete class, namely, an annotation for the property that owl:deprecated is "true". I can't tell you today if BioPortal actually makes use of that information for properties (not sure we've had the question come up before, certainly not since my arrival in 2015).

Can you clarify what you'd like to know?  If it's about BioPortal's handling of properties that have been made obsolete, most likely we'll have to review the code and/or write some tests to determine the answer. You're welcome to tell us anything you learn in that regard!

John


On Jul 5, 2019, at 11:58 AM, Michael Dorf <[hidden email]> wrote:

Hi John,

I am not an ontology building expert, so can’t really speak with authority on whether there exists such a thing as an obsolete property. What I can tell for sure is that we don’t track that information in our system. There is no “obsolete” attribute defined on the properties model classes:


Michael


On Jul 4, 2019, at 6:48 AM, John Zobolas <[hidden email]> wrote:

​One more question: Are there any obsolete properties? (I don't see any obsolete property defined in the returned JSON when using the `property_search` endpoint)​

From: John Zobolas
Sent: Thursday, July 4, 2019 3:37 PM
To: [hidden email]
Subject: Combine search and property_search endpoints
 
​Hi,

The story:

I was using the `search` endpoint to request for a term in an ontology, but some people (while doing a free text search) wanted to get back the properties of the ontologies returned as terms - for example these ones: https://bioportal.bioontology.org/ontologies/OBOREL/?p=properties. So, asking for `causally related to` in the OBOREL ontology using the `search` endpoint returned nothing. I saw that you have a endpoint the `property_search` for that, which means that I will have to duplicate every search query that the users make. But then, when I request for IDs internally in my application, I ask queries like this one:
http://data.bioontology.org/search?q=http%3A%2F%2Fwww.semanticweb.org%2Fpallabi.d%2Fontologies%2F2014%2F2%2Funtitled-ontology-11%23CXorf36-Glu142%2A&ontologies=&require_exact_match=true&also_search_obsolete=true&display_context=false, and if it is an ID of a property, you have to ask also the `property_search` endpoint or otherwise you will never get it. So I have to duplicate the `getID` related-queries as well. For example, asking for this ID does not return anything: http://data.bioontology.org/search?q=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002410&exact_match=true&page=1&pagesize=130&display_context=false, but changing to the `property_search` endpoint you find all the ontologies that have this ID and refers to the `causally related to` term/label)

The Questions:
  • Why have two different endpoints for searching? Is it possible to provide a single endpoint that combines both?
  • I had been given a hacked kind of query to ask for all IDs within all ontologies in BioPortal (paginated): http://data.bioontology.org/search?ontologies=&ontology_types=ONTOLOGY&page=1&display_context=false. Do you know if the above will include the property terms? (I guess not because some of the properties of the returned JSON objects are different between the `search` and `property_search` endpoints)
BR, John.
​-----------------
John Zobolas
PhD Student
Department of Biology, Faculty of Natural Sciences, NTNU
Department of Clinical and Molecular Medicine, Faculty of Medicine and Health Sciences, NTNU

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

========================
John Graybeal
Technical Program Manager
Center for Expanded Data Annotation and Retrieval /+/ NCBO BioPortal
Stanford Center for Biomedical Informatics Research
650-736-1632


_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

========================
John Graybeal
Technical Program Manager
Center for Expanded Data Annotation and Retrieval /+/ NCBO BioPortal
Stanford Center for Biomedical Informatics Research
650-736-1632



_______________________________________________
bioontology-support mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/bioontology-support