131_Where_are_the_human_genes_encoding_enzymes_metabolizing_cholesterol_expressed: Where are the human genes encoding enzymes metabolizing cholesterol expressed?

PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> PREFIX CHEBI:<http://purl.obolibrary.org/obo/CHEBI_> PREFIX up:<http://purl.uniprot.org/core/> PREFIX taxon:<http://purl.uniprot.org/taxonomy/> PREFIX genex: <http://purl.org/genex#> PREFIX lscr: <http://purl.org/lscr#> SELECT distinct ?protein ?ensemblGene ?reaction ?anatomicEntityLabel ?anatomicEntity WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . ?reaction rh:equation ?reactionEquation . ?reaction rh:side ?reactionSide . ?reactionSide rh:contains ?participant . ?participant rh:compound ?compound . # compound constraint (CHEBI:16113 == cholesterol) ?compound rh:chebi CHEBI:16113 . SERVICE <https://sparql.uniprot.org/sparql> { # 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 . ?ca up:catalyzedReaction ?reaction . ?protein rdfs:seeAlso / up:transcribedFrom ?ensemblGene . } # federated query to Bgee (expression data) SERVICE <https://www.bgee.org/sparql/> { ?gene genex:isExpressedIn ?anatomicEntity . ?gene lscr:xrefEnsemblGene ?ensemblGene . ?anatomicEntity rdfs:label ?anatomicEntityLabel . } }Use

19_draft_human_metabolome: Generate a draft human metabolome

PREFIX chebislash: <http://purl.obolibrary.org/obo/chebi/> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX taxon: <http://purl.uniprot.org/taxonomy/> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?uniprot ?mnemonic ?rhea ?chebi ?smiles ?inchiKey WHERE { ?rhea rh:side/rh:contains/rh:compound ?compound . ?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi . ?chebi chebislash:smiles ?smiles ; chebislash:inchikey ?inchiKey . SERVICE <https://sparql.uniprot.org/sparql> { ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea ; up:organism taxon:9606 ; up:mnemonic ?mnemonic . } }Use

20_search_chemical_names_in_japanese: Search for Chemical names starting in Japanese, translated to english using allie

PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT * WHERE { SERVICE <https://data.allie.dbcls.jp/sparql>{ ?x rdfs:label "1,2,4-トリクロロベンゼン"@ja ; rdfs:label ?englishLabel . FILTER(lang(?englishLabel) = "en") } BIND(STR(?englishLabel) AS ?englishLabelStr) ?chebi rdfs:label|oboInOwl:hasSynonym ?englishLabelStr . }Use

21_count_rhea_examples: SELECT the number of reactions in Rhea

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT (count(?reaction) as ?reactionCount) WHERE { ?reaction rdfs:subClassOf rh:Reaction . }Use

22__Select_all_reactions_and_their_equation_ordered_by_reaction_identifier: Select all reactions and their equation, ordered by reaction identifier

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?reaction ?reactionId ?equation WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:equation ?equation . ?reaction rh:id ?reactionId . } ORDER BY ?reactionUse

23_Select_all_reaction_IDs_status_and_equations_ordered_by_reaction_identifier: Select all reaction IDs, status and equations ordered by reaction identifier

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?reactionId ?status ?equation WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:equation ?equation . ?reaction rh:status ?status . ?reaction rh:id ?reactionId . } ORDER BY ?reactionUse

24_Display_only_a_subset_of_reactions: Select the 10 reactions, with the lowest identifier by alphabetic sort

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?reaction ?reactionId WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:id ?reactionId . } ORDER BY ?reaction LIMIT 10Use

25_Select_the_first_10_reactions_starting_from_the_fifth_reaction: Select the fifth to fiftheenth (inclusive) reactions, with the lowest identifier by alphabetic sort

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?reaction ?reactionId WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:id ?reactionId . } ORDER BY ?reaction LIMIT 10 OFFSET 5Use

26_Select_the_number_of_reactions_with_status_Approved: Select the number of reactions with status Approved

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT (count(?reaction) as ?reactionCount) WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . }Use

27_Select_the_number_of_reactions_that_have_Xrefs: Select the number of reactions that have cross-references

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT (count(distinct ?reaction) as ?distinctReactionCount) WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:directionalReaction ?directionalReaction . ?reaction rh:bidirectionalReaction ?bidirectionalReaction . OPTIONAL { ?directionalReaction rdfs:seeAlso ?xref . } OPTIONAL { ?bidirectionalReaction rdfs:seeAlso ?xref . } FILTER (BOUND(?xref)) }Use

28_Select_all_reactions_with_Xrefs: Select all reactions with cross-references

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT ?reaction WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:directionalReaction ?directionalReaction . ?reaction rh:bidirectionalReaction ?bidirectionalReaction . OPTIONAL { ?directionalReaction rdfs:seeAlso ?xref . } OPTIONAL { ?bidirectionalReaction rdfs:seeAlso ?xref . } FILTER (BOUND(?xref)) } ORDER BY ?reactionUse

29_Select_all_approved_reactions_linked_to_PMID_X: Select all approved reactions linked to PMID:2460092

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX pubmed:<http://rdf.ncbi.nlm.nih.gov/pubmed/> SELECT ?reaction ?reactionEquation WHERE { BIND(pubmed:2460092 AS ?cit) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . ?reaction rh:equation ?reactionEquation . ?reaction rh:citation ?cit . } ORDER BY ?reactionUse

30_Select_all_approved_reactions_annotated_with_a_given_Pubmed_ID: Select all approved reactions annotated with a given Pubmed ID (2460092, and show the pubmed id in result as text, using strafter and BIND)

PREFIX rh:<http://rdf.rhea-db.org/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX pubmed:<http://rdf.ncbi.nlm.nih.gov/pubmed/> SELECT ?reaction ?pubMedID ?reactionEquation WHERE { BIND(pubmed:2460092 AS ?cit) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . ?reaction rh:equation ?reactionEquation . ?reaction rh:citation ?cit . BIND(strafter(str(?cit), str(pubmed:)) AS ?pubMedID ) }Use

31_Select_the_average_number_of_citation_of_reactions_that_have_at_least_one_citation: Select the average number of citation of reactions that have at least one citation

PREFIX rh: <http://rdf.rhea-db.org/> SELECT (AVG(?linksToPubmedPerReaction) AS ?avgLinksToPubmedPerReaction) WHERE { SELECT ?reaction (COUNT(DISTINCT ?citation) AS ?linksToPubmedPerReaction) WHERE { ?reaction rh:citation ?citation . } GROUP BY ?reaction ORDER BY DESC(?linksToPubmedPerReaction) }Use

32_Select_the_distribution_of_reactions_according_to_their_status: Select the distribution of reactions according to their status

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> SELECT ?status (count(?reaction) as ?reactionCount) WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status ?status . } GROUP BY ?statusUse

33_Select_all_approved_transport_reactions: Select all approved transport reactions

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> SELECT ?reaction ?reactionEquation WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . ?reaction rh:equation ?reactionEquation . ?reaction rh:isTransport true } ORDER BY ?reactionUse

34_Select_all_cross-references_for_a_given_reaction: Select all cross-references for a given reaction (RHEA:11680)

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> SELECT ?reaction ?xref WHERE { BIND (rh:11680 AS ?reaction) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:directionalReaction ?directionalReaction . OPTIONAL { ?directionalReaction rdfs:seeAlso ?xref . } ?reaction rh:bidirectionalReaction ?bidirectionalReaction . OPTIONAL { ?bidirectionalReaction rdfs:seeAlso ?xref . } }Use

35_Select_all_cross-references_Kegg_MetaCyc_Macie_for_a_given_reaction: Select all cross-references (to KEGG, MetaCyc, Macie, ...) for a given reaction (RHEA:11932)

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> SELECT ?reaction ?xref WHERE { BIND (rh:11932 AS ?reaction) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:directionalReaction ?directionalReaction . OPTIONAL { ?directionalReaction rdfs:seeAlso ?xref . } ?reaction rh:bidirectionalReaction ?bidirectionalReaction . OPTIONAL { ?bidirectionalReaction rdfs:seeAlso ?xref . } }Use

36_Select_the_number_of_reactions_with_cross-references_to_KEGG_resource: Select the number of reactions with cross-references to KEGG resource (via bidirectional rhea reactions)

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX kegg: <http://identifiers.org/kegg.reaction/> SELECT (count(?reaction) as ?reactionCount) WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:bidirectionalReaction ?bidirectionalReaction . ?bidirectionalReaction rdfs:seeAlso ?xref . FILTER (regex(?xref, str(kegg:))) }Use

37_Select_the_number_of_reactions_with_cross-references_to_MetaCyc: Select the number of reactions with cross-references to MetaCyc

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> PREFIX CHEBI:<http://purl.obolibrary.org/obo/CHEBI_> PREFIX up:<http://purl.uniprot.org/core/> PREFIX keywords:<http://purl.uniprot.org/keywords/> PREFIX taxon:<http://purl.uniprot.org/taxonomy/> SELECT (count(distinct ?rhea) as ?rheaMetacycCount) (count(distinct ?xref) as ?metacycRheaCount) (count(?rhea) as ?rheaMetacycXrefCount) WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:status rh:Approved . ?rhea rh:directionalReaction ?directionalReaction . ?rhea rh:bidirectionalReaction ?bidirectionalReaction . { ?directionalReaction rdfs:seeAlso ?xref . FILTER regex(str(?xref), "METACYC") . } UNION { ?bidirectionalReaction rdfs:seeAlso ?xref . FILTER regex(str(?xref), "METACYC") . } UNION { ?rhea rdfs:seeAlso ?xref . FILTER regex(str(?xref), "METACYC") . } }Use

39_Select_all_reactions_annotated_with_a_given_Pubmed_ID: Select all reactions annotated with a given Pubmed ID

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> PREFIX pubmed:<http://rdf.ncbi.nlm.nih.gov/pubmed/> SELECT ?reaction ?pubMedID ?reactionEquation WHERE { BIND(pubmed:2460092 AS ?pubMedID) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . ?reaction rh:equation ?reactionEquation . ?reaction rh:citation ?pubMedID . }Use

40_Select_all_citations_of_a_given_reaction: Select all citations of a given reaction

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> PREFIX pubmed:<http://rdf.ncbi.nlm.nih.gov/pubmed/> SELECT ?reaction ?citation WHERE { BIND(rh:11680 AS ?reaction) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:citation ?citation . }Use

41_Select_all_reactions_with_citations_display_the_number_of_citations_and_order_by_reaction_ID: Select all reactions with citations, display the number of citations and ORDER BY reaction ID

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> SELECT ?reaction (COUNT(DISTINCT ?citation) AS ?countPubmedPerReaction) WHERE { ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:citation ?citation . } GROUP BY ?reaction ORDER BY DESC (COUNT(DISTINCT ?citation))Use

42_Select_the_average_number_of_citation_of_reactions_that_have_at_least_one_citation: Select the average number of citation of reactions that have at least one citation

PREFIX rh: <http://rdf.rhea-db.org/> SELECT (AVG(?linksToPubmedPerReaction) AS ?avgLinksToPubmedPerReaction) WHERE { SELECT ?reaction (COUNT(DISTINCT ?citation) AS ?linksToPubmedPerReaction) WHERE { ?reaction rh:citation ?citation . } GROUP BY ?reaction ORDER BY DESC(?linksToPubmedPerReaction) }Use

43_Select_the_child_reactions_of_a_given_reaction_in_the_Rhea_hierarchy: Select the child reaction(s) of a given reaction (RHEA:11628) in the Rhea hierarchy, (using rdfs:subClassOf)

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> SELECT ?reaction ?equation ?childReaction ?childEquation WHERE { BIND (rh:11628 AS ?reaction) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . ?reaction rh:equation ?equation . ?childReaction rdfs:subClassOf rh:Reaction . ?childReaction rh:status rh:Approved . ?childReaction rdfs:subClassOf ?reaction . ?childReaction rh:equation ?childEquation . }Use

44_Select_the_descendant_reactions_of_a_given_reaction_in_the_Rhea_hierarchy: Select the descendant reaction(s) of a given reaction (RHEA:11628) in the Rhea hierarchy, (using rdfs:subClassOf+)

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh:<http://rdf.rhea-db.org/> SELECT ?reaction ?equation ?descendantReaction ?descendantEquation WHERE { BIND(rh:11628 AS ?reaction) ?reaction rdfs:subClassOf rh:Reaction . ?reaction rh:status rh:Approved . ?reaction rh:equation ?equation . ?descendantReaction rdfs:subClassOf rh:Reaction . ?descendantReaction rh:status rh:Approved . ?descendantReaction rdfs:subClassOf+ ?reaction . ?descendantReaction rh:equation ?descendantEquation . }Use