NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Scrollbar
iconsfalse

...

Page info
title
title

Table of Contents

...

Step

Action

1

Obtain an OWL formatted source.
The National Center for Bio Ontology (NCBO

Multiexcerpt include
nopaneltrue
MultiExcerptNameExitDisclaimer
PageWithExcerptwikicontent:Exit Disclaimer to Include
) hosts OWL formatted and other sources and downloads of some sources are available.
OWL formatted source list
Save the source to a local folder.

2

Load the source without options.
Load in Linux/Unix environments:

Code Block
./LoadOWL.sh -in "file:///home/LargeStorage/ontologies/owl/amino-acid.owl"

Load in Windows environments:

Code Block
LoadOWL.bat -in "file:///home/LargeStorage/ontologies/owl/amino-acid.owl"

Sample output on success:
screenshot of output

3

Load source with options:
Some sources may not offer much in the way of information about the terminology. Since this information is often found in resources outside the terminology itself, LexEVS offers an option to load it in an accompanying manifest file.
This is an example of an OWL file with minimal metadata about the terminology:
screenshot of OWL file with minimal metadata about the terminology
and this manifest file allows the user to add appropriate metadata:
screenshot of manifest file
Manifest file construction is detailed in the administrative guide.
Loading in LInux/Unix

Code Block
./LoadOWL.sh -in "file:///data/phont/LexEVS/test/resources/testData/camera.owl" -mf "file:///data/phont/LexEVS/test/resources/testData/Camera-manifest.xml"

Loading in Windows

Code Block
LoadOWL.bat -in  "file:///data/phont/LexEVS/test/resources/testData/camera.owl" -mf  "file:///data/phont/LexEVS/test/resources/testData/Camera-manifest.xml"

...

StepAction
1

Obtain or write an OWL2 source

An example is the OBI Ontology described here:

http://obi-ontology.org/page/Main_Page

With source currently available here:

http://svn.code.sf.net/p/obi/code/releases/2015-09-15/obi.owl

2

Create a manifest and preferences file for this source

Manifests are XML files formatted to an XML schema.  They are easiest to create when using an XML editor that can reference an XML schema.  The manifest schema is hosted here:

http://LexGrid.org/schema/2010/01/LexOnt/CodingSchemeManifest

For OWL2 the user can create one like the example for regular OWL above but add a tag for mappings that will help define namespaces in the OBI load:

Code Block
themeEclipse
languagexml
titleMappings Tag
    <owldef:mappings dc="mappings" xmlns="http://LexGrid.org/schema/2009/01/LexGrid/codingSchemes">

As tag content supply a supported coding scheme for the enclosing coding scheme OBI.

Code Block
themeEclipse
languagexml
titleCoding Scheme
   <supportedCodingScheme isImported="false" localId="obi" urn="http://purl.obolibrary.org/obo/obi.owl#" xmlns="http://LexGrid.org/schema/2008/01/LexGrid/codingSchemes"/>

After this tag define the namespace for the enclosing coding scheme with a reference to the enclosing coding scheme in the equivalent coding scheme attribute

Code Block
themeEclipse
languagexml
titleEnclosing Scheme Namespace
 <supportedNamespace localId="obi" uri="http://purl.obolibrary.org/obo/obi.owl#" equivalentCodingScheme="obi">obi</supportedNamespace>

All other namespaces can be defined in the same way with references from the original OWL source which are found in the xmlns attributes of the "<rdf:RDF tag."  Each with a reference to the enclosing coding scheme using the equivalentCodingScheme attribute

Code Block
themeEclipse
languagexml
titleSupported Namespace
        <supportedNamespace localId="dc" uri="http://purl.org/dc/elements/1.1/" equivalentCodingScheme="obi">dc</supportedNamespace>
        <supportedNamespace localId="doap" uri="http://usefulinc.com/ns/doap#" equivalentCodingScheme="obi">doap</supportedNamespace>
        <supportedNamespace localId="foaf" uri="http://xmlns.com/foaf/0.1/" equivalentCodingScheme="obi">foaf</supportedNamespace>
        <supportedNamespace localId="obo" uri="http://purl.obolibrary.org/obo/" equivalentCodingScheme="obi">obo</supportedNamespace>
        <supportedNamespace localId="oboInOwl" uri="http://www.geneontology.org/formats/oboInOwl#" equivalentCodingScheme="obi">oboInOwl</supportedNamespace>
        <supportedNamespace localId="owl" uri="http://www.w3.org/2002/07/owl" equivalentCodingScheme="obi">owl</supportedNamespace>     
        <supportedNamespace localId="protege" uri="http://protege.stanford.edu/plugins/owl/protege#" equivalentCodingScheme="obi">protege</supportedNamespace>
        <supportedNamespace localId="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns" equivalentCodingScheme="obi">rdf</supportedNamespace>
        <supportedNamespace localId="rdfs" uri="http://www.w3.org/2000/01/rdf-schema" equivalentCodingScheme="obi">rdfs</supportedNamespace>
        <supportedNamespace localId="xsd" uri="http://www.w3.org/2001/XMLSchema" equivalentCodingScheme="obi">xsd</supportedNamespace>
        <supportedNamespace localId="xml" uri="http://www.w3.org/XML/1998/namespace" equivalentCodingScheme="obi">xml</supportedNamespace>

Attached is a full example of a working manifest for OBI

OBI_Apr2015_With_NamespaceToCS_MF.xml

Preferences files work in a similar way to the manifest.  Instead of updating coding scheme data, they initiate programmatic switches determining how a variety of source definitions can be loaded. The preferences XML scheme is defined here:

http://LexGrid.org/schema/LexBIG/2009/01/Preferences/load/OWLLoadPreferences

This includes setting nodes designated as root, i.e. without relational parent codes of any kind.

Code Block
themeEclipse
languagexml
titleMatch Root Name
   <MatchRootName>(BFO_0000001|Project|SVNRepository|ObsoleteClass|Version)</MatchRootName>

Other applications for OWL2 include loading Axiom based restrictions as a variety of relationships.   This is accomplished by setting the strict owl tag value to true:

Code Block
themeEclipse
languagexml
titleStrict OWL
<StrictOWLImplementation>true</StrictOWLImplementation>

A full working preferences file is attached below

OBI_StrictOWL_PF.xml

3

Load source with options using option files

Code Block
./LoadOWL2.sh -in "file:///data/phont/LexEVS/test/resources/testData/obi.owl" -mf "file:///data/phont/LexEVS/test/resources/testData/OBI_Apr2015_With_NamespaceToCS_MF.xml" -lp "file:///data/phont/LexEVS/test/resources/testData/OBI_StrictOWL_PF.xml"

...

Scrollbar
iconsfalse