diff --git a/CHANGELOG.md b/CHANGELOG.md index 461f372a4..5c8ad6b32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added option to input template strings from external file [#1152] +### Changed +- Updated `duplicate_exact_syonym` [`report`] query to be case-insensitive and ignore synoyms annotated as abbreviation or acronym synonym types [#1179] +- Extend `--drop-axiom-annotations` option to support value-specific removal of axiom annotations [#1193] +- Add `--enforce-obo-format`, `--exclude-named-classes` and `--include-subclass-of` features to relax command [#1060, #1183] +- Updated OWL API to 3.5.29. This includes a major update to OBO Format which now supports [IDSPACE declarations](https://github.com/owlcs/owlapi/pull/1102) (non-OBO Foundry prefixes). + ### Fixed - '--annotate-with-source true' does not work with extract --method subset [#1160] - Fix how Template adds entities to the QuotedEntityChecker [#1104] @@ -17,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Handle IRIs that are not entities in export [#1168] - Fix integration tests [#1181] - `robot repair` is fixed to be more flexible, to enable partial repairs [#1194] +- Invalid Xrefs test has been fixed to recognise invalid CURIEs correctly [#1127] +- Fix issue with correctly determining base entities [#1108] ## [1.9.5] - 2023-09-20 @@ -389,13 +397,16 @@ First official release of ROBOT! [`validate`]: http://robot.obolibrary.org/validate ; [#1181]: https://github.com/ontodev/robot/pull/1181 +[#1179]: https://github.com/ontodev/robot/pull/1179 [#1171]: https://github.com/ontodev/robot/pull/1171 [#1168]: https://github.com/ontodev/robot/pull/1168 [#1160]: https://github.com/ontodev/robot/pull/1160 [#1152]: https://github.com/ontodev/robot/issues/1152 [#1148]: https://github.com/ontodev/robot/pull/1148 [#1135]: https://github.com/ontodev/robot/pull/1135 +[#1127]: https://github.com/ontodev/robot/pull/1127 [#1119]: https://github.com/ontodev/robot/pull/1119 +[#1108]: https://github.com/ontodev/robot/pull/1108 [#1104]: https://github.com/ontodev/robot/pull/1104 [#1100]: https://github.com/ontodev/robot/pull/1100 [#1091]: https://github.com/ontodev/robot/issues/1091 diff --git a/docs/examples/annotated.obo b/docs/examples/annotated.obo index e775e0ca9..d0b4a2427 100644 --- a/docs/examples/annotated.obo +++ b/docs/examples/annotated.obo @@ -1,5 +1,7 @@ format-version: 1.2 data-version: https://github.com/ontodev/robot/examples/annotated-1.owl +idspace: foaf http://xmlns.com/foaf/0.1/ +idspace: oboInOwl http://www.geneontology.org/formats/oboInOwl# remark: Comment remark: Comment from annotations.ttl file. ontology: https://github.com/ontodev/robot/examples/annotated.owl @@ -378,8 +380,8 @@ xref: XAO:0000165 is_a: UBERON:0001851 ! cortex intersection_of: UBERON:0001851 ! cortex intersection_of: part_of UBERON:0002369 ! adrenal gland -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/5/5c/Gray1185.png -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Gray1185.png/200px-Gray1185.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/5/5c/Gray1185.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Gray1185.png/200px-Gray1185.png property_value: homology_notes "All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues (medulla), but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG]" xsd:string property_value: taxon_notes "Kardong states that mammals are the first to have distinct cortext and medulla, but this contradicts XAO" xsd:string @@ -470,7 +472,7 @@ is_a: UBERON:0002530 ! gland intersection_of: UBERON:0002530 ! gland intersection_of: part_of UBERON:0000949 ! endocrine system relationship: part_of UBERON:0000949 ! endocrine system -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/d/da/Illu_endocrine_system.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/d/da/Illu_endocrine_system.png [Term] id: UBERON:0002369 @@ -515,9 +517,9 @@ xref: XAO:0000164 is_a: UBERON:0006858 ! adrenal/interrenal gland relationship: part_of UBERON:0000916 ! abdomen relationship: part_of UBERON:0000949 ! endocrine system -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/9/9d/Illu_endocrine_system_New.png -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Illu_endocrine_system.jpg/200px-Illu_endocrine_system.jpg property_value: external_definition "Anatomical structure which is found on the surface of the kidney and secretes various hormones including epinephrine, norephinephrine, aldosterone, corticosterone, and cortisol.[AAO]" xsd:string +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/9/9d/Illu_endocrine_system_New.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Illu_endocrine_system.jpg/200px-Illu_endocrine_system.jpg property_value: function_notes "suprarenal cortex manufactures corticosteroids; suprarenal medulla manufactures epinephrine and norepinephrine; suprarenal medulla receives preganglionic sympathetic innervation from the greater thoracic splanchnic n." xsd:string property_value: homology_notes "All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues, but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG]" xsd:string property_value: taxon_notes "The origin of the adrenal gland is still controversial. It is thought to share the same origin as the kidney and gonads, derived from coelomic epithelium of the urogenital ridge and/or the underlying mesenchyme (Keegan and Hammer, 2002; Morohashi, 1997). We follow Kardong and state homology at the level of the cortex and medulla rather than gland as a whole" xsd:string @@ -572,7 +574,7 @@ xref: OpenCyc:Mx4rwP3vyJwpEbGdrcN5Y29ycA xref: UMLS:C1285092 xref: WikipediaCategory:Glands is_a: UBERON:0000062 ! organ -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/a/a1/Gray1026.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/a/a1/Gray1026.png property_value: has_relational_adjective "glandular" xsd:string [Term] diff --git a/docs/examples/example.obo b/docs/examples/example.obo index a3a30ed3d..d303d3b13 100644 --- a/docs/examples/example.obo +++ b/docs/examples/example.obo @@ -1,4 +1,6 @@ format-version: 1.2 +idspace: foaf http://xmlns.com/foaf/0.1/ +idspace: oboInOwl http://www.geneontology.org/formats/oboInOwl# remark: Comment from annotations.ttl file. ontology: https://github.com/ontodev/robot/examples/edit.owl owl-axioms: Prefix(owl:=)\nPrefix(rdf:=)\nPrefix(xml:=)\nPrefix(xsd:=)\nPrefix(rdfs:=)\n\n\nOntology(\nDeclaration(Class())\n############################\n# Classes\n############################\n\n# Class: ()\n\nSubClassOf( owl:Thing)\n\n\n) @@ -377,8 +379,8 @@ xref: XAO:0000165 is_a: UBERON:0001851 ! cortex intersection_of: UBERON:0001851 ! cortex intersection_of: part_of UBERON:0002369 ! adrenal gland -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/5/5c/Gray1185.png -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Gray1185.png/200px-Gray1185.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/5/5c/Gray1185.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Gray1185.png/200px-Gray1185.png property_value: homology_notes "All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues (medulla), but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG]" xsd:string {date_retrieved="2012-09-17", external_class="VHOG:0001481", ontology="VHOG", source="http://bgee.unil.ch/", source="ISBN:978-0030223693 Liem KF, Bemis WE, Walker WF, Grande L, Functional Anatomy of the Vertebrates: An Evolutionary Perspective (2001) p.518 and Figure 15-9"} property_value: taxon_notes "Kardong states that mammals are the first to have distinct cortext and medulla, but this contradicts XAO" xsd:string @@ -469,7 +471,7 @@ is_a: UBERON:0002530 ! gland intersection_of: UBERON:0002530 ! gland intersection_of: part_of UBERON:0000949 ! endocrine system relationship: part_of UBERON:0000949 ! endocrine system -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/d/da/Illu_endocrine_system.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/d/da/Illu_endocrine_system.png [Term] id: UBERON:0002369 @@ -514,9 +516,9 @@ xref: XAO:0000164 is_a: UBERON:0006858 ! adrenal/interrenal gland relationship: part_of UBERON:0000916 ! abdomen relationship: part_of UBERON:0000949 ! endocrine system -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/9/9d/Illu_endocrine_system_New.png -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Illu_endocrine_system.jpg/200px-Illu_endocrine_system.jpg property_value: external_definition "Anatomical structure which is found on the surface of the kidney and secretes various hormones including epinephrine, norephinephrine, aldosterone, corticosterone, and cortisol.[AAO]" xsd:string {date_retrieved="2012-06-20", external_class="AAO:0010551", ontology="AAO", source="AAO:BJB"} +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/9/9d/Illu_endocrine_system_New.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Illu_endocrine_system.jpg/200px-Illu_endocrine_system.jpg property_value: function_notes "suprarenal cortex manufactures corticosteroids; suprarenal medulla manufactures epinephrine and norepinephrine; suprarenal medulla receives preganglionic sympathetic innervation from the greater thoracic splanchnic n." xsd:string property_value: homology_notes "All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues, but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG]" xsd:string {date_retrieved="2012-09-17", external_class="VHOG:0001141", ontology="VHOG", source="http://bgee.unil.ch/", source="ISBN:978-0030223693 Liem KF, Bemis WE, Walker WF, Grande L, Functional Anatomy of the Vertebrates: An Evolutionary Perspective (2001) p.518 and Figure 15-9"} property_value: taxon_notes "The origin of the adrenal gland is still controversial. It is thought to share the same origin as the kidney and gonads, derived from coelomic epithelium of the urogenital ridge and/or the underlying mesenchyme (Keegan and Hammer, 2002; Morohashi, 1997). We follow Kardong and state homology at the level of the cortex and medulla rather than gland as a whole" xsd:string @@ -572,7 +574,7 @@ xref: OpenCyc:Mx4rwP3vyJwpEbGdrcN5Y29ycA xref: UMLS:C1285092 {source="ncithesaurus:Gland"} xref: WikipediaCategory:Glands is_a: UBERON:0000062 ! organ -property_value: depicted:by http://upload.wikimedia.org/wikipedia/commons/a/a1/Gray1026.png +property_value: foaf:depicted_by http://upload.wikimedia.org/wikipedia/commons/a/a1/Gray1026.png property_value: has_relational_adjective "glandular" xsd:string [Term] diff --git a/docs/examples/filter_annotations_drop_axioms.owl b/docs/examples/filter_annotations_drop_axioms.owl new file mode 100644 index 000000000..0aec1b527 --- /dev/null +++ b/docs/examples/filter_annotations_drop_axioms.owl @@ -0,0 +1,2526 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Anatomical structure that performs a specific function or group of functions [WP]. + Organs are commonly observed as visibly distinct structures, but may also exist as loosely associated clusters of cells that work together to perform a specific function or functions. + CARO v1 does not include a generic 'organ' class, only simple and compound organ. CARO v2 may include organ, see https://github.com/obophenotype/caro/issues/4 + + + + + + EFO:0000634 + EMAPA:35949 + ENVO:01000162 + FMA:67498 + MA:0003001 + OpenCyc:Mx4rv5XMb5wpEbGdrcN5Y29ycA + OpenCyc:Mx4rwP3iWpwpEbGdrcN5Y29ycA + UMLS:C0178784 + WBbt:0003760 + uberon + anatomical unit + body organ + element + UBERON:0000062 + + organ + + + + + UMLS:C0178784 + ncithesaurus:Organ + + + + + + + + + + + + + + Anatomical structure which has as its direct parts two or more types of tissue and is continuous with one or more anatomical structures likewise constituted by two or more portions of tissues distinct from those of their complement. Examples: osteon, cortical bone, neck of femur, bronchopulmonary segment, left lobe of liver, anterior right side of heart, interventricular branch of left coronary artery, right atrium, mitral valve, head of pancreas[FMA]. + + + + AAO:0011124 + EFO:0000635 + FMA:82472 + cardinal organ part + uberon + regional part of organ + UBERON:0000064 + + + + organ part + + + + + + + + + + + + + + + Anatomical system that consists of all the muscles of the body[VSAO, modified]. + Anatomical system that consists of the muscles of the body.[VSAO] + we place the MA term musculature here, rather than under uberon:musculature, as this seems more appropriate given the structure of MA + AAO:0000307 + BILA:0000088 + BTO:0001369 + BTO:0001485 + EFO:0000801 + EMAPA:35578 + FBbt:00005069 + FMA:72954 + MA:0002888 + MAT:0000025 + MIAA:0000025 + VSAO:0000033 + XAO:0004042 + muscle system + muscle system of body + muscular system + musculature system + set of all muscles + set of muscles of body + vertebrate muscular system + uberon + muskelsystem + UBERON:0000383 + + musculature of body + + + + + Anatomical system that consists of the muscles of the body.[VSAO] + 2012-08-14 + VSAO:0000033 + VSAO + VSAO:curator + + + + + we place the MA term musculature here, rather than under uberon:musculature, as this seems more appropriate given the structure of MA + MA + + + + + + + + + + + + + + + Anatomical group that is has as its parts distinct anatomical structures interconnected by anatomical structures at a lower level of granularity[CARO]. A group of organs that work together to perform a certain task [Wikipedia]. + system + + + + + + AAO:0000007 + AEO:0000011 + BILA:0000011 + BSA:0000049 + CALOHA:TS-2088 + CARO:0000011 + EHDAA2:0003011 + EHDAA:392 + EMAPA:16103 + EV:0100000 + FBbt:00004856 + FMA:7149 + HAO:0000011 + MA:0000003 + OpenCyc:Mx4rCWM0QCtDEdyAAADggVbxzQ + TAO:0001439 + TGMA:0001831 + UMLS:C0460002 + VHOG:0001725 + WBbt:0005746 + WBbt:0005763 + XAO:0003002 + ZFA:0001439 + galen:AnatomicalSystem + body system + organ system + uberon + UBERON:0000467 + + + anatomical system + + + + + + UMLS:C0460002 + ncithesaurus:Organ_System + + + + + + + + Anatomical structure that is an individual member of a species and consists of more than one cell. + TODO - split body and mc organism? body continues after death stage + organismal + + + + + AAO:0010026 + AEO:0000191 + BILA:0000012 + BSA:0000038 + BTO:0000042 + CARO:0000012 + EFO:0002906 + EHDAA2:0003103 + EHDAA2:0003191 + EHDAA:1 + EHDAA:9178 + EMAPA:25765 + EV:0100016 + FBbt:00000001 + FMA:256135 + HAO:0000012 + TADS:0000001 + TAO:0001094 + TGMA:0001832 + VHOG:0000671 + WBbt:0007833 + XAO:0003004 + ZFA:0001094 + galen:Organism + multi-cellular organism + organism + whole organism + animal + uberon + Koerper + body + whole body + UBERON:0000468 + + + + multicellular organism + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Anatomical structure which is a subdivision of a whole organism, consisting of components of multiple anatomical systems, largely surrounded by a contiguous region of integument. + Reflects CARO2. todo - check the inclusion of FMA 'cardinal body part here', and check child terms for consistency + + + + + AAO:0010053 + AEO:0000032 + BILA:0000032 + CALOHA:TS-2084 + CARO:0000032 + EFO:0000808 + EHDAA2:0003032 + EMAPA:36031 + FBbt:00007009 + FMA:7153 + HAO:0000032 + MA:0002433 + MAT:0000293 + MESH:A01 + MIAA:0000293 + OpenCyc:Mx4rvViAHJwpEbGdrcN5Y29ycA + TAO:0001308 + TGMA:0001840 + UMLS:C0229962 + VHOG:0001758 + XAO:0003013 + ZFA:0001308 + galen:BodyPart + anatomic region + uberon + body part + body region + cardinal body part + UBERON:0000475 + + + + organism subdivision + + + + + UMLS:C0229962 + ncithesaurus:Body_Part + + + + + + + + + Anatomical group that has its parts adjacent to one another. + Will be obsoleted in CARO v2 [https://github.com/obophenotype/caro/issues/3] + AAO:0010009 + AEO:0000041 + BILA:0000041 + CARO:0000041 + EHDAA2:0003041 + FBbt:00007277 + FMA:49443 + HAO:0000041 + TADS:0000605 + TAO:0001478 + TGMA:0001842 + VHOG:0001737 + XAO:0003160 + ZFA:0001478 + uberon + UBERON:0000477 + + + anatomical cluster + + + + + + + + + + + + + + Multicellular anatomical structure that consists of many cells of one or a few types, arranged in an extracellular matrix such that their long-range organisation is at least partly a repetition of their short-range organisation. + changed label and definition to reflect CARO2 + + + + AAO:0000607 + AAO:0010054 + AEO:0000043 + BILA:0000043 + CALOHA:TS-2090 + CARO:0000043 + EHDAA2:0003043 + EMAPA:35868 + FBbt:00007003 + FMA:9637 + HAO:0000043 + MA:0003002 + MESH:A10 + TAO:0001477 + TGMA:0001844 + UMLS:C0040300 + VHOG:0001757 + WBbt:0005729 + XAO:0003040 + ZFA:0001477 + galen:Tissue + portion of tissue + tissue portion + simple tissue + uberon + UBERON:0000479 + + tissue + + + + + UMLS:C0040300 + ncithesaurus:Tissue + + + + + + + + + + + + + + Anatomical structure consisting of at least two non-overlapping organs, multi-tissue aggregates or portion of tissues or cells of different types that does not constitute an organism, organ, multi-tissue aggregate, or portion of tissue. + Will be obsoleted in v2 of CARO [https://github.com/obophenotype/caro/issues/2] + AAO:0010008 + AEO:0000054 + BILA:0000054 + CARO:0000054 + EHDAA2:0003054 + HAO:0000054 + TAO:0001512 + TGMA:0001846 + VHOG:0001724 + XAO:0003001 + ZFA:0001512 + uberon + UBERON:0000480 + + anatomical group + + + + + + + + + + + + + + + + + + + + + + + Portion of tissue, that consists of one or more layers of epithelial cells connected to each other by cell junctions and which is underlain by a basal lamina. Examples: simple squamous epithelium, glandular cuboidal epithelium, transitional epithelium, myoepithelium[CARO]. + The two basic types of metazoan tissue are epithelial and connective. The simplest metazoans, and developmental stages of many primitive invertebrates, consist solely of these two layers. Thus, epithelial and connective tissues may be the primary (original) tissues of metazoans, and both are important in the functional organization of animals.[well established][VHOG] + epithelial + + + + + AAO:0000144 + AAO:0010055 + AEO:0000066 + BILA:0000066 + BTO:0000416 + CALOHA:TS-0288 + CARO:0000066 + EHDAA2:0003066 + EMAPA:32738 + FBbt:00007005 + FMA:9639 + GAID:402 + HAO:0000066 + MA:0003060 + MESH:A10.272 + TAO:0001486 + UMLS:C0014609 + VHOG:0000387 + XAO:0003045 + ZFA:0001486 + epithelial tissue + portion of epithelium + uberon + UBERON:0000483 + + + epithelium + + + + + + The two basic types of metazoan tissue are epithelial and connective. The simplest metazoans, and developmental stages of many primitive invertebrates, consist solely of these two layers. Thus, epithelial and connective tissues may be the primary (original) tissues of metazoans, and both are important in the functional organization of animals.[well established][VHOG] + 2012-09-17 + VHOG:0000387 + VHOG + + ISBN:978-0030259821 Ruppert EE, Fox RS, Barnes RD, Invertebrate zoology: a functional evolutionary approach (2003) p.59 + + + + + UMLS:C0014609 + ncithesaurus:Epithelium + + + + + + + + + Epithelium which consists of more than one layer of epithelial cells that may or may not be in contact with a basement membrane. Examples: keratinized stratified squamous epithelium, ciliated stratified columnar epithelium.[FMA] + Epithelium that consists of more than one layer of epithelial cells.[CARO] + + + + + AAO:0010059 + AEO:0000069 + BILA:0000069 + BTO:0002074 + CARO:0000069 + EHDAA2:0003069 + FMA:45562 + HAO:0000069 + TAO:0001494 + UMLS:C0682575 + XAO:0004006 + ZFA:0001494 + stratified epithelium + uberon + laminated epithelium + UBERON:0000486 + + + multilaminar epithelium + + + + + Epithelium that consists of more than one layer of epithelial cells.[CARO] + 2012-06-20 + CARO:0000069 + CARO + CARO:MAH + FMA:45562 + + + + + UMLS:C0682575 + ncithesaurus:Stratified_Epithelium + + + + + + + + + Epithelium which consists of a single layer of epithelial cells. Examples: endothelium, mesothelium, glandular squamous epithelium.[FMA] + consider adding disjointness axiom between unilaminar and multilaminar - but note that this will render EHDAA2:0003244 (chorionic trophoblast) unsatisfiable + Epithelium that consists of a single layer of epithelial cells.[CARO] + + + + AAO:0010062 + AEO:0000073 + BILA:0000073 + BTO:0002073 + CARO:0000073 + EHDAA2:0003073 + FMA:45561 + HAO:0000073 + TAO:0001495 + UMLS:C0682574 + XAO:0004007 + ZFA:0001495 + simple epithelium + uberon + UBERON:0000490 + + unilaminar epithelium + + + + + Epithelium that consists of a single layer of epithelial cells.[CARO] + 2012-06-20 + CARO:0000073 + CARO + CARO:MAH + FMA:45561 + + + + + UMLS:C0682574 + ncithesaurus:Simple_Epithelium + + + + + + + + + + + + + + + The subdivision of the vertebrate body between the thorax and pelvis. The ventral part of the abdomen contains the abdominal cavity and visceral organs. The dorsal part includes the abdominal section of the vertebral column. + Vertebrate specific. In arthropods 'abdomen' is the most distal section of the body which lies behind the thorax or cephalothorax. If need be we can introduce some grouping class + abdominal + celiac + + + BTO:0000020 + CALOHA:TS-0001 + EFO:0000968 + EMAPA:35102 + EV:0100011 + FMA:9577 + GAID:16 + MA:0000029 + MAT:0000298 + MESH:A01.047 + MIAA:0000298 + OpenCyc:Mx4rvVjgyZwpEbGdrcN5Y29ycA + galen:Abdomen + abdominopelvic region + abdominopelvis + uberon + adult abdomen + belly + celiac region + UBERON:0000916 + + + abdomen + + + + + + + + + Anatomical system that consists of the glands and parts of glands that produce endocrine secretions and help to integrate and control bodily metabolic activity. + Anatomical system containing glands which regulates bodily functions though the secretion of hormones.[AAO] + Multicellular organisms have complex endocrine systems, allowing responses to environmental stimuli, regulation of development, reproduction, and homeostasis. Nuclear receptors (NRs), a metazoan-specific family of ligand-activated transcription factors, play central roles in endocrine responses, as intermediates between signaling molecules and target genes. The NR family includes ligand-bound and orphan receptors, that is, receptors with no known ligand or for which there is no ligand Pocket. Understanding NR evolution has been further improved by comparison of several completed genomes, particularly those of deuterostomes and ecdysozoans. In contrast, evolution of NR ligands is still much debated. One hypothesis proposes that several independent gains and losses of ligand-binding ability in NRs occurred in protostomes and deuterostomes. A second hypothesis, pertaining to the NR3 subfamily (vertebrate steroid hormone receptors and estrogen related receptor), proposes that before the divergence of protostomes and deuterostomes, there was an ancestral steroid receptor (AncSR) that was ligand-activated and that orphan receptors secondarily lost the ability to bind a ligand. (...) Our analysis reveals that steroidogenesis has been independently elaborated in the 3 main bilaterian lineages (...).[well established][VHOG] + endocrine + + + + + AAO:0010279 + CALOHA:TS-1301 + EFO:0002969 + EHDAA2:0002224 + EMAPA:35306 + EV:0100128 + FBbt:00005068 + FMA:9668 + GAID:439 + MA:0000012 + MESH:A06 + TAO:0001158 + UMLS:C0014136 + VHOG:0000098 + XAO:0000158 + ZFA:0001158 + endocrine glandular system + endocrine system + systema endocrinum + uberon + UBERON:0000949 + + + + endocrine system + + + + + Anatomical system containing glands which regulates bodily functions though the secretion of hormones.[AAO] + 2012-06-20 + AAO:0010279 + AAO + AAO:BJB + + + + + Multicellular organisms have complex endocrine systems, allowing responses to environmental stimuli, regulation of development, reproduction, and homeostasis. Nuclear receptors (NRs), a metazoan-specific family of ligand-activated transcription factors, play central roles in endocrine responses, as intermediates between signaling molecules and target genes. The NR family includes ligand-bound and orphan receptors, that is, receptors with no known ligand or for which there is no ligand Pocket. Understanding NR evolution has been further improved by comparison of several completed genomes, particularly those of deuterostomes and ecdysozoans. In contrast, evolution of NR ligands is still much debated. One hypothesis proposes that several independent gains and losses of ligand-binding ability in NRs occurred in protostomes and deuterostomes. A second hypothesis, pertaining to the NR3 subfamily (vertebrate steroid hormone receptors and estrogen related receptor), proposes that before the divergence of protostomes and deuterostomes, there was an ancestral steroid receptor (AncSR) that was ligand-activated and that orphan receptors secondarily lost the ability to bind a ligand. (...) Our analysis reveals that steroidogenesis has been independently elaborated in the 3 main bilaterian lineages (...).[well established][VHOG] + 2012-09-17 + VHOG:0000098 + VHOG + + DOI:10.1073/pnas.0812138106 Markov GV, Tavares R, Dauphin-Villemant C, Demeneix BA, Baker ME, Laudet V, Independent elaboration of steroid hormone signaling pathways in metazoans. PNAS (2009) + + + + + UMLS:C0014136 + ncithesaurus:Endocrine_System + + + + + + + + + organ system that passes nutrients (such as amino acids and electrolytes), gases, hormones, blood cells, etc. to and from cells in the body to help fight diseases and help stabilize body temperature and pH to maintain homeostasis[WP]. + the cardiovascular system and the lymphatic system are parts of the circulatory system + + Anatomical system of ion binding, a pumping mechanism, and an efficient vascular system; consisting of the blood, heart, and blood and lymph vessels, respectively.[AAO] + We should divest ourselves of the view that earlier vertebrate groups were 'on their way' to becoming mammals, as clearly they were not such visionaries. Neither were their systems 'imperfect' as earlier anatomists thought. Instead, their circulatory systems served them well to address the ecological demands arising from their lifestyles.[well established][VHOG] + + AAO:0000959 + CALOHA:TS-2103 + FBbt:00005057 + OpenCyc:Mx4rvVjzG5wpEbGdrcN5Y29ycA + VHOG:0001248 + uberon + systema cardiovasculare + UBERON:0001009 + + circulatory system + + + + + + + + WBbt coelomocyte currently classified as circulating cell + + + + + Anatomical system of ion binding, a pumping mechanism, and an efficient vascular system; consisting of the blood, heart, and blood and lymph vessels, respectively.[AAO] + 2012-06-20 + AAO:0000959 + AAO + AAO:BJB + + + + + We should divest ourselves of the view that earlier vertebrate groups were 'on their way' to becoming mammals, as clearly they were not such visionaries. Neither were their systems 'imperfect' as earlier anatomists thought. Instead, their circulatory systems served them well to address the ecological demands arising from their lifestyles.[well established][VHOG] + 2012-09-17 + VHOG:0001248 + VHOG + + ISBN:978-0072528305 Kardong KV, Vertebrates: Comparative Anatomy, Function, Evolution (2006) p.493 + + + + + systema cardiovasculare + + + + + + + + + + + + + + + + A subdivision of the muscular system. + In FMA this is classified as a set of organs. ZFA musculature system has subtypes, so it is classified here. WBbt muscular system has subtypes so it goes here. Note that we use the MA term set of skeletal muscles here as it seems most appropriate (*not* MA:musculature). AAO is generally confused here. + + + + AAO:0011066 + BTO:0000887 + EFO:0001949 + EMAPA:32715 + EMAPA:35577 + FMA:32558 + MA:0000165 + OpenCyc:Mx4rvVjmr5wpEbGdrcN5Y29ycA + TAO:0000548 + UMLS:C0026845 + VSAO:0005038 + WBbt:0005737 + ZFA:0000548 + muscle group + muscles set + musculature + musculi + set of muscles + set of skeletal muscles + uberon + muscle system + muscles + musculature system + UBERON:0001015 + + + + musculature + + + + + + In FMA this is classified as a set of organs. ZFA musculature system has subtypes, so it is classified here. WBbt muscular system has subtypes so it goes here. Note that we use the MA term set of skeletal muscles here as it seems most appropriate (*not* MA:musculature). AAO is generally confused here. + FMA + + + + + UMLS:C0026845 + ncithesaurus:Muscle + + + + + musculi + + + + + + + + + + The nervous system is an organ system containing predominantly neuron and glial cells. In bilaterally symmetrical organism, it is arranged in a network of tree-like structures connected to a central body. The main functions of the nervous system are to regulate and control body functions, and to receive sensory input, process this information, and generate behavior [CUMBO]. + A regulatory system of the body that consists of neurons and neuroglial cells. The nervous system is divided into two parts, the central nervous system (CNS) and the peripheral nervous system (PNS). (Source: BioGlossary, www.Biology-Text.com)[TAO] + Anatomical system consisting of nerve bodies and nerve fibers which regulate the response of the body to external and internal stimuli.[AAO] + Nervous systems evolved in the ancestor of Eumetazoa.[well established][VHOG] + nervous + neural + + + + + + + AAO:0000324 + BILA:0000079 + BTO:0001484 + CALOHA:TS-1313 + EFO:0000802 + EHDAA2:0001246 + EHDAA:826 + EMAPA:16469 + EV:0100162 + FBbt:00005093 + FMA:7157 + GAID:466 + MA:0000016 + MAT:0000026 + MESH:A08 + MIAA:0000026 + OpenCyc:Mx4rvViT_pwpEbGdrcN5Y29ycA + TAO:0000396 + UMLS:C0027763 + VHOG:0000402 + WBbt:0005735 + XAO:0000177 + ZFA:0000396 + neurological system + nerve net + uberon + systema nervosum + UBERON:0001016 + + + + + nervous system + + + + + + + A regulatory system of the body that consists of neurons and neuroglial cells. The nervous system is divided into two parts, the central nervous system (CNS) and the peripheral nervous system (PNS). (Source: BioGlossary, www.Biology-Text.com)[TAO] + 2012-08-14 + TAO:0000396 + TAO + ZFIN:curator + + + + + Anatomical system consisting of nerve bodies and nerve fibers which regulate the response of the body to external and internal stimuli.[AAO] + 2012-06-20 + AAO:0000324 + AAO + AAO:BJB + + + + + Nervous systems evolved in the ancestor of Eumetazoa.[well established][VHOG] + 2012-09-17 + VHOG:0000402 + VHOG + + ISBN:978-0198566694 Schmidt-Rhaesa A, The evolution of organ systems (2007) p.117 + + + + + UMLS:C0027763 + ncithesaurus:Nervous_System + + + + + systema nervosum + + + + + + + + + + + + + + + + + + + + + + + + + + + the thick outer layer of the adrenal gland that produces and secretes steroid hormones such as corticosterone, estrone and aldosterone + All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues (medulla), but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG] + Kardong states that mammals are the first to have distinct cortext and medulla, but this contradicts XAO + + + + + AAO:0011009 + BTO:0000045 + CALOHA:TS-0015 + EFO:0000237 + EMAPA:18427 + EV:0100136 + FMA:15632 + GAID:447 + MA:0000118 + MAT:0000494 + MESH:A06.407.071.140 + UMLS:C0001613 + VHOG:0001481 + XAO:0000165 + adrenal gland cortex + cortex (glandula suprarenalis) + cortex of adrenal gland + cortex of suprarenal gland + suprarenal cortex + uberon + cortex glandulae suprarenalis + suprarenal + UBERON:0001235 + + + adrenal cortex + + + + + + + All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues (medulla), but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG] + 2012-09-17 + VHOG:0001481 + VHOG + + ISBN:978-0030223693 Liem KF, Bemis WE, Walker WF, Grande L, Functional Anatomy of the Vertebrates: An Evolutionary Perspective (2001) p.518 and Figure 15-9 + + + + + UMLS:C0001613 + ncithesaurus:Adrenal_Cortex + + + + + cortex glandulae suprarenalis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Anatomical system that is a multi-element, multi-tissue anatomical cluster that consists of the skeleton and the articular system. + Anatomical system consisting of multiple elements and tissues that provides physical support.[TAO] + Anatomical system that is a multi-element, multi-tissue anatomical cluster that consists of the skeleton and the articular system.[VSAO] + System that provides physical support to the organism.[AAO] + By taking a holistic approach, integration of the evidence from molecular and developmental features of model organisms, the phylogenetic distribution in the 'new animal phylogeny' and the earliest fossilized remains of mineralized animal skeletons suggests independent origins of the skeleton at the phylum level.[debated][VHOG] + skeletal + GO defines skeletal system very generically: The skeleton is the bony framework of the body in vertebrates (endoskeleton) or the hard outer envelope of insects (exoskeleton or dermoskeleton) GO:0001501; however, all annotations are to vertebrates + + + AAO:0000566 + BTO:0001486 + CALOHA:TS-1320 + EFO:0000806 + EHDAA2:0003168 + EMAPA:35773 + FMA:23881 + MA:0000018 + OpenCyc:Mx4rvVi1rpwpEbGdrcN5Y29ycA + TAO:0000434 + UMLS:C0037253 + VHOG:0001254 + VSAO:0000027 + XAO:0003060 + ZFA:0000434 + skeleton system + set of all bones and joints + uberon + Skelettsystem + UBERON:0001434 + + + + skeletal system + https://github.com/obophenotype/uberon/wiki/The-skeletal-system + + + + + Anatomical system consisting of multiple elements and tissues that provides physical support.[TAO] + 2012-08-14 + TAO:0000434 + TAO + TAO:wd + + + + + Anatomical system that is a multi-element, multi-tissue anatomical cluster that consists of the skeleton and the articular system.[VSAO] + 2012-08-14 + VSAO:0000027 + VSAO + PSPUB:0000170 + + + + + System that provides physical support to the organism.[AAO] + 2012-06-20 + AAO:0000566 + AAO + AAO:LAP + + + + + By taking a holistic approach, integration of the evidence from molecular and developmental features of model organisms, the phylogenetic distribution in the 'new animal phylogeny' and the earliest fossilized remains of mineralized animal skeletons suggests independent origins of the skeleton at the phylum level.[debated][VHOG] + 2012-09-17 + VHOG:0001254 + VHOG + + DOI:10.1159/000324245 Donoghue PCJ, Sansom IJ, Origin and early evolution of vertebrate skeletonization. Microscopy research and technique (2002) + + + + + GO defines skeletal system very generically: The skeleton is the bony framework of the body in vertebrates (endoskeleton) or the hard outer envelope of insects (exoskeleton or dermoskeleton) GO:0001501; however, all annotations are to vertebrates + GO + + + + + UMLS:C0037253 + ncithesaurus:Skeletal_System + + + + + set of all bones and joints + + + + + + + + + + Outermost layer of an organ[WP]. + cortical + this class is used more generically than in FMA, and includes e.g. cortex of hair + + EFO:0000383 + EHDAA:9344 + FMA:61109 + galen:Cortex + cortex + cortex of organ + uberon + UBERON:0001851 + + + cortex + + + + + this class is used more generically than in FMA, and includes e.g. cortex of hair + FMA + + + + + + + + + + + + + + + Organism subdivision which is the part of the body posterior to the cervical region (or head, when cervical region not present) and anterior to the caudal region. Includes the sacrum when present. + Organism subdivision that is the part of the body posterior to the head and anterior to the tail.[AAO] + Organism subdivision which is the part of the body posterior to the head and anterior to the tail.[TAO] + + + + + AAO:0010339 + BILA:0000116 + BTO:0001493 + CALOHA:TS-1071 + EFO:0000966 + EMAPA:31857 + FMA:7181 + MA:0000004 + MAT:0000296 + MIAA:0000296 + OpenCyc:Mx4rvVkJjpwpEbGdrcN5Y29ycA + TAO:0001115 + UMLS:C0460005 + XAO:0000054 + XAO:0003025 + ZFA:0001115 + galen:Trunk + thoracolumbar region + torso + trunk region + uberon + Rumpf + UBERON:0002100 + + + + trunk + + + + + Organism subdivision that is the part of the body posterior to the head and anterior to the tail.[AAO] + 2012-06-20 + AAO:0010339 + AAO + AAO:BJB + + + + + Organism subdivision which is the part of the body posterior to the head and anterior to the tail.[TAO] + 2012-08-14 + TAO:0001115 + TAO + ZFIN:curator + + + + + UMLS:C0460005 + ncithesaurus:Trunk + + + + + + + + + + + + + + + Anatomical system that consists of the muscular and skeletal systems. + Anatomical system that provides locomotion and physical support to the organism.[AAO] + There are more than 50,000 extant vertebrate species, representing over 500 million years of evolution. During that time, the vertebrate musculoskeletal systems have adapted to aquatic, terrestrial, fossorial, and arboreal lifestyles, while simultaneously retaining functionally integrated axial and appendicular skeletal systems.[well established][VHOG] + musculoskeletal + + + + + AAO:0010546 + CALOHA:TS-1311 + EMAPA:32714 + EV:0100139 + FMA:7482 + GAID:98 + MA:0002418 + MESH:A02 + OpenCyc:Mx4rQRpVNgAKEdyHxgDggVfs8g + UMLS:C0026860 + VHOG:0001275 + VSAO:0000031 + XAO:0000168 + musculo-skeletal system + uberon + UBERON:0002204 + + musculoskeletal system + + + + + Anatomical system that provides locomotion and physical support to the organism.[AAO] + 2012-06-20 + AAO:0010546 + AAO + AAO:EJS + + + + + There are more than 50,000 extant vertebrate species, representing over 500 million years of evolution. During that time, the vertebrate musculoskeletal systems have adapted to aquatic, terrestrial, fossorial, and arboreal lifestyles, while simultaneously retaining functionally integrated axial and appendicular skeletal systems.[well established][VHOG] + 2012-09-17 + VHOG:0001275 + VHOG + + DOI:10.1002/jez.b.21246 Shearman RM, Burke AC, The lateral somitic frontier in ontogeny and phylogeny. Journal of Experimental Zoology (2009) + + + + + UMLS:C0026860 + ncithesaurus:Musculoskeletal_System + + + + + + + + + + + + + + + + + + + + + + + + + + Set of all muscles in abdomen. + distinction between abdomen muscle and abdomen musculature + FMA:71294 + FMA:86917 + TAO:0001327 + ZFA:0001327 + abdominal musculature + muscle group of abdomen + muscles of abdomen + musculature of abdomen + musculature of abdominal wall + set of muscles of abdomen + uberon + UBERON:0002343 + + abdomen musculature + + + + + + + + + + + + + + + + + + + + + + + + + + Endocrine glands are glands of the endocrine system that secrete their products directly into the circulatory system rather than through a duct.[WP, modified]. + + + + + AEO:0000098 + BTO:0001488 + CALOHA:TS-1300 + EHDAA2:0003098 + EMAPA:35999 + FMA:9602 + GAID:335 + MA:0002563 + MESH:A06.407 + OpenCyc:Mx4rvbkiRZwpEbGdrcN5Y29ycA + UMLS:C0014133 + ductless gland + glandula endocrina + uberon + ductless gland + glandulae endocrinae + UBERON:0002368 + + + endocrine gland + + + + + + UMLS:C0014133 + ncithesaurus:Endocrine_Gland + + + + + glandulae endocrinae + + + + + + + + + + + + + + + + + + + + + + Either of a pair of complex endocrine organs near the anterior medial border of the kidney consisting of a mesodermal cortex that produces glucocorticoid, mineralocorticoid, and androgenic hormones and an ectodermal medulla that produces epinephrine and norepinephrine[BTO]. + Anatomical structure which is found on the surface of the kidney and secretes various hormones including epinephrine, norephinephrine, aldosterone, corticosterone, and cortisol.[AAO] + All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues, but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG] + The origin of the adrenal gland is still controversial. It is thought to share the same origin as the kidney and gonads, derived from coelomic epithelium of the urogenital ridge and/or the underlying mesenchyme (Keegan and Hammer, 2002; Morohashi, 1997). We follow Kardong and state homology at the level of the cortex and medulla rather than gland as a whole + suprarenal cortex manufactures corticosteroids; suprarenal medulla manufactures epinephrine and norepinephrine; suprarenal medulla receives preganglionic sympathetic innervation from the greater thoracic splanchnic n. + + + + + AAO:0010551 + BTO:0000047 + CALOHA:TS-0016 + EFO:0000238 + EMAPA:18426 + EV:0100135 + FMA:9604 + GAID:446 + MA:0000116 + MAT:0000071 + MESH:A06.407.071 + MIAA:0000071 + OpenCyc:Mx4rvXYiz5wpEbGdrcN5Y29ycA + UMLS:C0001625 + VHOG:0001141 + XAO:0000164 + galen:AdrenalGland + glandula adrenalis + glandula suprarenalis + uberon + adrenal + adrenal capsule + adrenal medulla cell + atrabiliary capsule + epinephric gland + epinephros + glandula suprarenalis + interrenal gland + suprarenal capsule + suprarenal gland + UBERON:0002369 + + + adrenal gland + + + + + + + UMLS:C0001625 + ncithesaurus:Adrenal_Gland + + + + + glandula adrenalis + + + + + + glandula suprarenalis + + + + + + interrenal gland + + + + + + Anatomical structure which is found on the surface of the kidney and secretes various hormones including epinephrine, norephinephrine, aldosterone, corticosterone, and cortisol.[AAO] + 2012-06-20 + AAO:0010551 + AAO + AAO:BJB + + + + + All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues, but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG] + 2012-09-17 + VHOG:0001141 + VHOG + + ISBN:978-0030223693 Liem KF, Bemis WE, Walker WF, Grande L, Functional Anatomy of the Vertebrates: An Evolutionary Perspective (2001) p.518 and Figure 15-9 + + + + + + + + + + + + + + + An organ system that protects the body from damage, forming the bounding layer of the organism and comprising the outer epithelial layer and any associated adnexa. In vertebrates, the integumental system consists of the epidermis, dermis plus associated glands and adnexa such as hair and scales. In invertebrates, the integumental system may include cuticle. + (...) the integument of many tetrapods is reinforced by a morphologically and structurally diverse assemblage of skeletal elements. These elements are widely understood to be derivatives of the once all-encompassing dermal skeleton of stem-gnathostomes (...).[well established][VHOG] + UBERON:0007029 + + + + + AEO:0000154 + BILA:0000118 + CALOHA:TS-1299 + CARO:0002001 + EFO:0000807 + EHDAA2:0000836 + EHDAA2_RETIRED:0003154 + EHDAA:6520 + EMAPA:17524 + EV:0100151 + FBbt:00004969 + FMA:72979 + HAO:0000421 + MA:0000014 + MAT:0000033 + MESH:A17 + MIAA:0000033 + TADS:0000108 + UMLS:C0037267 + VHOG:0000403 + XAO:0000176 + galen:Surface + integumentary system + uberon + body surface + dermal system + external covering of organism + integumentum commune + organism surface + surface + UBERON:0002416 + + + integumental system + + + + + (...) the integument of many tetrapods is reinforced by a morphologically and structurally diverse assemblage of skeletal elements. These elements are widely understood to be derivatives of the once all-encompassing dermal skeleton of stem-gnathostomes (...).[well established][VHOG] + 2012-09-17 + VHOG:0000403 + VHOG + + DOI:10.1111/j.1469-7580.2008.01043.x Vickaryous MK, Sire JY, The integumentary skeleton of tetrapods: origin, evolution, and development. J Anat (2009) + + + + + UMLS:C0037267 + ncithesaurus:Integumentary_System + + + + + integumentum commune + + + + + + + + + + + The abdominal segment of the torso. + + + EMAPA:35104 + FMA:259211 + MA:0000021 + uberon + abdomen/pelvis/perineum + lower body + lumbar region + UBERON:0002417 + abdominal segment of trunk + + + + + + + + + an organ that functions as a secretory or excretory organ + glandular + UBERON:MIAA_0000021 + + + + + AAO:0000212 + AEO:0000096 + BTO:0000522 + EFO:0000797 + EHDAA2:0003096 + EHDAA:2161 + EHDAA:4475 + EHDAA:6522 + EMAPA:18425 + FBbt:00100317 + FMA:86294 + HAO:0000375 + MA:0003038 + MAT:0000021 + MIAA:0000021 + OpenCyc:Mx4rwP3vyJwpEbGdrcN5Y29ycA + UMLS:C1285092 + WikipediaCategory:Glands + galen:Gland + uberon + Druese + glandula + UBERON:0002530 + + + gland + + + + + + UMLS:C1285092 + ncithesaurus:Gland + + + + + glandula + + + + + + + + + + + + + + + + + + + + + + + + + + Anatomical structure that overlaps the outer epithelial layer and is adjacent to the space surrounding the organism. + Organism subdivision which is the collection of anatomical structures on the body surface.[ZFA] + + AAO:0010337 + AEO_RETIRED:0000010 + EHDAA2_RETIRED:0003010 + TAO:0000292 + VSAO:0000001 + XAO:0003028 + ZFA:0000292 + galen:SurfaceRegion + anatomical surface feature + uberon + surface feature + surface region + UBERON:0003102 + + surface structure + + + + + Organism subdivision which is the collection of anatomical structures on the body surface.[ZFA] + 2012-08-14 + TAO:0000292 + TAO + ZFIN:curator + + + + + + + + + + + + + + + + + + + + + + + + + + A gland that is part of a integumental system [Automatically generated definition]. + EHDAA2:0000837 + EHDAA:6522 + EMAPA:17758 + MA:0000144 + VHOG:0000654 + integumental gland + integumental system gland + integumentary gland + uberon + UBERON:0003297 + gland of integumental system + + + + + + + + + + + + + + + Anatomical cluster that consists of all the skeletal elements (eg., bone, cartilage, and teeth) of the body. + Anatomical cluster that consists of all the skeletal elements (eg., bone, cartilage, and teeth) of the body.[VSAO] + skeletal + + + AEO:0000168 + EHDAA2:0001843 + EHDAA:5047 + EMAPA:17213 + FMA:23875 + GAID:177 + MA:0003006 + MAT:0000032 + MESH:A02.835 + MIAA:0000032 + OpenCyc:Mx4rvVi1rpwpEbGdrcN5Y29ycA + VSAO:0000026 + XAO:0004053 + galen:Skeleton + set of all bones + set of bones of body + uberon + UBERON:0004288 + + + skeleton + https://github.com/obophenotype/uberon/wiki/The-skeletal-system + + + + + Anatomical cluster that consists of all the skeletal elements (eg., bone, cartilage, and teeth) of the body.[VSAO] + 2012-08-14 + VSAO:0000026 + VSAO + + + + + + + + + + + + + + + + + + + + + + + + + + Any collection of muscles that is part of a trunk [Automatically generated definition]. + AAO:0011572 + EFO:0003531 + FMA:50187 + muscle group of trunk + set of muscles of trunk + uberon + UBERON:0004479 + + musculature of trunk + + + + + + + + + + + + + + + + Anatomical system that consists of all the joints of the body. + + EMAPA:35150 + FMA:23878 + MA:0003007 + VSAO:0000181 + joint system + set of all joints of body + uberon + set of all joints + set of joints of body + UBERON:0004770 + articular system + + + + + + + + + + + + + + + + + + + + + + + + + + An organ or element that is in the abdomen. Examples: spleen, intestine, kidney, abdominal mammary gland. + + MA:0000522 + abdomen organ + uberon + UBERON:0005172 + + abdomen element + + + + + + + + + + + + + + + + + + + + + + + + + + An organ or element that is part of the adbominal segment of the organism. This region can be further subdivided into the abdominal cavity and the pelvic region. + MA:0000529 + abdominal segment organ + uberon + UBERON:0005173 + + abdominal segment element + + + + + + + + + + + + + + + + + + + + + + + + + + An organ or element that part of the trunk region. The trunk region can be further subdividied into thoracic (including chest and thoracic cavity) and abdominal (including abdomen and pelbis) regions. + MA:0000516 + trunk organ + uberon + UBERON:0005177 + + + trunk region element + + + + + + + + + + + + + + An acellular membrane that is part of the epithelium, lies adjacent to the epithelial cells, and is the fusion of the the basal lamina and the reticular lamina. + this class represents a continuous sheet of basement membrane which can underlie multiple epithelial cells over large regions. In contrast, the GO class 'basal membrane' represents a portion of substance on the scale of a single cell. + + + + + + AAO:0010596 + FMA:63872 + GAID:915 + UMLS:C0004799 + basement membrane of connective tissue + membrana basalis + uberon + basement membrane + UBERON:0005769 + basement membrane of epithelium + + + + + + + + + + + UMLS:C0004799 + ncithesaurus:Basement_Membrane + + + + + membrana basalis + + + + + + + + + + + + + + + + + This gland can either be a discrete structure located bilaterally above each kidney, or a cluster of cells in the head kidney that perform the functions of the adrenal gland. In either case, this organ consists of two cells types, aminergic chromaffin cells and steroidogenic cortical cells[GO] + keep this grouping class so long as it is required for GO + All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues, but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG] + VHOG:0001141 + adrenal gland - interrenal gland + adrenal gland/interrenal tissue + uberon + adrenal - interrenal gland + suprarenal gland - interrenal gland + UBERON:0006858 + + + adrenal/interrenal gland + + + + + All craniates have groups of cells homologous to the mammalian adrenocortical and chromaffin tissues, but they are scattered in and near the kidneys in fishes. (...) The cortical and chromaffin tissues come together to form adrenal glands in tetrapods.[well established][VHOG] + 2012-09-17 + VHOG:0001141 + VHOG + + ISBN:978-0030223693 Liem KF, Bemis WE, Walker WF, Grande L, Functional Anatomy of the Vertebrates: An Evolutionary Perspective (2001) p.518 and Figure 15-9 + + + + + + + + + + The epidermis is the entire outer epithelial layer of an animal, it may be a single layer that produces an extracellular material (e.g. the cuticle of arthropods) or a complex stratified squamous epithelium, as in the case of many vertebrate species[GO]. + this grouping class exists primarily to align with GO - see GO:0008544. + + BSA:0000073 + BTO:0000313 + FBbt:00004993 + HAO:0000298 + TADS:0000109 + WBbt:0005733 + epidermis + outer epidermal layer + outer epithelial layer + uberon + hypoderm + hypodermis + UBERON:0007376 + + outer epithelium + + + + + epidermis + + + + + + hypoderm + + + + + + hypodermis + + + + + + + + + + + + + + + + + FMA:25054 + region of trunk + trunk subdivision + uberon + UBERON:0009569 + + subdivision of trunk + + + + + + + + + + + + + + + + + + + + + + + + + + any of the organized aggregations of cells that function as secretory or excretory organs and that release hormones in response to neural stimuli + MA:0000720 + uberon + UBERON:0010133 + neuroendocrine gland + + + + + + + + + Epithelium that derives from the ectoderm. Examples: epithelium of acinus of lactiferous duct, subscapular lens epithelium, epithelium of posterior surface of cornea. + FMA:69064 + ectoderm-derived epithelium + uberon + UBERON:0010371 + ecto-epithelium + + + + + + + + + + + + + + + A major subdivision of an organism that divides an organism along its main body axis (typically anterio-posterior axis). In vertebrates, this is based on the vertebral column. + Ideally this would be disjoint with analagous class for appendicular axes, but currently 'appendages' like antennae, horns cause a problem + axial subdivision of organism + uberon + body segment + main body segment + UBERON:0011676 + + subdivision of organism along main body axis + + + + + + + + + A principle subdivision of an organism that includes all structures along the primary axis, typically the anterior-posterior axis, from head to tail, including structures of the body proper where present (for example, ribs), but excluding appendages. + uberon + UBERON:0013701 + main body axis + + + + + + + + + + + + + + + The region of the organism associated with the visceral organs. + Cardinal body part, which consists of a maximal set of diverse subclasses of organ and organ part spatially associated with the vertebral column and ribcage. Examples: There is only one body proper[FMA:231424]. + AEO:0000103 + BTO:0001489 + EMAPA:36031 + FMA:231424 + uberon + body + whole body + UBERON:0013702 + + body proper + + + + + Cardinal body part, which consists of a maximal set of diverse subclasses of organ and organ part spatially associated with the vertebral column and ribcage. Examples: There is only one body proper[FMA:231424]. + FMA:231424 + + + + + + + + + + + + + + + + + + + + + + + + + + Tissue that is part of some adrenal gland + TODO - describe typology of adrenal gland tissue used in this ontology + + UBERONTEMP:a7bf197b-0db2-467e-824e-be45b39e2672 + adrenal gland tissue + uberon + UBERON:0018303 + adrenal tissue + + + + + + + diff --git a/docs/examples/relaxed-enforced-obo.owl b/docs/examples/relaxed-enforced-obo.owl new file mode 100644 index 000000000..9ff2582eb --- /dev/null +++ b/docs/examples/relaxed-enforced-obo.owl @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + R + + + + + + + + + + + + + + A (Named Equivalent) + + + + + + + + A1 + + + + + + + + + + + + + + + + + + + B (SubClass example) + + + + + + + + B1 + + + + + + + + B2 + + + + + + + + + + + + + + + + + + + + C (Equivalent Simple Existential) + + + + + + + + C1 (Equivalent Simple Existential) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + E (Complex existential) + + + + + + + + E1 + + + + + + + + E2 + + + + + + + + E3 + + + + + + + + E4 + + + + + + + + E5 + + + + + + + + E6 + + + + + + + diff --git a/docs/examples/relaxed-exclude-named.owl b/docs/examples/relaxed-exclude-named.owl new file mode 100644 index 000000000..b3f54787b --- /dev/null +++ b/docs/examples/relaxed-exclude-named.owl @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + R + + + + + + + + + + + + + + A (Named Equivalent) + + + + + + + + A1 + + + + + + + + + + + + + + + + + + + B (SubClass example) + + + + + + + + B1 + + + + + + + + B2 + + + + + + + + + + + + + + + + + + + + C (Equivalent Simple Existential) + + + + + + + + C1 (Equivalent Simple Existential) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + E (Complex existential) + + + + + + + + E1 + + + + + + + + E2 + + + + + + + + E3 + + + + + + + + E4 + + + + + + + + E5 + + + + + + + + E6 + + + + + + + diff --git a/docs/examples/relaxed-include-subclass.owl b/docs/examples/relaxed-include-subclass.owl new file mode 100644 index 000000000..cf990a5b0 --- /dev/null +++ b/docs/examples/relaxed-include-subclass.owl @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + R + + + + + + + + + + + + + + A (Named Equivalent) + + + + + + + + A1 + + + + + + + + + + + + + + + + + + + + + + + + + + B (SubClass example) + + + + + + + + B1 + + + + + + + + B2 + + + + + + + + + + + + + + + + + + + + C (Equivalent Simple Existential) + + + + + + + + C1 (Equivalent Simple Existential) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + E (Complex existential) + + + + + + + + E1 + + + + + + + + E2 + + + + + + + + E3 + + + + + + + + E4 + + + + + + + + E5 + + + + + + + + E6 + + + + + + + diff --git a/docs/examples/relaxed2.owl b/docs/examples/relaxed2.owl new file mode 100644 index 000000000..6b228849b --- /dev/null +++ b/docs/examples/relaxed2.owl @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + R + + + + + + + + + + + + + E5 + + + + + + + + + + + + + + C (Equivalent Simple Existential) + + + + + + + + E2 + + + + + + + + E4 + + + + + + + + E6 + + + + + + + + B1 + + + + + + + + C1 (Equivalent Simple Existential) + + + + + + + + + + + + + + + + + + + B (SubClass example) + + + + + + + + + A1 + + + + + + + + B2 + + + + + + + + E1 + + + + + + + + A (Named Equivalent) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + E (Complex existential) + + + + + + + + E3 + + + + + + + diff --git a/docs/examples/report.tsv b/docs/examples/report.tsv index 671a44a20..ca8312a9b 100644 --- a/docs/examples/report.tsv +++ b/docs/examples/report.tsv @@ -2,6 +2,8 @@ Level Rule Name Subject Property Value ERROR missing_ontology_description http://purl.obolibrary.org/obo/uberon.owl dc:description ERROR missing_ontology_license http://purl.obolibrary.org/obo/uberon.owl dc:license ERROR missing_ontology_title http://purl.obolibrary.org/obo/uberon.owl dc:title +WARN invalid_xref BFO:0000051 oboInOwl:hasDbXref BFO-:0000051 +WARN invalid_xref BFO:0000062 oboInOwl:hasDbXref :0000062 WARN missing_definition BFO:0000050 IAO:0000115 WARN missing_definition BFO:0000051 IAO:0000115 WARN missing_definition BFO:0000063 IAO:0000115 diff --git a/docs/examples/template-base-filter.owl b/docs/examples/template-base-filter.owl index a961903d0..e463796ab 100644 --- a/docs/examples/template-base-filter.owl +++ b/docs/examples/template-base-filter.owl @@ -58,6 +58,15 @@ Weight of a mouse or rat in kilograms (kg). Rebecca C Jackson weight in kilograms + + + + + + + + + diff --git a/docs/examples/template-base.owl b/docs/examples/template-base.owl index a961903d0..e463796ab 100644 --- a/docs/examples/template-base.owl +++ b/docs/examples/template-base.owl @@ -58,6 +58,15 @@ Weight of a mouse or rat in kilograms (kg). Rebecca C Jackson weight in kilograms + + + + + + + + + diff --git a/docs/examples/template-drop-axiom-filter.owl b/docs/examples/template-drop-axiom-filter.owl index 5c14a517a..283b621cd 100644 --- a/docs/examples/template-drop-axiom-filter.owl +++ b/docs/examples/template-drop-axiom-filter.owl @@ -52,6 +52,15 @@ Weight of a mouse or rat in kilograms (kg). Rebecca C Jackson weight in kilograms + + + + + + + + + @@ -126,5 +135,5 @@ - + diff --git a/docs/examples/template-drop-axiom-remove.owl b/docs/examples/template-drop-axiom-remove.owl index 5c14a517a..3fd4d36c8 100644 --- a/docs/examples/template-drop-axiom-remove.owl +++ b/docs/examples/template-drop-axiom-remove.owl @@ -52,6 +52,15 @@ Weight of a mouse or rat in kilograms (kg). Rebecca C Jackson weight in kilograms + + + + + + + + + diff --git a/docs/examples/uberon_fragment.owl b/docs/examples/uberon_fragment.owl index 83a9116f0..ccf8beeb8 100644 --- a/docs/examples/uberon_fragment.owl +++ b/docs/examples/uberon_fragment.owl @@ -262,7 +262,7 @@ has_part - BFO:0000051 + BFO-:0000051 has_part has_part uberon @@ -276,7 +276,7 @@ preceded_by - BFO:0000062 + :0000062 X preceded_by Y iff: end(Y) before_or_simultaneous_with start(X) is preceded by preceded_by diff --git a/docs/relax.md b/docs/relax.md index 7ebceea48..8a56e2e6f 100644 --- a/docs/relax.md +++ b/docs/relax.md @@ -1,5 +1,14 @@ # Relax +## Contents + +1. [Overview](#overview) +1. [Exclude named classes from relax (`--exclude-named-classes`)](#exclude-named-classes) +1. [Relax subclass of axioms in addition to equivalents (`--include-subclass-of`)](#include-subclass-of) +1. [Enforce OBO format (`--enforce-obo-format`)](#enforce-obo-format) + +## Overview + Robot can be used to relax Equivalence Axioms to weaker SubClassOf axioms. The resulting axioms will be redundant with the stronger equivalence axioms, but may be useful for applications that only consume SubClassOf axioms Example: @@ -58,6 +67,75 @@ Running `reduce` will remove the redundant axiom (5), leaving the following axio This SubClassOf graph is complete and non-redundant, and can be used for intuitive visualization and browsing of the ontology +## Note about normalization of Qualified Number restrictions + +For convenience of downstream processing, `relax` rewrites expressions of the kind `:R min 1 :A` or `:R min 2 :A` to `:R some :A`. This is safe, because `:R some :A` is implied by any cardinality restriction > 0. + + + +## Exclude named classes (`--exclude-named-classes/-x`) + +By default, axioms of the form: + +``` +:A EquivalentTo :B +``` + +where `:A` and `:B` are named classes are not relaxed to be: + +``` +:A SubClassOf :B +:B SubClassOf :A +``` + +In some cases, this may be desired; in these cases, the `-x/--exclude-named-classes` can be set to `false`. + +Example to ensure that named classes are not relaxed (this is the default): + + robot relax --input relaxed2.owl --exclude-named-classes true --output results/relaxed-exclude-named.owl + + + +## Relax subclass of axioms (`--include-subclass-of/-s`) + +By default, relax is only concerned with relaxing `EquivalentClasses` axioms. However, some of the magic of the `relax` commmand is the simplification of complex conjunctive expressions, for example, as described above: + +``` +finger EquivalentTo digit and 'part of' some hand +``` +is relaxed to: +``` +finger SubClassOf digit +finger SubClassOf 'part of' some hand +``` + +In many cases it makes sense to also relax `SubClassOf` axioms this way. For example: + +``` +finger SubClassOf: digit and 'part of' some hand +``` + +can be relaxed to: + +``` +finger SubClassOf digit +finger SubClassOf 'part of' some hand +``` + +This can be achieved by setting the `--include-subclass-of` option to `true`. + +Example: + + robot relax --input relaxed2.owl --include-subclass-of true --output results/relaxed-include-subclass.owl + + + +## Enforce OBO format (`--enforce-obo-format/-x`) + +OBO format is a widely used representation for OBO ontologies. Its "graphy" nature lends itself as a simple intermediate towards graph-like representation of ontologies, such as obo-graphs JSON. For many use cases, we do not wish to assert non-graphy expressions such as `:R only :B` or `:A or :B`, expressions with nested sub-expressions such as `:R some (:S some B)` or similar. In cases where we only want to assert expressions that are simple existential restrictions, we can use the `--enforce-obo-format` option. This will process complex expressions (that potentially include _some_ complex and some _simple_ sub-expression), but only assert relaxed statements if they correspind to simple subexpression. + +Example: + robot relax --input relaxed2.owl --enforce-obo-format true --output results/relaxed-enforced-obo.owl diff --git a/docs/remove.md b/docs/remove.md index 1d17fffcb..2383646cc 100644 --- a/docs/remove.md +++ b/docs/remove.md @@ -230,13 +230,11 @@ Create a "base" subset by removing external axioms (alternatively, use `filter - --signature true \ --output results/filter_annotations.owl -Create a "base" subset in which axiom annotations involving IAO:0000117 and IAO:0000119 are removed: +Extracts a base module, then removing _all_ `oboInOwl:hasDbXref` annotations on the remaining axioms, and all `oboInOwl:hasDbXref` axiom annotations whose value matches the regular expression `GO.*`: - robot remove --input template.owl \ - --base-iri http://example.com/ \ + robot remove --input uberon_module.owl \ + --base-iri http://purl.obolibrary.org/obo/UBERON_ \ --axioms external \ - --drop-axiom-annotations IAO:0000117 \ - --drop-axiom-annotations IAO:0000119 \ - --output results/template-drop-axiom-remove.owl - - \ No newline at end of file + --drop-axiom-annotations oboInOwl:source=~'GO.*' \ + --drop-axiom-annotations oboInOwl:hasDbXref \ + --output results/filter_annotations_drop_axioms.owl diff --git a/docs/report_queries/duplicate_exact_synonym.md b/docs/report_queries/duplicate_exact_synonym.md index d30bc53fa..86263e070 100644 --- a/docs/report_queries/duplicate_exact_synonym.md +++ b/docs/report_queries/duplicate_exact_synonym.md @@ -1,8 +1,8 @@ # Duplicate Exact Synonym -**Problem:** Two entities share an exact synonym. This causes ambiguity. Excludes deprecated entities. +**Problem:** Two entities share an exact synonym (case-insensitive). This causes ambiguity. Excludes deprecated entities and synonyms annotated as abbreviation or acronym. -**Solution:** Avoid ambiguity by assigning unique exact synonyms or changing the exact synonym to a different annotation (e.g. broad synonym). +**Solution:** Avoid ambiguity by assigning unique exact synonyms, changing the exact synonym to a different annotation (e.g. broad synonym), or annotating it as an abbreviation or acronym. ```sparql PREFIX obo: @@ -10,18 +10,31 @@ PREFIX oboInOwl: PREFIX owl: PREFIX rdfs: -SELECT DISTINCT ?entity ?property ?value WHERE { - VALUES ?property { - obo:IAO_0000118 - oboInOwl:hasExactSynonym +SELECT DISTINCT ?entity ?property ?value +WHERE { + { + SELECT DISTINCT ?syn_std ?property (COUNT(DISTINCT ?entity) AS ?cnt) + WHERE { + VALUES ?property { obo:IAO_0000118 oboInOwl:hasExactSynonym } + ?entity ?property ?syn . + OPTIONAL { + VALUES ?syn_type { obo:OMO_0003000 obo:OMO_0003012 } + ?exclude a owl:Axiom ; + owl:annotatedSource ?entity ; + owl:annotatedProperty ?property ; + owl:annotatedTarget ?syn ; + oboInOwl:hasSynonymType ?syn_type . + } + + BIND(UCASE(?syn) AS ?syn_std) + FILTER (!isBlank(?entity) && !BOUND(?exclude)) + FILTER NOT EXISTS { ?entity owl:deprecated true } + } GROUP BY ?syn_std ?property HAVING (?cnt > 1) } - ?entity ?property ?value. - ?entity2 ?property ?value . - FILTER NOT EXISTS { ?entity owl:deprecated true } - FILTER NOT EXISTS { ?entity2 owl:deprecated true } - FILTER (?entity != ?entity2) + ?entity ?property ?value . FILTER (!isBlank(?entity)) - FILTER (!isBlank(?entity2)) + FILTER NOT EXISTS { ?entity owl:deprecated true } + FILTER (UCASE(?value) = ?syn_std) } ORDER BY DESC(UCASE(str(?value))) -``` +``` \ No newline at end of file diff --git a/docs/report_queries/invalid_xref.md b/docs/report_queries/invalid_xref.md index e3fca754b..a2ab3c4f5 100644 --- a/docs/report_queries/invalid_xref.md +++ b/docs/report_queries/invalid_xref.md @@ -11,7 +11,7 @@ PREFIX rdfs: SELECT DISTINCT ?entity ?property ?value WHERE { VALUES ?property {oboInOwl:hasDbXref} ?entity ?property ?value . - FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$")) + FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$")) FILTER (!isBlank(?entity)) } ORDER BY ?entity diff --git a/docs/report_queries/missing_subset_declaration.md b/docs/report_queries/missing_subset_declaration.md index 1ab62338f..1a67805f9 100644 --- a/docs/report_queries/missing_subset_declaration.md +++ b/docs/report_queries/missing_subset_declaration.md @@ -1,6 +1,6 @@ # Missing Subset Declaration -**Problem:** A subset is used in an annotation, but is not properly declared as a child of oboInOwl:SubsetProperty. This can cause problems with conversions to OBO format. +**Problem:** A subset is used in an annotation (via oboInOwl:inSubset), but is not properly declared as a child of oboInOwl:SubsetProperty. This can cause problems with conversions to OBO format, and should be avoided as all subsets should have metadata. **Solution:** Make the subset a child of oboInOwl:SubsetProperty. @@ -14,4 +14,4 @@ SELECT DISTINCT ?entity ?property ?value WHERE { FILTER NOT EXISTS { ?entity ?property oboInOwl:SubsetProperty } } ORDER BY ?entity -``` \ No newline at end of file +``` diff --git a/pom.xml b/pom.xml index ecbf1494d..ab8abdf0b 100644 --- a/pom.xml +++ b/pom.xml @@ -166,7 +166,7 @@ net.sourceforge.owlapi owlapi-api - 4.5.26 + 4.5.29 com.google.code.findbugs @@ -177,7 +177,7 @@ net.sourceforge.owlapi owlapi-apibinding - 4.5.26 + 4.5.29 com.google.code.findbugs @@ -188,7 +188,7 @@ net.sourceforge.owlapi owlapi-rio - 4.5.26 + 4.5.29 com.google.code.findbugs @@ -204,12 +204,12 @@ ch.qos.logback logback-classic - 1.2.13 + 1.5.6 org.slf4j log4j-over-slf4j - 1.7.32 + 2.0.13 au.csiro diff --git a/robot-command/src/main/java/org/obolibrary/robot/CommandLineHelper.java b/robot-command/src/main/java/org/obolibrary/robot/CommandLineHelper.java index 4c63a4793..5966d63d5 100644 --- a/robot-command/src/main/java/org/obolibrary/robot/CommandLineHelper.java +++ b/robot-command/src/main/java/org/obolibrary/robot/CommandLineHelper.java @@ -1121,4 +1121,36 @@ public static List getInputOntologies( } return inputOntologies; } + + /** + * Given an IOHelper and a list of unparsed patterns to select annotation assertions to be dropped + * build a Map of property IRIs, and value patterns for further processing. + * + * @param ioHelper the IOHelper to load the ontology with + * @param dropParameters The list of unparsed command line parameters describing the annotations + * to select + * @return A map of IRI to annotation value to drop + */ + public static Map createAnnotationToDropMap( + IOHelper ioHelper, List dropParameters) throws IOException { + Map annotationsToDrop = new HashMap<>(); + + for (String dropParameter : dropParameters) { + if (dropParameter.equalsIgnoreCase("all")) { + // ignore, we communicate this through the dropParameters list + } else if (dropParameter.contains("=")) { + String[] parts = dropParameter.split("="); + String annotationIRI = parts[0]; + String annotationValue = parts[1]; + IRI iri = + CommandLineHelper.maybeCreateIRI(ioHelper, annotationIRI, "drop-axiom-annotations"); + annotationsToDrop.put(iri, annotationValue); + } else { + IRI iri = + CommandLineHelper.maybeCreateIRI(ioHelper, dropParameter, "drop-axiom-annotations"); + annotationsToDrop.put(iri, null); + } + } + return annotationsToDrop; + } } diff --git a/robot-command/src/main/java/org/obolibrary/robot/FilterCommand.java b/robot-command/src/main/java/org/obolibrary/robot/FilterCommand.java index 3c1b65d37..aca9a5a91 100644 --- a/robot-command/src/main/java/org/obolibrary/robot/FilterCommand.java +++ b/robot-command/src/main/java/org/obolibrary/robot/FilterCommand.java @@ -2,8 +2,8 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import org.semanticweb.owlapi.apibinding.OWLManager; @@ -167,13 +167,9 @@ public CommandState execute(CommandState state, String[] args) throws Exception List dropParameters = CommandLineHelper.getOptionalValues(line, "drop-axiom-annotations"); - List annotationsToDrop = - dropParameters.stream() - .filter(s -> !s.equalsIgnoreCase("all")) - .map( - curie -> - CommandLineHelper.maybeCreateIRI(ioHelper, curie, "drop-axiom-annotations")) - .collect(Collectors.toList()); + + Map annotationsToDrop = + CommandLineHelper.createAnnotationToDropMap(ioHelper, dropParameters); // Use the select statements to get a set of objects to filter Set relatedObjects = diff --git a/robot-command/src/main/java/org/obolibrary/robot/RelaxCommand.java b/robot-command/src/main/java/org/obolibrary/robot/RelaxCommand.java index 423d809ac..655530fa4 100644 --- a/robot-command/src/main/java/org/obolibrary/robot/RelaxCommand.java +++ b/robot-command/src/main/java/org/obolibrary/robot/RelaxCommand.java @@ -1,6 +1,5 @@ package org.obolibrary.robot; -import java.util.Map; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import org.semanticweb.owlapi.model.OWLOntology; @@ -24,6 +23,21 @@ public RelaxCommand() { Options o = CommandLineHelper.getCommonOptions(); o.addOption("i", "input", true, "relax ontology from a file"); o.addOption("I", "input-iri", true, "relax ontology from an IRI"); + o.addOption( + null, + "enforce-obo-format", + true, + "if true, only axioms allowed in OBO format are asserted as a consequence of relax."); + o.addOption( + null, + "exclude-named-classes", + true, + "if true, equivalent class axioms between named classes are ignored during processing."); + o.addOption( + "s", + "include-subclass-of", + true, + "if true, equivalent class axioms between named classes are ignored during processing."); o.addOption("o", "output", true, "save relaxed ontology to a file"); options = o; } @@ -100,15 +114,13 @@ public CommandState execute(CommandState state, String[] args) throws Exception state = CommandLineHelper.updateInputOntology(ioHelper, state, line); OWLOntology ontology = state.getOntology(); - // Override default reasoner options with command-line options - Map relaxOptions = RelaxOperation.getDefaultOptions(); - for (String option : relaxOptions.keySet()) { - if (line.hasOption(option)) { - relaxOptions.put(option, line.getOptionValue(option)); - } - } + boolean enforceOboFormat = CommandLineHelper.getBooleanValue(line, "enforce-obo-format", false); + boolean excludeNamedClasses = + CommandLineHelper.getBooleanValue(line, "exclude-named-classes", true); + boolean includeSubclassOf = + CommandLineHelper.getBooleanValue(line, "include-subclass-of", false); - RelaxOperation.relax(ontology, relaxOptions); + RelaxOperation.relax(ontology, enforceOboFormat, excludeNamedClasses, includeSubclassOf); CommandLineHelper.maybeSaveOutput(line, ontology); diff --git a/robot-command/src/main/java/org/obolibrary/robot/RemoveCommand.java b/robot-command/src/main/java/org/obolibrary/robot/RemoveCommand.java index 81905de60..034e6046a 100644 --- a/robot-command/src/main/java/org/obolibrary/robot/RemoveCommand.java +++ b/robot-command/src/main/java/org/obolibrary/robot/RemoveCommand.java @@ -1,7 +1,6 @@ package org.obolibrary.robot; import java.util.*; -import java.util.stream.Collectors; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import org.semanticweb.owlapi.apibinding.OWLManager; @@ -157,13 +156,9 @@ public CommandState execute(CommandState state, String[] args) throws Exception List dropParameters = CommandLineHelper.getOptionalValues(line, "drop-axiom-annotations"); - List annotationsToDrop = - dropParameters.stream() - .filter(s -> !s.equalsIgnoreCase("all")) - .map( - curie -> - CommandLineHelper.maybeCreateIRI(ioHelper, curie, "drop-axiom-annotations")) - .collect(Collectors.toList()); + + Map annotationsToDrop = + CommandLineHelper.createAnnotationToDropMap(ioHelper, dropParameters); // Get the objects to remove Set relatedObjects = getObjects(line, ioHelper, ontology, selectGroups); diff --git a/robot-core/pom.xml b/robot-core/pom.xml index 9f94fa0b0..744da911b 100644 --- a/robot-core/pom.xml +++ b/robot-core/pom.xml @@ -86,7 +86,7 @@ net.sourceforge.owlapi owlapi-api - 4.5.26 + 4.5.29 com.google.code.findbugs @@ -97,7 +97,7 @@ net.sourceforge.owlapi owlapi-apibinding - 4.5.26 + 4.5.29 com.google.code.findbugs @@ -108,7 +108,7 @@ net.sourceforge.owlapi owlapi-rio - 4.5.26 + 4.5.29 com.google.code.findbugs diff --git a/robot-core/src/main/java/org/obolibrary/robot/OntologyHelper.java b/robot-core/src/main/java/org/obolibrary/robot/OntologyHelper.java index f6d96a716..21eeaca9b 100644 --- a/robot-core/src/main/java/org/obolibrary/robot/OntologyHelper.java +++ b/robot-core/src/main/java/org/obolibrary/robot/OntologyHelper.java @@ -4,6 +4,8 @@ import java.io.StringWriter; import java.util.*; import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.obolibrary.robot.checks.InvalidReferenceChecker; import org.obolibrary.robot.export.RendererType; import org.obolibrary.robot.providers.QuotedAnnotationValueShortFormProvider; @@ -1658,13 +1660,29 @@ public static void trimOntology(OWLOntology ontology) { * Removes all of the axiom annotations for the given annotation properties. * * @param ontology OWLOntology to remove axiom annotations - * @param properties Annotation property IRIs to remove related axiom annotations. + * @param properties List of annotation property IRIs to remove related axiom annotations. */ public static void removeAxiomAnnotations(OWLOntology ontology, List properties) { + Map annotationsToDrop = new HashMap<>(); + properties.forEach(iri -> annotationsToDrop.put(iri, null)); + removeAxiomAnnotations(ontology, annotationsToDrop); + } + + /** + * Removes all of the axiom annotations for the given annotation properties. + * + * @param ontology OWLOntology to remove axiom annotations + * @param properties Annotation property IRIs to remove related axiom annotations. + */ + public static void removeAxiomAnnotations( + OWLOntology ontology, Map annotationsToDrop) { OWLDataFactory owlDataFactory = ontology.getOWLOntologyManager().getOWLDataFactory(); - properties.stream() - .map(iri -> owlDataFactory.getOWLAnnotationProperty(iri)) - .forEach(p -> OntologyHelper.removeAxiomAnnotations(ontology, p)); + + for (IRI iri : annotationsToDrop.keySet()) { + OWLAnnotationProperty property = owlDataFactory.getOWLAnnotationProperty(iri); + String value = annotationsToDrop.get(iri); + OntologyHelper.removeAxiomAnnotations(ontology, property, value); + } } /** @@ -1674,11 +1692,57 @@ public static void removeAxiomAnnotations(OWLOntology ontology, List proper * @param property Annotation property to remove related axiom annotations. */ public static void removeAxiomAnnotations(OWLOntology ontology, OWLAnnotationProperty property) { + removeAxiomAnnotations(ontology, property, null); + } + + /** + * Removes all of the axiom annotations for the given annotation property and an optional value + * pattern The value pattern should follow + * https://robot.obolibrary.org/remove#pattern-subset-selectors + * + * @param ontology OWLOntology to remove axiom annotations + * @param property Annotation property to remove related axiom annotations. + * @param value a value or value pattern the restrict what is deleted. Can be null. + */ + public static void removeAxiomAnnotations( + OWLOntology ontology, OWLAnnotationProperty property, String value) { OWLOntologyManager manager = ontology.getOWLOntologyManager(); for (OWLAxiom axiom : ontology.getAxioms(Imports.EXCLUDED)) { - Set annotationsToRemove = axiom.getAnnotations(property); + Set annotationsToRemove = new HashSet<>(); + Set allAxiomAnnotations = axiom.getAnnotations(); + for (OWLAnnotation annotation : allAxiomAnnotations) { + if (annotation.getProperty().equals(property)) { + String annotationValue = getAnnotationValueAsStringOrNull(annotation); + if (value == null) { + // If there is no value set, we assume all annotations for the property should be + // removed + annotationsToRemove.add(annotation); + } else if (value.startsWith("~")) { + // If a value is set, and it starts with ~, we assume it is a regex pattern + String patternString = value.substring(1).replace("'", ""); + Pattern pattern = Pattern.compile(patternString); + Matcher matcher = pattern.matcher(annotationValue); + if (matcher.find()) { + annotationsToRemove.add(annotation); + } + } else { + // If a value is set, and it does not start with ~, we assume its an exact value + String processed_value = value.replace("'", ""); + if (annotationValue.equals(processed_value)) { + annotationsToRemove.add(annotation); + } else { + logger.warn( + "Annotation assertion value pattern must start with ~' to indicate a regex pattern" + + "or else correspond to the exact value. " + + "The value is: " + + value + + ". Other patterns are not supported."); + } + } + } + } if (!annotationsToRemove.isEmpty()) { - Set axiomAnnotations = axiom.getAnnotations(); + Set axiomAnnotations = new HashSet<>(allAxiomAnnotations); axiomAnnotations.removeAll(annotationsToRemove); OWLAxiom cleanedAxiom = axiom.getAxiomWithoutAnnotations().getAnnotatedAxiom(axiomAnnotations); @@ -1689,6 +1753,19 @@ public static void removeAxiomAnnotations(OWLOntology ontology, OWLAnnotationPro } } + private static String getAnnotationValueAsStringOrNull(OWLAnnotation annotation) { + OWLAnnotationValue v = annotation.getValue(); + if (v.isIRI()) { + return v.asIRI().get().toString(); + } else if (v.isLiteral()) { + return v.asLiteral().get().getLiteral().toString(); + } else if (v.isIndividual()) { + return v.asAnonymousIndividual().get().toString(); + } else { + return null; + } + } + /** * Removes all axiom annotations from the given ontology. * diff --git a/robot-core/src/main/java/org/obolibrary/robot/RelatedObjectsHelper.java b/robot-core/src/main/java/org/obolibrary/robot/RelatedObjectsHelper.java index 106dbb472..21dcbd12f 100644 --- a/robot-core/src/main/java/org/obolibrary/robot/RelatedObjectsHelper.java +++ b/robot-core/src/main/java/org/obolibrary/robot/RelatedObjectsHelper.java @@ -1417,6 +1417,14 @@ private static Set getAxiomSubjects(OWLAxiom axiom) { } else { iris.addAll(getIRIsFromEntities(subject.getSignature())); } + } else if (axiom instanceof OWLSubAnnotationPropertyOfAxiom) { + OWLSubAnnotationPropertyOfAxiom spAxiom = (OWLSubAnnotationPropertyOfAxiom) axiom; + OWLAnnotationProperty subject = spAxiom.getSubProperty(); + if (!subject.isAnonymous()) { + return Sets.newHashSet(subject.asOWLAnnotationProperty().getIRI()); + } else { + iris.addAll(getIRIsFromEntities(subject.getSignature())); + } } else if (axiom instanceof OWLEquivalentDataPropertiesAxiom) { OWLEquivalentDataPropertiesAxiom eqAxiom = (OWLEquivalentDataPropertiesAxiom) axiom; for (OWLSubDataPropertyOfAxiom spAxiom : eqAxiom.asSubDataPropertyOfAxioms()) { @@ -1492,6 +1500,54 @@ private static Set getAxiomSubjects(OWLAxiom axiom) { for (OWLObjectPropertyExpression expr : spcAxiom.getPropertyChain()) { iris.addAll(getIRIsFromEntities(expr.getSignature())); } + } else if (axiom instanceof OWLObjectPropertyCharacteristicAxiom) { + OWLObjectPropertyCharacteristicAxiom chAxiom = (OWLObjectPropertyCharacteristicAxiom) axiom; + OWLObjectPropertyExpression subject = chAxiom.getProperty(); + if (!subject.isAnonymous()) { + return Sets.newHashSet(subject.asOWLObjectProperty().getIRI()); + } else { + iris.addAll(getIRIsFromEntities(subject.getSignature())); + } + } else if (axiom instanceof OWLObjectPropertyDomainAxiom) { + OWLObjectPropertyDomainAxiom domainAxiom = (OWLObjectPropertyDomainAxiom) axiom; + OWLObjectPropertyExpression subject = domainAxiom.getProperty(); + if (!subject.isAnonymous()) { + return Sets.newHashSet(subject.asOWLObjectProperty().getIRI()); + } else { + iris.addAll(getIRIsFromEntities(subject.getSignature())); + } + } else if (axiom instanceof OWLObjectPropertyRangeAxiom) { + OWLObjectPropertyRangeAxiom rangeAxiom = (OWLObjectPropertyRangeAxiom) axiom; + OWLObjectPropertyExpression subject = rangeAxiom.getProperty(); + if (!subject.isAnonymous()) { + return Sets.newHashSet(subject.asOWLObjectProperty().getIRI()); + } else { + iris.addAll(getIRIsFromEntities(subject.getSignature())); + } + } else if (axiom instanceof OWLDataPropertyDomainAxiom) { + OWLDataPropertyDomainAxiom domainAxiom = (OWLDataPropertyDomainAxiom) axiom; + OWLDataPropertyExpression subject = domainAxiom.getProperty(); + if (!subject.isAnonymous()) { + return Sets.newHashSet(subject.asOWLDataProperty().getIRI()); + } else { + iris.addAll(getIRIsFromEntities(subject.getSignature())); + } + } else if (axiom instanceof OWLDataPropertyRangeAxiom) { + OWLDataPropertyRangeAxiom rangeAxiom = (OWLDataPropertyRangeAxiom) axiom; + OWLDataPropertyExpression subject = rangeAxiom.getProperty(); + if (!subject.isAnonymous()) { + return Sets.newHashSet(subject.asOWLDataProperty().getIRI()); + } else { + iris.addAll(getIRIsFromEntities(subject.getSignature())); + } + } else if (axiom instanceof OWLInverseObjectPropertiesAxiom) { + OWLInverseObjectPropertiesAxiom iopAxiom = (OWLInverseObjectPropertiesAxiom) axiom; + OWLObjectPropertyExpression subject = iopAxiom.getFirstProperty(); + if (!subject.isAnonymous()) { + return Sets.newHashSet(subject.asOWLObjectProperty().getIRI()); + } else { + iris.addAll(getIRIsFromEntities(subject.getSignature())); + } } else { logger.warn("Axiom type not supported: " + axiom.getClass().toString()); } @@ -2353,7 +2409,7 @@ private static void spanGapsHelper( * @param dropParameters list of drop-axiom-annotations parameters */ public static void dropAxiomAnnotations( - OWLOntology ontology, List annotationsToDrop, List dropParameters) { + OWLOntology ontology, Map annotationsToDrop, List dropParameters) { if (dropParameters.stream().anyMatch(x -> x.equalsIgnoreCase("all"))) { OntologyHelper.removeAllAxiomAnnotations(ontology); } else { diff --git a/robot-core/src/main/java/org/obolibrary/robot/RelaxOperation.java b/robot-core/src/main/java/org/obolibrary/robot/RelaxOperation.java index ab05ba031..51138dce4 100644 --- a/robot-core/src/main/java/org/obolibrary/robot/RelaxOperation.java +++ b/robot-core/src/main/java/org/obolibrary/robot/RelaxOperation.java @@ -17,6 +17,7 @@ import org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyManager; +import org.semanticweb.owlapi.model.OWLSubClassOfAxiom; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -89,6 +90,34 @@ public static Map getDefaultOptions() { * @param options A map of options for the operation */ public static void relax(OWLOntology ontology, Map options) { + relax(ontology); + } + + /** + * Replace EquivalentClass axioms with weaker SubClassOf axioms. + * + * @param ontology The OWLOntology to relax + */ + public static void relax(OWLOntology ontology) { + relax(ontology, false, false, false); + } + + /** + * Replace EquivalentClass axioms with weaker SubClassOf axioms. + * + * @param ontology The OWLOntology to relax + * @param enforceOboFormat if true, only axioms allowed in OBO format are asserted as a + * consequence of relax + * @param excludeNamedClasses if true, equivalent class axioms between named classes are ignored + * during processing + * @param includeSubclassOf if true, equivalent class axioms between named classes are ignored + * during processing + */ + public static void relax( + OWLOntology ontology, + boolean enforceOboFormat, + boolean excludeNamedClasses, + boolean includeSubclassOf) { OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); OWLDataFactory dataFactory = manager.getOWLDataFactory(); @@ -106,21 +135,28 @@ public static void relax(OWLOntology ontology, Map options) { OWLClass c = (OWLClass) x; // ax = EquivalentClasses(x y1 y2 ...) for (OWLClassExpression y : ax.getClassExpressionsMinus(c)) { - // limited structural reasoning: - // return (P some Z), if: - // - y is of the form (P some Z) - // - y is of the form ((P some Z) and ...), - // or any level of nesting - for (OWLObjectSomeValuesFrom svf : getSomeValuesFromAncestor(y, dataFactory)) { - newAxioms.add(dataFactory.getOWLSubClassOfAxiom(c, svf)); - } - for (OWLClass z : getNamedAncestors(y)) { - newAxioms.add(dataFactory.getOWLSubClassOfAxiom(c, z)); + // if we are excluding equivalents between named classes, skip + if (!y.isAnonymous() && excludeNamedClasses) { + continue; } + relaxExpression(c, y, newAxioms, enforceOboFormat, dataFactory); } } } } + if (includeSubclassOf) { + Set subClassAxioms = ontology.getAxioms(AxiomType.SUBCLASS_OF); + for (OWLSubClassOfAxiom ax : subClassAxioms) { + OWLClassExpression subClass = ax.getSubClass(); + OWLClassExpression superClass = ax.getSuperClass(); + // we only relax in cases where the subclass is a named class + // and the superclass a complex expression + if (!subClass.isAnonymous() && superClass.isAnonymous()) { + OWLClass namedSubClass = (OWLClass) subClass; + relaxExpression(namedSubClass, superClass, newAxioms, enforceOboFormat, dataFactory); + } + } + } // remove redundant axiom for (OWLAxiom ax : newAxioms) { @@ -129,6 +165,26 @@ public static void relax(OWLOntology ontology, Map options) { } } + private static void relaxExpression( + OWLClass namedSubClass, + OWLClassExpression anonymousSuperClass, + Set newAxioms, + boolean enforceOboFormat, + OWLDataFactory dataFactory) { + // limited structural reasoning: + // return (P some Z), if: + // - y is of the form (P some Z) + // - y is of the form ((P some Z) and ...), + // or any level of nesting + for (OWLObjectSomeValuesFrom svf : + getSomeValuesFromAncestor(anonymousSuperClass, enforceOboFormat, dataFactory)) { + newAxioms.add(dataFactory.getOWLSubClassOfAxiom(namedSubClass, svf)); + } + for (OWLClass z : getNamedAncestors(anonymousSuperClass)) { + newAxioms.add(dataFactory.getOWLSubClassOfAxiom(namedSubClass, z)); + } + } + /** * Given an OWLClassExpression y, return a set of OWLObjectSomeValuesFrom objects (p some v), * where (p some v) is a superclass of y. @@ -140,11 +196,13 @@ public static void relax(OWLOntology ontology, Map options) { * @return the set of OWLObjectSomeValuesFrom objects */ private static Set getSomeValuesFromAncestor( - OWLClassExpression x, OWLDataFactory dataFactory) { + OWLClassExpression x, boolean enforceOboFormat, OWLDataFactory dataFactory) { Set svfs = new HashSet<>(); if (x instanceof OWLObjectSomeValuesFrom) { OWLObjectSomeValuesFrom svf = (OWLObjectSomeValuesFrom) x; - svfs.add(svf); + if (!enforceOboFormat || isOboFormatConformant(svf)) { + svfs.add(svf); + } } else if (x instanceof OWLObjectCardinalityRestriction) { OWLObjectCardinalityRestriction ocr = (OWLObjectCardinalityRestriction) x; @@ -152,18 +210,24 @@ private static Set getSomeValuesFromAncestor( OWLObjectPropertyExpression p = ocr.getProperty(); if (ocr.getCardinality() > 0) { OWLObjectSomeValuesFrom svf = dataFactory.getOWLObjectSomeValuesFrom(p, filler); - svfs.add(svf); + if (!enforceOboFormat || isOboFormatConformant(svf)) { + svfs.add(svf); + } } } else if (x instanceof OWLObjectIntersectionOf) { for (OWLClassExpression op : ((OWLObjectIntersectionOf) x).getOperands()) { - svfs.addAll(getSomeValuesFromAncestor(op, dataFactory)); + svfs.addAll(getSomeValuesFromAncestor(op, enforceOboFormat, dataFactory)); } } return svfs; } + private static boolean isOboFormatConformant(OWLObjectSomeValuesFrom svf) { + return !svf.getProperty().isAnonymous() && !svf.getFiller().isAnonymous(); + } + /** * Given an OWLClassExpression y, return a set of named classes c, such that c is a superclass of * y, diff --git a/robot-core/src/main/java/org/obolibrary/robot/TemplateOperation.java b/robot-core/src/main/java/org/obolibrary/robot/TemplateOperation.java index d00fadec8..8536c1782 100644 --- a/robot-core/src/main/java/org/obolibrary/robot/TemplateOperation.java +++ b/robot-core/src/main/java/org/obolibrary/robot/TemplateOperation.java @@ -178,7 +178,7 @@ public static OWLOntology template( for (Map.Entry>> t : tables.entrySet()) { Template template = new Template(t.getKey(), t.getValue(), intermediate, ioHelper, checker); // sufficient to check if ext-template option has a not null value - if (options.get("ext-template") != null) { + if (options.get("external-template") != null) { template.setRowNum(1); } // Update the checker with new labels diff --git a/robot-core/src/main/resources/report_queries/duplicate_exact_synonym.rq b/robot-core/src/main/resources/report_queries/duplicate_exact_synonym.rq index 6f1f438bb..319725b71 100644 --- a/robot-core/src/main/resources/report_queries/duplicate_exact_synonym.rq +++ b/robot-core/src/main/resources/report_queries/duplicate_exact_synonym.rq @@ -1,25 +1,38 @@ # # Duplicate Exact Synonym # -# **Problem:** Two entities share an exact synonym. This causes ambiguity. Excludes deprecated entities. +# **Problem:** Two entities share an exact synonym (case-insensitive). This causes ambiguity. Excludes deprecated entities and synonyms annotated as abbreviation or acronym. # -# **Solution:** Avoid ambiguity by assigning unique exact synonyms or changing the exact synonym to a different annotation (e.g. broad synonym). +# **Solution:** Avoid ambiguity by assigning unique exact synonyms, changing the exact synonym to a different annotation (e.g. broad synonym), or annotating it as an abbreviation or acronym. PREFIX obo: PREFIX oboInOwl: PREFIX owl: PREFIX rdfs: -SELECT DISTINCT ?entity ?property ?value WHERE { - VALUES ?property { - obo:IAO_0000118 - oboInOwl:hasExactSynonym +SELECT DISTINCT ?entity ?property ?value +WHERE { + { + SELECT DISTINCT ?syn_std ?property (COUNT(DISTINCT ?entity) AS ?cnt) + WHERE { + VALUES ?property { obo:IAO_0000118 oboInOwl:hasExactSynonym } + ?entity ?property ?syn . + OPTIONAL { + VALUES ?syn_type { obo:OMO_0003000 obo:OMO_0003012 } + ?exclude a owl:Axiom ; + owl:annotatedSource ?entity ; + owl:annotatedProperty ?property ; + owl:annotatedTarget ?syn ; + oboInOwl:hasSynonymType ?syn_type . + } + + BIND(UCASE(?syn) AS ?syn_std) + FILTER (!isBlank(?entity) && !BOUND(?exclude)) + FILTER NOT EXISTS { ?entity owl:deprecated true } + } GROUP BY ?syn_std ?property HAVING (?cnt > 1) } - ?entity ?property ?value. - ?entity2 ?property ?value . - FILTER NOT EXISTS { ?entity owl:deprecated true } - FILTER NOT EXISTS { ?entity2 owl:deprecated true } - FILTER (?entity != ?entity2) + ?entity ?property ?value . FILTER (!isBlank(?entity)) - FILTER (!isBlank(?entity2)) + FILTER NOT EXISTS { ?entity owl:deprecated true } + FILTER (UCASE(?value) = ?syn_std) } -ORDER BY DESC(UCASE(str(?value))) +ORDER BY DESC(UCASE(str(?value))) \ No newline at end of file diff --git a/robot-core/src/main/resources/report_queries/invalid_xref.rq b/robot-core/src/main/resources/report_queries/invalid_xref.rq index 85b754264..fb6226279 100644 --- a/robot-core/src/main/resources/report_queries/invalid_xref.rq +++ b/robot-core/src/main/resources/report_queries/invalid_xref.rq @@ -10,7 +10,7 @@ PREFIX rdfs: SELECT DISTINCT ?entity ?property ?value WHERE { VALUES ?property {oboInOwl:hasDbXref} ?entity ?property ?value . - FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$")) + FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$")) FILTER (!isBlank(?entity)) } ORDER BY ?entity diff --git a/robot-core/src/main/resources/report_queries/missing_subset_declaration.rq b/robot-core/src/main/resources/report_queries/missing_subset_declaration.rq index 82413bd61..04ea01174 100644 --- a/robot-core/src/main/resources/report_queries/missing_subset_declaration.rq +++ b/robot-core/src/main/resources/report_queries/missing_subset_declaration.rq @@ -1,8 +1,8 @@ # # Missing Subset Declaration # -# **Problem:** A synonym type is used in an annotation, but is not properly declared as a child of oboInOwl:SynonymTypeProperty. This can cause problems with conversions to OBO format. +# **Problem:** A subset is used in an annotation (via oboInOwl:inSubset), but is not properly declared as a child of oboInOwl:SubsetProperty. This can cause problems with conversions to OBO format, and should be avoided as all subsets should have metadata. # -# **Solution:** Make the synonym type a child of oboInOwl:SubsetProperty. +# **Solution:** Make the subset a child of oboInOwl:SubsetProperty. PREFIX rdfs: PREFIX oboInOwl: @@ -12,4 +12,4 @@ SELECT DISTINCT ?entity ?property ?value WHERE { ?x oboInOwl:inSubset ?entity . FILTER NOT EXISTS { ?entity ?property oboInOwl:SubsetProperty } } -ORDER BY ?entity \ No newline at end of file +ORDER BY ?entity