ROBOT is a tool for working with Open Biomedical Ontologies. It can be used as a command-line tool or as a library for any language on the Java Virtual Machine.
The command-line tool is packaged a Java JAR file and can be run via the
robot shell script.
robot.jarfile from the latest release, and the right script for your platform:
Now you should be able to run ROBOT from a command line:
ROBOT is written in Java, and can be used from any language that runs on the Java Virtual Machine. It’s available on Maven Central. The code is divided into two parts:
robot-coreis a library of operations for working with ontologies (Maven Central, JavaDocs)
robot-commandis a command-line interface for using those operations (Maven Central, JavaDocs)
You can also download the standalone
robot.jar file from the latest release to include in your projects.
robot-core library provides a number of Operation classes for working with ontologies. The
IOHelper class contains convenient methods for loading and saving ontologies, and for loading sets of term IRIs. Here’s an example of extracting a “core” subset from an ontology:
IOHelper ioHelper = new IOHelper(); OWLOntology full = ioHelper.loadOntology("ontology.owl"); Set<IRI> coreTerms = ioHelper.loadTerms("coreTerms.txt"); OWLOntology core = ExtractOperation.extract(full, coreTerms); ioHelper.saveOntology(core, "core.owl");
IOHelper ioHelper = new IOHelper(); ioHelper.saveOntology( ExtractOperation.extract( ioHelper.loadOntology("ontology.owl"), ioHelper.loadTerms("coreTerms.txt"), IRI.create("http://example.com") ), 'core.owl' );