Logo
HomeIntroductionTutorialFAQsReferencesDownloadLinksContactAcknowledgeNews

Tutorial: How to import an Ontofox output file (or any OWL File) into a target ontology


Here we provide a tutorial on how to import an Ontofox output file (or any OWL file) into a target ontology. There are basically two methods for you to choose:

Table of Contents

  1. Import Ontofox output file to a target ontology using Protege OWL editor.
  2. Import Ontofox output file to a target ontology by modifying the OWL text file.

Below is to provide more detail for each of these method:

1. METHOD #1: Import Ontofox output file to a target ontology using Protege OWL editor:
Note: the tutorial material was provided by Ms. Melanie Courtot (Thanks!) on 12/14/2012:

To import a file into Protege, you should follow these steps:

Step 1: Open protege:
      In the tab active ontology (see the following screenshot), at the bottom you have section called "imported ontologies". Click on the small grey "+" button next to "direct imports"

import Ontofox ouptput file clip image 001

 

Step 2: This will open a new window (see the following screenshot), in which you would select "import an ontology contained in a specific file":


import Ontofox ouptput file clip image 002

 

Step 3: The following screenshot shows the window allowing you to select the file on your local hard drive:

import Ontofox ouptput file clip image 003

 

Step 4: The following screenshot is a summary of what will happen - if it is correct just click "finish"

 

import Ontofox ouptput file clip image 004

 

 

The above first method does not require you to modify the OWL text file directly. However, if you are familiar with the OWL file and are confident with the direct modification of the file, you can follow the following second method:

2. METHOD #2: Import Ontofox output file to a target ontology by modifying the OWL text file:

First we introduce a use case:

Task: Use Ontofox to import the bold OBI terms: Example protege screenshot (Note: this is part of the Ontofox output shown in Protege)

 

To a target ontology (e.g., BFO 1.1 as a target ontology): BFO 1.1 screenshot.

 

Basically, we have two scenarios: one is to use our Ontofox setting "URI of the OWL(RDF/XML) output file ", the other is not to use this setting. Based on this subtle difference, the Ontofox input file can be slightly different. The Ontofox input file with the special setting is copied here:

: Ontofox input file with setting "URI of the OWL (RDF/XML) output file"

If the special setting (see the second line in the above file image) is not specified, then we have an Ontofox input file without this setting,

1. By using the setting "URI of the OWL(RDF/XML) output file"
Again, here is the Ontofox input file with this setting.

The first few lines of the output file without the output file URI is here:

: Output with Output file URI

It is noted that the last line has no defined OWL file URI, but the xml:base has an OWL file URI randomly assigend by Ontofox.

NOTE: Please save the above output file using the same file name "example1_import.owl" in an appropriate folder as indicated by the URL. The updated Protege use an XML file (catalog-v001.xml) to track the mapping of the phicial location and the URI of an imported owl file. So it is not mandatory to save the out file using the same directory layout.

Here is a screenshot of the first few lines of the BFO 1.1 as the target ontology:

: BFO 1.1 as a target ontology

Basically, what we need to do is to add one child element under owl:Ontology:

<owl:imports rdf:resource="http://purl.obolibrary.org/obo/your_ontology/external/example1_import.owl"/>

:

2. A more general case, if you don't use this Ontofox setting.
Again, here is the Ontofox input file without using the above setting.

The first few lines of the output file without the output file URI is here:

: output file without output file URI.

It is noted that the last line has no defined OWL file URI, and the xml:base has an OWL file URI randomly assigned by Ontofox. Please change this URI manually in the Ontofox output OWL file and add a new URI (representing the name and location of the Ontofox output OWL file) to the target ontology as demonstrated above. For example, the new URI can be: http://purl.obolibrary.org/obo/your_ontology/external/example1_import.owl. This URI means that the Ontofox output OWL file is named "example1_import.owl", and it is located on the folder of "your ontology/external/". Note: it would be fine if you just put the imported owl file in the same folder as your target ontology because it is considered as a default folder when the Protege ontology editor is looking for the imported ontology.

Note: The same method as described here can be used to import any OWL file or existing ontologies to a target ontology.

Final merged ontology OWL file: The final merged ontology OWL file is HERE.

 

Does this tutorial help? Any suggestions and comments are welcome!