From 1b700759f23c79d20f3e3ea88f1181f9f36e9db6 Mon Sep 17 00:00:00 2001 From: Vincent Emonet Date: Thu, 23 May 2024 10:54:56 +0200 Subject: [PATCH] Fix UniProt SPARQL query example 49, broken due to an outdated Bgee SPARQL endpoint URL used for the SERVICE call, and mismatching ensembl URI used --- uniprot/49.ttl | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/uniprot/49.ttl b/uniprot/49.ttl index 0925ff369..d998882a8 100644 --- a/uniprot/49.ttl +++ b/uniprot/49.ttl @@ -1,29 +1,23 @@ -prefix ex: -prefix sh: +prefix ex: +prefix sh: prefix schema: -prefix rdf: -prefix rdfs: +prefix rdf: +prefix rdfs: ex:49 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; schema:target ; rdfs:label """Where are the human genes encoding enzymes metabolizing cholesterol expressed? (double federated query)""" ; rdfs:comment """Retrieve the UniProt proteins, their catalyzed Rhea reactions, their encoding genes (Ensembl) and the anatomic entities where the genes are expressed (UBERON anatomic entites from Bgee expression data resource).""" ; - sh:select """SELECT - DISTINCT - ?protein - ?ensemblGene - ?reaction - ?anatomicEntityLabel - ?anatomicEntity + sh:select """SELECT DISTINCT ?protein ?ensemblGene ?reaction ?anatomicEntityLabel ?anatomicEntity WHERE { # federated query to Rhea enadpoint { SELECT DISTINCT ?reaction WHERE { SERVICE { - ?reaction rdfs:subClassOf rh:Reaction . - ?reaction rh:equation ?reactionEquation . - ?reaction rh:side ?reactionSide . + ?reaction rdfs:subClassOf rh:Reaction ; + rh:equation ?reactionEquation ; + rh:side ?reactionSide . ?reactionSide rh:contains ?participant . ?participant rh:compound ?compound . # compound constraint (CHEBI:16113 == cholesterol) @@ -32,17 +26,17 @@ WHERE { } } # taxonomy constraint (taxon:9606 == Homo sapiens) - ?protein up:organism taxon:9606 . - ?protein up:annotation ?a . - ?a a up:Catalytic_Activity_Annotation . - ?a up:catalyticActivity ?ca . + ?protein up:organism taxon:9606 ; + up:annotation ?a . + ?a a up:Catalytic_Activity_Annotation ; + up:catalyticActivity ?ca . ?ca up:catalyzedReaction ?reaction . ?protein rdfs:seeAlso / up:transcribedFrom ?ensemblGene . - # federated query to Bgee (expression data) - SERVICE { - ?gene genex:isExpressedIn ?anatomicEntity . - ?gene lscr:xrefEnsemblGene ?ensemblGene . + BIND(IRI(REPLACE(STR(?ensemblGene), "\\.[0-9]+$", "")) AS ?ensemblGeneNoVersion) + SERVICE { + ?gene lscr:xrefEnsemblGene ?ensemblGeneNoVersion ; + genex:isExpressedIn ?anatomicEntity . ?anatomicEntity rdfs:label ?anatomicEntityLabel . } }""" .