James Overton and Becky Jackson
a command-line tool and library
for automating OWL ontology development tasks
“ROBOT is an OBO Tool”
OBO = Open Biological and Biomedical Ontologies
But ROBOT is not limited to OBO !!!
robot.jar
filerobot
scriptR.C. Jackson, J.P. Balhoff, E. Douglass, N.L. Harris, C.J. Mungall, and J.A. Overton.
ROBOT: A tool for automating ontology workflows.
BMC Bioinformatics, vol. 20, July 2019.
DROID (new) | web interface for GNU Make + GitHub |
GitHub | public repositories, workflows |
ODK | GNU Make templates, Docker container |
GNU Make, git | build tool, version control |
DOS-DP | RDF/OWL generation |
ROBOT | RDF/OWL manipulation |
OWLAPI, Apache Jena | RDF/OWL libraries |
robot-command
robot-core
Operationsrobot-core
robot convert |
change format: RDF/XML, TTL, OBO, OMN, … |
robot extract |
extract module: SLME TOP/BOT/STAR, MIREOT |
robot merge |
merge ontologies, imports |
robot unmerge |
undo merge (“subtract” axioms) |
robot mirror |
make local copies of import chain |
robot measure |
report ontology metrics |
robot python |
control ROBOT from Python |
robot reason |
reason, add axioms: ELK, HermiT, … |
robot explain |
output explanation for an inference |
robot materialize |
materialize inferred expressions |
robot relax |
relax Equivalents to SubClassOf |
robot reduce |
remove redundant SubClassOf axioms |
robot validate-profile |
check the OWL reasoning profile |
robot annotate |
add ontology annotations |
robot diff |
show differences between ontologies |
robot export |
convert OWL to tables |
robot rename |
map old IRIs to new IRIs |
robot remove |
remove selected axioms from ontology |
robot filter |
copy selected axioms to a new ontology |
robot repair |
fix common problems (OBO focused) |
robot collapse |
prune class hierarchies |
robot template |
convert tables to OWL |
robot query |
SPARQL: ASK, SELECT, CONSTRUCT, UPDATE |
robot verify |
run query, print and exit on results |
robot report |
customizable quality control report (OBO defaults) |
robot expand |
execute SPARQL expansion rules in annotations |
robot subset
extract ontology subsets by
annotations> robot help
help
export
--input
: input ontology--header
: fields to include in the export--export
: output export file|
)IRI
/ ID
LABEL
/ SYNONYMS
SubClass Of
/ SubClasses
Type
IAO:0000115
/ definition
The ID
column will always contain CURIEs and the
LABEL
column will always contain labels, but other values
are rendered by their label when possible.
robot export --input edit.owl \
--header "ID|SubClass Of" \
--entity-format ID \
--export results/export-parents.csv
You can set the rendering for all entity references with
--entity-format
: ID
, IRI
,
LABEL
, NAME
robot export \
--input edit.owl \
--header "ID|LABEL|definition" \
--export results/export-definitions.csv
Annotations will always contain the literal values.
You can reference an annotation property by ID or label.
robot export --input edit.owl \
--header "ID|LABEL|Type" \
--entity-select "properties" \
--export results/export-properties.csv
You can select classes
, individuals
, and/or
properties
with
--entity-select "classes properties"
query
(part 1)--input
: input ontology--query
: query & output pairASK always returns true/false
reason
--input
: input ontology--reasoner
: optional specify the reasoner to
use (ELK)--output
: output ontology with inferred statementsCheck that there are no unsatisfiable entities and that the ontology is consistent
diff
Formats: plain
, pretty
, html
,
markdown
--annotate-inferred-axioms true
--create-new-ontology true
--create-new-ontology-with-annotations true
--remove-redundant-subclass-axioms true
template
--input
: optional ontology containing
terms/properties to use or to merge into--template
: template source file--output
: output ontologyID | Label | Type | Annotation | Parent |
---|---|---|---|---|
ID | LABEL | TYPE | A property | SC % |
ex:123 | Example | owl:Class | An example | owl:Thing |
ID
: term CURIELABEL
: term label, asserted as
rdfs:label
TYPE
: term entity type (you can use classes here for
instances)A definition
A IAO:0000115
Axiom annotations are applied to the column to the left with
>
Annotation | Axiom Annotation |
---|---|
A definition | >A database_cross_reference |
My def … | url:http://example.com |
SC %
: direct superclassEC %
: equivalent class%
can be used as a wildcard to fill in logical
expressions:
SC 'has part' some %
SC 'has part' some ('part 1' and %)
CLASS_TYPE
: specify subclass
or
equivalent
expression typeC %
: interchangeable expression typeID | Class Type | Has Part |
---|---|---|
ID | CLASS_TYPE | C ‘has part’ some % |
ex:0 | ||
ex:1 | equivalent | ex:0 |
ex:2 | subclass | ex:0 |
You can reference a class or property by label if:
LABEL
column OR--input
ontologyUse the SPLIT
keyword to allow multiple values in a
single cell, separated by the provided character
ID | Parent |
---|---|
ID | SC % SPLIT=, |
ex:4 | ex:0,ex:1,ex:2 |
robot template --input edit.owl \
--template module.tsv \
--ontology-iri http://purl.obolibrary.org/obo/robot/mod.owl \
--output results/mod.owl
The --ontology-iri
arg will assign this ontology IRI to
our new module. This can be used in the import statement in the core
ontology.
robot template --input edit.owl \
--merge-before \
--template new_class.tsv \
--output results/new_class.owl
If your ontology includes imports, use
--collapse-import-closure false
with any merge option to
maintain the closure.
You can specify the output format of the constructed module with
--format
(e.g., ttl
)
extract
--input
: input ontology--method
: what kind of extract to perform--output
: output extracted modulerobot extract \
--input-iri http://purl.obolibrary.org/obo/obi.owl \
--term OBI:0000443 \
--method BOT \
--output results/obi_bot.owl
SLME modules include the input “seed” (term) and all terms required
for to preserve logic between entities in the module SLME methods:
BOT
(seed + superclasses), TOP
(seed +
subclasses), STAR
(seed + inter-relationships)
robot extract \
--input-iri http://purl.obolibrary.org/obo/obi.owl \
--method MIREOT \
--lower-terms obi_terms.txt \
--output results/obi_mireot.owl
MIROET modules only preserve the subclass hierarchy, but do not include additional logical relationships.
merge
--input
: input ontologies (as many as you want)--output
: output merged ontologyIf your ontology has import statements, ROBOT will automatically merge them.
Use --collapse-import-closure false
to maintain them
when merging separate files
annotate
--input
: input ontology--version-iri
: add a version IRI to the ontology--annotation [property] [value]
: add an annotation to
the ontology--output
: output ontologyreason
- relax
- reduce
report
--input
: input ontology--format
: optional report format (tsv, csv,
html, yaml, json, xlsx)--output
: output report tableYou can choose what violation level to fail on: ERROR, WARN, INFO, or none
verify
https://robot.obolibrary.org/verify
Create your own rules using SPARQL queries and verify your ontology conforms to them
validate-profile
https://robot.obolibrary.org/validate-profile
Validate your ontology against an OWL 2 profile: EL, RL, QL, DL, Full
measure
https://robot.obolibrary.org/measure
Compute metrics about your ontology (number of classes, number of axioms, OWL2 profile, etc.)