Working with Selections

There are two notions of selection in OBO-Edit: the global selection, and local ontology editor panel selections.

The Global Selection

The global selection is available to every component in OBO-Edit. Every control, plugin, data adapter, etc can find out which terms are globally selected. Some components respond to changes in the global selection. For example, the DAG Viewer plugin changes its display when the global selection changes.

Users can change the global selection by left-clicking on relationships in the primary ontology editor panel.  When a relationship is selected, it will be surrounded by a blue box:

In the above example, "intracellular organelle" and "non-membrane bound organelle" are selected.

Multiple relationships can be selected at once. To select a contiguous list of relationships, select the first item in the list by left-clicking. Then, hold the Shift key and click the last item in the list. To select several non-continguous terms, left-click on the first term, and select subsequent terms by holding down the Ctrl key and left-clicking.

The global selection may be changed in other ways. Other OBO-Edit components (like the Search  control) may change the current global selection. If the global selection changes, the primary ontology editor panel will reflect that change.

The Sub-Selection

Any number of relationships can be selected at a time. However, components like the text editor can only operate on a single term at a time. When multiple relationships are selected at once, the sub-selection control appears to the left of the text editor:

The sub-selection control contains a list of terms consisting of the child terms of all the currently selected relationships. This is a very important distinction: the current selection is a collection of relationships. The sub-selection is a single term .

When the current selection consists of single relationship, the sub-selection control is not visible, but it is still operating. When only one relationship is selected, the child of that relationship automatically becomes the current sub-selection.

In the example above, two relationships have been selected, and the sub-selection control has appeared next to the text editor. "Intracellular organelle" is selected in the sub-selection control, so "intracellular organelle" has been loaded into the text editor. Note that the ontology editor panel uses a slightly darker background color for the current sub-selection. To choose a different sub-selection, click the desired term in the sub-selection control.

What Objects Am I Selecting?

The global selection and the sub-selection actually designate different kinds of objects. This can be confusing for novice users.

The global selection (and any local ontology editor panel selection) is a collection of relationships betwen terms. In the image above, the actual selection consists of the following two relationships:

The sub-selection is a single term or relationship type. The sub-selection is always the child term from one of the relationships in the global selection.

Ocassionally this guide will refer to the "selected terms". Realize that this is shorthand for "the child terms of the selected relationships".

Local Selections

Terms can also be selected in ontology editor panels that are not the primary panel. However, when these terms are selected, the global selection does not change. Further, these panels do not respond to changes in the global selection.

Local selections can be very useful when using drag and drop. For example, a user may want to (globally) select a term, and then drag and drop some new parents into the cross products tab of the text editor. The user would need to select and drag the new parents from a non-primary ontology editor panel, so that the global selection does not change (if the global selection did change, the contents of the text editor would change accordingly, which would make it impossible to drag the new terms onto the correct target).