Closed leechuck closed 9 years ago
OWLAPI produces weird labels from xrefs in ChEBI.
Reproduce with the following code:
OWLOntologyManager oManager; OWLDataFactory df = OWLManager.getOWLDataFactory() ; OWLOntologyManager lManager = OWLManager.createOWLOntologyManager() OWLOntologyLoaderConfiguration config = new OWLOntologyLoaderConfiguration() config.setFollowRedirects(true) config = config.setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT) def fSource = new FileDocumentSource(new File('chebi.obo')) def ontology = lManager.loadOntologyFromOntologyDocument(fSource, config)
def cl = df.getOWLClass(IRI.create("http://purl.obolibrary.org/obo/CHEBI_82978")) EntitySearcher.getAnnotations(cl, ontology, df.getRDFSLabel()).each { annotation -> // OWLAnnotation println annotation }
XRefs are now parsed out of the labels using annotation assertion axioms of http://www.geneontology.org/formats/oboInOwl#hasDbXref
https://github.com/bio-ontology-research-group/AberOWL/commit/2e78b827d77309ee0970c1d8d824c79a9df3e41e
@leechuck Are there any other IRIs you know of used to indicate XRefs?
OWLAPI produces weird labels from xrefs in ChEBI.
Reproduce with the following code:
OWLOntologyManager oManager; OWLDataFactory df = OWLManager.getOWLDataFactory() ; OWLOntologyManager lManager = OWLManager.createOWLOntologyManager() OWLOntologyLoaderConfiguration config = new OWLOntologyLoaderConfiguration() config.setFollowRedirects(true) config = config.setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT) def fSource = new FileDocumentSource(new File('chebi.obo')) def ontology = lManager.loadOntologyFromOntologyDocument(fSource, config)
def cl = df.getOWLClass(IRI.create("http://purl.obolibrary.org/obo/CHEBI_82978")) EntitySearcher.getAnnotations(cl, ontology, df.getRDFSLabel()).each { annotation -> // OWLAnnotation println annotation }