sparql-examples

A set of SPARQL examples that are used in different GerBI resources

View the Project on GitHub German-BioImaging/sparql-examples

006

rq turtle/ttl

Get all unique gene identifier urls.

Use at


PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX omecore: <https://ld.openmicroscopy.org/core/>
PREFIX omekg: <https://ld.openmicroscopy.org/omekg#>
PREFIX obda: <https://w3id.org/obda/vocabulary#>
PREFIX xml: <http://www.w3.org/XML/1998/namespace/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX kv: <http://www.openmicroscopy.org/ns/default/>
PREFIX idr: <https://idr.openmicroscopy.org/>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

select distinct ?url
where {
  ?img a omecore:Image ;
       omecore:hasAnnotation/omecore:mapEntry [omecore:key ?key; omecore:value ?url] .
  values ?key {"Gene Identifier URL"}
  }

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?img")
  v4("?key")
  v3("?url"):::projected 
  a2((" "))
  a1((" "))
  c2([https://ld.openmicroscopy.org/core/Image]):::iri 
  v1 --"a"-->  c2
  a1 --https://ld.openmicroscopy.org/core/key-->  v4
  a1 --https://ld.openmicroscopy.org/core/value-->  v3
  v1 --https://ld.openmicroscopy.org/core/hasAnnotation-->  a2
  a2 --https://ld.openmicroscopy.org/core/mapEntry-->  a1
  bind0[/VALUES ?key/]
  bind0-->v4
  bind00(["Gene Identifier URL"])
  bind00 --> bind0