Skip to content

Import terms into ROO via ROBOT

Nicole Vasilevsky edited this page Feb 27, 2019 · 22 revisions
  1. Download the source ontology that you want to import (OWL file). Most of the ontologies can be downloaded from BioPortal. Temporarily* add the extraction source ontologies to the research-outputs-ontology/src/ontology/imports folder.
    • Note - All of the extraction source ontologies have been saved to our google drive folder.
  2. Create a text file with a list of the purls. Note - be sure to use underscores, not colon), and save file as ontology_terms.txt in the research-outputs-ontology/src/ontology/imports folder.
  3. Navigate to imports file in the terminal: cd git/research-outputs-ontology/src/ontology/imports
  4. Robot commands (update for each respective file)

robot extract --method STAR --term-file ero_terms.txt --input ero.owl --copy-ontology-annotations true --output ero_import.owl

  1. This command will create the file ero_import.owl in the imports folder. Once this file is created, it needs to be committed to GitHub:
    git commit -a -m "add message, such as create ero_import.owl file"
    git push

  2. Open the import.owl file in a text editor (such as ero_import.owl)

  3. In the about line, make sure it has the correct IRI, for example: <owl:Ontology rdf:about="http://purl.obolibrary.org/obo/roo/imports/ero_import.owl"/>

  4. Commit these changes to GitHub.

  5. Edit roo-edit.owl in text editor: add all of the purls from the import files to the roo-edit.owl file

  6. Edit catalog-v001.xml in text editor: add the uri for the import file you added. Follow examples in the file, for example:
    uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/roo/imports/ero_import.owl" uri="imports/ero_import.owl"/

  7. Commit to GitHub

*/ Note: To remove files temporarily saved in your GitHub repo, do the following commands:
git clean -n (this will show you which files will be removed)
git clean -f (this will remove unstaged files from your repo)

Clone this wiki locally