Search Mailing List Archives
[bioontology-support] another strange query
manuelso
manuelso at stanford.edu
Mon May 14 14:32:54 PDT 2012
Hi Helena,
Our public endpoint has timeouts enabled. This means that for expensive queries you might now get all the answers. You just hit one of the cases.
Q1 can be optimized very easily and the time out is not reached, therefore you get all answers.
In Q2 because "?uri = <http://purl.obolibrary.org/obo/CHEBI_26195>" is commented the join of labels and subclasses from CHEBI becomes a big join that hits the time out. One way to fix this is to run the query in two steps:
(A) Find the URI with:
SELECT *
FROM <http://bioportal.bioontology.org/ontologies/CHEBI>
WHERE {
?uri <http://www.w3.org/2000/01/rdf-schema#label> ?label .
filter regex(?label, "polyphenol")
}
(B) get the subclasses
SELECT *
FROM <http://bioportal.bioontology.org/ontologies/CHEBI>
WHERE {
<URI_FROM_QUERY_A> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?sc .
}
Best,
Manuel
On May 14, 2012, at 2:13 PM, Helena Deus wrote:
> Hi,
>
> Second strage behavior:
> Q1:
> SELECT *
> FROM <http://bioportal.bioontology.org/ontologies/CHEBI>
> WHERE {
> ?uri <http://www.w3.org/2000/01/rdf-schema#label> ?label .
> ?uri <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?sc .
> filter regex(?label, "polyphenol")
> filter (?uri = <http://purl.obolibrary.org/obo/CHEBI_26195>)
> }
>
> Results:
> uri label sc
> <http://purl.obolibrary.org/obo/CHEBI_26195> "polyphenol" <http://purl.obolibrary.org/obo/CHEBI_33822>
>
>
> Q2.
> SELECT *
> FROM <http://bioportal.bioontology.org/ontologies/CHEBI>
> WHERE {
> ?uri <http://www.w3.org/2000/01/rdf-schema#label> ?label .
> ?uri <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?sc .
> filter regex(?label, "polyphenol")
> #filter (?uri = <http://purl.obolibrary.org/obo/CHEBI_26195>)
> }
> Result: No results ...
>
> --
> Helena F. Deus
> Post-Doctoral Researcher at DERI/NUIG
> http://lenadeus.info/
>
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/bioontology-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20120514/87d56609/attachment.html>
More information about the bioontology-support
mailing list