ebi-chebi / ChEBI

Chemical Entities of Biological Interest (ChEBI) is a freely available dictionary of molecular entities focused on ‘small’ chemical compounds.
https://www.ebi.ac.uk/chebi
Creative Commons Attribution 4.0 International
39 stars 10 forks source link

Ontology term 'mixed' CHEBI:60004 missing from a number of compounds #4474

Open kaxelsen opened 5 months ago

kaxelsen commented 5 months ago

Hi Adnan,

Jerven from our development team identified a range of compounds which in their definitions were described as mixtures without being linked to 'mixture ' in the ontology.

He has generated a list which is currently available at this URL: https://tinyurl.com/ypxjhtl2

If it expires you can generate the list at sparql.rhea-db.org using this query: SELECT ?chebi ?label ?comment WHERE { GRAPH < http://sparql.rhea-db.org/chebi> { ?chebi < http://purl.obolibrary.org/obo/IAO_0000115> ?comment . FILTER(CONTAINS(?comment, "mixture")) OPTIONAL { ?chebi rdfs:subClassOf CHEBI:60004 . BIND(true AS ?isMixture) } FILTER(!BOUND(?isMixture)) FILTER(?chebi != CHEBI:60004) ?chebi rdfs:label ?label . } }

Best, Kristian

JervenBolleman commented 5 months ago

Formatted query written in a way that can be run at ontobee or rhea-db

PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX owl: <http://www.w3.org/2002/07/owl#> 
SELECT ?chebi ?label ?comment
FROM <http://sparql.rhea-db.org/chebi>
FROM <http://purl.obolibrary.org/obo/merged/CHEBI>
WHERE {
  ?chebi <http://purl.obolibrary.org/obo/IAO_0000115> ?comment .
  FILTER(CONTAINS(?comment, "mixture"))
  OPTIONAL {
    ?chebi rdfs:subClassOf* CHEBI:60004 .
    BIND(true AS ?isMixture)
  }
  FILTER(!BOUND(?isMixture))
  FILTER(?chebi != CHEBI:60004)
  ?chebi rdfs:label ?label .
}

This query is slightly different and shows 90 result at this time. This one materializes the full "is_a" hierarchy, that I thought was already materialized in the data sources.