The OBO Adapter

Overview

What it does: Reads and writes files in the OBO flat file format . All versions of the OBO format are supported. Files can be read from disk or a URL, but files must be written to disk.

Supported features:The OBO Adapter can save two different version of the flat file specification, OBO 1.0 and OBO 1.2. The two versions support slightly different ontology features.

OBO 1.2 - This format can save the entire contents of an OBO-Edit ontology, no matter what features are used.

OBO 1.0 - OBO 1.0 does not support:

Operation

Basic Operation

The OBO Flat File adapter's basic mode conforms to the interface described in The Basic Flat File Interface.

Advanced Operation

Loading

When the "Advanced" button is pressed, the load dialog changes to look like this:

This interface allows fine control over which files are loaded. The list to the left contains all the files to be loaded by the OBO Adapter.

To edit a file in the list, left-click the file to select it. The file will be loaded into an editor to the right:

To change the path, type a new path into the text box, or select a file from the disk by clicking the "Browse..." button.

To add a new file path, press the "Add" button. A new path will appear with the path set to "<new path>". Edit the path as described above.

To delete a path, select it from the list and press the "Del" button.

The "Allow dangling references" box enables the OBO Adapter to load ontologies that contain dangling references. Dangling references occur when an ontology term contains a link to a term that does not exist. This can happen if an ontology contains links to another ontology, but the second ontology is not loaded.

If dangling references are loaded, OBO-Edit records the references and writes them out when the file is saved. The dangling references cannot be changed or deleted within the normal OBO-Edit interface (although external plugins may allow you to edit the references).

Saving

When the "Advanced" button is pressed, the save dialog changes to look like this:

The dropdown box at the bottom of the dialog selects which version of the OBO format to use. The default is OBO version 1.0, but OBO 1.2 should be used for maximum expressivity.

The OBO Adapter can save an ontology to several different files. The contents of the save files may overlap, or may be entirely disjoint. The save can be configured so that some terms or links don't get saved at all.

The list to the left contains all the files that will be saved. To add a new save file, press the "Add" button. A new file will be created with the path "<new save path>".

To delete a save file, click it to select the file, and press the "Del" button.

To edit a save file, click it to select the file. An editor will appear to the right of the file list that looks like this:

The line at the top contains the path of the save file. To change the save path, type a new path into the text box or click the Browse button to select a file from the disk as a save location.

The middle 2 rows of controls contains filtering settings. These are very important, and are addressed in their own section below.

Below the filtering controls is a checkbox labeled "Save implied links". If this box is selected, implied links that were generated by a reasoner will be included in the save file. When implied links are saved, a dropdown box is enabled that specifies how the implied links should be saved. The possible settings are:

If the "Realize implied links" checkbox, implied links will be stripped of the label that identifies them as reasoner-generated links. These implied links will be saved as if they were regular links created by a human user.

On the next line is a dropdown box containing the id generation rules settings. OBO files can store certain kinds of id generation rules. This box specifies which id rules (if any) to write for this file. There are three settings:

At the bottom of the panel is a dropdown labeled "Output type". This dropdown allows the user to select whether to save in OBO 1.0 or OBO 1.2 format.

To the right of all these controls is the OBO File Remark text field. This field will be converted into a comment in the OBO file header. Note that even though text wraps in this field, the wrapping will not be preserved in the OBO file.

Filtering Output Files

The contents of the saved files can be controlled by the use of filters. To filter an ontology, click the "Filter terms" or "Filter links" checkboxes. Filter editors will appear, and the interface will look like this:

If "Filter terms" is checked, a term filter editor appears. If "Filter links" is checked, a link filter editor appears. If both are checked, a term filter editor and link filter editor appear. There is a small label above each to indicate which is which.

The filter editors are configured as described in the Term Filters and Link Filters section.

When link filtering is enabled, only links that match the filter will be written to the file. When term filtering is enabled, only term that match the filter will be written to the file. If term filtering is enabled and link filtering is not, if a term does not match the filter, no links to that term will be written to the file.

But, if term filtering and link filtering are enabled and a term does not match the filter, the term is not written, but links to that term can be written. To write these dangling links to the file, click the "Allow dangling parents" checkbox. If the checkbox is not selected, the dangling links will not be written out.

If the "Always save properties" box is checked, the term filter will be extended so that it properties are always saved, even if the term filter would normally drop them. This is done by changing your specified filter into [Self] [Is Property] OR <your filter>. Note that this has no effect on link filtering at all. If you are doing link filtering, make sure to take steps to preserve links between properties or they will be lost.

If the "Do type prefiltering" box is checked, a dropdown will be enabled that allows the user to select a pre-filter property. The pre-filter will be applied before the ontology is saved. See Reasoner Prefilters for more information.

The "Root selection algorithm" dropdown allows the user to choose a root selection algorithm to use when filtering the saved file. See Orphaned Terms and the Root Picking Algorithm  for more information.

Once all your save files have been configured, press the ok button to save.