@@ -7,217 +7,14 @@ Kit](https://github.com/INCATools/ontology-development-kit) (ODK). It
77provides additional ROBOT commands to perform tasks not covered by the
88ROBOT built-in command set.
99
10- Provided commands
11- -----------------
12-
13- ### validate
14- This command is intended to check the alignment of the ontology against
15- another, “upper-level” ontology. The ontology is considered “aligned” if
16- all its classes are subclasses of at least one class of the upper
17- ontology.
18-
19- The upper ontology to check against is specified using either the
20- ` --upper-ontology ` option (to load it from a local file) or the
21- ` --upper-ontology-iri ` option (to load it from a resolvable IRI). If
22- neither option is used, the command defaults to check against the [ Core
23- Ontology for Biology and Biomedicine] ( https://github.com/OBOFoundry/COB )
24- (COB).
25-
26- By default, the command will _ fail_ (interrupting any pipeline it is a
27- part of in the process) if the ontology is not aligned. Use the
28- ` --fail false ` option to allow the pipeline to continue without
29- erroring out.
30-
31- The command will produce a report listing the top-level unaligned
32- classes (if any) if the ` --report-output <FILE> ` option is used.
33-
34- To only check the alignment of classes in a given namespace, use the
35- ` --base-iri <namespace> ` option – that option may be used repeatedly to
36- check classes in different namespaces.
37-
38- If the ` --ignore-dangling true ` option is used, classes that are
39- considered “dangling” will be ignored. You may want to use that option
40- if you are not restricting the alignment check to your ontology’s
41- namespace, to avoid failing the check for any single dangling class
42- that is merely referenced from your ontology. On the other hand, not
43- using that option could be a way to check that your ontology does _ not_
44- reference dangling classes (which could indicate that you are missing
45- some imports).
46-
47- ### normalize
48- This command is intended to perform various “normalisation” operations.
49-
50- The main normalisation operation is the injection of
51- _ SubAnnotationPropertyOf_ axioms for annotation properties that
52- represent subsets (` --subset-decls true ` ) or synonym types
53- (` --synonym-decls true ` ).
54-
55- For subsets, if the ontology contains any annotation using the
56- ` oboInOwl:inSubset ` property (which marks a class as belonging to a
57- subset), and the annotation value is an IRI, this will inject an axiom
58- declaring that the IRI represents a subproperty of
59- ` oboInOwl:SubsetProperty ` .
60-
61- For synonyms, if the ontology contains any annotation using the
62- ` oboInOwl:hasSynonymType ` property (used on synonyn annotations to
63- indicate the nature of the synonym, e.g. abbreviations, etc.), and the
64- annotation value is an IRI, this will inject an axiom declaring that the
65- IRI represents a subproperty of ` oboInOwl:SynonymTypeProperty ` .
66-
67- In both cases, the normalisation will only consider IRIs that fall under
68- the following namespaces:
69-
70- * ` http://purl.obolibrary.org/obo/ ` ;
71- * ` http://www.ebi.ac.uk/efo/ ` ;
72- * ` http://w3id.org/biolink/ ` .
73-
74- Additional namespaces can be specified using the ` --base-iri ` option.
75-
76- Another normalisation operation is the merging of duplicate axioms that
77- differ only by their annotations. This is done with the
78- ` --merge-axioms true ` option. Of note, the existence of that option is
79- a (hopefully) temporary workaround until the corresponding feature in
80- ROBOT (` robot repair --merge-axiom-annotations true ` ) is fixed, as it
81- currently does not work as expected.
82-
83- Lastly, the command can also inject a ` dc:source ` annotation on the
84- ontology, set from the version IRI (` --add-source true ` ). This is used
85- in the ODK to annotate import modules with the version IRI of the
86- ontology they are derived from. (It is hoped that this could soon be
87- replaced by a built-in feature in ROBOT’s ` annotate ` command.)
88-
89- ### subset
90- The ` subset ` command creates an ontology subset. It is intended to
91- replace several equivalent OWLTools commands with a uniformed behaviour.
92-
93- #### Subset definition
94- The command offers several ways of defining which classes should be
95- included in the subset:
96-
97- * With a DL query, e.g ` --query "'part of' some 'nervous system'" `
98-
99- The subset will include all equivalent classes and subclasses matching
100- the query (to include superclasses as well, add the ` --ancestors true `
101- option). The query can use either quoted labels (as in the example
102- above) or short-form identifiers (e.g. ` --query UBERON:0001016 ` ).
103- When using quoted labels, if the query consists of a single class, be
104- mindful that you will most likely need to quote it _ twice_ , as in
105- ` --query "'nervous system'" ` – the outer quotes will be stripped by
106- your command interpreter.
107-
108- Be also mindful that not all reasoners allow querying using a class
109- expression – ELK, which the ` subset ` command uses by default, does not,
110- so you might want to use WHELK instead (` --reasoner WHELK ` ).
111-
112- * With a subset name or IRI, e.g. ` --subset PFX:MY_SUBSET `
113-
114- This will select all classes that are marked with a ` oboInOwl:inSubset `
115- annotation whose value is the ` PFX:MY_SUBSET ` IRI. If the argument is
116- not an IRI (e.g. ` --subset MY_SUBSET ` ), this will select all classes
117- with a ` oboInOwl:inSubset ` annotation whose value ends with ` #MY_SUBSET `
118- regardless of the namespace – this is for compatibility with OWLTools.
119-
120- * With an explicit list of terms (` --term TERM ` or ` --term-file FILE ` )
121-
122- Any class whose ID is explicitly specified on the command line with
123- ` --term CLASS:ID ` or is listed in the file pointed to by the argument
124- to ` --term-file ` (which is expected to contain a list of IDs, with one
125- ID per line, excluding blank lines and lines starting with ` # ` ) will be
126- included in the subset.
127-
128- The ` --query ` , ` --subset ` , ` --term ` , and ` --term-file ` option can be
129- mixed freely and used repeatedly. Their effects are cumulative. For
130- example:
131-
132- ``` sh
133- odk:subset --reasoner WHELK \
134- --query " 'nervous system'" \
135- --query " 'part of' some 'nervous system'" \
136- --term UBERON:0000955
137- ```
138-
139- will create a subset from (1) 'nervous system' and all its descendants
140- and equivalents, (2) all classes that are 'part of' the 'nervous
141- system', and (3) the UBERON:0000955 class.
142-
143- #### Expanding the subset
144- By default, the subset generated by the ` subset ` command contains _ only_
145- the classes defined using any of the methods shown in the previous
146- section, plus all the object and annotation properties used by those
147- classes.
148-
149- Use the ` --fill-gaps true ` option to expand the subset so that it
150- contains all the classes that are referenced from within the initial
151- subset.
152-
153- Several options allow to control how the subset is expanded.
154-
155- * ` --follow-property PROPERTY `
156-
157- By default, the expanded subset will include all classes referenced by
158- _ any_ class expression used within the initial subset. If the
159- ` --follow-property PROPERTY ` option is used (where ` PROPERTY ` is the
160- IRI of an object property), only class expressions that use the
161- indicated object property will be considered. The option may be used
162- several times to follow several object properties.
163-
164- * ` --follow-in NAMESPACE `
165-
166- When this option is used, only classes that are in the indicated
167- namespace will be included in the expanded subset (the option may be
168- used several times to include classes from several namespaces). Axioms
169- that refer to a class outside of the followed namespace(s) will be
170- excluded from the subset.
171-
172- * ` --not-follow-in NAMESPACE `
173-
174- This is the opposite of the previous option. It prevents the inclusion
175- of any classes that is in the indicated namespace. It may also be used
176- repeatedly to exclude classes from several namespaces. Axioms that refer
177- to a class within the not-followed namespace(s) will be excluded from
178- the subset.
179-
180- The ` --follow-in ` and ` --not-follow-in ` options are mutually
181- exclusive. If both are used in the same ` subset ` command, the
182- ` --follow-in ` options take precedence and any ` --not-follow-in ` option
183- will be ignored.
184-
185- * ` --no-dangling false `
186-
187- By default, “dangling” classes are not considered for inclusion when
188- expanding the subset, even if they are referenced from within the
189- subset. Use that option to include them anyway.
190-
191- Note that none of the 4 options above affect the _ initial subset_ (the
192- subset defined by any of the ` --query ` , ` --subset ` , ` --term ` , or
193- ` --term-file ` options). They only affect how the subset is expanded. For
194- example, if the initial subset contains a class in the ` GO: ` namespace,
195- that class will be present in the final subset even if the
196- ` --not-follow-in http://purl.obolibrary.org/obo/GO_ ` option is used. To
197- force the exclusion of _ any_ GO class, either make sure that the initial
198- subset does not list any such class, or forcibly remove all GO classes
199- from the ontology (e.g. with ` robot remove ` or ` robot filter ` ) before
200- creating the subset.
201-
202- #### Writing the subset
203- By default, once the subset is created, it becomes the main ontology
204- that is being manipulated by the ROBOT pipeline (replacing the initial
205- ontology). This means that:
206-
207- * it can be saved to file using the traditional ` --output ` option;
208- * it will be passed down to any further ROBOT command.
209-
210- If you use the ` --write-to FILE ` option, the subset will be saved into
211- the indicated file, and will _ not_ be passed down to the rest of the
212- ROBOT pipeline (the unmodified, initial ontology will be passed down
213- instead). This allows creating several subsets from the same ontology:
214-
215- ``` sh
216- robot merge -i my-ontology.owl \
217- odk:subset --subset MY_SUBSET --write-to my-subset.owl \
218- odk:subset --subset ANOTHER_SUBSET --write-to another-subset.owl
219- ```
10+ Available commands
11+ ------------------
12+ The following commands are provided by the plugin:
22013
14+ * ` odk:subset ` : to create ontology subsets;
15+ * ` odk:validate ` : to validate an ontology against an upper-level
16+ ontology;
17+ * ` odk:normalize ` : to “normalise” an ontology.
22118
22219Building
22320--------
0 commit comments