# Tagging markup-resource components with an ontology class

**URL:** https://discourse.kitware.com/t/tagging-markup-resource-components-with-an-ontology-class/930
**Category:** Gallery
**Created:** [December 2, 2022, 4:57pm UTC](https://discourse.kitware.com/t/tagging-markup-resource-components-with-an-ontology-class/930 "2022-12-02T16:57:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.kitware.com/user_avatar/discourse.kitware.com/dcthomp/32/10_2.png) [@dcthomp](https://discourse.kitware.com/u/dcthomp)
#### Post date: [December 2, 2022, 4:57pm UTC](https://discourse.kitware.com/t/tagging-markup-resource-components-with-an-ontology-class/930/1 "2022-12-02T16:57:57Z")

</div>

The new [markup resource](https://smtk.readthedocs.io/en/latest/userguide/markup/index.html) now includes an operation for tagging components with an ontology class, indicating the component is an individual member of that class of components. This work was done for [aeva](https://simtk.org/projects/aeva-apps) in order to expose the [uberon ontology](https://github.com/obophenotype/uberon), which is a large ontology with approximately 40,000 classes (covering organs, tissues, and physical + developmental relationships between them). The operation includes a custom UI item-view (`qtOntologyItem`) which autocompletes tag names from the set of all classes.

 ![ontology-tag-editor-add](https://discourse.kitware.com/uploads/default/original/1X/8a1628074d350e10060d68a4fdb490d3601df70b.png)&nbsp; ![ontology-tag-editor-remove](https://discourse.kitware.com/uploads/default/original/1X/b9f6fc3e66e3504a2cec571f00e13a9675d31db4.png)

This operation and UI is embodied in [cmb/smtk!2824](https://gitlab.kitware.com/cmb/smtk/-/merge_requests/2824).

## Creating your own ontology

If you would like to create your own ontology for a different area, you might find the [yamlpyowl](https://github.com/cknoll/yamlpyowl/) package useful. You can declare ontology classes and their inheritance using YAML, then convert it into the OWL format that SMTK expects. This is how the [example we use for testing](https://gitlab.kitware.com/dcthomp/engineered-object-ontology/-/blob/master/engineered.owl.yaml) was created.
