205_taxon_abbreviated_lineage_flag

rq turtle/ttl

For human (taxon 9606), list every ancestor taxon in its lineage and whether that taxon is shown in UniProt's abbreviated lineage view (up:partOfLineage), as opposed to the full, non-abbreviated set of ancestors. Pairs with #183: since UniProt's taxonomy is pre-flattened, a single-hop rdfs:subClassOf already reaches every ancestor at any depth

Use at

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

SELECT
  ?ancestor
  ?ancestorName
  ?partOfLineage
WHERE {
  taxon:9606 rdfs:subClassOf ?ancestor .
  ?ancestor up:scientificName ?ancestorName .
  OPTIONAL { ?ancestor up:partOfLineage ?partOfLineage }
}
ORDER BY DESC(?partOfLineage)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?ancestor"):::projected 
  v3("?ancestorName"):::projected 
  v1("?partOfLineage"):::projected 
  c1(["taxon:9606"]):::iri 
  c1 --"rdfs:subClassOf"-->  v2
  v2 --"up:scientificName"-->  v3
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."up:partOfLineage".->  v1
  end