-
Notifications
You must be signed in to change notification settings - Fork 4
Making imports
PCO uses the Robot functions extract to make OWL files that import selected terms other ontologies. The plan is to move all this to the makefile, but for now, it is documented here.
Robot takes as input a text file listing the terms to be imported and the source ontology (stored locally at src/ontology/imports/files, but not committed to the github repo) and generates an OWL import file in that same directory. Note that to update the import, you must first download the latest copy of the source ontology file. The `--annotate-with-source true' option should be included.
During editing, import files are stored in /src/ontology/imports. In order to edit the ontology, you must import from this working directory, rather than from the release file PURLs (see below). If you import from a local file in Protege, that should work.
For releases, all import text files and extracted OWL files are stored in the imports directory in the root directory. Using partial redirect, these can be referenced using PURLs such as http://purl.obolibrary.org/obo/pco/imports/go_import.owl
.
There are multiple extraction methods that can be used. The table below describes PCO imports and the extraction methods used to create them. Some ontologies are imported whole.
Source Ontology | extraction method | term file | import file |
---|---|---|---|
OBO Metadata Ontology (OMO) | full import | ||
RO core | full import | http://purl.obolibrary.org/obo/ro/core.owl | |
BFO | BOT | /src/ontology/imports/bfo_terms.txt | /src/ontology/imports/bfo_import.owl |
ECOCORE | MIREOT | /src/ontology/imports/ecocore_terms.txt | /src/ontology/imports/ecocore_import.owl |
ENVO | MIREOT | /src/ontology/imports/envo_terms.txt | /src/ontology/imports/envo_import.owl |
GO | BOT | /src/ontology/imports/go_terms.txt | /src/ontology/imports/go_import.owl |
IAO | MIREOT | /src/ontology/imports/iao_terms.txt | /src/ontology/imports/iao_import.owl |
NCBITaxon | STAR | /src/ontology/imports/ncbitaxon_terms.txt | /src/ontology/imports/ncbitaxon_import.owl |
PATO | BOT | /src/ontology/imports/pato_terms.txt | /src/ontology/imports/pato_import.owl |
RO | MIREOT | /src/ontology/imports/ro_terms.txt | /src/ontology/imports/ro_import.owl |
STATO | MIREOT | /src/ontology/imports/stato_terms.txt | /src/ontology/imports/stato_import.owl |
CARO | manual import | n/a | CARO terms were added to the ontology file manually. Soon these will be replaced by a proper import from COB |
Robot by default gives the import files the IRIs for their source ontologies. These need to be changed to the pco import directory. For example, the IRI for the GO imports file should be http://purl.obolibrary.org/obo/pco/imports/go_import.owl
. This can be done using the robot annotate
command with the --ontology-iri
option.
The robot command used with each term file should be appended to the file as a comment.
Below is an example robot command to create the GO import module:
robot extract --method BOT
--input files/go.owl
--term-file go_terms.txt
--annotate-with-source true
annotate --ontology-iri "http://purl.obolibrary.org/obo/pco/imports/go_import.owl"
--output go_import.owl
Note that ENVO imports a lot of terms from PCO, so using an SMLE method to extract imports leads to import cycles. The current ENVO extract command (based on /src/ontology/imports/envo_terms.txt) is:
robot extract --method MIREOT
--input files/envo.owl
--upper-term "http://purl.obolibrary.org/obo/BFO_0000040"
--lower-term "http://purl.obolibrary.org/obo/ENVO_01000744"
--lower-term "http://purl.obolibrary.org/obo/ENVO_01001369"
--intermediates minimal
--annotate-with-source true
--copy-ontology-annotations true
annotate --ontology-iri "http://purl.obolibrary.org/obo/pco/imports/envo_import.owl"
--output envo_import.owl