From f3631e7cfb9fb7c60fa00cb68701af03b5c67dc8 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Tue, 21 May 2024 16:26:12 +0200 Subject: [PATCH] testing with a few initial oma sparql querries --- check.sh | 3 ++- convertToOneTurtle.sh | 3 ++- oma/01-rat-proteins.ttl | 20 ++++++++++++++++++++ oma/02-all-species.ttl | 16 ++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 oma/01-rat-proteins.ttl create mode 100644 oma/02-all-species.ttl diff --git a/check.sh b/check.sh index 159b5339c..74aedeac8 100755 --- a/check.sh +++ b/check.sh @@ -17,7 +17,7 @@ prefixes=$(sparql --results=TSV --data=prefixes.ttl "PREFIX sh: +prefix sh: +prefix rdfs: +prefix schema: +ex:1 + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Find all Rattus norvegicus' proteins present in OMA RDF database.""" ; + sh:select """SELECT ?protein ?OMA_link +WHERE +{ + ?protein a orth:Protein. + ?protein orth:organism ?organism. + ?inTaxon rdfs:label 'in taxon'@en. + ?organism ?inTaxon ?taxon. + ?taxon up:scientificName 'Rattus norvegicus'. + ?protein rdfs:seeAlso ?OMA_link. +}""" . + diff --git a/oma/02-all-species.ttl b/oma/02-all-species.ttl new file mode 100644 index 000000000..2e2657520 --- /dev/null +++ b/oma/02-all-species.ttl @@ -0,0 +1,16 @@ +prefix ex: +prefix sh: +prefix rdfs: +prefix schema: +ex:1 + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Which species are available on OMA database and their scientific names?""" ; + sh:select """SELECT ?species ?sciname WHERE +{ + ?species a up:Taxon. + ?species up:scientificName ?sciname. + ?species up:rank up:Species. +}""" . +