From c7c641bbdd387124f5e9de97b40893e7fc0795a6 Mon Sep 17 00:00:00 2001 From: Chris Mungall Date: Thu, 9 May 2024 09:33:12 -0700 Subject: [PATCH] Adding skos-xref-duplicate to obo compliance suite (#752) * Adding skos-xref-duplicate to obo compliance suite See https://github.com/geneontology/obographs/issues/102 * derived files --- tests/input/obo-compliance.obo | 15 ++++ .../skos-xref-duplicate.expected.json | 45 ++++++++++ .../skos-xref-duplicate.expected.obo | 13 +++ .../skos-xref-duplicate.expected.ofn | 53 +++++++++++ .../skos-xref-duplicate.expected.owl | 90 +++++++++++++++++++ .../skos-xref-duplicate.meta.yaml | 5 ++ .../skos-xref-duplicate.obo | 13 +++ 7 files changed, 234 insertions(+) create mode 100644 tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.json create mode 100644 tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.obo create mode 100644 tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.ofn create mode 100644 tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.owl create mode 100644 tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.meta.yaml create mode 100644 tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.obo diff --git a/tests/input/obo-compliance.obo b/tests/input/obo-compliance.obo index a0ca211cf..f70afd914 100644 --- a/tests/input/obo-compliance.obo +++ b/tests/input/obo-compliance.obo @@ -268,6 +268,21 @@ relationship: skos:exactMatch Y:1 id: skos:exactMatch is_metadata_tag: true +!! name: skos-xref-duplicate +!! description: Using both xref and skos relationship (annotation) to communicate the same mapping +!! seeAlso: https://github.com/geneontology/obographs/issues/102 +!! unstable: true +idspace: skos http://www.w3.org/2004/02/skos/core# + +[Term] +id: X:1 +relationship: skos:exactMatch Y:1 +xref: Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + !! name: alt_id !! description: Alternative ID for the term diff --git a/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.json b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.json new file mode 100644 index 000000000..60132f7e3 --- /dev/null +++ b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.json @@ -0,0 +1,45 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/skos-xref-duplicate.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "xrefs" : [ { + "val" : "Y:1" + } ], + "basicPropertyValues" : [ { + "pred" : "http://www.w3.org/2004/02/skos/core#exactMatch", + "val" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasDbXref", + "lbl" : "database_cross_reference", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#id", + "lbl" : "id", + "type" : "PROPERTY" + }, { + "id" : "http://www.w3.org/2004/02/skos/core#exactMatch", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.obo b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.obo new file mode 100644 index 000000000..e669b8eac --- /dev/null +++ b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.obo @@ -0,0 +1,13 @@ +format-version: 1.2 +idspace: skos http://www.w3.org/2004/02/skos/core# +ontology: skos-xref-duplicate + +[Term] +id: X:1 +xref: Y:1 +relationship: skos:exactMatch Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.ofn b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.ofn new file mode 100644 index 000000000..76d3f55a2 --- /dev/null +++ b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.ofn @@ -0,0 +1,53 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) +Prefix(skos:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(skos:exactMatch)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (database_cross_reference) + +AnnotationAssertion(rdfs:label "database_cross_reference") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + +# Annotation Property: (id) + +AnnotationAssertion(rdfs:label "id") + +# Annotation Property: skos:exactMatch (skos:exactMatch) + +AnnotationAssertion( skos:exactMatch "skos:exactMatch") +AnnotationAssertion( skos:exactMatch "true"^^xsd:boolean) + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "Y:1") +AnnotationAssertion( "X:1") +AnnotationAssertion(skos:exactMatch ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.owl b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.owl new file mode 100644 index 000000000..497358778 --- /dev/null +++ b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.expected.owl @@ -0,0 +1,90 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + id + + + + + + + + + + + + + + skos:exactMatch + true + + + + + + + + + + + + + Y:1 + X:1 + + + + + + + + diff --git a/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.meta.yaml b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.meta.yaml new file mode 100644 index 000000000..602cf905a --- /dev/null +++ b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.meta.yaml @@ -0,0 +1,5 @@ +name: skos-xref-duplicate +name: skos-xref-duplicate +description: Using both xref and skos relationship (annotation) to communicate the same mapping +seeAlso: https://github.com/geneontology/obographs/issues/102 +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.obo b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.obo new file mode 100644 index 000000000..cac3ecaa4 --- /dev/null +++ b/tests/input/obo-compliance/skos-xref-duplicate/skos-xref-duplicate.obo @@ -0,0 +1,13 @@ +format-version: 1.4 +ontology: skos-xref-duplicate +idspace: skos http://www.w3.org/2004/02/skos/core# + +[Term] +id: X:1 +relationship: skos:exactMatch Y:1 +xref: Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true +