diff --git a/src/oaklib/converters/obo_graph_to_rdf_owl_converter.py b/src/oaklib/converters/obo_graph_to_rdf_owl_converter.py index 767781d30..08e7a5888 100644 --- a/src/oaklib/converters/obo_graph_to_rdf_owl_converter.py +++ b/src/oaklib/converters/obo_graph_to_rdf_owl_converter.py @@ -24,6 +24,7 @@ HAS_RELATED_SYNONYM, ) from oaklib.types import CURIE +from oaklib.utilities.format_utilities import RDFLIB_SYNTAX_ALIAS_MAP TRIPLE = Tuple[rdflib.URIRef, rdflib.URIRef, Any] @@ -45,7 +46,7 @@ class OboGraphToRdfOwlConverter(DataModelConverter): """Converts from OboGraph to OWL layered on RDF.""" - def dump(self, source: GraphDocument, target: str = None, **kwargs) -> None: + def dump(self, source: GraphDocument, target: str = None, format="turtle", **kwargs) -> None: """ Dump an OBO Graph Document to a FHIR CodeSystem @@ -54,10 +55,13 @@ def dump(self, source: GraphDocument, target: str = None, **kwargs) -> None: :return: """ g = self.convert(source) + # TODO: simplify this, see https://github.com/INCATools/ontology-access-kit/issues/687 + if format in RDFLIB_SYNTAX_ALIAS_MAP: + format = RDFLIB_SYNTAX_ALIAS_MAP[format] if target is None: - print(g.serialize(format="turtle")) + print(g.serialize(format=format)) else: - g.serialize(format="turtle", destination=target) + g.serialize(format=format, destination=target) def convert( self, source: Union[Graph, GraphDocument], target: rdflib.Graph = None, **kwargs @@ -157,6 +161,8 @@ def _add_reified( target.add((pred, RDF.type, OWL.AnnotationProperty)) def _uri_ref(self, curie: CURIE) -> rdflib.URIRef: + if ":" not in curie: + curie = f"obo:{curie}" if self.curie_converter is None: self.curie_converter = BasicOntologyInterface().converter uri = self.curie_converter.expand(curie, passthrough=True) diff --git a/src/oaklib/implementations/simpleobo/simple_obo_implementation.py b/src/oaklib/implementations/simpleobo/simple_obo_implementation.py index 4f9991cde..5bffb968f 100644 --- a/src/oaklib/implementations/simpleobo/simple_obo_implementation.py +++ b/src/oaklib/implementations/simpleobo/simple_obo_implementation.py @@ -643,7 +643,7 @@ def dump(self, path: Union[str, TextIO] = None, syntax: str = "obo", **kwargs): else: self.obo_document.dump(path) else: - super().dump(path, syntax) + super().dump(path, syntax=syntax) def save( self, @@ -706,6 +706,8 @@ def node(self, curie: CURIE, strict=False, include_metadata=False) -> obograph.N meta.definition = obograph.DefinitionPropertyValue(val=defn) for _, syn in self.synonym_property_values([curie]): meta.synonyms.append(syn) + for _, subset in self.terms_subsets([curie]): + meta.subsets.append(subset) return obograph.Node(id=curie, lbl=self.label(curie), type=typ, meta=meta) def as_obograph(self, expand_curies=False) -> Graph: diff --git a/src/oaklib/implementations/simpleobo/simple_obo_parser.py b/src/oaklib/implementations/simpleobo/simple_obo_parser.py index b07a4bbc7..230dc2b44 100644 --- a/src/oaklib/implementations/simpleobo/simple_obo_parser.py +++ b/src/oaklib/implementations/simpleobo/simple_obo_parser.py @@ -372,7 +372,7 @@ def intersection_of_tuples(self) -> List[Tuple[CURIE, Optional[CURIE]]]: pairs = [] for v in self._values(TAG_INTERSECTION_OF): toks = [x for x in v.split(" ") if x] - if toks[1].startswith("!"): + if len(toks) == 1 or toks[1].startswith("!"): pairs.append((toks[0], None)) else: pairs.append((toks[0], toks[1])) @@ -382,7 +382,7 @@ def property_value_tuples(self) -> List[Tuple[CURIE, Optional[CURIE]]]: pairs = [] for v in self._values(TAG_PROPERTY_VALUE): toks = [x for x in v.split(" ") if x] - if toks[1].startswith("!"): + if len(toks) == 1 or toks[1].startswith("!"): pairs.append((toks[0], None)) else: pairs.append((toks[0], toks[1])) diff --git a/src/oaklib/implementations/sqldb/sql_implementation.py b/src/oaklib/implementations/sqldb/sql_implementation.py index 247b65841..ff90e2957 100644 --- a/src/oaklib/implementations/sqldb/sql_implementation.py +++ b/src/oaklib/implementations/sqldb/sql_implementation.py @@ -154,6 +154,10 @@ from oaklib.utilities.axioms.logical_definition_utilities import ( logical_definition_matches, ) +from oaklib.utilities.format_utilities import ( + OBOGRAPHS_SYNTAX_ALIAS_MAP, + RDFLIB_SYNTAX_ALIAS_MAP, +) from oaklib.utilities.graph.relationship_walker import walk_down, walk_up from oaklib.utilities.identifier_utils import ( string_as_base64_curie, @@ -1180,11 +1184,14 @@ def dump(self, path: str = None, syntax: str = None, **kwargs): """ if syntax is None: syntax = "ttl" - if syntax == "ttl": + if syntax in ["ttl", "rdfxml", "owl"]: + if syntax in RDFLIB_SYNTAX_ALIAS_MAP: + syntax = RDFLIB_SYNTAX_ALIAS_MAP[syntax] g = self.as_rdflib_graph() logging.info(f"Dumping to {path}") g.serialize(path, format=syntax) - elif syntax == "json": + elif syntax in OBOGRAPHS_SYNTAX_ALIAS_MAP.keys(): + syntax = OBOGRAPHS_SYNTAX_ALIAS_MAP[syntax] g = self.as_obograph(expand_curies=True) gd = obograph.GraphDocument(graphs=[g]) json_dumper.dump(gd, path) diff --git a/src/oaklib/interfaces/dumper_interface.py b/src/oaklib/interfaces/dumper_interface.py index b41606a74..3ab2d0c1c 100644 --- a/src/oaklib/interfaces/dumper_interface.py +++ b/src/oaklib/interfaces/dumper_interface.py @@ -25,6 +25,7 @@ "rdfxml": (OboGraphToRdfOwlConverter, {"format": "xml"}), "cx": OboGraphToCXConverter, "obojson": None, + "json": None, } FORMAT_SYNONYMS = { @@ -61,7 +62,8 @@ def dump( raise ValueError(f"Cannot handle interface: {self}") og = self.as_obograph() ogdoc = GraphDocument(graphs=[og]) - if syntax == "obojson": + converter_class = OBOGRAPH_CONVERTERS.get(syntax, None) + if converter_class is None: json_str = json_dumper.dumps(ogdoc, inject_type=False) if path: with open(path, "w", encoding="utf-8") as f: @@ -69,7 +71,6 @@ def dump( else: print(json_str) else: - converter_class = OBOGRAPH_CONVERTERS[syntax] if isinstance(converter_class, tuple): converter_class, converter_kwargs = converter_class kwargs.update(converter_kwargs) @@ -78,4 +79,6 @@ def dump( logging.info(f"Using {converter}, kwargs={kwargs}") converter.curie_converter = self.converter kwargs = {k: v for k, v in kwargs.items() if v is not None} + if "format" not in kwargs: + kwargs["format"] = syntax converter.dump(ogdoc, target=path, **kwargs) diff --git a/src/oaklib/utilities/format_utilities.py b/src/oaklib/utilities/format_utilities.py new file mode 100644 index 000000000..ac1901f65 --- /dev/null +++ b/src/oaklib/utilities/format_utilities.py @@ -0,0 +1,68 @@ +""" +Utilities for working with formats + +See https://github.com/INCATools/ontology-access-kit/issues/687 +""" + +from enum import Enum + + +class OntologyModel(str, Enum): + """ + Enumerated types for ontology models. + + A model is an abstract representation of an ontology that is potentially + serializable in multiple syntaxes. + """ + + OWL = "owl" + """W3C OWL2 Ontology Model""" + + SKOS = "skos" + """W3C SKOS Ontology Model""" + + SDO_RDFS = "sdo_rdfs" + """Schema.org RDFS Ontology Model""" + + OBOFORMAT = "oboformat" + """OBO Format Ontology Model. Always serialized as obo format""" + + OBOGRAPHS = "obographs" + """OBO Graphs Ontology Model""" + + +MODEL_ALLOWED_SYNTAXES = { + OntologyModel.OWL: [ + "ttl", + "rdfxml", + "n3", + "nt", + "pretty-xml", + "trix", + "trig", + "ofn", + "owx", + "omn", + "obo", + ], + OntologyModel.SKOS: ["ttl", "rdfxml", "n3", "nt", "pretty-xml", "trix", "trig"], + OntologyModel.OBOFORMAT: ["obo"], + OntologyModel.OBOGRAPHS: ["json", "yaml"], +} + + +OBOGRAPHS_SYNTAX_ALIAS_MAP = { + "json": "json", + "obojson": "json", + "yaml": "yaml", + "obograph": "json", + "obographjson": "json", + "obographyaml": "yaml", +} + + +RDFLIB_SYNTAX_ALIAS_MAP = { + "owl": "turtle", + "ttl": "turtle", + "rdfxml": "xml", +} diff --git a/tests/input/obo-compliance.obo b/tests/input/obo-compliance.obo new file mode 100644 index 000000000..a0ca211cf --- /dev/null +++ b/tests/input/obo-compliance.obo @@ -0,0 +1,717 @@ +!! ############# +!! # OBO Compliance Suite +!! ############# +!! # +!! # https://github.com/geneontology/obographs/issues/106 +!! # https://github.com/owlcollab/oboformat/issues/146 +!! # +!! # ######### +!! # Term Tags +!! # ######### +!! +!! name: is_a +!! description: test that is_a maps to subClassOf + +[Term] +id: X:1 +is_a: Y:1 + +!! name: relationship +!! description: existential restrictions + +[Term] +id: X:1 +relationship: R:1 Y:1 + +!! name: relationship-annotated +!! description: existential restrictions + +[Term] +id: X:1 +relationship: R:1 Y:1 {source="PMID:123456"} + +[Typedef] +id: R:1 + +!! name: name +!! description: rdfs:label + +[Term] +id: X:1 +name: x1 + +!! name: invalid-name-duplicate +!! description: max 1 name +!! invalid: true + +[Term] +id: X:1 +name: x1 +name: x2 + +!! name: namespace +!! description: oio:namespace + +[Term] +id: X:1 +namespace: NS1 + +!! name: xref +!! description: rdfs:label + +[Term] +id: X:1 +xref: Y:1 + +!! name: definition +!! description: OIO + +[Term] +id: X:1 +def: "x1 def" [] + +!! name: definition-xref +!! description: axiom annotation + +[Term] +id: X:1 +def: "x1 def" [PMID:123456] + +!! name: intersection_of-genus-differentia +!! description: Genus-differentia + +[Term] +id: X:1 +intersection_of: X:2 +intersection_of: R:1 X:3 + +!! name: intersection_of-genus-pair +!! description: Genus-Genus + +[Term] +id: X:1 +intersection_of: X:2 +intersection_of: X:3 + +!! name: invalid-intersection_of-single-element +!! description: Single elements disallowed +!! invalid: true + +[Term] +id: X:1 +intersection_of: X:2 + +!! name: union_of +!! description: Union Of Classes + +[Term] +id: X:1 +union_of: X:2 +union_of: X:3 + +!! name: equivalent_to +!! description: Equivalent To Class + +[Term] +id: X:1 +equivalent_to: X:2 + +!! name: subset +!! description: Test for subset attribute +subsetdef: S "my subset" +ontology: subset + +[Term] +id: X:1 +subset: S + +!! name: disjoint_from +!! description: Disjointness axiom + +[Term] +id: X:1 +disjoint_from: X:2 + +!! name: created_by +!! description: Metadata for creator + +[Term] +id: X:1 +created_by: username + +!! name: creation_date +!! description: Metadata for creation date + +[Term] +id: X:1 +creation_date: 2023-11-20 + +!! name: obsolete +!! description: Marking term as obsolete + +[Term] +id: X:1 +is_obsolete: true + +!! name: replaced_by +!! description: Indicating replacement for obsolete term + +[Term] +id: X:1 +is_obsolete: true +replaced_by: X:2 + +!! name: consider +!! description: Suggesting alternative for obsolete term + +[Term] +id: X:1 +is_obsolete: true +consider: X:3 + +!! name: property_value-string +!! description: property value with string datatype + +[Term] +id: X:1 +property_value: R:1 "foo" xsd:string + +[Typedef] +id: R:1 +is_metadata_tag: true + +!! name: property_value-id-tag +!! description: property value with string datatype + +[Term] +id: X:1 +property_value: id "X:1" xsd:string + +[Typedef] +id: R:1 +xref: http://www.geneontology.org/formats/oboInOwl#id +is_metadata_tag: true + +!! name: property_value-float +!! description: property value with float datatype + +[Term] +id: X:1 +property_value: R:1 "1.5" xsd:float + +[Typedef] +id: R:1 +is_metadata_tag: true + +!! name: property_value-anyURI +!! description: property value with anyURI datatype + +[Term] +id: X:1 +property_value: R:1 "http://example.org" xsd:anyURI + +[Typedef] +id: R:1 +is_metadata_tag: true + +!! name: property_value-object +!! description: Annotation using PropertyValue +!! non-canonical-form-of: relationship-non-logical +!! issue: https://github.com/owlcollab/oboformat/issues/144 + +[Term] +id: X:1 +property_value: R:1 Y:1 + +[Typedef] +id: R:1 +is_metadata_tag: true + +!! name: relationship-non-logical +!! description: relationship where the relation is metadata, maps to annotation +!! issue: https://github.com/owlcollab/oboformat/issues/144 + +[Term] +id: X:1 +relationship: R:1 Y:1 + +[Typedef] +id: R:1 +is_metadata_tag: true + + +!! name: property_value-skos-object +!! description: SKOS mapping to an object +!! non-canonical-form-of: relationship-skos-object +!! unstable: true +idspace: skos http://www.w3.org/2004/02/skos/core# + +[Term] +id: X:1 +property_value: skos:exactMatch Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + +!! name: relationship-skos-object +!! description: SKOS mapping to an object using relationship +!! issue: 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 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + +!! name: alt_id +!! description: Alternative ID for the term + +[Term] +id: X:1 +alt_id: X:2 + +!! name: comment +!! description: Comment about the term + +[Term] +id: X:1 +comment: "This is a comment about term X:1." + +!! name: exact_synonym +!! description: Test for exact synonym type + +[Term] +id: X:1 +name: example term +synonym: "exact synonym" EXACT [] + +!! name: narrow_synonym +!! description: Test for narrow synonym type + +[Term] +id: X:1 +name: example term +synonym: "narrow synonym" NARROW [] + +!! name: broad_synonym +!! description: Test for broad synonym type + +[Term] +id: X:1 +name: example term +synonym: "broad synonym" BROAD [] + +!! name: related_synonym +!! description: Test for related synonym type + +[Term] +id: X:1 +name: example term +synonym: "related synonym" RELATED [] + +!! name: synonym-with-xref +!! description: Synonym with cross-reference + +[Term] +id: X:1 +name: example term +synonym: "synonym with xref" EXACT [PMID:1] + +!! name: synonym-with-scope-and-xref +!! description: Synonym with scope and cross-reference + +[Term] +id: X:1 +name: example term +synonym: "synonym with scope and xref" RELATED [PMID:2] + +!! name: synonym-with-type +!! description: Synonym with a specified type + +[Term] +id: X:1 +name: example term +synonym: "synonym with type" RELATED ST:1 [] + +!! name: synonym-with-multiple_xrefs +!! description: Synonym with multiple cross-references + +[Term] +id: X:1 +name: example term +synonym: "synonym with multiple xrefs" EXACT [PMID:3, PMID:4] + +!! name: synonym-without-scope +!! description: Synonym without specified scope +!! invalid: true + +[Term] +id: X:1 +name: example term +synonym: "synonym without scope" [] + +!! name: synonymtypedef-definition +!! description: Definition of a new synonym type +synonymtypedef: S:1 "example" +ontology: synonymtypedef-definition + +!! # ######### +!! # Typedef Tags +!! # ######### +!! +!! name: typedef-is_a +!! description: test that is_a on Typedef maps to subObjectPropertyOf + +[Typedef] +id: R:1 +is_a: R:2 + +!! name: typedef-is_a-metadata +!! description: test that is_a on a metadata Typedef maps to subAnnotationPropertyOf +!! issue: https://github.com/owlcollab/oboformat/issues/147 +!! unstable: true + +[Typedef] +id: R:1 +is_a: R:2 +is_metadata_tag: true + +!! name: typedef-declaration +!! description: bare declaration + +[Typedef] +id: R:1 + +!! name: typedef-xref-ro +!! description: maps to RO IRIs automatically + +[Typedef] +id: R:1 +xref: RO:0000000 + +!! name: typedef-xref-anyiri +!! description: maps IRIs + +[Typedef] +id: R:1 +xref: http://example.org/R/1 + +!! name: typedef-xref-anyiri-ann +!! description: maps IRIs + +[Typedef] +id: R:1 +xref: http://example.org/R/1 +is_metadata_tag: true + +!! name: is_transitive +!! description: transitivity + +[Typedef] +id: R:1 +is_transitive: true + +!! name: is_anti_symmetric + +[Typedef] +id: R:1 +is_anti_symmetric: true + +!! name: is_inverse_functional + +[Typedef] +id: R:1 +is_inverse_functional: true + +!! name: is_functional + +[Typedef] +id: R:1 +is_functional: true + +!! name: is_cyclic + +[Typedef] +id: R:1 +is_cyclic: true + +!! name: is_symmetric + +[Typedef] +id: R:1 +is_symmetric: true + +!! name: typedef-name +!! description: rdfs:label + +[Typedef] +id: R:1 +name: r1 + +!! name: typedef-xref +!! description: plain xref + +[Typedef] +id: R:1 +xref: Y:1 + +!! name: typedef-def +!! description: test for def (definition) attribute + +[Typedef] +id: R:1 +def: "An example definition." [] + +!! name: typedef-domain +!! description: test for domain attribute + +[Typedef] +id: R:1 +domain: X:1 + +!! name: typedef-range +!! description: test for range attribute + +[Typedef] +id: R:1 +range: Y:1 + +!! name: typedef-inverse_of +!! description: test for inverse_of attribute + +[Typedef] +id: R:1 +inverse_of: R:2 + +!! name: typedef-transitive_over +!! description: test for transitive_over attribute + +[Typedef] +id: R:1 +transitive_over: R:3 + +!! name: typedef-is_metadata_tag +!! description: ... + +[Typedef] +id: R:1 +is_metadata_tag: true + +!! name: typedef-is_class_level +!! description: ... + +[Typedef] +id: R:1 +is_class_level: true + +!! name: typedef-is_metadata_tag-is_class_level +!! description: both + +[Typedef] +id: R:1 +is_metadata_tag: true +is_class_level: true + +!! # ######### +!! # Prefixes +!! # ######### +!! + +!! name: prefixes +!! description: prefixes allow customization of IRIs +!! issue: https://github.com/geneontology/obographs/issues/97 +!! unstable: true +idspace: X http://example.org/X/ + +[Term] +id: X:1 +is_a: Y:1 + +!! name: prefixes-xref +!! description: prefix expansions and xrefs +!! unstable: true +idspace: Y http://example.org/Y/ + +[Term] +id: X:1 +xref: Y:1 + +!! name: prefixes-created_by +!! description: prefix expansions and author metadata +!! unstable: true +idspace: Y http://example.org/Y/ + +[Term] +id: X:1 +created_by: Y:1 + +!! # ######### +!! # Headers +!! # ######### +!! + +!! name: default-namespace +!! description: terms auto-inject into default namespace +default-namespace: NS1 +ontology: default-namespace + +[Term] +id: X:1 + +!! # #### +!! # Axiom Annotations +!! # + +!! name: is_a-annotated +!! description: annotated variant of is_a + +[Term] +id: X:1 +is_a: Y:1 {source="PMID:123456"} + +!! name: is_a-annotated-prefix +!! description: annotated axiom using a prefix +!! unstable: true +idspace: dcterms http://purl.org/dc/terms/ + +[Term] +id: X:1 +is_a: Y:1 {dcterms:source="PMID:123456"} + +!! name: name-annotated +!! description: rdfs:label with annotation + +[Term] +id: X:1 +name: x1 {source="PMID:123457"} + +!! name: xref-annotated +!! description: rdfs:label with annotation + +[Term] +id: X:1 +xref: Y:1 {source="PMID:123458"} + +!! name: definition-annotated +!! description: OIO with annotation + +[Term] +id: X:1 +def: "x1 def" [PMID:123459] + +!! name: intersection_of-genus-differentia-annotated +!! description: Genus-differentia with annotation + +[Term] +id: X:1 +intersection_of: X:2 {source="PMID:123460"} +intersection_of: R:1 X:3 + +!! name: union_of-annotated +!! description: Union Of Classes with annotation + +[Term] +id: X:1 +union_of: X:2 {source="PMID:123462"} +union_of: X:3 + +!! name: equivalent_to-annotated +!! description: Equivalent To Class with annotation + +[Term] +id: X:1 +equivalent_to: X:2 {source="PMID:123463"} + +!! name: subset-annotated +!! description: Test for subset attribute with annotation +subsetdef: S "my subset" +ontology: subset-annotated + +[Term] +id: X:1 +subset: S {source="PMID:123464"} + +!! name: disjoint_from-annotated +!! description: Disjointness axiom with annotation + +[Term] +id: X:1 +disjoint_from: X:2 {source="PMID:123465"} + +!! name: created_by-annotated +!! description: Metadata for creator with annotation + +[Term] +id: X:1 +created_by: ORCID:1234 {source="PMID:123466"} + +!! name: creation_date-annotated +!! description: Metadata for creation date with annotation + +[Term] +id: X:1 +creation_date: 2023-11-20 {source="PMID:123467"} + +!! name: obsolete-annotated +!! description: Marking term as obsolete with annotation + +[Term] +id: X:1 +is_obsolete: true {source="PMID:123468"} + +!! name: replaced_by-annotated +!! description: Indicating replacement for obsolete term with annotation + +[Term] +id: X:1 +is_obsolete: true +replaced_by: X:2 {source="PMID:123469"} + +!! name: consider-annotated +!! description: Suggesting alternative for obsolete term with annotation + +[Term] +id: X:1 +is_obsolete: true +consider: X:3 {source="PMID:123470"} + +!! name: property_value-object-annotated +!! description: Annotation using PropertyValue with annotation + +[Term] +id: X:1 +property_value: R:1 Y:1 {source="PMID:123471"} + +[Typedef] +id: R:1 + +!! name: property_value-string-annotated +!! description: Annotation using PropertyValue with annotation + +[Term] +id: X:1 +property_value: R:1 "foo" xsd:string {source="PMID:123472"} + +[Typedef] +id: R:1 +is_metadata_tag: true + +!! # ######### +!! # Generic OWL +!! # ######### +!! # TODO: these tests should be seeded from an .ofn file + +!! name: owl-axioms-ObjectInverseOf +!! description: OWL axioms header +!! issue: https://github.com/owlcollab/oboformat/issues/145 +owl-axioms: Ontology(SubObjectPropertyOf( ObjectInverseOf())) + +!! name: invalid-owl-axioms-owl-syntax +!! description: Intentionally broken +!! invalid: true +owl-axioms: SubObjectPropertyOf( diff --git a/tests/input/obo-compliance/alt_id/alt_id.expected.json b/tests/input/obo-compliance/alt_id/alt_id.expected.json new file mode 100644 index 000000000..34cae3811 --- /dev/null +++ b/tests/input/obo-compliance/alt_id/alt_id.expected.json @@ -0,0 +1,42 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/alt_id.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasAlternativeId", + "val" : "X:2" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_2", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/IAO_0000231", + "val" : "http://purl.obolibrary.org/obo/IAO_0000227" + }, { + "pred" : "http://purl.obolibrary.org/obo/IAO_0100001", + "val" : "http://purl.obolibrary.org/obo/X_1" + } ], + "deprecated" : true + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasAlternativeId", + "lbl" : "has_alternative_id", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/alt_id/alt_id.expected.obo b/tests/input/obo-compliance/alt_id/alt_id.expected.obo new file mode 100644 index 000000000..a5ab299b4 --- /dev/null +++ b/tests/input/obo-compliance/alt_id/alt_id.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: alt_id + +[Term] +id: X:1 +alt_id: X:2 + diff --git a/tests/input/obo-compliance/alt_id/alt_id.expected.ofn b/tests/input/obo-compliance/alt_id/alt_id.expected.ofn new file mode 100644 index 000000000..4a84914fd --- /dev/null +++ b/tests/input/obo-compliance/alt_id/alt_id.expected.ofn @@ -0,0 +1,49 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_alternative_id) + +AnnotationAssertion(rdfs:label "has_alternative_id") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:2") +AnnotationAssertion( "X:1") + +# Class: () + +AnnotationAssertion( ) +AnnotationAssertion( ) +AnnotationAssertion(owl:deprecated "true"^^xsd:boolean) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/alt_id/alt_id.expected.owl b/tests/input/obo-compliance/alt_id/alt_id.expected.owl new file mode 100644 index 000000000..cbc010d1f --- /dev/null +++ b/tests/input/obo-compliance/alt_id/alt_id.expected.owl @@ -0,0 +1,94 @@ + + + + 1.4 + + + + + + + + + + + + + + + + + + + + + + + + + has_alternative_id + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + X:2 + X:1 + + + + + + + + + + true + + + + + + + diff --git a/tests/input/obo-compliance/alt_id/alt_id.meta.yaml b/tests/input/obo-compliance/alt_id/alt_id.meta.yaml new file mode 100644 index 000000000..36c31971a --- /dev/null +++ b/tests/input/obo-compliance/alt_id/alt_id.meta.yaml @@ -0,0 +1,3 @@ +name: alt_id +name: alt_id +description: Alternative ID for the term \ No newline at end of file diff --git a/tests/input/obo-compliance/alt_id/alt_id.obo b/tests/input/obo-compliance/alt_id/alt_id.obo new file mode 100644 index 000000000..59b5089ea --- /dev/null +++ b/tests/input/obo-compliance/alt_id/alt_id.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: alt_id + +[Term] +id: X:1 +alt_id: X:2 + diff --git a/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.json b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.json new file mode 100644 index 000000000..583c4a47c --- /dev/null +++ b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/broad_synonym.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "pred" : "hasBroadSynonym", + "val" : "broad synonym" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym", + "lbl" : "has_broad_synonym", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.obo b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.obo new file mode 100644 index 000000000..9ddf2b0b6 --- /dev/null +++ b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: broad_synonym + +[Term] +id: X:1 +name: example term +synonym: "broad synonym" BROAD [] + diff --git a/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.ofn b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.ofn new file mode 100644 index 000000000..27329352d --- /dev/null +++ b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_broad_synonym) + +AnnotationAssertion(rdfs:label "has_broad_synonym") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion( "broad synonym") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.owl b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.owl new file mode 100644 index 000000000..e4628c8da --- /dev/null +++ b/tests/input/obo-compliance/broad_synonym/broad_synonym.expected.owl @@ -0,0 +1,78 @@ + + + + 1.4 + + + + + + + + + + + + + has_broad_synonym + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + broad synonym + X:1 + example term + + + + + + + diff --git a/tests/input/obo-compliance/broad_synonym/broad_synonym.meta.yaml b/tests/input/obo-compliance/broad_synonym/broad_synonym.meta.yaml new file mode 100644 index 000000000..5f05e91d2 --- /dev/null +++ b/tests/input/obo-compliance/broad_synonym/broad_synonym.meta.yaml @@ -0,0 +1,3 @@ +name: broad_synonym +name: broad_synonym +description: Test for broad synonym type \ No newline at end of file diff --git a/tests/input/obo-compliance/broad_synonym/broad_synonym.obo b/tests/input/obo-compliance/broad_synonym/broad_synonym.obo new file mode 100644 index 000000000..0b888f35d --- /dev/null +++ b/tests/input/obo-compliance/broad_synonym/broad_synonym.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: broad_synonym + +[Term] +id: X:1 +name: example term +synonym: "broad synonym" BROAD [] + diff --git a/tests/input/obo-compliance/comment/comment.expected.json b/tests/input/obo-compliance/comment/comment.expected.json new file mode 100644 index 000000000..ca2f869e9 --- /dev/null +++ b/tests/input/obo-compliance/comment/comment.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/comment.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/comment/comment.expected.obo b/tests/input/obo-compliance/comment/comment.expected.obo new file mode 100644 index 000000000..b13e45905 --- /dev/null +++ b/tests/input/obo-compliance/comment/comment.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: comment + +[Term] +id: X:1 +comment: "This is a comment about term X:1." + diff --git a/tests/input/obo-compliance/comment/comment.expected.ofn b/tests/input/obo-compliance/comment/comment.expected.ofn new file mode 100644 index 000000000..6cf21a979 --- /dev/null +++ b/tests/input/obo-compliance/comment/comment.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:comment)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:comment "\"This is a comment about term X:1.\"") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/comment/comment.expected.owl b/tests/input/obo-compliance/comment/comment.expected.owl new file mode 100644 index 000000000..7d9affc5f --- /dev/null +++ b/tests/input/obo-compliance/comment/comment.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + "This is a comment about term X:1." + + + + + + + diff --git a/tests/input/obo-compliance/comment/comment.meta.yaml b/tests/input/obo-compliance/comment/comment.meta.yaml new file mode 100644 index 000000000..c20a57652 --- /dev/null +++ b/tests/input/obo-compliance/comment/comment.meta.yaml @@ -0,0 +1,3 @@ +name: comment +name: comment +description: Comment about the term \ No newline at end of file diff --git a/tests/input/obo-compliance/comment/comment.obo b/tests/input/obo-compliance/comment/comment.obo new file mode 100644 index 000000000..147f2515b --- /dev/null +++ b/tests/input/obo-compliance/comment/comment.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: comment + +[Term] +id: X:1 +comment: "This is a comment about term X:1." + diff --git a/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.json b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.json new file mode 100644 index 000000000..a9b80f3b8 --- /dev/null +++ b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/consider-annotated.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#consider", + "val" : "X:3" + } ], + "deprecated" : true + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#consider", + "lbl" : "consider", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.obo b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.obo new file mode 100644 index 000000000..8c09ab249 --- /dev/null +++ b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: consider-annotated + +[Term] +id: X:1 +is_obsolete: true +consider: X:3 {source="PMID:123470"} + diff --git a/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.ofn b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.ofn new file mode 100644 index 000000000..5d1ec795c --- /dev/null +++ b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.ofn @@ -0,0 +1,43 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(owl:deprecated)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (consider) + +AnnotationAssertion(rdfs:label "consider") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123470") "X:3") +AnnotationAssertion( "X:1") +AnnotationAssertion(owl:deprecated "true"^^xsd:boolean) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.owl b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.owl new file mode 100644 index 000000000..ecbd72aad --- /dev/null +++ b/tests/input/obo-compliance/consider-annotated/consider-annotated.expected.owl @@ -0,0 +1,90 @@ + + + + 1.4 + + + + + + + + + + + + + consider + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X:3 + X:1 + true + + + + + X:3 + PMID:123470 + + + + + + + diff --git a/tests/input/obo-compliance/consider-annotated/consider-annotated.meta.yaml b/tests/input/obo-compliance/consider-annotated/consider-annotated.meta.yaml new file mode 100644 index 000000000..b6172c607 --- /dev/null +++ b/tests/input/obo-compliance/consider-annotated/consider-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: consider-annotated +name: consider-annotated +description: Suggesting alternative for obsolete term with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/consider-annotated/consider-annotated.obo b/tests/input/obo-compliance/consider-annotated/consider-annotated.obo new file mode 100644 index 000000000..f0859576e --- /dev/null +++ b/tests/input/obo-compliance/consider-annotated/consider-annotated.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: consider-annotated + +[Term] +id: X:1 +is_obsolete: true +consider: X:3 {source="PMID:123470"} + diff --git a/tests/input/obo-compliance/consider/consider.expected.json b/tests/input/obo-compliance/consider/consider.expected.json new file mode 100644 index 000000000..5014074c9 --- /dev/null +++ b/tests/input/obo-compliance/consider/consider.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/consider.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#consider", + "val" : "X:3" + } ], + "deprecated" : true + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#consider", + "lbl" : "consider", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/consider/consider.expected.obo b/tests/input/obo-compliance/consider/consider.expected.obo new file mode 100644 index 000000000..c43063d58 --- /dev/null +++ b/tests/input/obo-compliance/consider/consider.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: consider + +[Term] +id: X:1 +is_obsolete: true +consider: X:3 + diff --git a/tests/input/obo-compliance/consider/consider.expected.ofn b/tests/input/obo-compliance/consider/consider.expected.ofn new file mode 100644 index 000000000..3466507e7 --- /dev/null +++ b/tests/input/obo-compliance/consider/consider.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(owl:deprecated)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (consider) + +AnnotationAssertion(rdfs:label "consider") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:3") +AnnotationAssertion( "X:1") +AnnotationAssertion(owl:deprecated "true"^^xsd:boolean) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/consider/consider.expected.owl b/tests/input/obo-compliance/consider/consider.expected.owl new file mode 100644 index 000000000..f3b2bf167 --- /dev/null +++ b/tests/input/obo-compliance/consider/consider.expected.owl @@ -0,0 +1,78 @@ + + + + 1.4 + + + + + + + + + + + + + consider + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + X:3 + X:1 + true + + + + + + + diff --git a/tests/input/obo-compliance/consider/consider.meta.yaml b/tests/input/obo-compliance/consider/consider.meta.yaml new file mode 100644 index 000000000..9c6021534 --- /dev/null +++ b/tests/input/obo-compliance/consider/consider.meta.yaml @@ -0,0 +1,3 @@ +name: consider +name: consider +description: Suggesting alternative for obsolete term \ No newline at end of file diff --git a/tests/input/obo-compliance/consider/consider.obo b/tests/input/obo-compliance/consider/consider.obo new file mode 100644 index 000000000..22dfc5550 --- /dev/null +++ b/tests/input/obo-compliance/consider/consider.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: consider + +[Term] +id: X:1 +is_obsolete: true +consider: X:3 + diff --git a/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.json b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.json new file mode 100644 index 000000000..25a16a525 --- /dev/null +++ b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/created_by-annotated.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#created_by", + "val" : "ORCID:1234" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.obo b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.obo new file mode 100644 index 000000000..d71f2a382 --- /dev/null +++ b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: created_by-annotated + +[Term] +id: X:1 +created_by: ORCID:1234 {source="PMID:123466"} + diff --git a/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.ofn b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.ofn new file mode 100644 index 000000000..79ae07c61 --- /dev/null +++ b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123466") "ORCID:1234") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.owl b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.owl new file mode 100644 index 000000000..1c8442454 --- /dev/null +++ b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.expected.owl @@ -0,0 +1,81 @@ + + + + 1.4 + + + + + + + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + ORCID:1234 + X:1 + + + + + ORCID:1234 + PMID:123466 + + + + + + + diff --git a/tests/input/obo-compliance/created_by-annotated/created_by-annotated.meta.yaml b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.meta.yaml new file mode 100644 index 000000000..52c75bdb0 --- /dev/null +++ b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: created_by-annotated +name: created_by-annotated +description: Metadata for creator with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/created_by-annotated/created_by-annotated.obo b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.obo new file mode 100644 index 000000000..2073c3879 --- /dev/null +++ b/tests/input/obo-compliance/created_by-annotated/created_by-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: created_by-annotated + +[Term] +id: X:1 +created_by: ORCID:1234 {source="PMID:123466"} + diff --git a/tests/input/obo-compliance/created_by/created_by.expected.json b/tests/input/obo-compliance/created_by/created_by.expected.json new file mode 100644 index 000000000..f9ae82d9e --- /dev/null +++ b/tests/input/obo-compliance/created_by/created_by.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/created_by.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#created_by", + "val" : "username" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/created_by/created_by.expected.obo b/tests/input/obo-compliance/created_by/created_by.expected.obo new file mode 100644 index 000000000..ffce50181 --- /dev/null +++ b/tests/input/obo-compliance/created_by/created_by.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: created_by + +[Term] +id: X:1 +created_by: username + diff --git a/tests/input/obo-compliance/created_by/created_by.expected.ofn b/tests/input/obo-compliance/created_by/created_by.expected.ofn new file mode 100644 index 000000000..c26052ddc --- /dev/null +++ b/tests/input/obo-compliance/created_by/created_by.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "username") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/created_by/created_by.expected.owl b/tests/input/obo-compliance/created_by/created_by.expected.owl new file mode 100644 index 000000000..485c567ce --- /dev/null +++ b/tests/input/obo-compliance/created_by/created_by.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + username + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/created_by/created_by.meta.yaml b/tests/input/obo-compliance/created_by/created_by.meta.yaml new file mode 100644 index 000000000..a7e3a4cab --- /dev/null +++ b/tests/input/obo-compliance/created_by/created_by.meta.yaml @@ -0,0 +1,3 @@ +name: created_by +name: created_by +description: Metadata for creator \ No newline at end of file diff --git a/tests/input/obo-compliance/created_by/created_by.obo b/tests/input/obo-compliance/created_by/created_by.obo new file mode 100644 index 000000000..998a49dce --- /dev/null +++ b/tests/input/obo-compliance/created_by/created_by.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: created_by + +[Term] +id: X:1 +created_by: username + diff --git a/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.json b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.json new file mode 100644 index 000000000..ce605ed16 --- /dev/null +++ b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/creation_date-annotated.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#creation_date", + "val" : "2023-11-20" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.obo b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.obo new file mode 100644 index 000000000..668a79eb3 --- /dev/null +++ b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: creation_date-annotated + +[Term] +id: X:1 +creation_date: 2023-11-20 {source="PMID:123467"} + diff --git a/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.ofn b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.ofn new file mode 100644 index 000000000..3c050896b --- /dev/null +++ b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123467") "2023-11-20") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.owl b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.owl new file mode 100644 index 000000000..a057580b8 --- /dev/null +++ b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.expected.owl @@ -0,0 +1,81 @@ + + + + 1.4 + + + + + + + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + 2023-11-20 + X:1 + + + + + 2023-11-20 + PMID:123467 + + + + + + + diff --git a/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.meta.yaml b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.meta.yaml new file mode 100644 index 000000000..36f1384f1 --- /dev/null +++ b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: creation_date-annotated +name: creation_date-annotated +description: Metadata for creation date with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.obo b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.obo new file mode 100644 index 000000000..e2a54b2ac --- /dev/null +++ b/tests/input/obo-compliance/creation_date-annotated/creation_date-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: creation_date-annotated + +[Term] +id: X:1 +creation_date: 2023-11-20 {source="PMID:123467"} + diff --git a/tests/input/obo-compliance/creation_date/creation_date.expected.json b/tests/input/obo-compliance/creation_date/creation_date.expected.json new file mode 100644 index 000000000..901b6a52c --- /dev/null +++ b/tests/input/obo-compliance/creation_date/creation_date.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/creation_date.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#creation_date", + "val" : "2023-11-20" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/creation_date/creation_date.expected.obo b/tests/input/obo-compliance/creation_date/creation_date.expected.obo new file mode 100644 index 000000000..b215e721f --- /dev/null +++ b/tests/input/obo-compliance/creation_date/creation_date.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: creation_date + +[Term] +id: X:1 +creation_date: 2023-11-20 + diff --git a/tests/input/obo-compliance/creation_date/creation_date.expected.ofn b/tests/input/obo-compliance/creation_date/creation_date.expected.ofn new file mode 100644 index 000000000..3a24248e4 --- /dev/null +++ b/tests/input/obo-compliance/creation_date/creation_date.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "2023-11-20") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/creation_date/creation_date.expected.owl b/tests/input/obo-compliance/creation_date/creation_date.expected.owl new file mode 100644 index 000000000..17224700a --- /dev/null +++ b/tests/input/obo-compliance/creation_date/creation_date.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + 2023-11-20 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/creation_date/creation_date.meta.yaml b/tests/input/obo-compliance/creation_date/creation_date.meta.yaml new file mode 100644 index 000000000..6af896991 --- /dev/null +++ b/tests/input/obo-compliance/creation_date/creation_date.meta.yaml @@ -0,0 +1,3 @@ +name: creation_date +name: creation_date +description: Metadata for creation date \ No newline at end of file diff --git a/tests/input/obo-compliance/creation_date/creation_date.obo b/tests/input/obo-compliance/creation_date/creation_date.obo new file mode 100644 index 000000000..925a2b798 --- /dev/null +++ b/tests/input/obo-compliance/creation_date/creation_date.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: creation_date + +[Term] +id: X:1 +creation_date: 2023-11-20 + diff --git a/tests/input/obo-compliance/default-namespace/default-namespace.expected.json b/tests/input/obo-compliance/default-namespace/default-namespace.expected.json new file mode 100644 index 000000000..40b157ee1 --- /dev/null +++ b/tests/input/obo-compliance/default-namespace/default-namespace.expected.json @@ -0,0 +1,32 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/default-namespace.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#default-namespace", + "val" : "NS1" + }, { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace", + "val" : "NS1" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace", + "lbl" : "has_obo_namespace", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/default-namespace/default-namespace.expected.obo b/tests/input/obo-compliance/default-namespace/default-namespace.expected.obo new file mode 100644 index 000000000..cea019645 --- /dev/null +++ b/tests/input/obo-compliance/default-namespace/default-namespace.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +default-namespace: NS1 +ontology: default-namespace + +[Term] +id: X:1 + diff --git a/tests/input/obo-compliance/default-namespace/default-namespace.expected.ofn b/tests/input/obo-compliance/default-namespace/default-namespace.expected.ofn new file mode 100644 index 000000000..1c67771ca --- /dev/null +++ b/tests/input/obo-compliance/default-namespace/default-namespace.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "NS1") +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + +# Annotation Property: (has_obo_namespace) + +AnnotationAssertion(rdfs:label "has_obo_namespace") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "NS1") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/default-namespace/default-namespace.expected.owl b/tests/input/obo-compliance/default-namespace/default-namespace.expected.owl new file mode 100644 index 000000000..c3e8a58aa --- /dev/null +++ b/tests/input/obo-compliance/default-namespace/default-namespace.expected.owl @@ -0,0 +1,78 @@ + + + + NS1 + 1.4 + + + + + + + + + + + + + + + + + + + has_obo_format_version + + + + + + + + has_obo_namespace + + + + + + + + + + + + + + + + + + + NS1 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/default-namespace/default-namespace.meta.yaml b/tests/input/obo-compliance/default-namespace/default-namespace.meta.yaml new file mode 100644 index 000000000..aa00f107f --- /dev/null +++ b/tests/input/obo-compliance/default-namespace/default-namespace.meta.yaml @@ -0,0 +1,3 @@ +name: default-namespace +name: default-namespace +description: terms auto-inject into default namespace \ No newline at end of file diff --git a/tests/input/obo-compliance/default-namespace/default-namespace.obo b/tests/input/obo-compliance/default-namespace/default-namespace.obo new file mode 100644 index 000000000..b7b8f2a0a --- /dev/null +++ b/tests/input/obo-compliance/default-namespace/default-namespace.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +default-namespace: NS1 +ontology: default-namespace + +[Term] +id: X:1 + + diff --git a/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.json b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.json new file mode 100644 index 000000000..ec9b07292 --- /dev/null +++ b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.json @@ -0,0 +1,33 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/definition-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/IAO_0000115", + "lbl" : "definition", + "type" : "PROPERTY" + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "definition" : { + "val" : "x1 def", + "xrefs" : [ "PMID:123459" ] + } + } + }, { + "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.obo b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.obo new file mode 100644 index 000000000..3309948de --- /dev/null +++ b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: definition-annotated + +[Term] +id: X:1 +def: "x1 def" [PMID:123459] + diff --git a/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.ofn b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.ofn new file mode 100644 index 000000000..b086391c5 --- /dev/null +++ b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.ofn @@ -0,0 +1,45 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (definition) + +AnnotationAssertion(rdfs:label "definition") + +# Annotation Property: (database_cross_reference) + +AnnotationAssertion(rdfs:label "database_cross_reference") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123459") "x1 def") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.owl b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.owl new file mode 100644 index 000000000..1156e3a40 --- /dev/null +++ b/tests/input/obo-compliance/definition-annotated/definition-annotated.expected.owl @@ -0,0 +1,86 @@ + + + + 1.4 + + + + + + + + + + + + + definition + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + x1 def + X:1 + + + + + x1 def + PMID:123459 + + + + + + + diff --git a/tests/input/obo-compliance/definition-annotated/definition-annotated.meta.yaml b/tests/input/obo-compliance/definition-annotated/definition-annotated.meta.yaml new file mode 100644 index 000000000..f7f22f947 --- /dev/null +++ b/tests/input/obo-compliance/definition-annotated/definition-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: definition-annotated +name: definition-annotated +description: OIO with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/definition-annotated/definition-annotated.obo b/tests/input/obo-compliance/definition-annotated/definition-annotated.obo new file mode 100644 index 000000000..e03d73970 --- /dev/null +++ b/tests/input/obo-compliance/definition-annotated/definition-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: definition-annotated + +[Term] +id: X:1 +def: "x1 def" [PMID:123459] + diff --git a/tests/input/obo-compliance/definition-xref/definition-xref.expected.json b/tests/input/obo-compliance/definition-xref/definition-xref.expected.json new file mode 100644 index 000000000..382592ef8 --- /dev/null +++ b/tests/input/obo-compliance/definition-xref/definition-xref.expected.json @@ -0,0 +1,33 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/definition-xref.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/IAO_0000115", + "lbl" : "definition", + "type" : "PROPERTY" + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "definition" : { + "val" : "x1 def", + "xrefs" : [ "PMID:123456" ] + } + } + }, { + "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/definition-xref/definition-xref.expected.obo b/tests/input/obo-compliance/definition-xref/definition-xref.expected.obo new file mode 100644 index 000000000..0ad537118 --- /dev/null +++ b/tests/input/obo-compliance/definition-xref/definition-xref.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: definition-xref + +[Term] +id: X:1 +def: "x1 def" [PMID:123456] + diff --git a/tests/input/obo-compliance/definition-xref/definition-xref.expected.ofn b/tests/input/obo-compliance/definition-xref/definition-xref.expected.ofn new file mode 100644 index 000000000..fe77e1b3f --- /dev/null +++ b/tests/input/obo-compliance/definition-xref/definition-xref.expected.ofn @@ -0,0 +1,45 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (definition) + +AnnotationAssertion(rdfs:label "definition") + +# Annotation Property: (database_cross_reference) + +AnnotationAssertion(rdfs:label "database_cross_reference") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123456") "x1 def") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/definition-xref/definition-xref.expected.owl b/tests/input/obo-compliance/definition-xref/definition-xref.expected.owl new file mode 100644 index 000000000..ccd6f514f --- /dev/null +++ b/tests/input/obo-compliance/definition-xref/definition-xref.expected.owl @@ -0,0 +1,86 @@ + + + + 1.4 + + + + + + + + + + + + + definition + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + x1 def + X:1 + + + + + x1 def + PMID:123456 + + + + + + + diff --git a/tests/input/obo-compliance/definition-xref/definition-xref.meta.yaml b/tests/input/obo-compliance/definition-xref/definition-xref.meta.yaml new file mode 100644 index 000000000..04b79a83f --- /dev/null +++ b/tests/input/obo-compliance/definition-xref/definition-xref.meta.yaml @@ -0,0 +1,3 @@ +name: definition-xref +name: definition-xref +description: axiom annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/definition-xref/definition-xref.obo b/tests/input/obo-compliance/definition-xref/definition-xref.obo new file mode 100644 index 000000000..cf5d20bb5 --- /dev/null +++ b/tests/input/obo-compliance/definition-xref/definition-xref.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: definition-xref + +[Term] +id: X:1 +def: "x1 def" [PMID:123456] + diff --git a/tests/input/obo-compliance/definition/definition.expected.json b/tests/input/obo-compliance/definition/definition.expected.json new file mode 100644 index 000000000..b9368b94f --- /dev/null +++ b/tests/input/obo-compliance/definition/definition.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/definition.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/IAO_0000115", + "lbl" : "definition", + "type" : "PROPERTY" + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "definition" : { + "val" : "x1 def" + } + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/definition/definition.expected.obo b/tests/input/obo-compliance/definition/definition.expected.obo new file mode 100644 index 000000000..e5964b999 --- /dev/null +++ b/tests/input/obo-compliance/definition/definition.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: definition + +[Term] +id: X:1 +def: "x1 def" [] + diff --git a/tests/input/obo-compliance/definition/definition.expected.ofn b/tests/input/obo-compliance/definition/definition.expected.ofn new file mode 100644 index 000000000..802e027af --- /dev/null +++ b/tests/input/obo-compliance/definition/definition.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (definition) + +AnnotationAssertion(rdfs:label "definition") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "x1 def") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/definition/definition.expected.owl b/tests/input/obo-compliance/definition/definition.expected.owl new file mode 100644 index 000000000..d3f17fa70 --- /dev/null +++ b/tests/input/obo-compliance/definition/definition.expected.owl @@ -0,0 +1,72 @@ + + + + 1.4 + + + + + + + + + + + + + definition + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + x1 def + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/definition/definition.meta.yaml b/tests/input/obo-compliance/definition/definition.meta.yaml new file mode 100644 index 000000000..bada725b3 --- /dev/null +++ b/tests/input/obo-compliance/definition/definition.meta.yaml @@ -0,0 +1,3 @@ +name: definition +name: definition +description: OIO \ No newline at end of file diff --git a/tests/input/obo-compliance/definition/definition.obo b/tests/input/obo-compliance/definition/definition.obo new file mode 100644 index 000000000..fa83dbf10 --- /dev/null +++ b/tests/input/obo-compliance/definition/definition.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: definition + +[Term] +id: X:1 +def: "x1 def" [] + diff --git a/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.json b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.json new file mode 100644 index 000000000..b83fa5e69 --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/disjoint_from-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.obo b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.obo new file mode 100644 index 000000000..d20cc47ab --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: disjoint_from-annotated + +[Term] +id: X:1 +disjoint_from: X:2 {source="PMID:123465"} + diff --git a/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.ofn b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.ofn new file mode 100644 index 000000000..37e0c2a83 --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +DisjointClasses(Annotation( "PMID:123465") ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.owl b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.owl new file mode 100644 index 000000000..72ce9f88e --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.expected.owl @@ -0,0 +1,81 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + PMID:123465 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.meta.yaml b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.meta.yaml new file mode 100644 index 000000000..a9b53d85f --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: disjoint_from-annotated +name: disjoint_from-annotated +description: Disjointness axiom with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.obo b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.obo new file mode 100644 index 000000000..80ba32fd7 --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from-annotated/disjoint_from-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: disjoint_from-annotated + +[Term] +id: X:1 +disjoint_from: X:2 {source="PMID:123465"} + diff --git a/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.json b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.json new file mode 100644 index 000000000..e43c759d6 --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/disjoint_from.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.obo b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.obo new file mode 100644 index 000000000..a44f51aba --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: disjoint_from + +[Term] +id: X:1 +disjoint_from: X:2 + diff --git a/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.ofn b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.ofn new file mode 100644 index 000000000..d6d48eb15 --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +DisjointClasses( ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.owl b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.owl new file mode 100644 index 000000000..7b592fad0 --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from/disjoint_from.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/disjoint_from/disjoint_from.meta.yaml b/tests/input/obo-compliance/disjoint_from/disjoint_from.meta.yaml new file mode 100644 index 000000000..5c5f0cabd --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from/disjoint_from.meta.yaml @@ -0,0 +1,3 @@ +name: disjoint_from +name: disjoint_from +description: Disjointness axiom \ No newline at end of file diff --git a/tests/input/obo-compliance/disjoint_from/disjoint_from.obo b/tests/input/obo-compliance/disjoint_from/disjoint_from.obo new file mode 100644 index 000000000..4209db9a8 --- /dev/null +++ b/tests/input/obo-compliance/disjoint_from/disjoint_from.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: disjoint_from + +[Term] +id: X:1 +disjoint_from: X:2 + diff --git a/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.json b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.json new file mode 100644 index 000000000..ed60131be --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.json @@ -0,0 +1,26 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/equivalent_to-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "equivalentNodesSets" : [ { + "representativeNodeId" : "http://purl.obolibrary.org/obo/X_1", + "nodeIds" : [ "http://purl.obolibrary.org/obo/X_1", "http://purl.obolibrary.org/obo/X_2" ], + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#source", + "val" : "PMID:123463" + } ] + } + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.obo b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.obo new file mode 100644 index 000000000..7ca370adb --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: equivalent_to-annotated + +[Term] +id: X:1 +equivalent_to: X:2 {source="PMID:123463"} + diff --git a/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.ofn b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.ofn new file mode 100644 index 000000000..35dc5b4aa --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +EquivalentClasses(Annotation( "PMID:123463") ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.owl b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.owl new file mode 100644 index 000000000..da2bace78 --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.expected.owl @@ -0,0 +1,81 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + PMID:123463 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.meta.yaml b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.meta.yaml new file mode 100644 index 000000000..a61927cf4 --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: equivalent_to-annotated +name: equivalent_to-annotated +description: Equivalent To Class with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.obo b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.obo new file mode 100644 index 000000000..427788de9 --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to-annotated/equivalent_to-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: equivalent_to-annotated + +[Term] +id: X:1 +equivalent_to: X:2 {source="PMID:123463"} + diff --git a/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.json b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.json new file mode 100644 index 000000000..dba36982c --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/equivalent_to.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "equivalentNodesSets" : [ { + "representativeNodeId" : "http://purl.obolibrary.org/obo/X_1", + "nodeIds" : [ "http://purl.obolibrary.org/obo/X_1", "http://purl.obolibrary.org/obo/X_2" ] + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.obo b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.obo new file mode 100644 index 000000000..3f4fd224b --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: equivalent_to + +[Term] +id: X:1 +equivalent_to: X:2 + diff --git a/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.ofn b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.ofn new file mode 100644 index 000000000..6e295f9e7 --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +EquivalentClasses( ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.owl b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.owl new file mode 100644 index 000000000..2be7fc32b --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to/equivalent_to.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/equivalent_to/equivalent_to.meta.yaml b/tests/input/obo-compliance/equivalent_to/equivalent_to.meta.yaml new file mode 100644 index 000000000..301820e92 --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to/equivalent_to.meta.yaml @@ -0,0 +1,3 @@ +name: equivalent_to +name: equivalent_to +description: Equivalent To Class \ No newline at end of file diff --git a/tests/input/obo-compliance/equivalent_to/equivalent_to.obo b/tests/input/obo-compliance/equivalent_to/equivalent_to.obo new file mode 100644 index 000000000..739c6d602 --- /dev/null +++ b/tests/input/obo-compliance/equivalent_to/equivalent_to.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: equivalent_to + +[Term] +id: X:1 +equivalent_to: X:2 + diff --git a/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.json b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.json new file mode 100644 index 000000000..4e376188a --- /dev/null +++ b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/exact_synonym.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "pred" : "hasExactSynonym", + "val" : "exact synonym" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasExactSynonym", + "lbl" : "has_exact_synonym", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.obo b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.obo new file mode 100644 index 000000000..e536a7d2e --- /dev/null +++ b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: exact_synonym + +[Term] +id: X:1 +name: example term +synonym: "exact synonym" EXACT [] + diff --git a/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.ofn b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.ofn new file mode 100644 index 000000000..d3a2585d0 --- /dev/null +++ b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_exact_synonym) + +AnnotationAssertion(rdfs:label "has_exact_synonym") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion( "exact synonym") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.owl b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.owl new file mode 100644 index 000000000..06db9269b --- /dev/null +++ b/tests/input/obo-compliance/exact_synonym/exact_synonym.expected.owl @@ -0,0 +1,78 @@ + + + + 1.4 + + + + + + + + + + + + + has_exact_synonym + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + exact synonym + X:1 + example term + + + + + + + diff --git a/tests/input/obo-compliance/exact_synonym/exact_synonym.meta.yaml b/tests/input/obo-compliance/exact_synonym/exact_synonym.meta.yaml new file mode 100644 index 000000000..b85cd95bb --- /dev/null +++ b/tests/input/obo-compliance/exact_synonym/exact_synonym.meta.yaml @@ -0,0 +1,3 @@ +name: exact_synonym +name: exact_synonym +description: Test for exact synonym type \ No newline at end of file diff --git a/tests/input/obo-compliance/exact_synonym/exact_synonym.obo b/tests/input/obo-compliance/exact_synonym/exact_synonym.obo new file mode 100644 index 000000000..93c70c800 --- /dev/null +++ b/tests/input/obo-compliance/exact_synonym/exact_synonym.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: exact_synonym + +[Term] +id: X:1 +name: example term +synonym: "exact synonym" EXACT [] + diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.json b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.json new file mode 100644 index 000000000..e84568dba --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.json @@ -0,0 +1,24 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/intersection_of-genus-differentia-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "logicalDefinitionAxioms" : [ { + "definedClassId" : "http://purl.obolibrary.org/obo/X_1", + "genusIds" : [ "http://purl.obolibrary.org/obo/X_2" ], + "restrictions" : [ { + "propertyId" : "http://purl.obolibrary.org/obo/R_1", + "fillerId" : "http://purl.obolibrary.org/obo/X_3" + } ] + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.obo b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.obo new file mode 100644 index 000000000..6671e43dd --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: intersection_of-genus-differentia-annotated + +[Term] +id: X:1 +intersection_of: X:2 {source="PMID:123460"} +intersection_of: R:1 X:3 {source="PMID:123460"} + diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.ofn b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.ofn new file mode 100644 index 000000000..ba83cc8d9 --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(Class()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +EquivalentClasses(Annotation( "PMID:123460") ObjectIntersectionOf( ObjectSomeValuesFrom( ))) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.owl b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.owl new file mode 100644 index 000000000..a31dd7307 --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.expected.owl @@ -0,0 +1,113 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + + + PMID:123460 + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.meta.yaml b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.meta.yaml new file mode 100644 index 000000000..be9d490ef --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: intersection_of-genus-differentia-annotated +name: intersection_of-genus-differentia-annotated +description: Genus-differentia with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.obo b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.obo new file mode 100644 index 000000000..49fdf578d --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia-annotated/intersection_of-genus-differentia-annotated.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: intersection_of-genus-differentia-annotated + +[Term] +id: X:1 +intersection_of: X:2 {source="PMID:123460"} +intersection_of: R:1 X:3 + diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.json b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.json new file mode 100644 index 000000000..29cd1633b --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.json @@ -0,0 +1,24 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/intersection_of-genus-differentia.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "logicalDefinitionAxioms" : [ { + "definedClassId" : "http://purl.obolibrary.org/obo/X_1", + "genusIds" : [ "http://purl.obolibrary.org/obo/X_2" ], + "restrictions" : [ { + "propertyId" : "http://purl.obolibrary.org/obo/R_1", + "fillerId" : "http://purl.obolibrary.org/obo/X_3" + } ] + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.obo b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.obo new file mode 100644 index 000000000..ba1b25dd4 --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: intersection_of-genus-differentia + +[Term] +id: X:1 +intersection_of: X:2 +intersection_of: R:1 X:3 + diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.ofn b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.ofn new file mode 100644 index 000000000..b7639054d --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.ofn @@ -0,0 +1,39 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(Class()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +EquivalentClasses( ObjectIntersectionOf( ObjectSomeValuesFrom( ))) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.owl b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.owl new file mode 100644 index 000000000..f773f1b54 --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.expected.owl @@ -0,0 +1,102 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.meta.yaml b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.meta.yaml new file mode 100644 index 000000000..4b7981af7 --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.meta.yaml @@ -0,0 +1,3 @@ +name: intersection_of-genus-differentia +name: intersection_of-genus-differentia +description: Genus-differentia \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.obo b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.obo new file mode 100644 index 000000000..2033431a9 --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-differentia/intersection_of-genus-differentia.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: intersection_of-genus-differentia + +[Term] +id: X:1 +intersection_of: X:2 +intersection_of: R:1 X:3 + diff --git a/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.json b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.json new file mode 100644 index 000000000..95fbc33da --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/intersection_of-genus-pair.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "logicalDefinitionAxioms" : [ { + "definedClassId" : "http://purl.obolibrary.org/obo/X_1", + "genusIds" : [ "http://purl.obolibrary.org/obo/X_2", "http://purl.obolibrary.org/obo/X_3" ] + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.obo b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.obo new file mode 100644 index 000000000..53637386e --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: intersection_of-genus-pair + +[Term] +id: X:1 +intersection_of: X:2 +intersection_of: X:3 + diff --git a/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.ofn b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.ofn new file mode 100644 index 000000000..c18bb987a --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +EquivalentClasses( ObjectIntersectionOf( )) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.owl b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.owl new file mode 100644 index 000000000..272e9107b --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.expected.owl @@ -0,0 +1,82 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.meta.yaml b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.meta.yaml new file mode 100644 index 000000000..8a30b4f7a --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.meta.yaml @@ -0,0 +1,3 @@ +name: intersection_of-genus-pair +name: intersection_of-genus-pair +description: Genus-Genus \ No newline at end of file diff --git a/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.obo b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.obo new file mode 100644 index 000000000..774f69245 --- /dev/null +++ b/tests/input/obo-compliance/intersection_of-genus-pair/intersection_of-genus-pair.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: intersection_of-genus-pair + +[Term] +id: X:1 +intersection_of: X:2 +intersection_of: X:3 + diff --git a/tests/input/obo-compliance/invalid-intersection_of-single-element/invalid-intersection_of-single-element.meta.yaml b/tests/input/obo-compliance/invalid-intersection_of-single-element/invalid-intersection_of-single-element.meta.yaml new file mode 100644 index 000000000..d4dc18322 --- /dev/null +++ b/tests/input/obo-compliance/invalid-intersection_of-single-element/invalid-intersection_of-single-element.meta.yaml @@ -0,0 +1,4 @@ +name: invalid-intersection_of-single-element +name: invalid-intersection_of-single-element +description: Single elements disallowed +invalid: true \ No newline at end of file diff --git a/tests/input/obo-compliance/invalid-intersection_of-single-element/invalid-intersection_of-single-element.obo b/tests/input/obo-compliance/invalid-intersection_of-single-element/invalid-intersection_of-single-element.obo new file mode 100644 index 000000000..2a3c62a90 --- /dev/null +++ b/tests/input/obo-compliance/invalid-intersection_of-single-element/invalid-intersection_of-single-element.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: invalid-intersection_of-single-element + +[Term] +id: X:1 +intersection_of: X:2 + diff --git a/tests/input/obo-compliance/invalid-name-duplicate/invalid-name-duplicate.meta.yaml b/tests/input/obo-compliance/invalid-name-duplicate/invalid-name-duplicate.meta.yaml new file mode 100644 index 000000000..e9cfbe65a --- /dev/null +++ b/tests/input/obo-compliance/invalid-name-duplicate/invalid-name-duplicate.meta.yaml @@ -0,0 +1,4 @@ +name: invalid-name-duplicate +name: invalid-name-duplicate +description: max 1 name +invalid: true \ No newline at end of file diff --git a/tests/input/obo-compliance/invalid-name-duplicate/invalid-name-duplicate.obo b/tests/input/obo-compliance/invalid-name-duplicate/invalid-name-duplicate.obo new file mode 100644 index 000000000..c85894117 --- /dev/null +++ b/tests/input/obo-compliance/invalid-name-duplicate/invalid-name-duplicate.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: invalid-name-duplicate + +[Term] +id: X:1 +name: x1 +name: x2 + diff --git a/tests/input/obo-compliance/invalid-owl-axioms-owl-syntax/invalid-owl-axioms-owl-syntax.meta.yaml b/tests/input/obo-compliance/invalid-owl-axioms-owl-syntax/invalid-owl-axioms-owl-syntax.meta.yaml new file mode 100644 index 000000000..70fec86fa --- /dev/null +++ b/tests/input/obo-compliance/invalid-owl-axioms-owl-syntax/invalid-owl-axioms-owl-syntax.meta.yaml @@ -0,0 +1,4 @@ +name: invalid-owl-axioms-owl-syntax +name: invalid-owl-axioms-owl-syntax +description: Intentionally broken +invalid: true \ No newline at end of file diff --git a/tests/input/obo-compliance/invalid-owl-axioms-owl-syntax/invalid-owl-axioms-owl-syntax.obo b/tests/input/obo-compliance/invalid-owl-axioms-owl-syntax/invalid-owl-axioms-owl-syntax.obo new file mode 100644 index 000000000..53c68f084 --- /dev/null +++ b/tests/input/obo-compliance/invalid-owl-axioms-owl-syntax/invalid-owl-axioms-owl-syntax.obo @@ -0,0 +1,3 @@ +format-version: 1.4 +ontology: invalid-owl-axioms-owl-syntax +owl-axioms: SubObjectPropertyOf( diff --git a/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.json b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.json new file mode 100644 index 000000000..005e4c047 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.json @@ -0,0 +1,27 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_a-annotated-prefix.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/X_1", + "pred" : "is_a", + "obj" : "http://purl.obolibrary.org/obo/Y_1", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#dcterms:source", + "val" : "PMID:123456" + } ] + } + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.obo b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.obo new file mode 100644 index 000000000..15d5d7c8b --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_a-annotated-prefix + +[Term] +id: X:1 +is_a: Y:1 {dcterms:source="PMID:123456"} + diff --git a/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.ofn b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.ofn new file mode 100644 index 000000000..4332c1f82 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +SubClassOf(Annotation( "PMID:123456") ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.owl b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.owl new file mode 100644 index 000000000..f9b973151 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.expected.owl @@ -0,0 +1,82 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + PMID:123456 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.meta.yaml b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.meta.yaml new file mode 100644 index 000000000..d0ca58185 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.meta.yaml @@ -0,0 +1,4 @@ +name: is_a-annotated-prefix +name: is_a-annotated-prefix +description: annotated axiom using a prefix +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.obo b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.obo new file mode 100644 index 000000000..a1794f923 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated-prefix/is_a-annotated-prefix.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: is_a-annotated-prefix +idspace: dcterms http://purl.org/dc/terms/ + +[Term] +id: X:1 +is_a: Y:1 {dcterms:source="PMID:123456"} + diff --git a/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.json b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.json new file mode 100644 index 000000000..2ce05dc0a --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.json @@ -0,0 +1,27 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_a-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/X_1", + "pred" : "is_a", + "obj" : "http://purl.obolibrary.org/obo/Y_1", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#source", + "val" : "PMID:123456" + } ] + } + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.obo b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.obo new file mode 100644 index 000000000..137f250fc --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_a-annotated + +[Term] +id: X:1 +is_a: Y:1 {source="PMID:123456"} + diff --git a/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.ofn b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.ofn new file mode 100644 index 000000000..ba8134170 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +SubClassOf(Annotation( "PMID:123456") ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.owl b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.owl new file mode 100644 index 000000000..cad565cf1 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.expected.owl @@ -0,0 +1,81 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + PMID:123456 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/is_a-annotated/is_a-annotated.meta.yaml b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.meta.yaml new file mode 100644 index 000000000..9f7e695fb --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: is_a-annotated +name: is_a-annotated +description: annotated variant of is_a \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a-annotated/is_a-annotated.obo b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.obo new file mode 100644 index 000000000..3863001e1 --- /dev/null +++ b/tests/input/obo-compliance/is_a-annotated/is_a-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_a-annotated + +[Term] +id: X:1 +is_a: Y:1 {source="PMID:123456"} + diff --git a/tests/input/obo-compliance/is_a/is_a.expected.json b/tests/input/obo-compliance/is_a/is_a.expected.json new file mode 100644 index 000000000..a31491906 --- /dev/null +++ b/tests/input/obo-compliance/is_a/is_a.expected.json @@ -0,0 +1,21 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_a.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/X_1", + "pred" : "is_a", + "obj" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a/is_a.expected.obo b/tests/input/obo-compliance/is_a/is_a.expected.obo new file mode 100644 index 000000000..ea609bb1a --- /dev/null +++ b/tests/input/obo-compliance/is_a/is_a.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_a + +[Term] +id: X:1 +is_a: Y:1 + diff --git a/tests/input/obo-compliance/is_a/is_a.expected.ofn b/tests/input/obo-compliance/is_a/is_a.expected.ofn new file mode 100644 index 000000000..d7cc4ac5a --- /dev/null +++ b/tests/input/obo-compliance/is_a/is_a.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +SubClassOf( ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a/is_a.expected.owl b/tests/input/obo-compliance/is_a/is_a.expected.owl new file mode 100644 index 000000000..43a4793e3 --- /dev/null +++ b/tests/input/obo-compliance/is_a/is_a.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/is_a/is_a.meta.yaml b/tests/input/obo-compliance/is_a/is_a.meta.yaml new file mode 100644 index 000000000..28bf8388b --- /dev/null +++ b/tests/input/obo-compliance/is_a/is_a.meta.yaml @@ -0,0 +1,3 @@ +name: is_a +name: is_a +description: test that is_a maps to subClassOf \ No newline at end of file diff --git a/tests/input/obo-compliance/is_a/is_a.obo b/tests/input/obo-compliance/is_a/is_a.obo new file mode 100644 index 000000000..c17647644 --- /dev/null +++ b/tests/input/obo-compliance/is_a/is_a.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_a + +[Term] +id: X:1 +is_a: Y:1 + diff --git a/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.json b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.json new file mode 100644 index 000000000..b4b6ab549 --- /dev/null +++ b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.json @@ -0,0 +1,29 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_anti_symmetric.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/IAO_0000427", + "lbl" : "antisymmetric property", + "type" : "PROPERTY" + }, { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/IAO_0000427", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.obo b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.obo new file mode 100644 index 000000000..bdb6265f0 --- /dev/null +++ b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_anti_symmetric + +[Typedef] +id: R:1 +is_anti_symmetric: true + diff --git a/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.ofn b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.ofn new file mode 100644 index 000000000..b222ceed1 --- /dev/null +++ b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (antisymmetric property) + +AnnotationAssertion(rdfs:label "antisymmetric property") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "true"^^xsd:boolean) +AnnotationAssertion( "R:1") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.owl b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.owl new file mode 100644 index 000000000..b5f14799a --- /dev/null +++ b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.expected.owl @@ -0,0 +1,72 @@ + + + + 1.4 + + + + + + + + + + + + + antisymmetric property + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + true + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.meta.yaml b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.meta.yaml new file mode 100644 index 000000000..cba2e317f --- /dev/null +++ b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.meta.yaml @@ -0,0 +1,2 @@ +name: is_anti_symmetric +name: is_anti_symmetric \ No newline at end of file diff --git a/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.obo b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.obo new file mode 100644 index 000000000..b03b76e47 --- /dev/null +++ b/tests/input/obo-compliance/is_anti_symmetric/is_anti_symmetric.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_anti_symmetric + +[Typedef] +id: R:1 +is_anti_symmetric: true + diff --git a/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.json b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.json new file mode 100644 index 000000000..78ef8353d --- /dev/null +++ b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_cyclic.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_cyclic", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.obo b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.obo new file mode 100644 index 000000000..fa2e88715 --- /dev/null +++ b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_cyclic + +[Typedef] +id: R:1 +is_cyclic: true + diff --git a/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.ofn b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.ofn new file mode 100644 index 000000000..0735aa934 --- /dev/null +++ b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.owl b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.owl new file mode 100644 index 000000000..f11de3e70 --- /dev/null +++ b/tests/input/obo-compliance/is_cyclic/is_cyclic.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + R:1 + true + + + + + + + diff --git a/tests/input/obo-compliance/is_cyclic/is_cyclic.meta.yaml b/tests/input/obo-compliance/is_cyclic/is_cyclic.meta.yaml new file mode 100644 index 000000000..6ca57df29 --- /dev/null +++ b/tests/input/obo-compliance/is_cyclic/is_cyclic.meta.yaml @@ -0,0 +1,2 @@ +name: is_cyclic +name: is_cyclic \ No newline at end of file diff --git a/tests/input/obo-compliance/is_cyclic/is_cyclic.obo b/tests/input/obo-compliance/is_cyclic/is_cyclic.obo new file mode 100644 index 000000000..857d47ae6 --- /dev/null +++ b/tests/input/obo-compliance/is_cyclic/is_cyclic.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_cyclic + +[Typedef] +id: R:1 +is_cyclic: true + diff --git a/tests/input/obo-compliance/is_functional/is_functional.expected.json b/tests/input/obo-compliance/is_functional/is_functional.expected.json new file mode 100644 index 000000000..e9ed0eb41 --- /dev/null +++ b/tests/input/obo-compliance/is_functional/is_functional.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_functional.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_functional/is_functional.expected.obo b/tests/input/obo-compliance/is_functional/is_functional.expected.obo new file mode 100644 index 000000000..9f3c6ad7d --- /dev/null +++ b/tests/input/obo-compliance/is_functional/is_functional.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_functional + +[Typedef] +id: R:1 +is_functional: true + diff --git a/tests/input/obo-compliance/is_functional/is_functional.expected.ofn b/tests/input/obo-compliance/is_functional/is_functional.expected.ofn new file mode 100644 index 000000000..7bb203dc0 --- /dev/null +++ b/tests/input/obo-compliance/is_functional/is_functional.expected.ofn @@ -0,0 +1,35 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +FunctionalObjectProperty() + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_functional/is_functional.expected.owl b/tests/input/obo-compliance/is_functional/is_functional.expected.owl new file mode 100644 index 000000000..db92a894f --- /dev/null +++ b/tests/input/obo-compliance/is_functional/is_functional.expected.owl @@ -0,0 +1,63 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/is_functional/is_functional.meta.yaml b/tests/input/obo-compliance/is_functional/is_functional.meta.yaml new file mode 100644 index 000000000..5e59e84f6 --- /dev/null +++ b/tests/input/obo-compliance/is_functional/is_functional.meta.yaml @@ -0,0 +1,2 @@ +name: is_functional +name: is_functional \ No newline at end of file diff --git a/tests/input/obo-compliance/is_functional/is_functional.obo b/tests/input/obo-compliance/is_functional/is_functional.obo new file mode 100644 index 000000000..b933ed626 --- /dev/null +++ b/tests/input/obo-compliance/is_functional/is_functional.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_functional + +[Typedef] +id: R:1 +is_functional: true + diff --git a/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.json b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.json new file mode 100644 index 000000000..364c3b6d0 --- /dev/null +++ b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_inverse_functional.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.obo b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.obo new file mode 100644 index 000000000..e1d8f4025 --- /dev/null +++ b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_inverse_functional + +[Typedef] +id: R:1 +is_inverse_functional: true + diff --git a/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.ofn b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.ofn new file mode 100644 index 000000000..6fe90ef76 --- /dev/null +++ b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.ofn @@ -0,0 +1,35 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +InverseFunctionalObjectProperty() + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.owl b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.owl new file mode 100644 index 000000000..246d07639 --- /dev/null +++ b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.expected.owl @@ -0,0 +1,63 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.meta.yaml b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.meta.yaml new file mode 100644 index 000000000..d02f8031c --- /dev/null +++ b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.meta.yaml @@ -0,0 +1,2 @@ +name: is_inverse_functional +name: is_inverse_functional \ No newline at end of file diff --git a/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.obo b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.obo new file mode 100644 index 000000000..f2f419fe4 --- /dev/null +++ b/tests/input/obo-compliance/is_inverse_functional/is_inverse_functional.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_inverse_functional + +[Typedef] +id: R:1 +is_inverse_functional: true + diff --git a/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.json b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.json new file mode 100644 index 000000000..e06163d42 --- /dev/null +++ b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_symmetric.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.obo b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.obo new file mode 100644 index 000000000..ad05fb17e --- /dev/null +++ b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_symmetric + +[Typedef] +id: R:1 +is_symmetric: true + diff --git a/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.ofn b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.ofn new file mode 100644 index 000000000..eb0394fc4 --- /dev/null +++ b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.ofn @@ -0,0 +1,35 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +SymmetricObjectProperty() + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.owl b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.owl new file mode 100644 index 000000000..55a59cbd3 --- /dev/null +++ b/tests/input/obo-compliance/is_symmetric/is_symmetric.expected.owl @@ -0,0 +1,63 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/is_symmetric/is_symmetric.meta.yaml b/tests/input/obo-compliance/is_symmetric/is_symmetric.meta.yaml new file mode 100644 index 000000000..ecc4432c8 --- /dev/null +++ b/tests/input/obo-compliance/is_symmetric/is_symmetric.meta.yaml @@ -0,0 +1,2 @@ +name: is_symmetric +name: is_symmetric \ No newline at end of file diff --git a/tests/input/obo-compliance/is_symmetric/is_symmetric.obo b/tests/input/obo-compliance/is_symmetric/is_symmetric.obo new file mode 100644 index 000000000..a80cc0b9b --- /dev/null +++ b/tests/input/obo-compliance/is_symmetric/is_symmetric.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_symmetric + +[Typedef] +id: R:1 +is_symmetric: true + diff --git a/tests/input/obo-compliance/is_transitive/is_transitive.expected.json b/tests/input/obo-compliance/is_transitive/is_transitive.expected.json new file mode 100644 index 000000000..066d8f3a1 --- /dev/null +++ b/tests/input/obo-compliance/is_transitive/is_transitive.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/is_transitive.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/is_transitive/is_transitive.expected.obo b/tests/input/obo-compliance/is_transitive/is_transitive.expected.obo new file mode 100644 index 000000000..888a68fcc --- /dev/null +++ b/tests/input/obo-compliance/is_transitive/is_transitive.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: is_transitive + +[Typedef] +id: R:1 +is_transitive: true + diff --git a/tests/input/obo-compliance/is_transitive/is_transitive.expected.ofn b/tests/input/obo-compliance/is_transitive/is_transitive.expected.ofn new file mode 100644 index 000000000..c65052829 --- /dev/null +++ b/tests/input/obo-compliance/is_transitive/is_transitive.expected.ofn @@ -0,0 +1,35 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +TransitiveObjectProperty() + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/is_transitive/is_transitive.expected.owl b/tests/input/obo-compliance/is_transitive/is_transitive.expected.owl new file mode 100644 index 000000000..632f3720c --- /dev/null +++ b/tests/input/obo-compliance/is_transitive/is_transitive.expected.owl @@ -0,0 +1,63 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/is_transitive/is_transitive.meta.yaml b/tests/input/obo-compliance/is_transitive/is_transitive.meta.yaml new file mode 100644 index 000000000..cfe94143b --- /dev/null +++ b/tests/input/obo-compliance/is_transitive/is_transitive.meta.yaml @@ -0,0 +1,3 @@ +name: is_transitive +name: is_transitive +description: transitivity \ No newline at end of file diff --git a/tests/input/obo-compliance/is_transitive/is_transitive.obo b/tests/input/obo-compliance/is_transitive/is_transitive.obo new file mode 100644 index 000000000..9b25865b7 --- /dev/null +++ b/tests/input/obo-compliance/is_transitive/is_transitive.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: is_transitive + +[Typedef] +id: R:1 +is_transitive: true + diff --git a/tests/input/obo-compliance/name-annotated/name-annotated.expected.json b/tests/input/obo-compliance/name-annotated/name-annotated.expected.json new file mode 100644 index 000000000..bbe9ce60c --- /dev/null +++ b/tests/input/obo-compliance/name-annotated/name-annotated.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/name-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "x1", + "type" : "CLASS" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/name-annotated/name-annotated.expected.obo b/tests/input/obo-compliance/name-annotated/name-annotated.expected.obo new file mode 100644 index 000000000..7dbe2ca50 --- /dev/null +++ b/tests/input/obo-compliance/name-annotated/name-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: name-annotated + +[Term] +id: X:1 +name: x1 {source="PMID:123457"} + diff --git a/tests/input/obo-compliance/name-annotated/name-annotated.expected.ofn b/tests/input/obo-compliance/name-annotated/name-annotated.expected.ofn new file mode 100644 index 000000000..359a92cc4 --- /dev/null +++ b/tests/input/obo-compliance/name-annotated/name-annotated.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: (x1) + +AnnotationAssertion( "X:1") +AnnotationAssertion(Annotation( "PMID:123457") rdfs:label "x1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/name-annotated/name-annotated.expected.owl b/tests/input/obo-compliance/name-annotated/name-annotated.expected.owl new file mode 100644 index 000000000..6ffcd12b3 --- /dev/null +++ b/tests/input/obo-compliance/name-annotated/name-annotated.expected.owl @@ -0,0 +1,81 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + x1 + + + + + x1 + PMID:123457 + + + + + + + diff --git a/tests/input/obo-compliance/name-annotated/name-annotated.meta.yaml b/tests/input/obo-compliance/name-annotated/name-annotated.meta.yaml new file mode 100644 index 000000000..5efbea787 --- /dev/null +++ b/tests/input/obo-compliance/name-annotated/name-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: name-annotated +name: name-annotated +description: rdfs:label with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/name-annotated/name-annotated.obo b/tests/input/obo-compliance/name-annotated/name-annotated.obo new file mode 100644 index 000000000..8928421bc --- /dev/null +++ b/tests/input/obo-compliance/name-annotated/name-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: name-annotated + +[Term] +id: X:1 +name: x1 {source="PMID:123457"} + diff --git a/tests/input/obo-compliance/name/name.expected.json b/tests/input/obo-compliance/name/name.expected.json new file mode 100644 index 000000000..75591dea2 --- /dev/null +++ b/tests/input/obo-compliance/name/name.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/name.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "x1", + "type" : "CLASS" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/name/name.expected.obo b/tests/input/obo-compliance/name/name.expected.obo new file mode 100644 index 000000000..545e79b1f --- /dev/null +++ b/tests/input/obo-compliance/name/name.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: name + +[Term] +id: X:1 +name: x1 + diff --git a/tests/input/obo-compliance/name/name.expected.ofn b/tests/input/obo-compliance/name/name.expected.ofn new file mode 100644 index 000000000..ed770b768 --- /dev/null +++ b/tests/input/obo-compliance/name/name.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: (x1) + +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "x1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/name/name.expected.owl b/tests/input/obo-compliance/name/name.expected.owl new file mode 100644 index 000000000..40431d5a1 --- /dev/null +++ b/tests/input/obo-compliance/name/name.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + x1 + + + + + + + diff --git a/tests/input/obo-compliance/name/name.meta.yaml b/tests/input/obo-compliance/name/name.meta.yaml new file mode 100644 index 000000000..a617c8c50 --- /dev/null +++ b/tests/input/obo-compliance/name/name.meta.yaml @@ -0,0 +1,3 @@ +name: name +name: name +description: rdfs:label \ No newline at end of file diff --git a/tests/input/obo-compliance/name/name.obo b/tests/input/obo-compliance/name/name.obo new file mode 100644 index 000000000..e46b0fb94 --- /dev/null +++ b/tests/input/obo-compliance/name/name.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: name + +[Term] +id: X:1 +name: x1 + diff --git a/tests/input/obo-compliance/namespace/namespace.expected.json b/tests/input/obo-compliance/namespace/namespace.expected.json new file mode 100644 index 000000000..e1dc1f5eb --- /dev/null +++ b/tests/input/obo-compliance/namespace/namespace.expected.json @@ -0,0 +1,29 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/namespace.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace", + "val" : "NS1" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace", + "lbl" : "has_obo_namespace", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/namespace/namespace.expected.obo b/tests/input/obo-compliance/namespace/namespace.expected.obo new file mode 100644 index 000000000..e975d83b8 --- /dev/null +++ b/tests/input/obo-compliance/namespace/namespace.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: namespace + +[Term] +id: X:1 +namespace: NS1 + diff --git a/tests/input/obo-compliance/namespace/namespace.expected.ofn b/tests/input/obo-compliance/namespace/namespace.expected.ofn new file mode 100644 index 000000000..36ef2e7b4 --- /dev/null +++ b/tests/input/obo-compliance/namespace/namespace.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + +# Annotation Property: (has_obo_namespace) + +AnnotationAssertion(rdfs:label "has_obo_namespace") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "NS1") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/namespace/namespace.expected.owl b/tests/input/obo-compliance/namespace/namespace.expected.owl new file mode 100644 index 000000000..28f969f9a --- /dev/null +++ b/tests/input/obo-compliance/namespace/namespace.expected.owl @@ -0,0 +1,71 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + has_obo_namespace + + + + + + + + + + + + + + + + + + + NS1 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/namespace/namespace.meta.yaml b/tests/input/obo-compliance/namespace/namespace.meta.yaml new file mode 100644 index 000000000..4640e466b --- /dev/null +++ b/tests/input/obo-compliance/namespace/namespace.meta.yaml @@ -0,0 +1,3 @@ +name: namespace +name: namespace +description: oio:namespace \ No newline at end of file diff --git a/tests/input/obo-compliance/namespace/namespace.obo b/tests/input/obo-compliance/namespace/namespace.obo new file mode 100644 index 000000000..f9839dd0b --- /dev/null +++ b/tests/input/obo-compliance/namespace/namespace.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: namespace + +[Term] +id: X:1 +namespace: NS1 + diff --git a/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.json b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.json new file mode 100644 index 000000000..7ca3350da --- /dev/null +++ b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/narrow_synonym.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "pred" : "hasNarrowSynonym", + "val" : "narrow synonym" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym", + "lbl" : "has_narrow_synonym", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.obo b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.obo new file mode 100644 index 000000000..a755c7ad7 --- /dev/null +++ b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: narrow_synonym + +[Term] +id: X:1 +name: example term +synonym: "narrow synonym" NARROW [] + diff --git a/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.ofn b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.ofn new file mode 100644 index 000000000..2913919e6 --- /dev/null +++ b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_narrow_synonym) + +AnnotationAssertion(rdfs:label "has_narrow_synonym") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion( "narrow synonym") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.owl b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.owl new file mode 100644 index 000000000..eeb5f1b42 --- /dev/null +++ b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.expected.owl @@ -0,0 +1,78 @@ + + + + 1.4 + + + + + + + + + + + + + has_narrow_synonym + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + narrow synonym + X:1 + example term + + + + + + + diff --git a/tests/input/obo-compliance/narrow_synonym/narrow_synonym.meta.yaml b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.meta.yaml new file mode 100644 index 000000000..050ce65a1 --- /dev/null +++ b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.meta.yaml @@ -0,0 +1,3 @@ +name: narrow_synonym +name: narrow_synonym +description: Test for narrow synonym type \ No newline at end of file diff --git a/tests/input/obo-compliance/narrow_synonym/narrow_synonym.obo b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.obo new file mode 100644 index 000000000..c2dd319a8 --- /dev/null +++ b/tests/input/obo-compliance/narrow_synonym/narrow_synonym.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: narrow_synonym + +[Term] +id: X:1 +name: example term +synonym: "narrow synonym" NARROW [] + diff --git a/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.json b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.json new file mode 100644 index 000000000..54e66a19b --- /dev/null +++ b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/obsolete-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.obo b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.obo new file mode 100644 index 000000000..673c98988 --- /dev/null +++ b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: obsolete-annotated + +[Term] +id: X:1 +is_obsolete: true {source="PMID:123468"} + diff --git a/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.ofn b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.ofn new file mode 100644 index 000000000..61f499c2a --- /dev/null +++ b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(owl:deprecated)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +AnnotationAssertion(Annotation( "PMID:123468") owl:deprecated "true"^^xsd:boolean) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.owl b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.owl new file mode 100644 index 000000000..8f5c5da6d --- /dev/null +++ b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.expected.owl @@ -0,0 +1,81 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + true + + + + + true + PMID:123468 + + + + + + + diff --git a/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.meta.yaml b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.meta.yaml new file mode 100644 index 000000000..1dfeb073b --- /dev/null +++ b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: obsolete-annotated +name: obsolete-annotated +description: Marking term as obsolete with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.obo b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.obo new file mode 100644 index 000000000..67bb7e717 --- /dev/null +++ b/tests/input/obo-compliance/obsolete-annotated/obsolete-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: obsolete-annotated + +[Term] +id: X:1 +is_obsolete: true {source="PMID:123468"} + diff --git a/tests/input/obo-compliance/obsolete/obsolete.expected.json b/tests/input/obo-compliance/obsolete/obsolete.expected.json new file mode 100644 index 000000000..cfdd6730f --- /dev/null +++ b/tests/input/obo-compliance/obsolete/obsolete.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/obsolete.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/obsolete/obsolete.expected.obo b/tests/input/obo-compliance/obsolete/obsolete.expected.obo new file mode 100644 index 000000000..9522fabf1 --- /dev/null +++ b/tests/input/obo-compliance/obsolete/obsolete.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: obsolete + +[Term] +id: X:1 +is_obsolete: true + diff --git a/tests/input/obo-compliance/obsolete/obsolete.expected.ofn b/tests/input/obo-compliance/obsolete/obsolete.expected.ofn new file mode 100644 index 000000000..677d883be --- /dev/null +++ b/tests/input/obo-compliance/obsolete/obsolete.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(owl:deprecated)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +AnnotationAssertion(owl:deprecated "true"^^xsd:boolean) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/obsolete/obsolete.expected.owl b/tests/input/obo-compliance/obsolete/obsolete.expected.owl new file mode 100644 index 000000000..c0bb0698c --- /dev/null +++ b/tests/input/obo-compliance/obsolete/obsolete.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + true + + + + + + + diff --git a/tests/input/obo-compliance/obsolete/obsolete.meta.yaml b/tests/input/obo-compliance/obsolete/obsolete.meta.yaml new file mode 100644 index 000000000..154626f93 --- /dev/null +++ b/tests/input/obo-compliance/obsolete/obsolete.meta.yaml @@ -0,0 +1,3 @@ +name: obsolete +name: obsolete +description: Marking term as obsolete \ No newline at end of file diff --git a/tests/input/obo-compliance/obsolete/obsolete.obo b/tests/input/obo-compliance/obsolete/obsolete.obo new file mode 100644 index 000000000..4f8c06709 --- /dev/null +++ b/tests/input/obo-compliance/obsolete/obsolete.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: obsolete + +[Term] +id: X:1 +is_obsolete: true + diff --git a/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.json b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.json new file mode 100644 index 000000000..800387991 --- /dev/null +++ b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/owl-axioms-ObjectInverseOf.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.obo b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.obo new file mode 100644 index 000000000..78484c2e3 --- /dev/null +++ b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.obo @@ -0,0 +1,4 @@ +format-version: 1.2 +ontology: owl-axioms-ObjectInverseOf +owl-axioms: Prefix(owl:=)\nPrefix(rdf:=)\nPrefix(xml:=)\nPrefix(xsd:=)\nPrefix(rdfs:=)\n\n\nOntology(\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\n############################\n# Object Properties\n############################\n\n# Object Property: ()\n\nSubObjectPropertyOf( ObjectInverseOf())\n\n\n) + diff --git a/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.ofn b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.ofn new file mode 100644 index 000000000..80e8950a9 --- /dev/null +++ b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.ofn @@ -0,0 +1,34 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +SubObjectPropertyOf( ObjectInverseOf()) + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.owl b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.owl new file mode 100644 index 000000000..f09fa58f9 --- /dev/null +++ b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.expected.owl @@ -0,0 +1,66 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.meta.yaml b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.meta.yaml new file mode 100644 index 000000000..c57d6ecb2 --- /dev/null +++ b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.meta.yaml @@ -0,0 +1,4 @@ +name: owl-axioms-ObjectInverseOf +name: owl-axioms-ObjectInverseOf +description: OWL axioms header +issue: https://github.com/owlcollab/oboformat/issues/145 \ No newline at end of file diff --git a/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.obo b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.obo new file mode 100644 index 000000000..37c7c2b97 --- /dev/null +++ b/tests/input/obo-compliance/owl-axioms-ObjectInverseOf/owl-axioms-ObjectInverseOf.obo @@ -0,0 +1,4 @@ +format-version: 1.4 +ontology: owl-axioms-ObjectInverseOf +owl-axioms: Ontology(SubObjectPropertyOf( ObjectInverseOf())) + diff --git a/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.json b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.json new file mode 100644 index 000000000..9e8413253 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/prefixes-created_by.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" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#created_by", + "val" : "1" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.obo b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.obo new file mode 100644 index 000000000..4587f6698 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: prefixes-created_by + +[Term] +id: X:1 +created_by: 1 + diff --git a/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.ofn b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.ofn new file mode 100644 index 000000000..4b3109275 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "1") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.owl b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.owl new file mode 100644 index 000000000..6790736e0 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + 1 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.meta.yaml b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.meta.yaml new file mode 100644 index 000000000..57d1c6fda --- /dev/null +++ b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.meta.yaml @@ -0,0 +1,4 @@ +name: prefixes-created_by +name: prefixes-created_by +description: prefix expansions and author metadata +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.obo b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.obo new file mode 100644 index 000000000..d74ef1fbb --- /dev/null +++ b/tests/input/obo-compliance/prefixes-created_by/prefixes-created_by.obo @@ -0,0 +1,9 @@ +format-version: 1.4 +ontology: prefixes-created_by +idspace: Y http://example.org/Y/ + +[Term] +id: X:1 +created_by: Y:1 + + diff --git a/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.json b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.json new file mode 100644 index 000000000..ef01af3d8 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/prefixes-xref.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" + } ] + } + }, { + "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.obo b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.obo new file mode 100644 index 000000000..b37d27fda --- /dev/null +++ b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: prefixes-xref + +[Term] +id: X:1 +xref: Y:1 + diff --git a/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.ofn b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.ofn new file mode 100644 index 000000000..e36f897b2 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# 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") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "Y:1") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.owl b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.owl new file mode 100644 index 000000000..f1b974dfb --- /dev/null +++ b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.expected.owl @@ -0,0 +1,71 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + Y:1 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/prefixes-xref/prefixes-xref.meta.yaml b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.meta.yaml new file mode 100644 index 000000000..f44617e62 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.meta.yaml @@ -0,0 +1,4 @@ +name: prefixes-xref +name: prefixes-xref +description: prefix expansions and xrefs +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes-xref/prefixes-xref.obo b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.obo new file mode 100644 index 000000000..73a393d08 --- /dev/null +++ b/tests/input/obo-compliance/prefixes-xref/prefixes-xref.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: prefixes-xref +idspace: Y http://example.org/Y/ + +[Term] +id: X:1 +xref: Y:1 + diff --git a/tests/input/obo-compliance/prefixes/prefixes.expected.json b/tests/input/obo-compliance/prefixes/prefixes.expected.json new file mode 100644 index 000000000..8b2c3a6c1 --- /dev/null +++ b/tests/input/obo-compliance/prefixes/prefixes.expected.json @@ -0,0 +1,21 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/prefixes.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/X_1", + "pred" : "is_a", + "obj" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes/prefixes.expected.obo b/tests/input/obo-compliance/prefixes/prefixes.expected.obo new file mode 100644 index 000000000..32b340307 --- /dev/null +++ b/tests/input/obo-compliance/prefixes/prefixes.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: prefixes + +[Term] +id: X:1 +is_a: Y:1 + diff --git a/tests/input/obo-compliance/prefixes/prefixes.expected.ofn b/tests/input/obo-compliance/prefixes/prefixes.expected.ofn new file mode 100644 index 000000000..d5f9e77f0 --- /dev/null +++ b/tests/input/obo-compliance/prefixes/prefixes.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +SubClassOf( ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes/prefixes.expected.owl b/tests/input/obo-compliance/prefixes/prefixes.expected.owl new file mode 100644 index 000000000..3cc9fd1de --- /dev/null +++ b/tests/input/obo-compliance/prefixes/prefixes.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/prefixes/prefixes.meta.yaml b/tests/input/obo-compliance/prefixes/prefixes.meta.yaml new file mode 100644 index 000000000..0308f1ba1 --- /dev/null +++ b/tests/input/obo-compliance/prefixes/prefixes.meta.yaml @@ -0,0 +1,5 @@ +name: prefixes +name: prefixes +description: prefixes allow customization of IRIs +issue: https://github.com/geneontology/obographs/issues/97 +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/prefixes/prefixes.obo b/tests/input/obo-compliance/prefixes/prefixes.obo new file mode 100644 index 000000000..a1041f28a --- /dev/null +++ b/tests/input/obo-compliance/prefixes/prefixes.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: prefixes +idspace: X http://example.org/X/ + +[Term] +id: X:1 +is_a: Y:1 + diff --git a/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.json b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.json new file mode 100644 index 000000000..4f0f16e82 --- /dev/null +++ b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-anyURI.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/R_1", + "val" : "http://example.org" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.obo b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.obo new file mode 100644 index 000000000..da4ed7867 --- /dev/null +++ b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: property_value-anyURI + +[Term] +id: X:1 +property_value: R:1 "http://example.org" xsd:anyURI + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.ofn b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.ofn new file mode 100644 index 000000000..fb4cbeaaa --- /dev/null +++ b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "http://example.org"^^xsd:anyURI) +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.owl b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.owl new file mode 100644 index 000000000..d649d6a95 --- /dev/null +++ b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + http://example.org + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.meta.yaml b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.meta.yaml new file mode 100644 index 000000000..5f6ceb1dd --- /dev/null +++ b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.meta.yaml @@ -0,0 +1,3 @@ +name: property_value-anyURI +name: property_value-anyURI +description: property value with anyURI datatype \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.obo b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.obo new file mode 100644 index 000000000..d70f56568 --- /dev/null +++ b/tests/input/obo-compliance/property_value-anyURI/property_value-anyURI.obo @@ -0,0 +1,11 @@ +format-version: 1.4 +ontology: property_value-anyURI + +[Term] +id: X:1 +property_value: R:1 "http://example.org" xsd:anyURI + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-float/property_value-float.expected.json b/tests/input/obo-compliance/property_value-float/property_value-float.expected.json new file mode 100644 index 000000000..12f4a28e6 --- /dev/null +++ b/tests/input/obo-compliance/property_value-float/property_value-float.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-float.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/R_1", + "val" : "1.5" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-float/property_value-float.expected.obo b/tests/input/obo-compliance/property_value-float/property_value-float.expected.obo new file mode 100644 index 000000000..c94c31d11 --- /dev/null +++ b/tests/input/obo-compliance/property_value-float/property_value-float.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: property_value-float + +[Term] +id: X:1 +property_value: R:1 "1.5" xsd:float + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-float/property_value-float.expected.ofn b/tests/input/obo-compliance/property_value-float/property_value-float.expected.ofn new file mode 100644 index 000000000..f7b7ab76f --- /dev/null +++ b/tests/input/obo-compliance/property_value-float/property_value-float.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "1.5"^^xsd:float) +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-float/property_value-float.expected.owl b/tests/input/obo-compliance/property_value-float/property_value-float.expected.owl new file mode 100644 index 000000000..1f7f2f70b --- /dev/null +++ b/tests/input/obo-compliance/property_value-float/property_value-float.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + 1.5 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-float/property_value-float.meta.yaml b/tests/input/obo-compliance/property_value-float/property_value-float.meta.yaml new file mode 100644 index 000000000..4637b7bf2 --- /dev/null +++ b/tests/input/obo-compliance/property_value-float/property_value-float.meta.yaml @@ -0,0 +1,3 @@ +name: property_value-float +name: property_value-float +description: property value with float datatype \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-float/property_value-float.obo b/tests/input/obo-compliance/property_value-float/property_value-float.obo new file mode 100644 index 000000000..db3fa1b7e --- /dev/null +++ b/tests/input/obo-compliance/property_value-float/property_value-float.obo @@ -0,0 +1,11 @@ +format-version: 1.4 +ontology: property_value-float + +[Term] +id: X:1 +property_value: R:1 "1.5" xsd:float + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.json b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.json new file mode 100644 index 000000000..ff50ad46b --- /dev/null +++ b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.json @@ -0,0 +1,41 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-id-tag.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "xrefs" : [ { + "val" : "http://www.geneontology.org/formats/oboInOwl#id" + } ], + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/property_value-id-tag#id", + "val" : "X: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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.obo b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.obo new file mode 100644 index 000000000..dd0356de4 --- /dev/null +++ b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.obo @@ -0,0 +1,12 @@ +format-version: 1.2 +ontology: property_value-id-tag + +[Term] +id: X:1 +property_value: id "X:1" xsd:string + +[Typedef] +id: R:1 +xref: http://www.geneontology.org/formats/oboInOwl#id +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.ofn b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.ofn new file mode 100644 index 000000000..1de53f36d --- /dev/null +++ b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.ofn @@ -0,0 +1,49 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "http://www.geneontology.org/formats/oboInOwl#id") +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (database_cross_reference) + +AnnotationAssertion(rdfs:label "database_cross_reference") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.owl b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.owl new file mode 100644 index 000000000..91ad95577 --- /dev/null +++ b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.expected.owl @@ -0,0 +1,95 @@ + + + + 1.4 + + + + + + + + + + + + + http://www.geneontology.org/formats/oboInOwl#id + R:1 + true + + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.meta.yaml b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.meta.yaml new file mode 100644 index 000000000..a24ebdf5c --- /dev/null +++ b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.meta.yaml @@ -0,0 +1,3 @@ +name: property_value-id-tag +name: property_value-id-tag +description: property value with string datatype \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.obo b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.obo new file mode 100644 index 000000000..bcc5f7022 --- /dev/null +++ b/tests/input/obo-compliance/property_value-id-tag/property_value-id-tag.obo @@ -0,0 +1,12 @@ +format-version: 1.4 +ontology: property_value-id-tag + +[Term] +id: X:1 +property_value: id "X:1" xsd:string + +[Typedef] +id: R:1 +xref: http://www.geneontology.org/formats/oboInOwl#id +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.json b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.json new file mode 100644 index 000000000..70b6571cc --- /dev/null +++ b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-object-annotated.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" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/X_1", + "pred" : "http://purl.obolibrary.org/obo/R_1", + "obj" : "http://purl.obolibrary.org/obo/Y_1", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#source", + "val" : "PMID:123471" + } ] + } + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.obo b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.obo new file mode 100644 index 000000000..5551801b1 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.obo @@ -0,0 +1,10 @@ +format-version: 1.2 +ontology: property_value-object-annotated +owl-axioms: Prefix(owl:=)\nPrefix(rdf:=)\nPrefix(xml:=)\nPrefix(xsd:=)\nPrefix(rdfs:=)\n\n\nOntology(\nDeclaration(ObjectProperty())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(AnnotationProperty())\n\n\n\n############################\n# Named Individuals\n############################\n\n# Individual: ()\n\nObjectPropertyAssertion(Annotation( \"PMID:123471\") )\n\n\n) + +[Term] +id: X:1 + +[Typedef] +id: R:1 + diff --git a/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.ofn b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.ofn new file mode 100644 index 000000000..28393d04b --- /dev/null +++ b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.ofn @@ -0,0 +1,56 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(ObjectProperty()) +Declaration(NamedIndividual()) +Declaration(NamedIndividual()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") + + +############################ +# Named Individuals +############################ + +# Individual: () + +ObjectPropertyAssertion(Annotation( "PMID:123471") ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.owl b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.owl new file mode 100644 index 000000000..eef5c86ce --- /dev/null +++ b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.expected.owl @@ -0,0 +1,131 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PMID:123471 + + + + + + + + + + + + + + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.meta.yaml b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.meta.yaml new file mode 100644 index 000000000..2d09f65f1 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: property_value-object-annotated +name: property_value-object-annotated +description: Annotation using PropertyValue with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.obo b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.obo new file mode 100644 index 000000000..808262151 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object-annotated/property_value-object-annotated.obo @@ -0,0 +1,10 @@ +format-version: 1.4 +ontology: property_value-object-annotated + +[Term] +id: X:1 +property_value: R:1 Y:1 {source="PMID:123471"} + +[Typedef] +id: R:1 + diff --git a/tests/input/obo-compliance/property_value-object/property_value-object.expected.json b/tests/input/obo-compliance/property_value-object/property_value-object.expected.json new file mode 100644 index 000000000..7ba125b70 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object/property_value-object.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-object.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/R_1", + "val" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-object/property_value-object.expected.obo b/tests/input/obo-compliance/property_value-object/property_value-object.expected.obo new file mode 100644 index 000000000..bd41c2801 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object/property_value-object.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: property_value-object + +[Term] +id: X:1 +relationship: R:1 Y:1 + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-object/property_value-object.expected.ofn b/tests/input/obo-compliance/property_value-object/property_value-object.expected.ofn new file mode 100644 index 000000000..15e3d7c83 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object/property_value-object.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( ) +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-object/property_value-object.expected.owl b/tests/input/obo-compliance/property_value-object/property_value-object.expected.owl new file mode 100644 index 000000000..cc4702e2f --- /dev/null +++ b/tests/input/obo-compliance/property_value-object/property_value-object.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-object/property_value-object.meta.yaml b/tests/input/obo-compliance/property_value-object/property_value-object.meta.yaml new file mode 100644 index 000000000..ea4b6a821 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object/property_value-object.meta.yaml @@ -0,0 +1,5 @@ +name: property_value-object +name: property_value-object +description: Annotation using PropertyValue +non-canonical-form-of: relationship-non-logical +issue: https://github.com/owlcollab/oboformat/issues/144 \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-object/property_value-object.obo b/tests/input/obo-compliance/property_value-object/property_value-object.obo new file mode 100644 index 000000000..c25ec7688 --- /dev/null +++ b/tests/input/obo-compliance/property_value-object/property_value-object.obo @@ -0,0 +1,11 @@ +format-version: 1.4 +ontology: property_value-object + +[Term] +id: X:1 +property_value: R:1 Y:1 + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.json b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.json new file mode 100644 index 000000000..32d984f6f --- /dev/null +++ b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-skos-object.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" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/skos_exactMatch", + "val" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/skos_exactMatch", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.obo b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.obo new file mode 100644 index 000000000..7ef9b7aa7 --- /dev/null +++ b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: property_value-skos-object + +[Term] +id: X:1 +relationship: skos:exactMatch Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.ofn b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.ofn new file mode 100644 index 000000000..98262f131 --- /dev/null +++ b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "skos:exactMatch") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( ) +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.owl b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.owl new file mode 100644 index 000000000..c4295a4a3 --- /dev/null +++ b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + skos:exactMatch + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.meta.yaml b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.meta.yaml new file mode 100644 index 000000000..2fab7de9c --- /dev/null +++ b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.meta.yaml @@ -0,0 +1,5 @@ +name: property_value-skos-object +name: property_value-skos-object +description: SKOS mapping to an object +non-canonical-form-of: relationship-skos-object +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.obo b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.obo new file mode 100644 index 000000000..95acfc4ff --- /dev/null +++ b/tests/input/obo-compliance/property_value-skos-object/property_value-skos-object.obo @@ -0,0 +1,12 @@ +format-version: 1.4 +ontology: property_value-skos-object +idspace: skos http://www.w3.org/2004/02/skos/core# + +[Term] +id: X:1 +property_value: skos:exactMatch Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.json b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.json new file mode 100644 index 000000000..66762dedc --- /dev/null +++ b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-string-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/R_1", + "val" : "foo" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.obo b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.obo new file mode 100644 index 000000000..6595d66db --- /dev/null +++ b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: property_value-string-annotated + +[Term] +id: X:1 +property_value: R:1 "foo" xsd:string {source="PMID:123472"} + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.ofn b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.ofn new file mode 100644 index 000000000..5554b941b --- /dev/null +++ b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.ofn @@ -0,0 +1,43 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123472") "foo") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.owl b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.owl new file mode 100644 index 000000000..dc89339bb --- /dev/null +++ b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.expected.owl @@ -0,0 +1,91 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + foo + X:1 + + + + + foo + PMID:123472 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.meta.yaml b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.meta.yaml new file mode 100644 index 000000000..2c197cfb1 --- /dev/null +++ b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: property_value-string-annotated +name: property_value-string-annotated +description: Annotation using PropertyValue with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.obo b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.obo new file mode 100644 index 000000000..1f0825d19 --- /dev/null +++ b/tests/input/obo-compliance/property_value-string-annotated/property_value-string-annotated.obo @@ -0,0 +1,12 @@ +format-version: 1.4 +ontology: property_value-string-annotated + +[Term] +id: X:1 +property_value: R:1 "foo" xsd:string {source="PMID:123472"} + +[Typedef] +id: R:1 +is_metadata_tag: true + + diff --git a/tests/input/obo-compliance/property_value-string/property_value-string.expected.json b/tests/input/obo-compliance/property_value-string/property_value-string.expected.json new file mode 100644 index 000000000..a1194824f --- /dev/null +++ b/tests/input/obo-compliance/property_value-string/property_value-string.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/property_value-string.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/R_1", + "val" : "foo" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-string/property_value-string.expected.obo b/tests/input/obo-compliance/property_value-string/property_value-string.expected.obo new file mode 100644 index 000000000..271606f71 --- /dev/null +++ b/tests/input/obo-compliance/property_value-string/property_value-string.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: property_value-string + +[Term] +id: X:1 +property_value: R:1 "foo" xsd:string + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/property_value-string/property_value-string.expected.ofn b/tests/input/obo-compliance/property_value-string/property_value-string.expected.ofn new file mode 100644 index 000000000..ff8fc9e4d --- /dev/null +++ b/tests/input/obo-compliance/property_value-string/property_value-string.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "foo") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-string/property_value-string.expected.owl b/tests/input/obo-compliance/property_value-string/property_value-string.expected.owl new file mode 100644 index 000000000..d0fad45bc --- /dev/null +++ b/tests/input/obo-compliance/property_value-string/property_value-string.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + foo + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/property_value-string/property_value-string.meta.yaml b/tests/input/obo-compliance/property_value-string/property_value-string.meta.yaml new file mode 100644 index 000000000..439efc4bf --- /dev/null +++ b/tests/input/obo-compliance/property_value-string/property_value-string.meta.yaml @@ -0,0 +1,3 @@ +name: property_value-string +name: property_value-string +description: property value with string datatype \ No newline at end of file diff --git a/tests/input/obo-compliance/property_value-string/property_value-string.obo b/tests/input/obo-compliance/property_value-string/property_value-string.obo new file mode 100644 index 000000000..034d380b4 --- /dev/null +++ b/tests/input/obo-compliance/property_value-string/property_value-string.obo @@ -0,0 +1,11 @@ +format-version: 1.4 +ontology: property_value-string + +[Term] +id: X:1 +property_value: R:1 "foo" xsd:string + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/related_synonym/related_synonym.expected.json b/tests/input/obo-compliance/related_synonym/related_synonym.expected.json new file mode 100644 index 000000000..cb495f943 --- /dev/null +++ b/tests/input/obo-compliance/related_synonym/related_synonym.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/related_synonym.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "pred" : "hasRelatedSynonym", + "val" : "related synonym" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym", + "lbl" : "has_related_synonym", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/related_synonym/related_synonym.expected.obo b/tests/input/obo-compliance/related_synonym/related_synonym.expected.obo new file mode 100644 index 000000000..81710698e --- /dev/null +++ b/tests/input/obo-compliance/related_synonym/related_synonym.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: related_synonym + +[Term] +id: X:1 +name: example term +synonym: "related synonym" RELATED [] + diff --git a/tests/input/obo-compliance/related_synonym/related_synonym.expected.ofn b/tests/input/obo-compliance/related_synonym/related_synonym.expected.ofn new file mode 100644 index 000000000..dc8a8fd86 --- /dev/null +++ b/tests/input/obo-compliance/related_synonym/related_synonym.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + +# Annotation Property: (has_related_synonym) + +AnnotationAssertion(rdfs:label "has_related_synonym") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion( "related synonym") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/related_synonym/related_synonym.expected.owl b/tests/input/obo-compliance/related_synonym/related_synonym.expected.owl new file mode 100644 index 000000000..c08bfa1e2 --- /dev/null +++ b/tests/input/obo-compliance/related_synonym/related_synonym.expected.owl @@ -0,0 +1,78 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + has_related_synonym + + + + + + + + + + + + + + + + + + + + + + + + + related synonym + X:1 + example term + + + + + + + diff --git a/tests/input/obo-compliance/related_synonym/related_synonym.meta.yaml b/tests/input/obo-compliance/related_synonym/related_synonym.meta.yaml new file mode 100644 index 000000000..89e6b70c3 --- /dev/null +++ b/tests/input/obo-compliance/related_synonym/related_synonym.meta.yaml @@ -0,0 +1,3 @@ +name: related_synonym +name: related_synonym +description: Test for related synonym type \ No newline at end of file diff --git a/tests/input/obo-compliance/related_synonym/related_synonym.obo b/tests/input/obo-compliance/related_synonym/related_synonym.obo new file mode 100644 index 000000000..8e5282f16 --- /dev/null +++ b/tests/input/obo-compliance/related_synonym/related_synonym.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: related_synonym + +[Term] +id: X:1 +name: example term +synonym: "related synonym" RELATED [] + diff --git a/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.json b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.json new file mode 100644 index 000000000..598c10171 --- /dev/null +++ b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.json @@ -0,0 +1,27 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/relationship-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/X_1", + "pred" : "http://purl.obolibrary.org/obo/R_1", + "obj" : "http://purl.obolibrary.org/obo/Y_1", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#source", + "val" : "PMID:123456" + } ] + } + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.obo b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.obo new file mode 100644 index 000000000..33963c694 --- /dev/null +++ b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.obo @@ -0,0 +1,10 @@ +format-version: 1.2 +ontology: relationship-annotated + +[Term] +id: X:1 +relationship: R:1 Y:1 {source="PMID:123456"} + +[Typedef] +id: R:1 + diff --git a/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.ofn b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.ofn new file mode 100644 index 000000000..cf0757574 --- /dev/null +++ b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.ofn @@ -0,0 +1,47 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +SubClassOf(Annotation( "PMID:123456") ObjectSomeValuesFrom( )) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.owl b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.owl new file mode 100644 index 000000000..e050014ae --- /dev/null +++ b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.expected.owl @@ -0,0 +1,104 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + + + + + + + + X:1 + + + + + + + + + + PMID:123456 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/relationship-annotated/relationship-annotated.meta.yaml b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.meta.yaml new file mode 100644 index 000000000..e9d62142e --- /dev/null +++ b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: relationship-annotated +name: relationship-annotated +description: existential restrictions \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-annotated/relationship-annotated.obo b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.obo new file mode 100644 index 000000000..f0b4a4cfa --- /dev/null +++ b/tests/input/obo-compliance/relationship-annotated/relationship-annotated.obo @@ -0,0 +1,10 @@ +format-version: 1.4 +ontology: relationship-annotated + +[Term] +id: X:1 +relationship: R:1 Y:1 {source="PMID:123456"} + +[Typedef] +id: R:1 + diff --git a/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.json b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.json new file mode 100644 index 000000000..ef0a4a24b --- /dev/null +++ b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/relationship-non-logical.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/R_1", + "val" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.obo b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.obo new file mode 100644 index 000000000..bd81c1041 --- /dev/null +++ b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: relationship-non-logical + +[Term] +id: X:1 +relationship: R:1 Y:1 + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.ofn b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.ofn new file mode 100644 index 000000000..0a8c2ee9a --- /dev/null +++ b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( ) +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.owl b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.owl new file mode 100644 index 000000000..3d78a8f42 --- /dev/null +++ b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.meta.yaml b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.meta.yaml new file mode 100644 index 000000000..f9b7098a9 --- /dev/null +++ b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.meta.yaml @@ -0,0 +1,4 @@ +name: relationship-non-logical +name: relationship-non-logical +description: relationship where the relation is metadata, maps to annotation +issue: https://github.com/owlcollab/oboformat/issues/144 \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.obo b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.obo new file mode 100644 index 000000000..ddbaaac18 --- /dev/null +++ b/tests/input/obo-compliance/relationship-non-logical/relationship-non-logical.obo @@ -0,0 +1,12 @@ +format-version: 1.4 +ontology: relationship-non-logical + +[Term] +id: X:1 +relationship: R:1 Y:1 + +[Typedef] +id: R:1 +is_metadata_tag: true + + diff --git a/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.json b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.json new file mode 100644 index 000000000..ca9356aa4 --- /dev/null +++ b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.json @@ -0,0 +1,34 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/relationship-skos-object.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" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/skos_exactMatch", + "val" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } + }, { + "id" : "http://purl.obolibrary.org/obo/skos_exactMatch", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.obo b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.obo new file mode 100644 index 000000000..e27a3d4e0 --- /dev/null +++ b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.obo @@ -0,0 +1,11 @@ +format-version: 1.2 +ontology: relationship-skos-object + +[Term] +id: X:1 +relationship: skos:exactMatch Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.ofn b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.ofn new file mode 100644 index 000000000..f4b377cf4 --- /dev/null +++ b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "skos:exactMatch") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( ) +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.owl b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.owl new file mode 100644 index 000000000..69e58c82e --- /dev/null +++ b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + skos:exactMatch + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.meta.yaml b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.meta.yaml new file mode 100644 index 000000000..4e41f873f --- /dev/null +++ b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.meta.yaml @@ -0,0 +1,5 @@ +name: relationship-skos-object +name: relationship-skos-object +description: SKOS mapping to an object using relationship +issue: https://github.com/geneontology/obographs/issues/102 +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.obo b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.obo new file mode 100644 index 000000000..eca6eb8fc --- /dev/null +++ b/tests/input/obo-compliance/relationship-skos-object/relationship-skos-object.obo @@ -0,0 +1,12 @@ +format-version: 1.4 +ontology: relationship-skos-object +idspace: skos http://www.w3.org/2004/02/skos/core# + +[Term] +id: X:1 +relationship: skos:exactMatch Y:1 + +[Typedef] +id: skos:exactMatch +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/relationship/relationship.expected.json b/tests/input/obo-compliance/relationship/relationship.expected.json new file mode 100644 index 000000000..6988e3cf8 --- /dev/null +++ b/tests/input/obo-compliance/relationship/relationship.expected.json @@ -0,0 +1,21 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/relationship.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/X_1", + "pred" : "http://purl.obolibrary.org/obo/R_1", + "obj" : "http://purl.obolibrary.org/obo/Y_1" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship/relationship.expected.obo b/tests/input/obo-compliance/relationship/relationship.expected.obo new file mode 100644 index 000000000..493447f03 --- /dev/null +++ b/tests/input/obo-compliance/relationship/relationship.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: relationship + +[Term] +id: X:1 +relationship: R:1 Y:1 + diff --git a/tests/input/obo-compliance/relationship/relationship.expected.ofn b/tests/input/obo-compliance/relationship/relationship.expected.ofn new file mode 100644 index 000000000..78a87b5c3 --- /dev/null +++ b/tests/input/obo-compliance/relationship/relationship.expected.ofn @@ -0,0 +1,38 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +SubClassOf( ObjectSomeValuesFrom( )) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship/relationship.expected.owl b/tests/input/obo-compliance/relationship/relationship.expected.owl new file mode 100644 index 000000000..8c135d96c --- /dev/null +++ b/tests/input/obo-compliance/relationship/relationship.expected.owl @@ -0,0 +1,91 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/relationship/relationship.meta.yaml b/tests/input/obo-compliance/relationship/relationship.meta.yaml new file mode 100644 index 000000000..0ebdff6d4 --- /dev/null +++ b/tests/input/obo-compliance/relationship/relationship.meta.yaml @@ -0,0 +1,3 @@ +name: relationship +name: relationship +description: existential restrictions \ No newline at end of file diff --git a/tests/input/obo-compliance/relationship/relationship.obo b/tests/input/obo-compliance/relationship/relationship.obo new file mode 100644 index 000000000..52151f1ab --- /dev/null +++ b/tests/input/obo-compliance/relationship/relationship.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: relationship + +[Term] +id: X:1 +relationship: R:1 Y:1 + diff --git a/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.json b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.json new file mode 100644 index 000000000..c0d47c82b --- /dev/null +++ b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/replaced_by-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/IAO_0100001", + "lbl" : "term replaced by", + "type" : "PROPERTY" + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/IAO_0100001", + "val" : "X:2" + } ], + "deprecated" : true + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.obo b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.obo new file mode 100644 index 000000000..c390c9e5a --- /dev/null +++ b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: replaced_by-annotated + +[Term] +id: X:1 +is_obsolete: true +replaced_by: X:2 {source="PMID:123469"} + diff --git a/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.ofn b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.ofn new file mode 100644 index 000000000..617cda7e8 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.ofn @@ -0,0 +1,43 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(owl:deprecated)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (term replaced by) + +AnnotationAssertion(rdfs:label "term replaced by") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123469") "X:2") +AnnotationAssertion( "X:1") +AnnotationAssertion(owl:deprecated "true"^^xsd:boolean) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.owl b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.owl new file mode 100644 index 000000000..5965d7331 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.expected.owl @@ -0,0 +1,91 @@ + + + + 1.4 + + + + + + + + + + + + + term replaced by + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X:2 + X:1 + true + + + + + X:2 + PMID:123469 + + + + + + + diff --git a/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.meta.yaml b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.meta.yaml new file mode 100644 index 000000000..197b0a10c --- /dev/null +++ b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: replaced_by-annotated +name: replaced_by-annotated +description: Indicating replacement for obsolete term with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.obo b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.obo new file mode 100644 index 000000000..b9129908c --- /dev/null +++ b/tests/input/obo-compliance/replaced_by-annotated/replaced_by-annotated.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: replaced_by-annotated + +[Term] +id: X:1 +is_obsolete: true +replaced_by: X:2 {source="PMID:123469"} + diff --git a/tests/input/obo-compliance/replaced_by/replaced_by.expected.json b/tests/input/obo-compliance/replaced_by/replaced_by.expected.json new file mode 100644 index 000000000..f45919bf5 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by/replaced_by.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/replaced_by.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/IAO_0100001", + "lbl" : "term replaced by", + "type" : "PROPERTY" + }, { + "id" : "http://purl.obolibrary.org/obo/X_1", + "type" : "CLASS", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://purl.obolibrary.org/obo/IAO_0100001", + "val" : "X:2" + } ], + "deprecated" : true + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/replaced_by/replaced_by.expected.obo b/tests/input/obo-compliance/replaced_by/replaced_by.expected.obo new file mode 100644 index 000000000..5df1d74f9 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by/replaced_by.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: replaced_by + +[Term] +id: X:1 +is_obsolete: true +replaced_by: X:2 + diff --git a/tests/input/obo-compliance/replaced_by/replaced_by.expected.ofn b/tests/input/obo-compliance/replaced_by/replaced_by.expected.ofn new file mode 100644 index 000000000..a60ef6742 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by/replaced_by.expected.ofn @@ -0,0 +1,42 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(owl:deprecated)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (term replaced by) + +AnnotationAssertion(rdfs:label "term replaced by") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:2") +AnnotationAssertion( "X:1") +AnnotationAssertion(owl:deprecated "true"^^xsd:boolean) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/replaced_by/replaced_by.expected.owl b/tests/input/obo-compliance/replaced_by/replaced_by.expected.owl new file mode 100644 index 000000000..0487d04c1 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by/replaced_by.expected.owl @@ -0,0 +1,79 @@ + + + + 1.4 + + + + + + + + + + + + + term replaced by + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + X:2 + X:1 + true + + + + + + + diff --git a/tests/input/obo-compliance/replaced_by/replaced_by.meta.yaml b/tests/input/obo-compliance/replaced_by/replaced_by.meta.yaml new file mode 100644 index 000000000..606846595 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by/replaced_by.meta.yaml @@ -0,0 +1,3 @@ +name: replaced_by +name: replaced_by +description: Indicating replacement for obsolete term \ No newline at end of file diff --git a/tests/input/obo-compliance/replaced_by/replaced_by.obo b/tests/input/obo-compliance/replaced_by/replaced_by.obo new file mode 100644 index 000000000..0d5c6ab24 --- /dev/null +++ b/tests/input/obo-compliance/replaced_by/replaced_by.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: replaced_by + +[Term] +id: X:1 +is_obsolete: true +replaced_by: X:2 + diff --git a/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.json b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.json new file mode 100644 index 000000000..c085f4a0f --- /dev/null +++ b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/subset-annotated.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" : { + "subsets" : [ "http://purl.obolibrary.org/obo/subset-annotated#S" ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#SubsetProperty", + "lbl" : "subset_property", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#inSubset", + "lbl" : "in_subset", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.obo b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.obo new file mode 100644 index 000000000..0a3fa8a5c --- /dev/null +++ b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +subsetdef: S "my subset" +ontology: subset-annotated + +[Term] +id: X:1 +subset: S {source="PMID:123464"} + diff --git a/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.ofn b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.ofn new file mode 100644 index 000000000..d85a535e4 --- /dev/null +++ b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.ofn @@ -0,0 +1,53 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:comment)) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion(rdfs:comment "my subset") +SubAnnotationPropertyOf( ) + +# Annotation Property: (subset_property) + +AnnotationAssertion(rdfs:label "subset_property") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + +# Annotation Property: (in_subset) + +AnnotationAssertion(rdfs:label "in_subset") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +AnnotationAssertion(Annotation( "PMID:123464") ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.owl b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.owl new file mode 100644 index 000000000..b05073241 --- /dev/null +++ b/tests/input/obo-compliance/subset-annotated/subset-annotated.expected.owl @@ -0,0 +1,107 @@ + + + + 1.4 + + + + + + + + + + + + + my subset + + + + + + + + + subset_property + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + in_subset + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + PMID:123464 + + + + + + + diff --git a/tests/input/obo-compliance/subset-annotated/subset-annotated.meta.yaml b/tests/input/obo-compliance/subset-annotated/subset-annotated.meta.yaml new file mode 100644 index 000000000..5b99f27dd --- /dev/null +++ b/tests/input/obo-compliance/subset-annotated/subset-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: subset-annotated +name: subset-annotated +description: Test for subset attribute with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/subset-annotated/subset-annotated.obo b/tests/input/obo-compliance/subset-annotated/subset-annotated.obo new file mode 100644 index 000000000..2b15e2a6c --- /dev/null +++ b/tests/input/obo-compliance/subset-annotated/subset-annotated.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +subsetdef: S "my subset" +ontology: subset-annotated + +[Term] +id: X:1 +subset: S {source="PMID:123464"} + diff --git a/tests/input/obo-compliance/subset/subset.expected.json b/tests/input/obo-compliance/subset/subset.expected.json new file mode 100644 index 000000000..bca04be00 --- /dev/null +++ b/tests/input/obo-compliance/subset/subset.expected.json @@ -0,0 +1,30 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/subset.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" : { + "subsets" : [ "http://purl.obolibrary.org/obo/subset#S" ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#SubsetProperty", + "lbl" : "subset_property", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#inSubset", + "lbl" : "in_subset", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/subset/subset.expected.obo b/tests/input/obo-compliance/subset/subset.expected.obo new file mode 100644 index 000000000..86a4c8a38 --- /dev/null +++ b/tests/input/obo-compliance/subset/subset.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +subsetdef: S "my subset" +ontology: subset + +[Term] +id: X:1 +subset: S + diff --git a/tests/input/obo-compliance/subset/subset.expected.ofn b/tests/input/obo-compliance/subset/subset.expected.ofn new file mode 100644 index 000000000..7391c5ef6 --- /dev/null +++ b/tests/input/obo-compliance/subset/subset.expected.ofn @@ -0,0 +1,52 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:comment)) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion(rdfs:comment "my subset") +SubAnnotationPropertyOf( ) + +# Annotation Property: (subset_property) + +AnnotationAssertion(rdfs:label "subset_property") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + +# Annotation Property: (in_subset) + +AnnotationAssertion(rdfs:label "in_subset") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +AnnotationAssertion( ) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/subset/subset.expected.owl b/tests/input/obo-compliance/subset/subset.expected.owl new file mode 100644 index 000000000..d53a26963 --- /dev/null +++ b/tests/input/obo-compliance/subset/subset.expected.owl @@ -0,0 +1,95 @@ + + + + 1.4 + + + + + + + + + + + + + my subset + + + + + + + + + subset_property + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + in_subset + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + diff --git a/tests/input/obo-compliance/subset/subset.meta.yaml b/tests/input/obo-compliance/subset/subset.meta.yaml new file mode 100644 index 000000000..2b06b2cf1 --- /dev/null +++ b/tests/input/obo-compliance/subset/subset.meta.yaml @@ -0,0 +1,3 @@ +name: subset +name: subset +description: Test for subset attribute \ No newline at end of file diff --git a/tests/input/obo-compliance/subset/subset.obo b/tests/input/obo-compliance/subset/subset.obo new file mode 100644 index 000000000..4b025babb --- /dev/null +++ b/tests/input/obo-compliance/subset/subset.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +subsetdef: S "my subset" +ontology: subset + +[Term] +id: X:1 +subset: S + diff --git a/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.json b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.json new file mode 100644 index 000000000..1650ae273 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.json @@ -0,0 +1,35 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/synonym-with-multiple_xrefs.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "pred" : "hasExactSynonym", + "val" : "synonym with multiple xrefs", + "xrefs" : [ "PMID:3", "PMID:4" ] + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasDbXref", + "lbl" : "database_cross_reference", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasExactSynonym", + "lbl" : "has_exact_synonym", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.obo b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.obo new file mode 100644 index 000000000..de743858e --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: synonym-with-multiple_xrefs + +[Term] +id: X:1 +name: example term +synonym: "synonym with multiple xrefs" EXACT [PMID:3, PMID:4] + diff --git a/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.ofn b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.ofn new file mode 100644 index 000000000..842afd003 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.ofn @@ -0,0 +1,47 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (database_cross_reference) + +AnnotationAssertion(rdfs:label "database_cross_reference") + +# Annotation Property: (has_exact_synonym) + +AnnotationAssertion(rdfs:label "has_exact_synonym") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion(Annotation( "PMID:3") Annotation( "PMID:4") "synonym with multiple xrefs") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.owl b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.owl new file mode 100644 index 000000000..34d42207e --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.expected.owl @@ -0,0 +1,93 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_exact_synonym + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + synonym with multiple xrefs + X:1 + example term + + + + + synonym with multiple xrefs + PMID:3 + PMID:4 + + + + + + + diff --git a/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.meta.yaml b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.meta.yaml new file mode 100644 index 000000000..3febe1e65 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.meta.yaml @@ -0,0 +1,3 @@ +name: synonym-with-multiple_xrefs +name: synonym-with-multiple_xrefs +description: Synonym with multiple cross-references \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.obo b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.obo new file mode 100644 index 000000000..31c8fc561 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-multiple_xrefs/synonym-with-multiple_xrefs.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: synonym-with-multiple_xrefs + +[Term] +id: X:1 +name: example term +synonym: "synonym with multiple xrefs" EXACT [PMID:3, PMID:4] + diff --git a/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.json b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.json new file mode 100644 index 000000000..3dabe9d42 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.json @@ -0,0 +1,35 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/synonym-with-scope-and-xref.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "pred" : "hasRelatedSynonym", + "val" : "synonym with scope and xref", + "xrefs" : [ "PMID:2" ] + } ] + } + }, { + "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#hasRelatedSynonym", + "lbl" : "has_related_synonym", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.obo b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.obo new file mode 100644 index 000000000..ac59b9731 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: synonym-with-scope-and-xref + +[Term] +id: X:1 +name: example term +synonym: "synonym with scope and xref" RELATED [PMID:2] + diff --git a/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.ofn b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.ofn new file mode 100644 index 000000000..b3d198c13 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.ofn @@ -0,0 +1,47 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# 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: (has_related_synonym) + +AnnotationAssertion(rdfs:label "has_related_synonym") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion(Annotation( "PMID:2") "synonym with scope and xref") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.owl b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.owl new file mode 100644 index 000000000..b5697be4b --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.expected.owl @@ -0,0 +1,92 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + has_related_synonym + + + + + + + + + + + + + + + + + + + + + + + + + synonym with scope and xref + X:1 + example term + + + + + synonym with scope and xref + PMID:2 + + + + + + + diff --git a/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.meta.yaml b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.meta.yaml new file mode 100644 index 000000000..7df89d17d --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.meta.yaml @@ -0,0 +1,3 @@ +name: synonym-with-scope-and-xref +name: synonym-with-scope-and-xref +description: Synonym with scope and cross-reference \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.obo b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.obo new file mode 100644 index 000000000..ed3e836c1 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-scope-and-xref/synonym-with-scope-and-xref.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: synonym-with-scope-and-xref + +[Term] +id: X:1 +name: example term +synonym: "synonym with scope and xref" RELATED [PMID:2] + diff --git a/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.json b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.json new file mode 100644 index 000000000..b61cb4ff0 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.json @@ -0,0 +1,35 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/synonym-with-type.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "synonymType" : "http://purl.obolibrary.org/obo/ST_1", + "pred" : "hasRelatedSynonym", + "val" : "synonym with type" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym", + "lbl" : "has_related_synonym", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasSynonymType", + "lbl" : "has_synonym_type", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.obo b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.obo new file mode 100644 index 000000000..2e35bcb42 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: synonym-with-type + +[Term] +id: X:1 +name: example term +synonym: "synonym with type" RELATED ST:1 [] + diff --git a/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.ofn b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.ofn new file mode 100644 index 000000000..6dc12fd8d --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.ofn @@ -0,0 +1,47 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + +# Annotation Property: (has_related_synonym) + +AnnotationAssertion(rdfs:label "has_related_synonym") + +# Annotation Property: (has_synonym_type) + +AnnotationAssertion(rdfs:label "has_synonym_type") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion(Annotation( ) "synonym with type") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.owl b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.owl new file mode 100644 index 000000000..b39df3082 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.expected.owl @@ -0,0 +1,92 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + has_related_synonym + + + + + + + + has_synonym_type + + + + + + + + + + + + + + + + + + + + + + + + + synonym with type + X:1 + example term + + + + + synonym with type + + + + + + + + diff --git a/tests/input/obo-compliance/synonym-with-type/synonym-with-type.meta.yaml b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.meta.yaml new file mode 100644 index 000000000..7cbff90e1 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.meta.yaml @@ -0,0 +1,3 @@ +name: synonym-with-type +name: synonym-with-type +description: Synonym with a specified type \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-type/synonym-with-type.obo b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.obo new file mode 100644 index 000000000..259e6f31d --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-type/synonym-with-type.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: synonym-with-type + +[Term] +id: X:1 +name: example term +synonym: "synonym with type" RELATED ST:1 [] + diff --git a/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.json b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.json new file mode 100644 index 000000000..7e31dac54 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.json @@ -0,0 +1,35 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/synonym-with-xref.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/X_1", + "lbl" : "example term", + "type" : "CLASS", + "meta" : { + "synonyms" : [ { + "pred" : "hasExactSynonym", + "val" : "synonym with xref", + "xrefs" : [ "PMID:1" ] + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasDbXref", + "lbl" : "database_cross_reference", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasExactSynonym", + "lbl" : "has_exact_synonym", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.obo b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.obo new file mode 100644 index 000000000..06fb2a0b3 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: synonym-with-xref + +[Term] +id: X:1 +name: example term +synonym: "synonym with xref" EXACT [PMID:1] + diff --git a/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.ofn b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.ofn new file mode 100644 index 000000000..38f59f88d --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.ofn @@ -0,0 +1,47 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (database_cross_reference) + +AnnotationAssertion(rdfs:label "database_cross_reference") + +# Annotation Property: (has_exact_synonym) + +AnnotationAssertion(rdfs:label "has_exact_synonym") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: (example term) + +AnnotationAssertion(Annotation( "PMID:1") "synonym with xref") +AnnotationAssertion( "X:1") +AnnotationAssertion(rdfs:label "example term") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.owl b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.owl new file mode 100644 index 000000000..42a8417ad --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.expected.owl @@ -0,0 +1,92 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_exact_synonym + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + synonym with xref + X:1 + example term + + + + + synonym with xref + PMID:1 + + + + + + + diff --git a/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.meta.yaml b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.meta.yaml new file mode 100644 index 000000000..77673ffd2 --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.meta.yaml @@ -0,0 +1,3 @@ +name: synonym-with-xref +name: synonym-with-xref +description: Synonym with cross-reference \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.obo b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.obo new file mode 100644 index 000000000..253b060aa --- /dev/null +++ b/tests/input/obo-compliance/synonym-with-xref/synonym-with-xref.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: synonym-with-xref + +[Term] +id: X:1 +name: example term +synonym: "synonym with xref" EXACT [PMID:1] + diff --git a/tests/input/obo-compliance/synonym-without-scope/synonym-without-scope.meta.yaml b/tests/input/obo-compliance/synonym-without-scope/synonym-without-scope.meta.yaml new file mode 100644 index 000000000..49dfec81b --- /dev/null +++ b/tests/input/obo-compliance/synonym-without-scope/synonym-without-scope.meta.yaml @@ -0,0 +1,4 @@ +name: synonym-without-scope +name: synonym-without-scope +description: Synonym without specified scope +invalid: true \ No newline at end of file diff --git a/tests/input/obo-compliance/synonym-without-scope/synonym-without-scope.obo b/tests/input/obo-compliance/synonym-without-scope/synonym-without-scope.obo new file mode 100644 index 000000000..d3344cac4 --- /dev/null +++ b/tests/input/obo-compliance/synonym-without-scope/synonym-without-scope.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: synonym-without-scope + +[Term] +id: X:1 +name: example term +synonym: "synonym without scope" [] + diff --git a/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.json b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.json new file mode 100644 index 000000000..871266cb3 --- /dev/null +++ b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.json @@ -0,0 +1,23 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/synonymtypedef-definition.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/S_1", + "lbl" : "example" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#SynonymTypeProperty", + "lbl" : "synonym_type_property", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.obo b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.obo new file mode 100644 index 000000000..980dd78c7 --- /dev/null +++ b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.obo @@ -0,0 +1,4 @@ +format-version: 1.2 +synonymtypedef: S:1 "example" +ontology: synonymtypedef-definition + diff --git a/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.ofn b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.ofn new file mode 100644 index 000000000..e3c00479e --- /dev/null +++ b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.ofn @@ -0,0 +1,35 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (example) + +AnnotationAssertion(rdfs:label "example") +SubAnnotationPropertyOf( ) + +# Annotation Property: (synonym_type_property) + +AnnotationAssertion(rdfs:label "synonym_type_property") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.owl b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.owl new file mode 100644 index 000000000..d28ca4324 --- /dev/null +++ b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.expected.owl @@ -0,0 +1,61 @@ + + + + 1.4 + + + + + + + + + + + + + example + + + + + + + + + synonym_type_property + + + + + + + + has_obo_format_version + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.meta.yaml b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.meta.yaml new file mode 100644 index 000000000..09952e4a7 --- /dev/null +++ b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.meta.yaml @@ -0,0 +1,3 @@ +name: synonymtypedef-definition +name: synonymtypedef-definition +description: Definition of a new synonym type \ No newline at end of file diff --git a/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.obo b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.obo new file mode 100644 index 000000000..5ec4b4ba7 --- /dev/null +++ b/tests/input/obo-compliance/synonymtypedef-definition/synonymtypedef-definition.obo @@ -0,0 +1,4 @@ +format-version: 1.4 +synonymtypedef: S:1 "example" +ontology: synonymtypedef-definition + diff --git a/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.json b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.json new file mode 100644 index 000000000..6373d69bd --- /dev/null +++ b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-declaration.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.obo b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.obo new file mode 100644 index 000000000..680436ea8 --- /dev/null +++ b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.obo @@ -0,0 +1,6 @@ +format-version: 1.2 +ontology: typedef-declaration + +[Typedef] +id: R:1 + diff --git a/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.ofn b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.ofn new file mode 100644 index 000000000..d684dc723 --- /dev/null +++ b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.ofn @@ -0,0 +1,34 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.owl b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.owl new file mode 100644 index 000000000..282727508 --- /dev/null +++ b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.expected.owl @@ -0,0 +1,62 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/typedef-declaration/typedef-declaration.meta.yaml b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.meta.yaml new file mode 100644 index 000000000..86adfb923 --- /dev/null +++ b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-declaration +name: typedef-declaration +description: bare declaration \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-declaration/typedef-declaration.obo b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.obo new file mode 100644 index 000000000..beccb8cbd --- /dev/null +++ b/tests/input/obo-compliance/typedef-declaration/typedef-declaration.obo @@ -0,0 +1,6 @@ +format-version: 1.4 +ontology: typedef-declaration + +[Typedef] +id: R:1 + diff --git a/tests/input/obo-compliance/typedef-def/typedef-def.expected.json b/tests/input/obo-compliance/typedef-def/typedef-def.expected.json new file mode 100644 index 000000000..34c320191 --- /dev/null +++ b/tests/input/obo-compliance/typedef-def/typedef-def.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-def.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/IAO_0000115", + "lbl" : "definition", + "type" : "PROPERTY" + }, { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "definition" : { + "val" : "An example definition." + } + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-def/typedef-def.expected.obo b/tests/input/obo-compliance/typedef-def/typedef-def.expected.obo new file mode 100644 index 000000000..ad7444f9e --- /dev/null +++ b/tests/input/obo-compliance/typedef-def/typedef-def.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-def + +[Typedef] +id: R:1 +def: "An example definition." [] + diff --git a/tests/input/obo-compliance/typedef-def/typedef-def.expected.ofn b/tests/input/obo-compliance/typedef-def/typedef-def.expected.ofn new file mode 100644 index 000000000..83d8631c3 --- /dev/null +++ b/tests/input/obo-compliance/typedef-def/typedef-def.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (definition) + +AnnotationAssertion(rdfs:label "definition") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "An example definition.") +AnnotationAssertion( "R:1") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-def/typedef-def.expected.owl b/tests/input/obo-compliance/typedef-def/typedef-def.expected.owl new file mode 100644 index 000000000..8bdcc9983 --- /dev/null +++ b/tests/input/obo-compliance/typedef-def/typedef-def.expected.owl @@ -0,0 +1,72 @@ + + + + 1.4 + + + + + + + + + + + + + definition + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + An example definition. + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/typedef-def/typedef-def.meta.yaml b/tests/input/obo-compliance/typedef-def/typedef-def.meta.yaml new file mode 100644 index 000000000..d8ea0af99 --- /dev/null +++ b/tests/input/obo-compliance/typedef-def/typedef-def.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-def +name: typedef-def +description: test for def (definition) attribute \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-def/typedef-def.obo b/tests/input/obo-compliance/typedef-def/typedef-def.obo new file mode 100644 index 000000000..328a9731f --- /dev/null +++ b/tests/input/obo-compliance/typedef-def/typedef-def.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-def + +[Typedef] +id: R:1 +def: "An example definition." [] + diff --git a/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.json b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.json new file mode 100644 index 000000000..d0dae9e5a --- /dev/null +++ b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-domain.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "domainRangeAxioms" : [ { + "predicateId" : "http://purl.obolibrary.org/obo/R_1", + "domainClassIds" : [ "http://purl.obolibrary.org/obo/X_1" ] + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.obo b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.obo new file mode 100644 index 000000000..b3aec6b00 --- /dev/null +++ b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-domain + +[Typedef] +id: R:1 +domain: X:1 + diff --git a/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.ofn b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.ofn new file mode 100644 index 000000000..ebfb176f5 --- /dev/null +++ b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +ObjectPropertyDomain( ) + + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.owl b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.owl new file mode 100644 index 000000000..8b1087501 --- /dev/null +++ b/tests/input/obo-compliance/typedef-domain/typedef-domain.expected.owl @@ -0,0 +1,80 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-domain/typedef-domain.meta.yaml b/tests/input/obo-compliance/typedef-domain/typedef-domain.meta.yaml new file mode 100644 index 000000000..bfbe21cf4 --- /dev/null +++ b/tests/input/obo-compliance/typedef-domain/typedef-domain.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-domain +name: typedef-domain +description: test for domain attribute \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-domain/typedef-domain.obo b/tests/input/obo-compliance/typedef-domain/typedef-domain.obo new file mode 100644 index 000000000..a9465f26e --- /dev/null +++ b/tests/input/obo-compliance/typedef-domain/typedef-domain.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-domain + +[Typedef] +id: R:1 +domain: X:1 + diff --git a/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.json b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.json new file mode 100644 index 000000000..fa85697ca --- /dev/null +++ b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.json @@ -0,0 +1,21 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-inverse_of.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/R_1", + "pred" : "inverseOf", + "obj" : "http://purl.obolibrary.org/obo/R_2" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.obo b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.obo new file mode 100644 index 000000000..805b03c6d --- /dev/null +++ b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-inverse_of + +[Typedef] +id: R:1 +inverse_of: R:2 + diff --git a/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.ofn b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.ofn new file mode 100644 index 000000000..9a6319a2c --- /dev/null +++ b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +InverseObjectProperties( ) + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.owl b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.owl new file mode 100644 index 000000000..9dc50ed9f --- /dev/null +++ b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.meta.yaml b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.meta.yaml new file mode 100644 index 000000000..ec092d58c --- /dev/null +++ b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-inverse_of +name: typedef-inverse_of +description: test for inverse_of attribute \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.obo b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.obo new file mode 100644 index 000000000..7419decbb --- /dev/null +++ b/tests/input/obo-compliance/typedef-inverse_of/typedef-inverse_of.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-inverse_of + +[Typedef] +id: R:1 +inverse_of: R:2 + diff --git a/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.json b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.json new file mode 100644 index 000000000..a74f68039 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-is_a-metadata.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.obo b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.obo new file mode 100644 index 000000000..6b2aede2f --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-is_a-metadata + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.ofn b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.ofn new file mode 100644 index 000000000..3f14b9478 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.ofn @@ -0,0 +1,31 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.owl b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.owl new file mode 100644 index 000000000..394a9b792 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.expected.owl @@ -0,0 +1,59 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.meta.yaml b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.meta.yaml new file mode 100644 index 000000000..e1d0213dd --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.meta.yaml @@ -0,0 +1,5 @@ +name: typedef-is_a-metadata +name: typedef-is_a-metadata +description: test that is_a on a metadata Typedef maps to subAnnotationPropertyOf +issue: https://github.com/owlcollab/oboformat/issues/147 +unstable: true \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.obo b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.obo new file mode 100644 index 000000000..5cd8e756c --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a-metadata/typedef-is_a-metadata.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: typedef-is_a-metadata + +[Typedef] +id: R:1 +is_a: R:2 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.json b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.json new file mode 100644 index 000000000..631052842 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.json @@ -0,0 +1,21 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-is_a.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "edges" : [ { + "sub" : "http://purl.obolibrary.org/obo/R_1", + "pred" : "subPropertyOf", + "obj" : "http://purl.obolibrary.org/obo/R_2" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.obo b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.obo new file mode 100644 index 000000000..4595976bc --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-is_a + +[Typedef] +id: R:1 +is_a: R:2 + diff --git a/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.ofn b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.ofn new file mode 100644 index 000000000..12568b8e4 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +SubObjectPropertyOf( ) + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.owl b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.owl new file mode 100644 index 000000000..b853ded85 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-is_a/typedef-is_a.meta.yaml b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.meta.yaml new file mode 100644 index 000000000..ce4508d9a --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-is_a +name: typedef-is_a +description: test that is_a on Typedef maps to subObjectPropertyOf \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_a/typedef-is_a.obo b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.obo new file mode 100644 index 000000000..a5208c26a --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_a/typedef-is_a.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-is_a + +[Typedef] +id: R:1 +is_a: R:2 + diff --git a/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.json b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.json new file mode 100644 index 000000000..9095ebb83 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-is_class_level.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_class_level", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.obo b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.obo new file mode 100644 index 000000000..745dfea5b --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-is_class_level + +[Typedef] +id: R:1 +is_class_level: true + diff --git a/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.ofn b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.ofn new file mode 100644 index 000000000..c3b54df1d --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.owl b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.owl new file mode 100644 index 000000000..8508586c8 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + R:1 + true + + + + + + + diff --git a/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.meta.yaml b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.meta.yaml new file mode 100644 index 000000000..e33fd753a --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-is_class_level +name: typedef-is_class_level +description: ... \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.obo b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.obo new file mode 100644 index 000000000..c07605622 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_class_level/typedef-is_class_level.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-is_class_level + +[Typedef] +id: R:1 +is_class_level: true + diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.json b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.json new file mode 100644 index 000000000..f90e8d4c4 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-is_metadata_tag-is_class_level.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_class_level", + "val" : "true" + }, { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.obo b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.obo new file mode 100644 index 000000000..6fcf075bd --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: typedef-is_metadata_tag-is_class_level + +[Typedef] +id: R:1 +is_metadata_tag: true +is_class_level: true + diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.ofn b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.ofn new file mode 100644 index 000000000..3b0b10f79 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.ofn @@ -0,0 +1,33 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.owl b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.owl new file mode 100644 index 000000000..d01d1a691 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.expected.owl @@ -0,0 +1,66 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.meta.yaml b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.meta.yaml new file mode 100644 index 000000000..5e5e56cb5 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-is_metadata_tag-is_class_level +name: typedef-is_metadata_tag-is_class_level +description: both \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.obo b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.obo new file mode 100644 index 000000000..190ed5878 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag-is_class_level/typedef-is_metadata_tag-is_class_level.obo @@ -0,0 +1,9 @@ +format-version: 1.4 +ontology: typedef-is_metadata_tag-is_class_level + +[Typedef] +id: R:1 +is_metadata_tag: true +is_class_level: true + + diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.json b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.json new file mode 100644 index 000000000..c007a1938 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.json @@ -0,0 +1,25 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-is_metadata_tag.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.obo b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.obo new file mode 100644 index 000000000..eb01a2d86 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-is_metadata_tag + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.ofn b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.ofn new file mode 100644 index 000000000..9997bf7dd --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.ofn @@ -0,0 +1,31 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.owl b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.owl new file mode 100644 index 000000000..a5141a7eb --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.expected.owl @@ -0,0 +1,59 @@ + + + + 1.4 + + + + + + + + + + + + + R:1 + true + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.meta.yaml b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.meta.yaml new file mode 100644 index 000000000..6455f3105 --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-is_metadata_tag +name: typedef-is_metadata_tag +description: ... \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.obo b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.obo new file mode 100644 index 000000000..63916237a --- /dev/null +++ b/tests/input/obo-compliance/typedef-is_metadata_tag/typedef-is_metadata_tag.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-is_metadata_tag + +[Typedef] +id: R:1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/typedef-name/typedef-name.expected.json b/tests/input/obo-compliance/typedef-name/typedef-name.expected.json new file mode 100644 index 000000000..778ff8a8f --- /dev/null +++ b/tests/input/obo-compliance/typedef-name/typedef-name.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-name.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "lbl" : "r1", + "type" : "PROPERTY" + }, { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-name/typedef-name.expected.obo b/tests/input/obo-compliance/typedef-name/typedef-name.expected.obo new file mode 100644 index 000000000..00360b8b4 --- /dev/null +++ b/tests/input/obo-compliance/typedef-name/typedef-name.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-name + +[Typedef] +id: R:1 +name: r1 + diff --git a/tests/input/obo-compliance/typedef-name/typedef-name.expected.ofn b/tests/input/obo-compliance/typedef-name/typedef-name.expected.ofn new file mode 100644 index 000000000..8e78508bd --- /dev/null +++ b/tests/input/obo-compliance/typedef-name/typedef-name.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty(rdfs:label)) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: (r1) + +AnnotationAssertion( "R:1") +AnnotationAssertion(rdfs:label "r1") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-name/typedef-name.expected.owl b/tests/input/obo-compliance/typedef-name/typedef-name.expected.owl new file mode 100644 index 000000000..3899ec7df --- /dev/null +++ b/tests/input/obo-compliance/typedef-name/typedef-name.expected.owl @@ -0,0 +1,69 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + R:1 + r1 + + + + + + + diff --git a/tests/input/obo-compliance/typedef-name/typedef-name.meta.yaml b/tests/input/obo-compliance/typedef-name/typedef-name.meta.yaml new file mode 100644 index 000000000..fc32783fb --- /dev/null +++ b/tests/input/obo-compliance/typedef-name/typedef-name.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-name +name: typedef-name +description: rdfs:label \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-name/typedef-name.obo b/tests/input/obo-compliance/typedef-name/typedef-name.obo new file mode 100644 index 000000000..bc11e1c3f --- /dev/null +++ b/tests/input/obo-compliance/typedef-name/typedef-name.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-name + +[Typedef] +id: R:1 +name: r1 + diff --git a/tests/input/obo-compliance/typedef-range/typedef-range.expected.json b/tests/input/obo-compliance/typedef-range/typedef-range.expected.json new file mode 100644 index 000000000..e3b085238 --- /dev/null +++ b/tests/input/obo-compliance/typedef-range/typedef-range.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-range.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "domainRangeAxioms" : [ { + "predicateId" : "http://purl.obolibrary.org/obo/R_1", + "rangeClassIds" : [ "http://purl.obolibrary.org/obo/Y_1" ] + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-range/typedef-range.expected.obo b/tests/input/obo-compliance/typedef-range/typedef-range.expected.obo new file mode 100644 index 000000000..cf4e75753 --- /dev/null +++ b/tests/input/obo-compliance/typedef-range/typedef-range.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-range + +[Typedef] +id: R:1 +range: Y:1 + diff --git a/tests/input/obo-compliance/typedef-range/typedef-range.expected.ofn b/tests/input/obo-compliance/typedef-range/typedef-range.expected.ofn new file mode 100644 index 000000000..3fe8bc423 --- /dev/null +++ b/tests/input/obo-compliance/typedef-range/typedef-range.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") +ObjectPropertyRange( ) + + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-range/typedef-range.expected.owl b/tests/input/obo-compliance/typedef-range/typedef-range.expected.owl new file mode 100644 index 000000000..75bf5e2bb --- /dev/null +++ b/tests/input/obo-compliance/typedef-range/typedef-range.expected.owl @@ -0,0 +1,80 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-range/typedef-range.meta.yaml b/tests/input/obo-compliance/typedef-range/typedef-range.meta.yaml new file mode 100644 index 000000000..276c56bff --- /dev/null +++ b/tests/input/obo-compliance/typedef-range/typedef-range.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-range +name: typedef-range +description: test for range attribute \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-range/typedef-range.obo b/tests/input/obo-compliance/typedef-range/typedef-range.obo new file mode 100644 index 000000000..45ba86974 --- /dev/null +++ b/tests/input/obo-compliance/typedef-range/typedef-range.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-range + +[Typedef] +id: R:1 +range: Y:1 + diff --git a/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.json b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.json new file mode 100644 index 000000000..d061ba3b9 --- /dev/null +++ b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.json @@ -0,0 +1,20 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-transitive_over.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ], + "propertyChainAxioms" : [ { + "predicateId" : "http://purl.obolibrary.org/obo/R_1", + "chainPredicateIds" : [ "http://purl.obolibrary.org/obo/R_1", "http://purl.obolibrary.org/obo/R_3" ] + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.obo b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.obo new file mode 100644 index 000000000..9e3cf0775 --- /dev/null +++ b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-transitive_over + +[Typedef] +id: R:1 +transitive_over: R:3 + diff --git a/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.ofn b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.ofn new file mode 100644 index 000000000..2580b2f0b --- /dev/null +++ b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.ofn @@ -0,0 +1,36 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "R:1") + + + +SubObjectPropertyOf(ObjectPropertyChain( ) ) +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.owl b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.owl new file mode 100644 index 000000000..2ff8cab4a --- /dev/null +++ b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.expected.owl @@ -0,0 +1,72 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + R:1 + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.meta.yaml b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.meta.yaml new file mode 100644 index 000000000..8b10de03e --- /dev/null +++ b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-transitive_over +name: typedef-transitive_over +description: test for transitive_over attribute \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.obo b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.obo new file mode 100644 index 000000000..db217a52f --- /dev/null +++ b/tests/input/obo-compliance/typedef-transitive_over/typedef-transitive_over.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-transitive_over + +[Typedef] +id: R:1 +transitive_over: R:3 + diff --git a/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.json b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.json new file mode 100644 index 000000000..f951f41fa --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.json @@ -0,0 +1,32 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-xref-anyiri-ann.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "xrefs" : [ { + "val" : "http://example.org/R/1" + } ], + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#is_metadata_tag", + "val" : "true" + } ] + } + }, { + "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.obo b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.obo new file mode 100644 index 000000000..1fb864241 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: typedef-xref-anyiri-ann + +[Typedef] +id: R:1 +xref: http://example.org/R/1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.ofn b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.ofn new file mode 100644 index 000000000..b51072515 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: () + +AnnotationAssertion( "http://example.org/R/1") +AnnotationAssertion( "R:1") +AnnotationAssertion( "true"^^xsd:boolean) + +# Annotation Property: (database_cross_reference) + +AnnotationAssertion(rdfs:label "database_cross_reference") + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.owl b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.owl new file mode 100644 index 000000000..1f844d362 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.expected.owl @@ -0,0 +1,68 @@ + + + + 1.4 + + + + + + + + + + + + + http://example.org/R/1 + R:1 + true + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.meta.yaml b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.meta.yaml new file mode 100644 index 000000000..4a362806f --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-xref-anyiri-ann +name: typedef-xref-anyiri-ann +description: maps IRIs \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.obo b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.obo new file mode 100644 index 000000000..e1621bce1 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri-ann/typedef-xref-anyiri-ann.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: typedef-xref-anyiri-ann + +[Typedef] +id: R:1 +xref: http://example.org/R/1 +is_metadata_tag: true + diff --git a/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.json b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.json new file mode 100644 index 000000000..2e5dd5d06 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-xref-anyiri.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "xrefs" : [ { + "val" : "http://example.org/R/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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.obo b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.obo new file mode 100644 index 000000000..d5c55aa73 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-xref-anyiri + +[Typedef] +id: R:1 +xref: http://example.org/R/1 + diff --git a/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.ofn b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.ofn new file mode 100644 index 000000000..50e32c6f2 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# 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") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "http://example.org/R/1") +AnnotationAssertion( "R:1") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.owl b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.owl new file mode 100644 index 000000000..9d8508290 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.expected.owl @@ -0,0 +1,71 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + http://example.org/R/1 + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.meta.yaml b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.meta.yaml new file mode 100644 index 000000000..e9740873c --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-xref-anyiri +name: typedef-xref-anyiri +description: maps IRIs \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.obo b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.obo new file mode 100644 index 000000000..a12cc1e57 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-anyiri/typedef-xref-anyiri.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-xref-anyiri + +[Typedef] +id: R:1 +xref: http://example.org/R/1 + diff --git a/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.json b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.json new file mode 100644 index 000000000..81c76e009 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-xref-ro.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/RO_0000000", + "type" : "PROPERTY", + "meta" : { + "xrefs" : [ { + "val" : "RO:0000000" + } ] + } + }, { + "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.obo b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.obo new file mode 100644 index 000000000..420414122 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: typedef-xref-ro +owl-axioms: Prefix(owl:=)\nPrefix(rdf:=)\nPrefix(xml:=)\nPrefix(xsd:=)\nPrefix(rdfs:=)\n\n\nOntology(\nDeclaration(AnnotationProperty())\n\n\nAnnotationAssertion( \"R:1\")\n) + +[Typedef] +id: RO:0000000 +xref: RO:0000000 + diff --git a/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.ofn b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.ofn new file mode 100644 index 000000000..442bd687b --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# 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") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "RO:0000000") +AnnotationAssertion( "R:1") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.owl b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.owl new file mode 100644 index 000000000..644d4bf22 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.expected.owl @@ -0,0 +1,71 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + RO:0000000 + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.meta.yaml b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.meta.yaml new file mode 100644 index 000000000..6caaeede0 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-xref-ro +name: typedef-xref-ro +description: maps to RO IRIs automatically \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.obo b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.obo new file mode 100644 index 000000000..4ca0da419 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref-ro/typedef-xref-ro.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-xref-ro + +[Typedef] +id: R:1 +xref: RO:0000000 + diff --git a/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.json b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.json new file mode 100644 index 000000000..2cd6c117a --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/typedef-xref.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://purl.obolibrary.org/obo/R_1", + "type" : "PROPERTY", + "meta" : { + "xrefs" : [ { + "val" : "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.obo b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.obo new file mode 100644 index 000000000..1c8b6137e --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: typedef-xref + +[Typedef] +id: R:1 +xref: Y:1 + diff --git a/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.ofn b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.ofn new file mode 100644 index 000000000..2be9bab1c --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(ObjectProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# 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") + + +############################ +# Object Properties +############################ + +# Object Property: () + +AnnotationAssertion( "Y:1") +AnnotationAssertion( "R:1") + + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.owl b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.owl new file mode 100644 index 000000000..58c8f2539 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref/typedef-xref.expected.owl @@ -0,0 +1,71 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + Y:1 + R:1 + + + + + + + diff --git a/tests/input/obo-compliance/typedef-xref/typedef-xref.meta.yaml b/tests/input/obo-compliance/typedef-xref/typedef-xref.meta.yaml new file mode 100644 index 000000000..8b25767e5 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref/typedef-xref.meta.yaml @@ -0,0 +1,3 @@ +name: typedef-xref +name: typedef-xref +description: plain xref \ No newline at end of file diff --git a/tests/input/obo-compliance/typedef-xref/typedef-xref.obo b/tests/input/obo-compliance/typedef-xref/typedef-xref.obo new file mode 100644 index 000000000..5b5465902 --- /dev/null +++ b/tests/input/obo-compliance/typedef-xref/typedef-xref.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: typedef-xref + +[Typedef] +id: R:1 +xref: Y:1 + diff --git a/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.json b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.json new file mode 100644 index 000000000..47bf6bd50 --- /dev/null +++ b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/union_of-annotated.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.obo b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.obo new file mode 100644 index 000000000..c1f619d3e --- /dev/null +++ b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: union_of-annotated + +[Term] +id: X:1 +union_of: X:2 {source="PMID:123462"} +union_of: X:3 {source="PMID:123462"} + diff --git a/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.ofn b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.ofn new file mode 100644 index 000000000..53ddf9c7b --- /dev/null +++ b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.ofn @@ -0,0 +1,38 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +EquivalentClasses(Annotation( "PMID:123462") ObjectUnionOf( )) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.owl b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.owl new file mode 100644 index 000000000..ed6551e44 --- /dev/null +++ b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.expected.owl @@ -0,0 +1,93 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + PMID:123462 + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/union_of-annotated/union_of-annotated.meta.yaml b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.meta.yaml new file mode 100644 index 000000000..f82a0bb44 --- /dev/null +++ b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: union_of-annotated +name: union_of-annotated +description: Union Of Classes with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/union_of-annotated/union_of-annotated.obo b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.obo new file mode 100644 index 000000000..e9f7668b9 --- /dev/null +++ b/tests/input/obo-compliance/union_of-annotated/union_of-annotated.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: union_of-annotated + +[Term] +id: X:1 +union_of: X:2 {source="PMID:123462"} +union_of: X:3 + diff --git a/tests/input/obo-compliance/union_of/union_of.expected.json b/tests/input/obo-compliance/union_of/union_of.expected.json new file mode 100644 index 000000000..a344e8c54 --- /dev/null +++ b/tests/input/obo-compliance/union_of/union_of.expected.json @@ -0,0 +1,16 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/union_of.owl", + "meta" : { + "basicPropertyValues" : [ { + "pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "val" : "1.4" + } ] + }, + "nodes" : [ { + "id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", + "lbl" : "has_obo_format_version", + "type" : "PROPERTY" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/union_of/union_of.expected.obo b/tests/input/obo-compliance/union_of/union_of.expected.obo new file mode 100644 index 000000000..408557f68 --- /dev/null +++ b/tests/input/obo-compliance/union_of/union_of.expected.obo @@ -0,0 +1,8 @@ +format-version: 1.2 +ontology: union_of + +[Term] +id: X:1 +union_of: X:2 +union_of: X:3 + diff --git a/tests/input/obo-compliance/union_of/union_of.expected.ofn b/tests/input/obo-compliance/union_of/union_of.expected.ofn new file mode 100644 index 000000000..3e3cb0893 --- /dev/null +++ b/tests/input/obo-compliance/union_of/union_of.expected.ofn @@ -0,0 +1,37 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(Class()) +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# Annotation Properties +############################ + +# Annotation Property: (has_obo_format_version) + +AnnotationAssertion(rdfs:label "has_obo_format_version") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "X:1") +EquivalentClasses( ObjectUnionOf( )) + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/union_of/union_of.expected.owl b/tests/input/obo-compliance/union_of/union_of.expected.owl new file mode 100644 index 000000000..ef0bfc0e6 --- /dev/null +++ b/tests/input/obo-compliance/union_of/union_of.expected.owl @@ -0,0 +1,82 @@ + + + + 1.4 + + + + + + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + + + X:1 + + + + + + + + + + + + + + + + + + + diff --git a/tests/input/obo-compliance/union_of/union_of.meta.yaml b/tests/input/obo-compliance/union_of/union_of.meta.yaml new file mode 100644 index 000000000..d4720b380 --- /dev/null +++ b/tests/input/obo-compliance/union_of/union_of.meta.yaml @@ -0,0 +1,3 @@ +name: union_of +name: union_of +description: Union Of Classes \ No newline at end of file diff --git a/tests/input/obo-compliance/union_of/union_of.obo b/tests/input/obo-compliance/union_of/union_of.obo new file mode 100644 index 000000000..564447434 --- /dev/null +++ b/tests/input/obo-compliance/union_of/union_of.obo @@ -0,0 +1,8 @@ +format-version: 1.4 +ontology: union_of + +[Term] +id: X:1 +union_of: X:2 +union_of: X:3 + diff --git a/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.json b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.json new file mode 100644 index 000000000..ed7adb01a --- /dev/null +++ b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/xref-annotated.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" + } ] + } + }, { + "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.obo b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.obo new file mode 100644 index 000000000..fce1b6296 --- /dev/null +++ b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: xref-annotated + +[Term] +id: X:1 +xref: Y:1 {source="PMID:123458"} + diff --git a/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.ofn b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.ofn new file mode 100644 index 000000000..c715ce5da --- /dev/null +++ b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.ofn @@ -0,0 +1,41 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# 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") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion(Annotation( "PMID:123458") "Y:1") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.owl b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.owl new file mode 100644 index 000000000..d98370827 --- /dev/null +++ b/tests/input/obo-compliance/xref-annotated/xref-annotated.expected.owl @@ -0,0 +1,83 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + + + + + + + Y:1 + X:1 + + + + + Y:1 + PMID:123458 + + + + + + + diff --git a/tests/input/obo-compliance/xref-annotated/xref-annotated.meta.yaml b/tests/input/obo-compliance/xref-annotated/xref-annotated.meta.yaml new file mode 100644 index 000000000..17c4e1f16 --- /dev/null +++ b/tests/input/obo-compliance/xref-annotated/xref-annotated.meta.yaml @@ -0,0 +1,3 @@ +name: xref-annotated +name: xref-annotated +description: rdfs:label with annotation \ No newline at end of file diff --git a/tests/input/obo-compliance/xref-annotated/xref-annotated.obo b/tests/input/obo-compliance/xref-annotated/xref-annotated.obo new file mode 100644 index 000000000..9664f8c26 --- /dev/null +++ b/tests/input/obo-compliance/xref-annotated/xref-annotated.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: xref-annotated + +[Term] +id: X:1 +xref: Y:1 {source="PMID:123458"} + diff --git a/tests/input/obo-compliance/xref/xref.expected.json b/tests/input/obo-compliance/xref/xref.expected.json new file mode 100644 index 000000000..4f5d78300 --- /dev/null +++ b/tests/input/obo-compliance/xref/xref.expected.json @@ -0,0 +1,28 @@ +{ + "graphs" : [ { + "id" : "http://purl.obolibrary.org/obo/xref.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" + } ] + } + }, { + "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" + } ] + } ] +} \ No newline at end of file diff --git a/tests/input/obo-compliance/xref/xref.expected.obo b/tests/input/obo-compliance/xref/xref.expected.obo new file mode 100644 index 000000000..2da0b9437 --- /dev/null +++ b/tests/input/obo-compliance/xref/xref.expected.obo @@ -0,0 +1,7 @@ +format-version: 1.2 +ontology: xref + +[Term] +id: X:1 +xref: Y:1 + diff --git a/tests/input/obo-compliance/xref/xref.expected.ofn b/tests/input/obo-compliance/xref/xref.expected.ofn new file mode 100644 index 000000000..52c70cdce --- /dev/null +++ b/tests/input/obo-compliance/xref/xref.expected.ofn @@ -0,0 +1,40 @@ +Prefix(:=) +Prefix(owl:=) +Prefix(rdf:=) +Prefix(xml:=) +Prefix(xsd:=) +Prefix(rdfs:=) + + +Ontology( +Annotation( "1.4") + +Declaration(Class()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +Declaration(AnnotationProperty()) +############################ +# 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") + + + +############################ +# Classes +############################ + +# Class: () + +AnnotationAssertion( "Y:1") +AnnotationAssertion( "X:1") + + +) \ No newline at end of file diff --git a/tests/input/obo-compliance/xref/xref.expected.owl b/tests/input/obo-compliance/xref/xref.expected.owl new file mode 100644 index 000000000..7c2488fe7 --- /dev/null +++ b/tests/input/obo-compliance/xref/xref.expected.owl @@ -0,0 +1,71 @@ + + + + 1.4 + + + + + + + + + + + + + database_cross_reference + + + + + + + + has_obo_format_version + + + + + + + + + + + + + + + + + + + Y:1 + X:1 + + + + + + + diff --git a/tests/input/obo-compliance/xref/xref.meta.yaml b/tests/input/obo-compliance/xref/xref.meta.yaml new file mode 100644 index 000000000..dd05625d5 --- /dev/null +++ b/tests/input/obo-compliance/xref/xref.meta.yaml @@ -0,0 +1,3 @@ +name: xref +name: xref +description: rdfs:label \ No newline at end of file diff --git a/tests/input/obo-compliance/xref/xref.obo b/tests/input/obo-compliance/xref/xref.obo new file mode 100644 index 000000000..84aa7b99e --- /dev/null +++ b/tests/input/obo-compliance/xref/xref.obo @@ -0,0 +1,7 @@ +format-version: 1.4 +ontology: xref + +[Term] +id: X:1 +xref: Y:1 + diff --git a/tests/test_cli.py b/tests/test_cli.py index 287d4e0fc..e9413b731 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -534,6 +534,9 @@ def test_dump(self): if conf_path: cmd.extend(["-c", conf_path]) result = self.runner.invoke(main, cmd) + if result.exit_code != 0: + print("STDOUT", result.stdout) + print("STDERR", result.stderr) self.assertEqual(0, result.exit_code, f"input={input}, output_format={output_format}") if output_format == "obojson": obj: obograph.GraphDocument diff --git a/tests/test_converters/test_obo_format.py b/tests/test_converters/test_obo_format.py new file mode 100644 index 000000000..155da3ffb --- /dev/null +++ b/tests/test_converters/test_obo_format.py @@ -0,0 +1,450 @@ +""" +OBO Format and OBO Graphs compliance tests. + +See: + +- https://github.com/owlcollab/oboformat/issues/146 +- https://github.com/geneontology/obographs/issues/106 + +Note: some of these tests may migrate from OAK to a more central location. + +Currently these tests do two things: + +1. Compile a compliance suite by converting from a source .obo file + - writes to tests/input/obo-compliance + - these may eventually be moved to a separate repo +2. Test that conversion to and from .obo matches these files + - generates files in tests/output/obo-compliance +""" + +import difflib +import json +import logging +import shutil +import subprocess +from functools import lru_cache +from pathlib import Path +from typing import Optional + +import pytest +import rdflib +from rdflib.compare import isomorphic + +from oaklib import get_adapter +from tests import INPUT_DIR, OUTPUT_DIR + +logger = logging.getLogger(__name__) + +COMPILED_OBO_FILE = INPUT_DIR / "obo-compliance.obo" +OBO_COMPLIANCE_DIR = INPUT_DIR / "obo-compliance" +OBO_COMPLIANCE_OUTPUT_DIR = OUTPUT_DIR / "obo-compliance" + +CANONICAL_DUMPER = "robot" + +KNOWN_ISSUES = [ + "typedef-xref-ro", + "intersection_of-genus-differentia-annotated", + "union-of-annotated", + "property_value-object-annotated", + "owl-axioms-ObjectInverseOf", +] + + +@lru_cache +def robot_is_on_path(): + """ + Check if robot is on the path. + + Can be installed from robot.obolibrary.org + + :return: + """ + return shutil.which("robot") is not None + + +@lru_cache +def obographs_java_is_on_path(): + """ + Check if ogger is on the path. + + Part of obographs-java + :return: + """ + return shutil.which("ogger") is not None + + +@pytest.fixture(scope="session") +def split_compiled_obo(): + """ + Split the compiled OBO file into individual files, + adding additional metadata files + + The compiled OBO file is a concatenation of multiple different ontologies, + separated by yaml metadata after !! characters (obo format comments). + + Note: this procedure may eventually go away and the component files + managed independently but for now it is easier to manage them together. + + :return: + """ + blocks = {} + metadata = {} + yamls = {} + ontology_id = None + paths = {} + with open(COMPILED_OBO_FILE) as f: + lines = f.readlines() + for line in lines: + if line.startswith("!!"): + yaml = line[3:].rstrip() + if not yaml: + continue + if yaml.startswith("#"): + continue + if ":" not in yaml: + raise ValueError(f"Invalid yaml: {yaml}") + k, v = yaml.strip().split(":", 1) + v = v.strip() + if k == "name": + ontology_id = v + if ontology_id in blocks: + raise ValueError(f"Duplicate ontology id: {ontology_id}") + metadata[ontology_id] = {} + yamls[ontology_id] = [yaml.rstrip()] + blocks[ontology_id] = [ + "format-version: 1.4\n", + f"ontology: {ontology_id}\n", + ] + metadata[ontology_id][k.strip()] = v.strip() + yamls[ontology_id].append(yaml.strip()) + + else: + blocks[ontology_id].append(line) + if line.startswith("ontology:") and blocks[ontology_id][1].startswith("ontology:"): + # normally we auto-populate the ontology id; + # however, some tests may explicitly include the ontology tag + # (necessary to preserve line ordering). In this case we + # remove the auto-populated tag + blocks[ontology_id].pop(1) + for ontology_id, block in blocks.items(): + folder = OBO_COMPLIANCE_DIR / ontology_id + folder.mkdir(exist_ok=True, parents=True) + filename = folder / f"{ontology_id}.obo" + paths[ontology_id] = filename + # logger.info(f"W") + with open(filename, "w") as f: + f.write("".join(block)) + with open(folder / f"{ontology_id}.meta.yaml", "w") as f: + f.write("\n".join(yamls[ontology_id])) + return paths, metadata + + +def test_split(split_compiled_obo): + paths, metadata = split_compiled_obo + assert len(paths.items()) > 0 + + +@pytest.mark.parametrize( + "output_format", + [ + "owl", + "json", + "obo", + "ofn", + ], +) +# @pytest.mark.skipif(not robot_is_on_path(), reason="robot not on path") +@pytest.mark.skip("Only to be executed periodically") +def test_generate_canonical_files(split_compiled_obo, output_format): + """ + Generate canonical converted files using .obo as source. + + Note that this test is intended to serve as a bootstrap, + and eventually the canonical conversions will be manually edited + rather than generated automatically. + + This will go through the compliance suite, and generate + *.expected.{obo,owl,json} files in the input obo-compliance folder. + These are intended to be checked in. + + If there is a diff between what was previously deposited, a message + will be written, but the test will pass. We realize that TestByGuru + is an anti-pattern, but this is temporary until the compliance suite + settles down. + + We use robot to generate the canonical files, except for json, + for which we use ogger (part of the obographs java package). These + are both called on the command line (if they are not found then + no canonical file will be generated). Again, this is a temporary + measure, and for now this unit test is intended for execution + by a small subset of the OAK team. It is expected that the person + running this will use the appropriate version of each. + + :param split_compiled_obo: + :param output_format: + :return: + """ + paths, metadata = split_compiled_obo + for ontology_id, path in paths.items(): + # logger.info(f"Testing {ontology_id} to {output_format}") + if metadata[ontology_id].get("invalid", None): + logger.info(f"Skipping intentionally invalid ontology: {ontology_id}") + continue + output_path = make_filename(ontology_id, "robot", output_format, parent=OUTPUT_DIR) + # logger.info(f"CONVERTING {path} to {output_path}") + if output_path == "json": + ok = ogger_convert(path, output_path) + else: + ok = robot_convert(path, output_path) + assert ok is not False + if ok: + canonical_path = Path( + make_filename(ontology_id, "expected", output_format, parent=OBO_COMPLIANCE_DIR) + ) + if canonical_path.exists(): + logger.info(f"(skipping) Comparing {output_path} to {canonical_path}") + # compare_output(path, ontology_id, "robot", output_format) + else: + canonical_path.parent.mkdir(exist_ok=True, parents=True) + # copy the output to the input dir + # logger.info(f"Copying {output_path} to {canonical_path}") + shutil.copy(output_path, canonical_path) + else: + assert ok is None + + +@pytest.mark.parametrize( + "output_format", + [ + "obo", + "json", + "owl", + ], +) +@pytest.mark.parametrize("wrapper", [("obo", "simpleobo")]) +def test_oak_loaders_dumpers(split_compiled_obo, output_format, wrapper): + """ + Tests that conversion via OAK generates files that are compliant. + + :param split_compiled_obo: + :param output_format: + :param wrapper: + :return: + """ + paths, metadata = split_compiled_obo + input_format, loader = wrapper + for ontology_id, path in paths.items(): + logger.info(f"Exporting {ontology_id} to {output_format}") + if metadata[ontology_id].get("invalid", None): + logger.info("Skipping intentionally invalid ontology") + continue + adapter = get_adapter(f"{loader}:{path}") + logger.info( + f"Loaded {ontology_id} with {loader}, entities: {len(list(adapter.entities()))}" + ) + output_path = make_filename(ontology_id, loader, output_format) + output_format_option = output_format + if output_format == "owl": + # xml is canonical for OBOFoundry + output_format_option = "rdfxml" + logger.info( + f"Dumping {ontology_id} to {output_path} using {output_format_option} with {loader}" + ) + adapter.dump(output_path, syntax=output_format_option) + if metadata[ontology_id].get("non-canonical-form-of", None): + # non-canonical forms are not expected to be identical + continue + canonical = canonical_path(ontology_id, output_format) + _, _, fatal = compare_output( + output_path, canonical, output_format, metadata=metadata[ontology_id] + ) + if output_format == "obo": + assert not fatal + + +def compare_output( + generated_path: str, canonical_path: str, format: str = None, metadata: dict = None +): + """ + Compare the output of OAK loading and dumping vs canonical files. + + :param generated_path: + :param canonical_path: + :param format: + :return: + """ + fatal = False + if not metadata: + metadata = {} + if format == "obo": + num_changes, diffs = diff_files(canonical_path, generated_path) + elif format.endswith("json"): + generated_obj = json.load(open(generated_path)) + canonical_obj = json.load(open(canonical_path)) + if generated_obj == canonical_obj: + diffs = [] + else: + diffs = list( + difflib.unified_diff( + json.dumps(canonical_obj, indent=2, sort_keys=True).splitlines(), + json.dumps(generated_obj, indent=2, sort_keys=True).splitlines(), + ) + ) + num_changes = len(diffs) + elif format == "owl": + canonical_graph = rdflib.Graph() + canonical_graph.parse(canonical_path, format="xml") + generated_graph = rdflib.Graph() + generated_graph.parse(generated_path, format="xml") + if isomorphic(canonical_graph, generated_graph): + diffs = [] + else: + diffs = list( + difflib.unified_diff( + canonical_graph.serialize(format="turtle").splitlines(), + generated_graph.serialize(format="turtle").splitlines(), + ) + ) + num_changes = len(diffs) + else: + num_changes, diffs = 0, [] + if num_changes: + name = metadata.get("name", None) + if "unstable" in metadata: + expected = "EXPECTED" + else: + if name in KNOWN_ISSUES: + expected = "TOD" + else: + expected = "UNEXPECTED" + fatal = False + logger.info(f"## {name}:: {expected} DIFF {format}: {canonical_path} vs {generated_path}:") + for diff in diffs: + logger.info(diff) + + else: + logger.info(f"## IDENTICAL {format}: {canonical_path} vs {generated_path}:") + return num_changes, diffs, fatal + + +def diff_files(file_path1, file_path2): + """ + Diff two files, at the ascii level. + + ignores the format-version line for obo format + + :param file_path1: + :param file_path2: + :return: + """ + + def readlines(file): + lines = [] + for line in file.readlines(): + line = line.rstrip() + if line.startswith("format-version:"): + continue + lines.append(line) + return lines + + with open(file_path1, "r") as file1, open(file_path2, "r") as file2: + file1_contents = readlines(file1) + file2_contents = readlines(file2) + differ = difflib.Differ() + diffs = list(differ.compare(file1_contents, file2_contents)) + + def is_change(line): + if line.startswith("+") or line.startswith("-"): + if line[1:].strip() == "": + return False + else: + return True + else: + return False + + return len([line for line in diffs if is_change(line)]), diffs + + +def make_filename( + ontology_id: str, loader: str, output_format: str, parent=OBO_COMPLIANCE_OUTPUT_DIR +) -> str: + """ + Make a filename for a given ontology id, loader, and output format. + + :param ontology_id: + :param loader: + :param output_format: + :param parent: + :return: + """ + outdir = parent / ontology_id + outdir.mkdir(exist_ok=True, parents=True) + return str(outdir / f"{ontology_id}.{loader}.{output_format}") + # return str(source_path.parent / f"{ontology_id}.{loader}.{output_format}") + + +def canonical_path(ontology_id: str, output_format: str) -> str: + """ + Get the canonical path for a given ontology id and output format. + + :param ontology_id: + :param output_format: + :return: + """ + return str(OBO_COMPLIANCE_DIR / ontology_id / f"{ontology_id}.expected.{output_format}") + + +def robot_convert(input_path: str, output_path: str) -> Optional[bool]: + """ + Convert an ontology using robot. + + :param input_path: + :param output_path: + :return: + """ + if not robot_is_on_path(): + return None + cmd = [ + "robot", + "convert", + "-i", + input_path, + "-o", + output_path, + ] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + if result.stderr: + logging.warning(result.stderr) + logging.info(result.stdout) + return True + except subprocess.CalledProcessError as e: + logging.info(f"Robot call failed: {e}") + return False + + +def ogger_convert(input_path: str, output_path: str) -> Optional[bool]: + """ + Convert an ontology using ogger. + + :param input_path: + :param output_path: + :return: + """ + if not obographs_java_is_on_path(): + return None + cmd = [ + "ogger", + input_path, + "-o", + output_path, + ] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + if result.stderr: + logging.warning(result.stderr) + logging.info(result.stdout) + return True + except subprocess.CalledProcessError as e: + logging.info(f"Ogger call failed: {e}") + return False diff --git a/tests/test_utilities/test_cross_ontology_diff.py b/tests/test_utilities/test_cross_ontology_diff.py index c65a9aec2..4bea44c70 100644 --- a/tests/test_utilities/test_cross_ontology_diff.py +++ b/tests/test_utilities/test_cross_ontology_diff.py @@ -50,7 +50,11 @@ def test_initial_check(self): ] for oi in [self.oi, self.owl_oi]: for subject, preds, ancs in cases: - self.assertEqual(ancs, list(oi.ancestors([subject], predicates=preds))) + self.assertEqual( + ancs, + list(oi.ancestors([subject], predicates=preds)), + msg=f"Initial Check Failed for {oi.__class__}", + ) def test_structural_diff(self): cases = [(EXPECTED_L2R, False), (EXPECTED_BIDI, True)] diff --git a/tests/test_utilities/test_unreciprocated_mappings.py b/tests/test_utilities/test_unreciprocated_mappings.py index 7bb859440..5023a878f 100644 --- a/tests/test_utilities/test_unreciprocated_mappings.py +++ b/tests/test_utilities/test_unreciprocated_mappings.py @@ -24,10 +24,16 @@ def test_unreciprocated(self): pairs = mappings_to_pairs(unreciprocated_mappings(oi, oi)) # for p in pairs: # logging.info(p) - self.assertCountEqual(pairs, [("X:5", "Y:5"), ("Y:2", "X:1"), ("Y:4", "X:4")]) + self.assertCountEqual( + pairs, + [("X:5", "Y:5"), ("Y:2", "X:1"), ("Y:4", "X:4")], + msg=f"Basic Check Failed for {oi.__class__}", + ) pairs = mappings_to_pairs(unreciprocated_mappings(oi, oi, filter_unidirectional=False)) # for p in pairs: # logging.info(p) self.assertCountEqual( - pairs, [("X:5", "Y:5"), ("Y:2", "X:1"), ("Y:4", "X:4"), ("Y:4", "Z:4")] + pairs, + [("X:5", "Y:5"), ("Y:2", "X:1"), ("Y:4", "X:4"), ("Y:4", "Z:4")], + msg=f"Filter unidirectional Check Failed for {oi.__class__}", )