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

AG: ontology report errors out with SPARQL::Client::MalformedQuery: MALFORMED QUERY: Line 1, Found '<'. #147

Open
alexskr opened this issue Aug 29, 2023 · 1 comment
Assignees

Comments

@alexskr
Copy link
Member

alexskr commented Aug 29, 2023

ncbo_ontology_report_rebuild errors out when running for ANC, AUTISM,CMECS2, ELD, ETH_ANC (and other) ontologies with the following error:

E, [2023-08-28T16:59:56.515128 #10922] ERROR -- : Error during ontologies report paging - SPARQL::Client::MalformedQuery: MALFORMED QUERY: Line 1, Found '<'. Was expecting one of: ABS, AVG, BNODE, BOUND, CEIL, COALESCE, CONCAT, CONTAINS, COUNT, DATATYPE, DAY, DECIMAL, DOUBLE, ENCODE_FOR_URI, EXISTS, FALSE, FLOOR, GROUP_CONCAT, HOURS, IF, INTEGER, IRI, ISBLANK, ISIRI, ISLITERAL, ISNUMERIC, ISTRIPLE, ISURI, LANG, LANGMATCHES, LCASE, MAX, MD5, MIN, MINUTES, MONTH, NOT, NOW, NUMERIC-PLUS, Q_IRI_REF, QNAME, QNAME_NS, RAND, REGEX, REPLACE, ROUND, SAMETERM, SAMPLE, SECONDS, SHA1, SHA256, SHA384, SHA512, STR, STRAFTER, STRBEFORE, STRDT, STRENDS, STRING_LITERAL1, STRING_LITERAL2, STRING_LITERAL_LONG1, STRING_LITERAL_LONG2, STRLANG, STRLEN, STRSTARTS, STRUUID, SUBSTR, SUM, TIMEZONE, TRUE, TZ, UCASE, URI, UUID, VARNAME, YEAR or punctuation '!', '(', '+', '-', '<<'.
@mdorf
Copy link
Member

mdorf commented Aug 29, 2023

All these ontologies indeed have errors in their structure, resulting in malformed queries downstream. Examples:

AUTISM:

SELECT DISTINCT ?id ?prefLabel ?definition ?synonym ?obsolete 
FROM <http://data.bioontology.org/ontologies/AUTISM/submissions/1> 
WHERE { ?id a <http://www.w3.org/2002/07/owl#Class> . 
       OPTIONAL { ?id ?rewrite0 ?prefLabel . 
                 FILTER(?rewrite0 = <http://data.bioontology.org/metadata/def/prefLabel> || 
                        ?rewrite0 = <http://www.w3.org/2004/02/skos/core#prefLabel>) } 
       OPTIONAL { ?id ?rewrite1 ?definition . 
                 FILTER(?rewrite1 = <http://purl.obolibrary.org/obo/IAO_0000115> || 
                        ?rewrite1 = <http://www.w3.org/2000/01/rdf-schema#comment> || 
                        ?rewrite1 = <http://purl.obolibrary.org/obo/def> || 
                        ?rewrite1 = <http://www.w3.org/2004/02/skos/core#definition>) } 
       OPTIONAL { ?id ?rewrite2 ?synonym . 
                 FILTER(?rewrite2 = <http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym> || 
                        ?rewrite2 = <http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym> || 
                        ?rewrite2 = <http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym> || 
                        ?rewrite2 = <http://purl.obolibrary.org/obo/synonym> || 
                        ?rewrite2 = <http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> || 
                        ?rewrite2 = <http://www.w3.org/2004/02/skos/core#altLabel>) } 
       OPTIONAL { ?id <http://www.w3.org/2002/07/owl#deprecated> ?obsolete . } 
       			FILTER(?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_a109c71b_678e_4d1a_9a69_0d61f66b2a52Defintion> || 
                       ?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_2aaf4433_1364_442f_b187_2caa2463b0d3Defintion> || 
                       ?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_6626a718_0552_45ea_bc3d_d8239d7b92b7Defintion> || 
                       ?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_c3456d7b_ee8b_4c5f_abbd_bdcb365c7e94Defintion> || 
                       ?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_283ae24f_3b85_44fc_b31b_9dec20ee4398Defintion> || 
                       ?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_ae391391_9b4e_4a57_8dcb_7662fd433803Defintion> || 
                       ?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_c009618f_346f_46c7_8bc1_9a32653854feDefintion> || 
                       ?id = <C:/Users/maryk_000/2020/7/untitled-AutismOn#[OWL]_3c9e4ec4_04f7_4633_abe2_3b0020b7e892Defintion>) })

ANC:

SELECT DISTINCT ?id 
FROM <http://data.bioontology.org/ontologies/ANC/submissions/1> 
WHERE { ?id a <http://www.w3.org/2004/02/skos/core#Concept> . 
       FILTER(?id = <http://vocab.vodana.org/gdmt/Dateofvisit (DD/MM/YY)>) })

ETH_ANC:

SELECT DISTINCT ?id FROM <http://data.bioontology.org/ontologies/ETH_ANC/submissions/2> 
WHERE { ?id a <http://www.w3.org/2004/02/skos/core#Concept> . 
       FILTER(?id = <http://vocab.vodana.org/ETH-ANC/KnownHIVpositives (transferredfromART)>) })

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

No branches or pull requests

2 participants