176_taxon_names_not_unique

rq turtle/ttl

Find up:scientificName values that label more than one taxon. The same string can genuinely be reused for unrelated nodes in UniProt's taxonomy: a higher-rank name is sometimes also reused at genus rank (e.g. Acanthocephala, a phylum of thorny-headed worms, is also an insect genus elsewhere in the tree); "environmental samples" is a special case, a placeholder reused thousands of times under many different higher taxa for unclassified/metagenomic entries

Use at

PREFIX up: <http://purl.uniprot.org/core/>

SELECT
  ?scientificName
  (COUNT(?taxon) AS ?taxonCount)
  (GROUP_CONCAT(SUBSTR(STR(?taxon), 34); separator=",") AS ?taxonIds)
WHERE {
  ?taxon up:scientificName ?scientificName .
}
GROUP BY ?scientificName
HAVING (COUNT(?taxon) > 1)
ORDER BY ?scientificName
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?_anon_having_1412439080f2472d4cc7b45b0c4bfe72d4710")
  v1("?scientificName"):::projected 
  v2("?taxon"):::projected 
  v4("?taxonCount")
  v5("?taxonIds")
  a1((" "))
  f0[[" > '1^^xsd:integer'"]]
  f0 --> a1
  v2 --"up:scientificName"-->  v1
  bind4[/"count(?taxon)"/]
  v2 --o bind4
  bind4 --as--o v3
  bind5[/"count(?taxon)"/]
  v2 --o bind5
  bind5 --as--o v4
  bind6[/"substring(str(?taxon),'34^^xsd:integer')"/]
  v2 --o bind6
  bind6 --as--o v5