James Overton & Becky Jackson
17 releases:
sh run.sh robot --version
cd examples
sh ../run.sh
robot merge --input edit.owl \
--input foo.owl \
--output results/merged.owl
ROBOT will automatically merge imports. To not merge imports, include --collapse-import-closure false
. This option is not supported in v1.0.0.
robot merge --input with-import.owl \
--output results/merged_imports.owl
Validates that the ontology contains no unsatisfiable entities and that it is not inconsistent.
robot reason --input unsatisfiable.owl
robot reason --input non-reasoned.owl \
--output results/reasoned.owl
robot annotate --input edit.owl \
--version-iri \
https://github.com/ontodev/robot/releases/2019-07-31/edit.owl \
--annotation oboInOwl:date "07:31:2019 12:00" \
--output results/annotated.owl
robot convert --input edit.owl \
--format owl \
--output results/release.owl
NOTE: OWL functional syntax is defined by the suffix .ofn
- if you want to convert to that format, use --format ofn
or an output ending in .ofn
. The .owl
suffix can be used to represent any OWL ontology. Using --format owl
or excluding the --format
option and specifying an output with .owl
will convert to RDF/XML.
robot convert --input edit.owl \
--output results/release.obo
NOTE: You do not always need to include the --format
if the extension of the --output
matches the desired format.
Output ontologies can be used as the input to subsequent commands. Only the first command uses an --input
, and only the last command uses an --output
.
robot merge --input edit.owl --collapse-import-closure true \
reason --reasoner ELK \
annotate --version-iri http://purl.obolibrary.org/obo/robot/2018-08-07/release.owl \
convert --output results/chained_release.ttl
A Makefile contains a set of rules to make target objects.
Here, we use it to create the release files.
make release
NOTE: This Makefile will fail on v1.0.0 and v1.1.0 - alternatively, run make build
.
diff
supports different formats:
plain
: default, shows removed and added axiomspretty
: plain, plus entity labels for IRIshtml
: HTML summary page (easy for humans!)markdown
: markdown summary (great for GitHub!)robot diff --left non-reasoned.owl \
--right results/reasoned.owl \
--output results/diff.txt
NOTE: If you do not include an --output
, the results will be printed to the terminal.
robot diff --left non-reasoned.owl \
--right results/reasoned.owl \
--format html \
--output results/diff.html
SELECT queries can be useful for statistics on the ontology, and for sharing data. For example, you could get a list of all the terms containing just the IDs and labels.
robot query --input edit.owl \
--query select.rq results/select.tsv
ASK queries can help determine if something exists in the ontology or not. For example, if you want to make sure that “trunk” is in the “vertebrate core” subset.
robot query --input edit.owl \
--query ask.rq results/ask.txt
Sometimes, classes can be accidentally orphaned. This verification ensures that all classes, aside from the top-level “anatomical entity”, have asserted parents. If they do not, the verification fails.
robot verify --input edit.owl \
--queries verify.rq \
--output-dir results
This verify query checks that all classes have an equivalent class statement. In our edit ontology, only some of the classes have equivalent classes, so this will fail.
robot verify --input edit.owl \
--queries verify_fail.rq \
--output-dir results
robot report --input edit.owl --output results/report.tsv
make test
from the Makefile STAR: fixpoint-nested
BOT: bottom module
TOP: top module
robot extract \
--input-iri http://purl.obolibrary.org/obo/obi.owl \
--term OBI:0000443 \
--method BOT \
--output results/obi_bot.owl
NOTE: You can also include a list of terms to extract in a text file with --term-file
.
NOTE 2: To use a local file, use --input <file>
instead of --input-iri
.
Creates a simple hierarchy of terms.
Requires lower term(s) and optional upper term(s).
robot extract \
--input-iri http://purl.obolibrary.org/obo/obi.owl \
--method MIREOT \
--lower-terms obi_terms.txt \
--output results/obi_mireot.owl
NOTE: Without specifiying any --upper-terms
, the MIREOT method will include all ancestors up to owl:Thing
.
NOTE 2: To just specify one term to extract, use --lower-term
This will create a standalone module that can be included in the edit file with an import statement. To update the module, editors only need to update the spreadsheet and run this command to remake the module.
robot template --input edit.owl \
--template module.tsv \
--ontology-iri http://purl.obolibrary.org/obo/robot/module.owl \
--output results/module.owl
NOTE: template
gets all the entity labels from edit.owl
so we are able to use the labels in the spreadsheet, instead of always specifying the ID. If we didn’t include the --input
, the labels would not resolve.
For one-time class creation (especially if many classes need to be created), a temporary template can be created and the results immediately merged into the edit ontology.
robot template --input edit.owl --merge-before \
--template new_class.tsv \
--output results/new_class.owl
NOTE: if your ontology includes imports, use --collapse-import-closure false
with any merge option to maintain the closure.
robot query --input edit.owl \
--query construct.rq results/construct.ttl \
merge --input results/construct.ttl \
--output results/construct.owl
The construct.ttl
file isn’t much use on its own; we need to merge it. For query
, the output ontology is the unchanged input ontology, so we can chain this with the merge
command to merge construct.ttl
.
robot query --input edit.owl \
--update update.ru \
--output results/updated.owl
Here, we replace ‘definition’ (IAO:0000115
) with ‘external_definition’ (UBPROP:0000001
) for all UBERON terms.
--select
option to remove related terms--axioms
robot remove --input edit.owl \
--term UBERON:0000475 \
--select "self descendants" \
--output results/removed.owl
robot remove --input edit.owl \
--axioms equivalent \
remove --select parents --select anonymous --select imports \
--output results/simple.owl
NOTE: --select
accepts a string of options, or can be passed multiple times. For a string of options (previous example) the selected set is the union of all options (both the input term and all descendants of the term). For passing in multiple select options (as above), the options are processed in order (first the parents are selected, and then only the anonymous parents are selected).
Released with v1.2.0-alpha - previously, filter
only filtered for object properties.
robot filter --input edit.owl \
--term UBERON:0000475 \
--select "self descendants annotations" \
--output results/branch.owl
NOTE: in order to include annotations on the filtered entities, --select annotations
must be included. Otherwise, you muist include all annotation properties in the set of input terms.
robot filter --input edit.owl \
--select \
"oboInOwl:inSubset=<http://purl.obolibrary.org/obo/uberon/core#uberon_slim>" \
--select annotations \
--output-iri http://purl.obolibrary.org/robot/uberon_slim.owl
--output results/uberon_slim.owl
NOTE: selecting for annotations is highly configurable:
CURIE=CURIE
CURIE="literal"^^datatype
CURIE=<IRI>
CURIE=~"regex pattern"