From 7fdbe908968118608388519ff5aa848dd8a8a06f Mon Sep 17 00:00:00 2001 From: henrietteharmse Date: Wed, 6 Nov 2024 13:59:44 +0000 Subject: [PATCH] Fixed definedBy issue and made oio available locally. --- .../linker/src/main/java/LinkerPass2.java | 2 +- .../annotation-properties/gitIssue502.json | 2 +- testcases/annotation-properties/oboInOwl.owl | 488 ++++++++++++++++++ 3 files changed, 490 insertions(+), 2 deletions(-) create mode 100644 testcases/annotation-properties/oboInOwl.owl diff --git a/dataload/linker/src/main/java/LinkerPass2.java b/dataload/linker/src/main/java/LinkerPass2.java index 67c2df88f..9769b3db5 100644 --- a/dataload/linker/src/main/java/LinkerPass2.java +++ b/dataload/linker/src/main/java/LinkerPass2.java @@ -342,7 +342,7 @@ private static void writeIriMapping(JsonWriter jsonWriter, EntityDefinitionSet d if(definitions.definingOntologyIds.size() == 1) { // ...and is only defined in ONE ontology. Therefore that ontology is the canonical defining ontology as far as OLS is concerned - jsonWriter.name(DEFINITION.getText()); + jsonWriter.name(DEFINED_BY.getText()); jsonWriter.beginArray(); jsonWriter.value(definitions.definingOntologyIds.iterator().next()); jsonWriter.endArray(); diff --git a/testcases/annotation-properties/gitIssue502.json b/testcases/annotation-properties/gitIssue502.json index 523d14164..1b2a77c7f 100644 --- a/testcases/annotation-properties/gitIssue502.json +++ b/testcases/annotation-properties/gitIssue502.json @@ -22,7 +22,7 @@ }, { "id": "oio", - "ontology_purl": "https://gist.githubusercontent.com/haideriqbal/4a2b1a9aa81d9fa26cae81e0b0b7730b/raw/527665128b9be9d7d6133f9a796379600151c737/oboInOwl.owl", + "ontology_purl": "./testcases/annotation-properties/oboInOwl.owl", "base_uri": ["http://www.geneontology.org/formats/oboInOwl#"] } ] diff --git a/testcases/annotation-properties/oboInOwl.owl b/testcases/annotation-properties/oboInOwl.owl new file mode 100644 index 000000000..a3c2367a0 --- /dev/null +++ b/testcases/annotation-properties/oboInOwl.owl @@ -0,0 +1,488 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBO Format metamodel. This meta-ontology is self-describing. OBO metamodel properties are described using OBO metamodel properties + + + This is an OWL translation of an ontology whose native representational form is .obo. The translation was performed using the oboInOwl xslt library. For details, see http://www.berkeleybop.org/obo-conv.cgi + + + + database_cross_reference + + + definition + we are forced to use the n-ary relation pattern in OWL1.0. For OWL2 we may make this a direct axiom between a class and the string + + + The textual definition of the current term. There must be zero or one instances of this tag per term description + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + URL:http://www.obofoundry.org/wiki/index.php/Definitions + http://www.obofoundry.org/wiki/index.php/Definitions + + + + + obsolete_class + + + pseudo-class. in the oboInOwl translation, all obsolete classes are subclasses of this class. Note that this is not a metaclass + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + subset + + + A grouping of terms from an ontology or ontologies. Note that this is not a metaclass - classes are linked to subsets via oboInOwl:inSubset + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + view + + + + + partition + + + + + slim + + + + + GO-slim + + + + + oboFormat:subsetdef + http://purl.org/obo/owl/oboFormat#oboFormat_subsetdef + + + + + synonym + we are forced to use the n-ary relation pattern in OWL1.0. For OWL2 we may make this a direct axiom between a class and the string + + + An instance of synonym usage. synonym instances are linked to classes via oboInOwl:has*Synonym properties + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + synonym_type + + + obsolete_property + Note that this is not a metaclass + + + pseudo-property. in the oboInOwl translation, all obsolete relations are subProperties of this class + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + consider + + + Gives a term which may be an appropriate substitute for an obsolete term, but needs to be looked at carefully by a human expert before the replacement is done + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + oboFormat:consider + http://purl.org/obo/owl/oboFormat#oboFormat_consider + + + + + has_alternative_id + + + An alternative identifier for this class; should follow ID syntax. These can result from class merges + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + oboFormat:alt_id + http://purl.org/obo/owl/oboFormat#oboFormat_alt_id + + + + + has_broad_synonym + + + + An alias in which the alias is broader than the primary class name. Example: cell division is a broad synonym of cytokinesis + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + + oboFormat:broad_synonym + http://purl.org/obo/owl/oboFormat#oboFormat_broad_synonym + + + + + has_date + + + oboFormat:date + http://purl.org/obo/owl/oboFormat#oboFormat_date + + + + + has_dbxref + + + oboFormat:xref + http://purl.org/obo/owl/oboFormat#oboFormat_xref + + + + + has_default_namespace + + + oboFormat:default-namespace + http://purl.org/obo/owl/oboFormat#oboFormat_default-namespace + + + + + has_definition + we are forced to use the n-ary relation pattern in OWL1.0. For OWL2 we may make this a direct axiom between a class and the string + + + a relation between a class and an instance of a oboInOwl:Definition + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + oboFormat:def + http://purl.org/obo/owl/oboFormat#oboFormat_def + + + + + has_exact_synonym + + + + An alias in which the alias exhibits true synonymy. Example: ornithine cycle is an exact synonym of urea cycle + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + + oboFormat:exact_synonym + http://purl.org/obo/owl/oboFormat#oboFormat_exact_synonym + + + + + has_narrow_synonym + + + + An alias in which the alias is narrower than the primary class name. Example: pyrimidine-dimer repair by photolyase is a narrow synonym of photoreactive repair + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + + oboFormat:narrow_synonym + http://purl.org/obo/owl/oboFormat#oboFormat_narrow_synonym + + + + + has_obo_namespace + + + A relation between a class and an OBO namespace string. OBO namespaces are to be distinguished from IDspaces; for example, biological_process is a namespace, GO is an idspace. + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + + oboFormat:namespace + http://purl.org/obo/owl/oboFormat#oboFormat_namespace + + + + + has_synonym + Note that this should be a super-property of hasRelatedSynonym, hasExactSynonym etc; however, we cannot state this and remain in OWL-DL + + + A relation between a class and an alias term. + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + + oboFormat:synonym + http://purl.org/obo/owl/oboFormat#oboFormat_synonym + + + + + has_related_synonym + + + + An alias in which the alias is related the primary class name, but not necessarily broader or narrower. Example: cytochrome bc1 complex is a related synonym of ubiquinol-cytochrome-c reductase activity; virulence is a related synonym of pathogenesis + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + + oboFormat:related_synonym + http://purl.org/obo/owl/oboFormat#oboFormat_related_synonym + + + + + has_subset + + + relation between an ontology and a oboInOwl:Subset, indicating classes in the ontology belong to the subset + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + has_synonym_type + + + URL:http://www.geneontology.org/GO.usage.shtml#type + http://www.geneontology.org/GO.usage.shtml#type + + + + + has_URI + + + has_version + + + oboFormat:version + http://purl.org/obo/owl/oboFormat#oboFormat_version + + + + + in_subset + + + relation between a class and a oboInOwl:Subset, indicating the class belongs (is a member of) the subset + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + oboFormat:subset + http://purl.org/obo/owl/oboFormat#oboFormat_subset + + + + + replaced_by + + + Gives a term which replaces an obsolete term. The value is the id of the replacement term. The value of this tag can safely be used to automatically reassign links to an obsolete term. The replaced_by tag may only be specified for obsolete terms. A single obsolete term may have more than one replaced_by tag. This tag can be used in conjunction with the consider tag. + + + oboInOwl:cjm + http://purl.org/obo/owl/oboInOwl#oboInOwl_cjm + + + + + + + oboFormat:replaced_by + http://purl.org/obo/owl/oboFormat#oboFormat_replaced_by + + + + + saved_by + + + oboFormat:saved_by + http://purl.org/obo/owl/oboFormat#oboFormat_saved_by + + + + + is_cyclic + + + + + + + + oboFormat:is_cyclic + http://purl.org/obo/owl/oboFormat#oboFormat_is_cyclic + + + + + subset_property + + + This annotation property groups all subsets declared in the ontology + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + + synonym_type_property + + + This annotation property groups all synonym types declared in the ontology + + + oboInOwl:GOC + http://purl.org/obo/owl/oboInOwl#oboInOwl_GOC + + + + + + \ No newline at end of file