181_subcellular_locations_that_are_membranes

rq turtle/ttl

Find every subcellular location that is itself a kind of membrane, by reasoning back to locations:162 ("Membrane") over the same mixed rdfs:subClassOf/up:partOf hierarchy as #180. Nothing states directly that e.g. Endosome membrane "is a membrane" - it has to be derived by following the location hierarchy up to the Membrane term

Use at

PREFIX up: <http://purl.uniprot.org/core/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT
  ?location
  ?locationName
WHERE {
  GRAPH <http://sparql.uniprot.org/locations> {
    ?location rdfs:subClassOf*/up:partOf+/rdfs:subClassOf* <http://purl.uniprot.org/locations/162> ;
      skos:prefLabel ?locationName .
  }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?location"):::projected 
  v2("?locationName"):::projected 
  a1((" "))
  a2((" "))
  c4([http://purl.uniprot.org/locations/162]):::iri 
  v1 --"rdfs:subClassOf"-->  a1
  a1 --"up:partOf"-->  a2
  a2 --"rdfs:subClassOf"-->  c4
  v1 --"skos:prefLabel"-->  v2