Here we provide a tutorial of how Ontofox can be applied for your research and ontology development:
Many more details about Ontofox and how to use it can be found from our Ontofox manuscript: PubMed ID: 20569493
Table of Contents
- Source Ontologies and their namespaces
- Ontofox execution using web input forms
- Ontofox data input format
- Four "directives" used in Ontofox
- Four settings used in Ontofox
- Ontofox hands-on demo
- Ontofox use case demonstrations
- Import an Ontofox output file into a target ontology
- Ontofox access without using Ontofox web site
- How to correctly use 'includeAllChildren'
- Can we merge Ontofox files for different source ontologies?
- New: Sivaram's short tutorial on using Ontofox
1. Source Ontologies and their namespaces:
Ontofox includes many source ontologies for query. Ontofox uses standardized namespaces of source ontologies following OBO Foundry recommendations. These namespaces are also used in ontology servers like Neurocommons.org:
# Ontology Ontology Full Name Term URI example 1 CARO Common Anatomy Reference Ontology http://purl.obolibrary.org/obo/CARO_0000042 2 CHEBI Chemical Entities of Biological Interest http://purl.obolibrary.org/obo/CHEBI_18379 3 CL Cell Ontology http://purl.obolibrary.org/obo/CL_0000076 4 DOID Human Disease Ontology http://purl.obolibrary.org/obo/DOID_0050305 5 ENVO Environment Ontology http://purl.obolibrary.org/obo/ENVO_00000046 6 FMA Foundational Model of Anatomy Ontology (subset) http://purl.obolibrary.org/obo/FMA_27742 7 GO Gene Ontology http://purl.obolibrary.org/obo/GO_0000439 8 IDO Infectious Disease Ontology http://purl.obolibrary.org/obo/IDO_0000558 9 MP Mammalian Phenotype http://purl.obolibrary.org/obo/MP_0000202 10 NCBITaxon NCBI organismal classification http://purl.obolibrary.org/obo/NCBITaxon_110815 11 OBI Ontology for Biomedical Investigations http://purl.obolibrary.org/obo/OBI_0001077 12 PATO Phenotype And Trait Ontology http://purl.obolibrary.org/obo/PATO_0000054 13 SO Sequence types and features ontology http://purl.obolibrary.org/obo/SO_0000644 14 VO Vaccine Ontology http://purl.obolibrary.org/obo/VO_0000423
Note: The compelete ontologies included in Ontofox is listed here.
2. Ontofox execution using web input forms:
Data for each component can be input using the web input form in the Ontofox home page. Ontofox needs the following information as input from users:
(1) Source ontology: The ontology where a list of terms will be retrieved from.
(2) Class term specification:
(a) Low level source term URIs: The URIs of low level term from source ontologies.To include all child terms of a source term, enter "includeAllChildren" in the line next to the source term. This feature is designed to extract all terms of an ontology hierarchy branch under a specific ontology term.
(b) Top level source term URIs and target direct superclass URIs: The URIs of top level term from source ontologies and their direct superclass URIs from a target ontology (i.e., the ontology that will import the terms from the source ontologies). The top level source term URI can be the same as the low level source term URI. In this case, a single source term will be fetched. If no top level source term is specified, by default the top level source term is the same as the low level source term. Since each top level source term has its own superclass in the target ontology, each target direct superclass of a top level source term should be specified. In OntoFecth, we specify the target direct superclass in a new line, following the sign "subClassOf ".
(c) Setting for retrieving intermediate source terms: Three options are available for retrieving intermediate terms: (a) includeNoIntermediates: no intermediate source terms are retrieved. (b) includeComputedIntermediates: Sensible intermediate source terms are retrieved. Sensible intermediates include those intermediate terms that are closest ancestors of more than one low level source terms. (c) includeAllIntermediates: All intermediate source terms are retrieved.
(3) Source annotation URIs: The annotation URIs for the source terms used in the source ontologies. To map or wrap an annotation to a new one, please specify "copyTo" or "mapTo" in the new line following the orignal annotation URL, followed by the new annotation URI.
The Ontofox home page provide many examples. These examples can be used to quickly learn how to use the Ontofox web forms for Ontofox implementation.
Common annotation URIs:
rdfs:label http://www.w3.org/2000/01/rdf-schema#label oboInOwl:hasSynonym http://www.geneontology.org/formats/oboInOwl#hasSynonym oboInOwl:hasExactSynonym http://www.geneontology.org/formats/oboInOwl#hasExactSynonym oboInOwl:hasRelatedSynonym http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym oboInOwl:hasNarrowSynonym http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym oboInOwl:hasBroadSynonym http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym oboInOwl:hasDefinition http://www.geneontology.org/formats/oboInOwl#hasDefinition iao:preferredTerm http://purl.obolibrary.org/obo/IAO_0000111 iao:definition http://purl.obolibrary.org/obo/IAO_0000115 iao:alternative term http://purl.obolibrary.org/obo/IAO_0000118 owl:equivalentClass http://www.w3.org/2002/07/owl#equivalentClass
NOTE: "owl:equivalentClass" is now a separate option: Use this option will include owl equivalence class, ie, the logical definition of a specific ontology term. In addition, those terms that are part of the logical definition will be extracted also. This means some new classes will appear in the final output. In the old version, this option was turned on by default. In the updated version now it is a separate option which is not included by default.
(4) URI of the OWL(RDF/XML) output file: This is a newly added feature that is designed to simplify the user's work after getting the Ontofox output file. After a URI of the OWL output file is specified, the URI will be automatically added to the Ontofox output file. The user can then put the Ontofox output file in a specified location. Once the target ontology includes the same information, the Ontofox output results can be directly shown in the target ontology in an OWL editor such as Protege. So basically, this URI is used so that later you don't need to modify this Ontofox-generated output file anymore. This indeed saves the user's time and avoids mistakes.
3. Ontofox data input format:
An example of Ontofox data input file is here:
[URI of the OWL(RDF/XML) output file]
[Low level source term URIs]
http://purl.obolibrary.org/obo/NCBITaxon_263 #Francisella tularensis
[Top level source term URIs and target direct superclass URIs]
subClassOf http://purl.obolibrary.org/obo/OBI_0100026 #organism, this term is from target ontology
[Source term retrieval setting]
includeNoIntermediates #or: includeAllIntermediates, inincludeComputedIntermediates
[Source annotation URIs]
As you can tell, the Ontofox data input format contains the following components:
- Headings: Each heading contains a text description quoted inside parenthesis "[ ]". Five headings represent the four components of Ontofox execution. Please use the exact same text in all headings.
- URI of the OWL(RDF/XML) output file under the first heading: This provides a URI for the Ontofox output OWL file.
- Source ontology list. This is required. If using web forms, one or many ontologies can be selected. Currently, the ontologies we have tested and included in Ontofox include: OBI, NCBITaxon, MP, PATO, GO, DOID, IDO, CHEBI, SO, PRO, CL, ENVO, and CARO.
- Low level source term URIs: At least one source term URI is required.
- Top level source term URIs and target direct superclass URIs: Since each top level source term has its own direct superclass in the target ontology, URIs of target direct superclasses of individual top level source terms are input together with the top level source term with a new line starting with "subClassOf". To get a single class from source ontology, you do not need to specify any top level source term, or you can specify the top level source term URI as the same as the low level source term URI.
- Source term retrieval setting: Choose one of three settings for retrieving intermediate source ontology terms:: includeNoIntermediates, includeAllIntermediates, and inincludeComputedIntermediates. See description below.
- Source annotation URIs: The source term annotation URIs are requested in case only limited annotations are needed. If no annotation URI is assigned, no annotations associated with a specific ontology term will be fetched. To include all possible annotations, you can put "includeAllAxioms"on one line, and all the annotations associated with a specific ontology term will be fetched. To map or wrap an annotation to a new one, please specify "copyTo" or "mapTo" in the new line following the orignal annotation URL, followed by the new annotation URI.
- Comments: The sign "#" as the first letter of a line or as a letter after a space in the middle of a line is an indicator of a comment. All text after this sign within one line is considered comment and will not be used for Ontofox analysis.
4. Five "directives" used in Ontofox:
Four directives are designed as unique Ontofox commands to guide users to provide consistent and readable input data in Ontofox web forms or input text format
- "includeAllChildren": To include all child terms of a source term, enter "includeAllChildren" in the line next to the source term. This feature is designed to extract all terms of an ontology hierarchy branch under a specific ontology term. To include all child terms of a source term, enter "includeAllChildren" in the line after the line with the source term.
- "fromEndpoint": This directive is generated to indicate a SPARQL endpoint from which a source ontology is retrieved by Ontofox. It is used at the beginning of a line, followed by a web-accessible URL of a particular SPARQL endpoint. The line above this ‘fromEndpoint’ statement is the URI of a source ontology.
- "subClassOf": This is a directive that is used in defining the target direct superclass (Box 3). This directive should be the first word in a line, followed by a target ontology URI that will be the superclass of the source ontology term listed in the previous line.
- "copyTo": This is a directive that is used in mapping for ontology term annotation (Box 4). This directive should be the first word in a line, followed by an annotation URI used in target ontology. The use of this directive would lead to addition of an annotation to an imported term which includes an annotation with annotation URI specified in the line before "copyTo". For example, the "copyTo" in the above example will provide an additional annotation http://purl.obolibrary.org/obo/IAO_0000111 (preferred_term) with the same content as the "label" (http://www.w3.org/2000/01/rdf-schema#label).
- "mapTo": This is a directive that is used in wrapping for ontology term annotation (Box 4). This directive should be the first word in a line, followed by an annotation URI used in target ontology. The use of this directive would lead to replacement of an annotation (specified by the annotation URI in the line before) of an imported term with another annotation specified in the URI following "mapTo". For example, the "mapTo" in the above example will replace source ontology annotation term URI "http://www.geneontology.org/formats/oboInOwl#hasDefinition" with target ontology annotation term URI "http://purl.obolibrary.org/obo/IAO_0000115" (IAO definition).
5. Six settings used in Ontofox:
To allow Ontofox server parse needed information desired by a user.
Three Ontofox settings are for retrieving intermediate classes. Any of these Ontofox settings stands alone and does not procede or follow any statements:
- "includeNoIntermediates": no intermediate source terms are retrieved.
- "includeComputedIntermediates": Computed intermediate source terms include those intermediate terms that are closest ancestors of more than one low level source terms. Those intermediate terms that have only one parent term and one child term each are removed. This setting provides an option to get less intermediate ontology terms then that with the setting ‘includeAllIntermediates" and still fulfills many users’ requirement. This option is the default usage for many ontologies (e.g., VO and OBI).
- "includeAllIntermediates": All intermediate source terms are retrieved.
Several annotation settings for ontology class annotations have also been designed in Ontofox:
- "includeAllAnnotationProperties": By default, if no annotation URI is assigned, no annotations associated with a specific ontology term will be fetched. To include all possible annotations, you can put "includeAllAnnotationProperties"on one line, and all the annotations associated with a specific ontology term will be fetched.
- "includeAllAxioms": To include all possible annotations and related axioms for a specified term(s), you can put "includeAllAxioms"on one line, and all the axioms associated with a specific ontology term(s) will be fetched. This is the same idea of CBD (Concise Bounded Description).
- "includeAllAxiomsRecursively": To include all possible annotations and related axioms for a specified term(s) and its associated terms recursively, you can enter "includeAllAxiomsRecursively"on one line. More information about the differences between these two settings is described below in the section of Ontofox-View introduction. Note: "includeNoIntermediates" and "includeComputedIntermediates" have higher priority and will override "includeAllAxiomsRecursively".
Several common annotation URIs for ontology class annotations are listed in the above table.
6. Ontofox hands-on demo
Here we provide hands-on demo for Ontofox usage.
7. Ontofox use case demo:
Here we provide use case demos for Ontofox usage.
8. Import an Ontofox output file into a target ontology
For many Ontofox users and general ontology developers, one typical question is how to import an external ontology, e.g., an Ontofox output file into a target ontology. To illustrate this, here we provide a detailed instruction on how to import Ontofox output file.
9. Remote Ontofox access without using the Ontofox web page:
We understand that there probably is a need to access Ontofox programmatically without coming to Ontofox web page. For this purpose, we have generated a new php script: http://ontofox.hegroup.org/service.php. For example, a user can use the following command line code to get the result: "curl -s -F file=@/tmp/input.txt -o /tmp/output.owl http://ontofox.hegroup.org/service.php". Alternatively, a user can also develop code using Perl, Java or other programming languages. In this case, a user will need use "put" to access this page.
10. How to correctly use includeAllChildren:
The feature "includeAllChildren" is designed to extract all terms of an ontology hierarchy branch under a specific ontology term. To include all child terms of a source term, enter "includeAllChildren" in the line after the the line with source term. Don't put them in the same line. For example:
It's noted that all directives are case sensitive. It means that the first "i" in "includeAllChildren" should be lower case.
11. Can we merge Ontofox files for different source ontologies?
Yes. You can put all of your import terms in ONE Ontofox input file. Later on, after you make any changes to the input file, just upload this file to Ontofox and get the updated version of the owl output file. Please refer a section above for detail about the input file format. For multiple source ontologies, just repeat section [Source ontology] to [Source annotation URIs].