<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>ROBOT: A command-line tool for ontology development</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>James A. Overton</string-name>
          <email>james@overton.ca</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Heiko Dietze</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shahim Essaid</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Osumi-Sutherland</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christopher J. Mungall</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>European Molecular Biology Laboratory - European Bioinformatics Institute, Wellcome Trust Genome Campus</institution>
          ,
          <addr-line>Hinxton</addr-line>
          ,
          <country country="UK">United Kingdom</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Knocean</institution>
          ,
          <addr-line>Toronto, Ontario</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Lawrence Berkeley National Laboratory</institution>
          ,
          <addr-line>Berkeley, California</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Oregon Health and Science University Library</institution>
          ,
          <addr-line>Portland, Oregon</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <abstract>
        <p>ROBOT is a command-line tool for working with ontologies, especially Open Biomedical Ontologies. It builds on OWLAPI and is designed to eventually replace Oort and many functions of OWLTools. Currently implemented commands include: reporting on differences between ontologies, merging ontologies, extracting ontology modules, filtering ObjectProperties, and reasoning. Commands can be chained together to form powerful, repeatable workflows. ROBOT is in early development but is available for use under an open source (BSD) license.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        ROBOT is a new command-line tool for working with ontologies,
with special emphasis on Open Biomedical Ontologies (OBO)
        <xref ref-type="bibr" rid="ref6">(Smith et al., 2007)</xref>
        . It provides convenient commands for merging
ontologies, extracting subsets, filtering for selected axioms, running
reasoners, and converting between file formats. Commands can be
chained together to form powerful, repeatable workflows.
      </p>
      <p>
        OWLTools and Oort are the predecessors to ROBOT. OWLTools
provides various functionality to support the Gene Ontology (GO)
and many other ontology projects. In particular, it has supported
the transition of GO and other projects from OBO format toward
OWL format
        <xref ref-type="bibr" rid="ref4">(Mungall et al., 2014)</xref>
        . Oort, the OBO Ontology
Release Tool, is part of OWLTools and specifically designed as a
command-line tool to help automate the transformation of ontology
files from editing versions to publishable release files. Both are used
extensively by BerkeleyBOP and other projects, often scripted by
GNU Make files and run as part of Continuous Integration systems
        <xref ref-type="bibr" rid="ref3">(Mungall et al., 2012)</xref>
        .
      </p>
      <p>OWLTools and Oort provide more core functionality than
ROBOT currently does. However, they have “evolved” over the
years without an overarching design. The resulting tools are
powerful, but somewhat difficult for new users to learn, and the code
base was designed around certain assumptions that held true for
OBO format ontologies but do not apply to OWL format ontologies.</p>
      <p>With ROBOT we aim to create a more modular and extensible
code base for developers, and provide a friendlier and more
consistent interface for users. We plan to incrementally replace
OWLTools and Oort, and promote the use of ROBOT as a standard
tool for use by OBO projects. In this paper we describe the design
of ROBOT, its usage, and some of our future plans.</p>
    </sec>
    <sec id="sec-2">
      <title>OPERATIONS</title>
      <p>
        robot-command implements the command-line interface
robot-core is designed to be used as a library from any language
that runs on the Java Virtual Machine. Operations are classes that
provide static methods for working with ontologies, usually building
on functionality from OWLAPI
        <xref ref-type="bibr" rid="ref2">(Horridge and Bechhofer, 2011)</xref>
        .
The currently implemented operations are:
      </p>
      <p>DiffOperation: find the differences between two ontologies</p>
      <sec id="sec-2-1">
        <title>ExtractOperation: extract a module</title>
        <p>FilterOperation: filter axioms by ObjectProperty
MergeOperation: merge axioms from one or more
ontologies and their imports into a single ontology
ReasonOperation: use a reasoner to add axioms to an
ontology</p>
        <p>
          We plan to provide operations for MIREOT
          <xref ref-type="bibr" rid="ref1">(Courtot et al., 2011)</xref>
          ,
for Quick Term Templates
          <xref ref-type="bibr" rid="ref5">(Rocca-Serra et al., 2011)</xref>
          , for validating
ontologies using SPARQL queries, and for modifying ontologies
using SPARQL Update. robot-core also provides a class with
static utility methods and a class for convenient file operations.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>COMMANDS AND CHAINS</title>
      <p>The robot-command module implements ROBOT’s
commandline interface using the Apache Commons CLI library.3. Each
command implements the Command interface, with main and
execute methods, as well as other common methods for getting
the command name and usage information. Commands do not
necessarily correspond to operations, but often do. The currently
implemented commands are:</p>
      <sec id="sec-3-1">
        <title>1 https://github.com/ontodev/robot</title>
      </sec>
      <sec id="sec-3-2">
        <title>2 https://maven.apache.org</title>
      </sec>
      <sec id="sec-3-3">
        <title>3 https://commons.apache.org/proper/commons-cli/</title>
        <p>Overton et al</p>
        <p>AnnotateCommand: add annotations to an ontology
ConvertCommand: save an ontology to another format:
RDFXML, RDFOWL, Turtle, Manchester Syntax, OWL
Functional Syntax, or OBO.</p>
        <p>DiffCommand: show the differences between two ontologies
ExportPrefixesCommand: show the current prefixes (see
below)</p>
      </sec>
      <sec id="sec-3-4">
        <title>ExtractCommand</title>
      </sec>
      <sec id="sec-3-5">
        <title>FilterCommand</title>
      </sec>
      <sec id="sec-3-6">
        <title>MergeCommand</title>
      </sec>
      <sec id="sec-3-7">
        <title>ReasonCommand</title>
        <p>Commands can be called individually or by CommandManager
instances. When used with a manager, commands can be chained
together into powerful workflows. When chained, commands
communicate using a CommandState object that contains the
current OWLOntology instance. Internally, command accepts a
state, updates it, and returns it for the next command to use. At
the command-line, each command is named by a verb and followed
by zero or more options and their arguments. Figure 1 shows an
example of a chain of commands for releasing an ontology.
robot \
merge --input edit.owl \
reason --reasoner ELK \
annotate \
--annotation-file annotations.ttl \
--output results/example.owl \
convert --output results/example.obo</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>NAMES AND FORMATS</title>
      <p>One source of problems with OWLTools has been the use of prefixed
identifiers in OBO and OWL. With ROBOT we have made use of
the JSON-LD standard4 and the JSONLD-Java5 library to provide a
concise and effective method for specifying and resolving prefixes.
A JSON-LD context is a JavaScript object with keys and values that
specify how names and prefixes should be expanded, optionally with
additional type information. The JSON-LD specification provides
an algorithm for resolving names and prefixes to full IRIs.</p>
      <p>ROBOT supports the use of JSON-LD for specifying prefixes to
be used when loading and saving ontologies and sets of ontology
terms. We also support loading ontology and annotation data from
JSON-LD files, and from YAML files6 when they have certain
structure corresponding to JSON-LD.
5</p>
    </sec>
    <sec id="sec-5">
      <title>DOCUMENTATION AND TESTING</title>
      <p>With ROBOT we aim to provide a user-friendly tool for ontology
users and ontology developers. The project repository includes a
README with installation instructions, a tutorial on
commandline usage with example data files, and full JavaDoc documentation
for the code itself. The command-line tool provides interactive
help on commands. We plan to include ROBOT in the online
OBO Tutorial,7 replacing custom Java code with standard ROBOT
commands.</p>
      <p>In addition to a suite of unit tests, the tutorial itself serves as an
integration test suite. A test harness extracts the example commands
from the tutorial document, runs them, and compares the resulting
files to the known-good example data files. Continuous Integration
systems run all tests every time code is committed to version control.
6</p>
    </sec>
    <sec id="sec-6">
      <title>DEMONSTRATION</title>
      <p>At ICBO we plan to demonstrate the installation and use of ROBOT
for a range of ontology operations, based on our tutorial document.
ROBOT will also be used in the OBO Tutorial session at the
conference.
7</p>
    </sec>
    <sec id="sec-7">
      <title>CONCLUSION</title>
      <p>ROBOT is a user-friendly tool for working with ontologies at the
command-line and for scripting ontology workflows. It is designed
to replace Oort and many of the functions of OWLTools, and to
address a wider audience of ontology developers. While still in
early development, ROBOT can be used today, and we appreciate
feedback via our GitHub repository.</p>
    </sec>
    <sec id="sec-8">
      <title>ACKNOWLEDGEMENTS</title>
      <p>JAO, HD, DOS, and CJM were supported by the National Human
Genome Research Institute (NHGRI) P41 grant
5P41HG00227309 to the Gene Ontology Consortium. In addition, HD and
CJMs contribution was also supported by the Director, Office of
Science, Office of Basic Energy Sciences, of the U.S. Department
of Energy under Contract No. DE- AC02-05CH11231. JAO’s
contribution was also supported by the Immune Epitope Database
and Analysis Project, funded by the National Institutes of Health
[HHSN272201200010C].</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Courtot</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gibson</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lister</surname>
            ,
            <given-names>A. L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Malone</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schober</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brinkman</surname>
            ,
            <given-names>R. R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Ruttenberg</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>MIREOT: The minimum information to reference an external ontology term</article-title>
          .
          <source>Applied Ontology</source>
          ,
          <volume>6</volume>
          (
          <issue>1</issue>
          ),
          <fpage>23</fpage>
          -
          <lpage>33</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Bechhofer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>The OWL API: A Java API for OWL ontologies</article-title>
          .
          <source>Semantic Web</source>
          ,
          <volume>2</volume>
          (
          <issue>1</issue>
          ),
          <fpage>11</fpage>
          -
          <lpage>21</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Mungall</surname>
            ,
            <given-names>C. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dietze</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Carbon</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ireland</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bauer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lewis</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Continuous Integration of Open Biological Ontology libraries</article-title>
          . Bio-Ontologies.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Mungall</surname>
            ,
            <given-names>C. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dietze</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Osumi-Sutherland</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Use of OWL within the Gene Ontology</article-title>
          . bioRxiv.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Rocca-Serra</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruttenberg</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>O'Connor</surname>
            ,
            <given-names>M. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Whetzel</surname>
            ,
            <given-names>P. L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schober</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Greenbaum</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Courtot</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brinkman</surname>
            ,
            <given-names>R. R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sansone</surname>
            ,
            <given-names>S. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scheuermann</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , et al. (
          <year>2011</year>
          ).
          <article-title>Overcoming the ontology enrichment bottleneck with quick term templates</article-title>
          .
          <source>Applied Ontology</source>
          ,
          <volume>6</volume>
          (
          <issue>1</issue>
          ),
          <fpage>13</fpage>
          -
          <lpage>22</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ashburner</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosse</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bard</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bug</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ceusters</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goldberg</surname>
            ,
            <given-names>L. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eilbeck</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ireland</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mungall</surname>
            ,
            <given-names>C. J.</given-names>
          </string-name>
          ,
          <source>The OBI Consortium</source>
          , Leontis,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>RoccaSerra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Ruttenberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Sansone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.-A.</given-names>
            ,
            <surname>Scheuermann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. H.</given-names>
            ,
            <surname>Shah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Whetzel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. L.</given-names>
            , and
            <surname>Lewis</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          (
          <year>2007</year>
          ).
          <article-title>The OBO Foundry: coordinated evolution of ontologies to support biomedical data integration</article-title>
          .
          <source>Nat Biotechnol</source>
          ,
          <volume>25</volume>
          (
          <issue>11</issue>
          ),
          <fpage>1251</fpage>
          -
          <lpage>1255</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>7 https://github.com/jamesaoverton/obo-tutorial</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>