├── .github
└── workflows
│ ├── docs.yml
│ └── qc.yml
├── .gitignore
├── LICENSE.txt
├── README.md
├── apollo_sv-base.json
├── apollo_sv-base.obo
├── apollo_sv-base.owl
├── apollo_sv-full.json
├── apollo_sv-full.obo
├── apollo_sv-full.owl
├── apollo_sv.json
├── apollo_sv.obo
├── apollo_sv.owl
├── catalog-v001.xml
├── docs
├── cite.md
├── contributing.md
├── index.md
└── odk-workflows
│ ├── ContinuousIntegration.md
│ ├── EditorsWorkflow.md
│ ├── ManageDocumentation.md
│ ├── ReleaseWorkflow.md
│ ├── RepoManagement.md
│ ├── RepositoryFileStructure.md
│ ├── SettingUpDockerForODK.md
│ ├── UpdateImports.md
│ ├── components.md
│ └── index.md
├── find-highest-obo-id.sh
├── mkdocs.yaml
└── src
├── ontology
├── Makefile
├── README-editors.md
├── apollo-sv.owl
├── apollo_sv-edit.owl
├── apollo_sv-idranges.owl
├── apollo_sv-odk.yaml
├── apollo_sv.Makefile
├── catalog-v001.xml
├── imports
│ ├── external_import.owl
│ ├── geo_import.owl
│ ├── geo_terms.txt
│ ├── go_import.owl
│ ├── go_terms.txt
│ ├── iao_import.owl
│ ├── iao_terms.txt
│ ├── ido_import.owl
│ ├── ido_terms.txt
│ ├── mf_import.owl
│ ├── mf_terms.txt
│ ├── omrse_import.owl
│ ├── omrse_terms.txt
│ ├── ro_import.owl
│ └── ro_terms.txt
├── run.bat
└── run.sh
├── scripts
├── run-command.sh
├── update_repo.sh
└── validate_id_ranges.sc
├── sparql
├── README.md
├── apollo_sv_terms.sparql
├── basic-report.sparql
├── class-count-by-prefix.sparql
├── edges.sparql
├── inject-subset-declaration.ru
├── inject-synonymtype-declaration.ru
├── iri-range-violation.sparql
├── label-with-iri-violation.sparql
├── labels.sparql
├── multiple-replaced_by-violation.sparql
├── obsoletes.sparql
├── owldef-self-reference-violation.sparql
├── postprocess-module.ru
├── preprocess-module.ru
├── simple-seed.sparql
├── subsets-labeled.sparql
├── synonyms.sparql
├── terms.sparql
└── xrefs.sparql
└── templates
└── external_import.tsv
/.github/workflows/docs.yml:
--------------------------------------------------------------------------------
1 | # Basic ODK workflow
2 | name: Docs
3 |
4 | # Controls when the action will run.
5 | on:
6 | # Allows you to run this workflow manually from the Actions tab
7 | workflow_dispatch:
8 | push:
9 | branches:
10 | - main
11 |
12 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
13 | jobs:
14 | build:
15 | name: Deploy docs
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Checkout main
19 | uses: actions/checkout@v3
20 |
21 | - name: Deploy docs
22 | uses: mhausenblas/mkdocs-deploy-gh-pages@master
23 | # Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
24 | env:
25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 | CONFIG_FILE: mkdocs.yaml
27 |
28 |
--------------------------------------------------------------------------------
/.github/workflows/qc.yml:
--------------------------------------------------------------------------------
1 | # Basic ODK workflow
2 |
3 | name: CI
4 |
5 | # Controls when the action will run.
6 | on:
7 | # Triggers the workflow on push or pull request events but only for the main branch
8 | push:
9 | branches: [ main ]
10 | pull_request:
11 | branches: [ main ]
12 |
13 | # Allows you to run this workflow manually from the Actions tab
14 | workflow_dispatch:
15 |
16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
17 | jobs:
18 | # This workflow contains a single job called "ontology_qc"
19 | ontology_qc:
20 | # The type of runner that the job will run on
21 | runs-on: ubuntu-latest
22 | container: obolibrary/odkfull:v1.5.2
23 |
24 | # Steps represent a sequence of tasks that will be executed as part of the job
25 | steps:
26 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27 | - uses: actions/checkout@v3
28 |
29 | - name: Run ontology QC checks
30 | env:
31 | DEFAULT_BRANCH: main
32 | run: cd src/ontology && make ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' test IMP=false PAT=false MIR=false
33 |
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | !src/ontology/tmp/README.md
3 | *.tmp
4 | *.tmp.json
5 | *.tmp.obo
6 | *.tmp.owl
7 | .DS_Store
8 | .github/token.txt
9 | bin/
10 | semantic.cache
11 | src/.DS_Store
12 | src/ontology/*~
13 | src/ontology/.DS_Store
14 | src/ontology/apollo_sv-base.*
15 | src/ontology/apollo_sv-basic.*
16 | src/ontology/apollo_sv-full.*
17 | src/ontology/apollo_sv-simple-non-classified.*
18 | src/ontology/apollo_sv-simple.*
19 | src/ontology/apollo_sv.json
20 | src/ontology/apollo_sv.obo
21 | src/ontology/apollo_sv.owl
22 | src/ontology/catalog*.xml
23 | src/ontology/dosdp-tools.log
24 | src/ontology/ed_definitions_merged.owl
25 | src/ontology/imports/*_terms_combined.txt
26 | src/ontology/merged-apollo_sv-edit.owl
27 | src/ontology/mirror
28 | src/ontology/mirror/*
29 | src/ontology/ontologyterms.txt
30 | src/ontology/patterns
31 | src/ontology/reports/*
32 | src/ontology/run.sh.conf
33 | src/ontology/run.sh.env
34 | src/ontology/seed.txt
35 | src/ontology/simple_seed.txt
36 | src/ontology/target/
37 | src/ontology/tmp/*
38 | src/patterns/all_pattern_terms.txt
39 | src/patterns/data/**/*.ofn
40 | src/patterns/data/**/*.txt
41 | src/patterns/pattern_owl_seed.txt
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Attribution 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More_considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution 4.0 International Public License
58 |
59 | By exercising the Licensed Rights (defined below), You accept and agree
60 | to be bound by the terms and conditions of this Creative Commons
61 | Attribution 4.0 International Public License ("Public License"). To the
62 | extent this Public License may be interpreted as a contract, You are
63 | granted the Licensed Rights in consideration of Your acceptance of
64 | these terms and conditions, and the Licensor grants You such rights in
65 | consideration of benefits the Licensor receives from making the
66 | Licensed Material available under these terms and conditions.
67 |
68 |
69 | Section 1 -- Definitions.
70 |
71 | a. Adapted Material means material subject to Copyright and Similar
72 | Rights that is derived from or based upon the Licensed Material
73 | and in which the Licensed Material is translated, altered,
74 | arranged, transformed, or otherwise modified in a manner requiring
75 | permission under the Copyright and Similar Rights held by the
76 | Licensor. For purposes of this Public License, where the Licensed
77 | Material is a musical work, performance, or sound recording,
78 | Adapted Material is always produced where the Licensed Material is
79 | synched in timed relation with a moving image.
80 |
81 | b. Adapter's License means the license You apply to Your Copyright
82 | and Similar Rights in Your contributions to Adapted Material in
83 | accordance with the terms and conditions of this Public License.
84 |
85 | c. Copyright and Similar Rights means copyright and/or similar rights
86 | closely related to copyright including, without limitation,
87 | performance, broadcast, sound recording, and Sui Generis Database
88 | Rights, without regard to how the rights are labeled or
89 | categorized. For purposes of this Public License, the rights
90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
91 | Rights.
92 |
93 | d. Effective Technological Measures means those measures that, in the
94 | absence of proper authority, may not be circumvented under laws
95 | fulfilling obligations under Article 11 of the WIPO Copyright
96 | Treaty adopted on December 20, 1996, and/or similar international
97 | agreements.
98 |
99 | e. Exceptions and Limitations means fair use, fair dealing, and/or
100 | any other exception or limitation to Copyright and Similar Rights
101 | that applies to Your use of the Licensed Material.
102 |
103 | f. Licensed Material means the artistic or literary work, database,
104 | or other material to which the Licensor applied this Public
105 | License.
106 |
107 | g. Licensed Rights means the rights granted to You subject to the
108 | terms and conditions of this Public License, which are limited to
109 | all Copyright and Similar Rights that apply to Your use of the
110 | Licensed Material and that the Licensor has authority to license.
111 |
112 | h. Licensor means the individual(s) or entity(ies) granting rights
113 | under this Public License.
114 |
115 | i. Share means to provide material to the public by any means or
116 | process that requires permission under the Licensed Rights, such
117 | as reproduction, public display, public performance, distribution,
118 | dissemination, communication, or importation, and to make material
119 | available to the public including in ways that members of the
120 | public may access the material from a place and at a time
121 | individually chosen by them.
122 |
123 | j. Sui Generis Database Rights means rights other than copyright
124 | resulting from Directive 96/9/EC of the European Parliament and of
125 | the Council of 11 March 1996 on the legal protection of databases,
126 | as amended and/or succeeded, as well as other essentially
127 | equivalent rights anywhere in the world.
128 |
129 | k. You means the individual or entity exercising the Licensed Rights
130 | under this Public License. Your has a corresponding meaning.
131 |
132 |
133 | Section 2 -- Scope.
134 |
135 | a. License grant.
136 |
137 | 1. Subject to the terms and conditions of this Public License,
138 | the Licensor hereby grants You a worldwide, royalty-free,
139 | non-sublicensable, non-exclusive, irrevocable license to
140 | exercise the Licensed Rights in the Licensed Material to:
141 |
142 | a. reproduce and Share the Licensed Material, in whole or
143 | in part; and
144 |
145 | b. produce, reproduce, and Share Adapted Material.
146 |
147 | 2. Exceptions and Limitations. For the avoidance of doubt, where
148 | Exceptions and Limitations apply to Your use, this Public
149 | License does not apply, and You do not need to comply with
150 | its terms and conditions.
151 |
152 | 3. Term. The term of this Public License is specified in Section
153 | 6(a).
154 |
155 | 4. Media and formats; technical modifications allowed. The
156 | Licensor authorizes You to exercise the Licensed Rights in
157 | all media and formats whether now known or hereafter created,
158 | and to make technical modifications necessary to do so. The
159 | Licensor waives and/or agrees not to assert any right or
160 | authority to forbid You from making technical modifications
161 | necessary to exercise the Licensed Rights, including
162 | technical modifications necessary to circumvent Effective
163 | Technological Measures. For purposes of this Public License,
164 | simply making modifications authorized by this Section 2(a)
165 | (4) never produces Adapted Material.
166 |
167 | 5. Downstream recipients.
168 |
169 | a. Offer from the Licensor -- Licensed Material. Every
170 | recipient of the Licensed Material automatically
171 | receives an offer from the Licensor to exercise the
172 | Licensed Rights under the terms and conditions of this
173 | Public License.
174 |
175 | b. No downstream restrictions. You may not offer or impose
176 | any additional or different terms or conditions on, or
177 | apply any Effective Technological Measures to, the
178 | Licensed Material if doing so restricts exercise of the
179 | Licensed Rights by any recipient of the Licensed
180 | Material.
181 |
182 | 6. No endorsement. Nothing in this Public License constitutes or
183 | may be construed as permission to assert or imply that You
184 | are, or that Your use of the Licensed Material is, connected
185 | with, or sponsored, endorsed, or granted official status by,
186 | the Licensor or others designated to receive attribution as
187 | provided in Section 3(a)(1)(A)(i).
188 |
189 | b. Other rights.
190 |
191 | 1. Moral rights, such as the right of integrity, are not
192 | licensed under this Public License, nor are publicity,
193 | privacy, and/or other similar personality rights; however, to
194 | the extent possible, the Licensor waives and/or agrees not to
195 | assert any such rights held by the Licensor to the limited
196 | extent necessary to allow You to exercise the Licensed
197 | Rights, but not otherwise.
198 |
199 | 2. Patent and trademark rights are not licensed under this
200 | Public License.
201 |
202 | 3. To the extent possible, the Licensor waives any right to
203 | collect royalties from You for the exercise of the Licensed
204 | Rights, whether directly or through a collecting society
205 | under any voluntary or waivable statutory or compulsory
206 | licensing scheme. In all other cases the Licensor expressly
207 | reserves any right to collect such royalties.
208 |
209 |
210 | Section 3 -- License Conditions.
211 |
212 | Your exercise of the Licensed Rights is expressly made subject to the
213 | following conditions.
214 |
215 | a. Attribution.
216 |
217 | 1. If You Share the Licensed Material (including in modified
218 | form), You must:
219 |
220 | a. retain the following if it is supplied by the Licensor
221 | with the Licensed Material:
222 |
223 | i. identification of the creator(s) of the Licensed
224 | Material and any others designated to receive
225 | attribution, in any reasonable manner requested by
226 | the Licensor (including by pseudonym if
227 | designated);
228 |
229 | ii. a copyright notice;
230 |
231 | iii. a notice that refers to this Public License;
232 |
233 | iv. a notice that refers to the disclaimer of
234 | warranties;
235 |
236 | v. a URI or hyperlink to the Licensed Material to the
237 | extent reasonably practicable;
238 |
239 | b. indicate if You modified the Licensed Material and
240 | retain an indication of any previous modifications; and
241 |
242 | c. indicate the Licensed Material is licensed under this
243 | Public License, and include the text of, or the URI or
244 | hyperlink to, this Public License.
245 |
246 | 2. You may satisfy the conditions in Section 3(a)(1) in any
247 | reasonable manner based on the medium, means, and context in
248 | which You Share the Licensed Material. For example, it may be
249 | reasonable to satisfy the conditions by providing a URI or
250 | hyperlink to a resource that includes the required
251 | information.
252 |
253 | 3. If requested by the Licensor, You must remove any of the
254 | information required by Section 3(a)(1)(A) to the extent
255 | reasonably practicable.
256 |
257 | 4. If You Share Adapted Material You produce, the Adapter's
258 | License You apply must not prevent recipients of the Adapted
259 | Material from complying with this Public License.
260 |
261 |
262 | Section 4 -- Sui Generis Database Rights.
263 |
264 | Where the Licensed Rights include Sui Generis Database Rights that
265 | apply to Your use of the Licensed Material:
266 |
267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
268 | to extract, reuse, reproduce, and Share all or a substantial
269 | portion of the contents of the database;
270 |
271 | b. if You include all or a substantial portion of the database
272 | contents in a database in which You have Sui Generis Database
273 | Rights, then the database in which You have Sui Generis Database
274 | Rights (but not its individual contents) is Adapted Material; and
275 |
276 | c. You must comply with the conditions in Section 3(a) if You Share
277 | all or a substantial portion of the contents of the database.
278 |
279 | For the avoidance of doubt, this Section 4 supplements and does not
280 | replace Your obligations under this Public License where the Licensed
281 | Rights include other Copyright and Similar Rights.
282 |
283 |
284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
285 |
286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
296 |
297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
306 |
307 | c. The disclaimer of warranties and limitation of liability provided
308 | above shall be interpreted in a manner that, to the extent
309 | possible, most closely approximates an absolute disclaimer and
310 | waiver of all liability.
311 |
312 |
313 | Section 6 -- Term and Termination.
314 |
315 | a. This Public License applies for the term of the Copyright and
316 | Similar Rights licensed here. However, if You fail to comply with
317 | this Public License, then Your rights under this Public License
318 | terminate automatically.
319 |
320 | b. Where Your right to use the Licensed Material has terminated under
321 | Section 6(a), it reinstates:
322 |
323 | 1. automatically as of the date the violation is cured, provided
324 | it is cured within 30 days of Your discovery of the
325 | violation; or
326 |
327 | 2. upon express reinstatement by the Licensor.
328 |
329 | For the avoidance of doubt, this Section 6(b) does not affect any
330 | right the Licensor may have to seek remedies for Your violations
331 | of this Public License.
332 |
333 | c. For the avoidance of doubt, the Licensor may also offer the
334 | Licensed Material under separate terms or conditions or stop
335 | distributing the Licensed Material at any time; however, doing so
336 | will not terminate this Public License.
337 |
338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
339 | License.
340 |
341 |
342 | Section 7 -- Other Terms and Conditions.
343 |
344 | a. The Licensor shall not be bound by any additional or different
345 | terms or conditions communicated by You unless expressly agreed.
346 |
347 | b. Any arrangements, understandings, or agreements regarding the
348 | Licensed Material not stated herein are separate from and
349 | independent of the terms and conditions of this Public License.
350 |
351 |
352 | Section 8 -- Interpretation.
353 |
354 | a. For the avoidance of doubt, this Public License does not, and
355 | shall not be interpreted to, reduce, limit, restrict, or impose
356 | conditions on any use of the Licensed Material that could lawfully
357 | be made without permission under this Public License.
358 |
359 | b. To the extent possible, if any provision of this Public License is
360 | deemed unenforceable, it shall be automatically reformed to the
361 | minimum extent necessary to make it enforceable. If the provision
362 | cannot be reformed, it shall be severed from this Public License
363 | without affecting the enforceability of the remaining terms and
364 | conditions.
365 |
366 | c. No term or condition of this Public License will be waived and no
367 | failure to comply consented to unless expressly agreed to by the
368 | Licensor.
369 |
370 | d. Nothing in this Public License constitutes or may be interpreted
371 | as a limitation upon, or waiver of, any privileges and immunities
372 | that apply to the Licensor or You, including from the legal
373 | processes of any jurisdiction or authority.
374 |
375 |
376 | =======================================================================
377 |
378 | Creative Commons is not a party to its public
379 | licenses. Notwithstanding, Creative Commons may elect to apply one of
380 | its public licenses to material it publishes and in those instances
381 | will be considered the “Licensor.” The text of the Creative Commons
382 | public licenses is dedicated to the public domain under the CC0 Public
383 | Domain Dedication. Except for the limited purpose of indicating that
384 | material is shared under a Creative Commons public license or as
385 | otherwise permitted by the Creative Commons policies published at
386 | creativecommons.org/policies, Creative Commons does not authorize the
387 | use of the trademark "Creative Commons" or any other trademark or logo
388 | of Creative Commons without its prior written consent including,
389 | without limitation, in connection with any unauthorized modifications
390 | to any of its public licenses or any other arrangements,
391 | understandings, or agreements concerning use of licensed material. For
392 | the avoidance of doubt, this paragraph does not form part of the
393 | public licenses.
394 |
395 | Creative Commons may be contacted at creativecommons.org.
396 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # apollo-sv
2 |
3 | ## About the Apollo-SV ontology:
4 | Apollo-SV, developed as an OWL specification, defines the terms and relations necessary for interoperation between epidemic simulators and public health application software that interface with these simulators.
5 |
6 | ## Requirements:
7 |
8 | Apollo-SV imports the GEO ontology, which is located at: https://github.com/ufbmi/geographical-entity-ontology
9 |
10 | Currently, the development branch of the GEO project is intended for use with Apollo-SV.
11 |
12 | ## Viewing the Apollo-SV ontology in Protege
13 |
14 | ### Introduction
15 | To view Apollo-SV, you need to download and configure the Protege Ontology editor, and then open the ontology in Protege.
16 |
17 | ### Download and Installation
18 | Download and Install Protege
19 | First, go to this web site and download the appropriate version of Protege for your operating system:
20 |
21 | http://protege.stanford.edu/download/registered.html
22 |
23 | #### To install Protege on a Windows-based system, run the installer and follow the on-screen instructions.
24 |
25 | #### To install Protege on a Mac:
26 |
27 | 1. Open the downloaded file
28 | 2. If you do not see anything, you might need to click the Finder icon on the Dock (the smiley face icon on the left)
29 | 3. In the Finder window, the file Protege.app should be highlighted.
30 | 4. Drag and Drop Protege.app onto the LaunchPad? icon on the Dock (the icon with the Rocket)
31 |
32 | ### Configure Protege
33 | Many ontologies assign meaningless identifiers to classes and properties, and use annotations such as labels to assign terms to classes. However, Protege sometimes by default shows the meaningless identifiers. Apollo-SV is one of the ontologies that follows best practices of using meaningless identifiers. To view Apollo-SV, you should therefore configure Protege to display labels.
34 |
35 | #### To set up Protege to show labels on a PC:
36 | 1. Go to the File menu, choose Preferences...
37 | 2. Click on the Renderer tab.
38 | 3. Select "Render by annotation property..." option under "Entity rendering"
39 | 4. Click the Configure... button
40 | 5. Paste the following into the Set Language box: en, en-us, !, ""
41 | 6. Click OK. (Returns to Renderer Tab)
42 | 7. Click OK. (Returns to Protege main screen)
43 |
44 | #### To set up Protege to show labels on a Mac:
45 |
46 | 1. Click the Protege menu next to the apple icon, choose Preferences...
47 | 2. Click on the Renderer tab.
48 | 3. Select "Render by annotation property..." option under "Entity rendering"
49 | 4. Click the Configure... button
50 | 5. Paste the following into the Set Language box: en, en-us, !, ""
51 | 6. Click OK. (Returns to Renderer Tab)
52 | 7. Click OK. (Returns to Protege main screen)
53 |
54 |
55 | ### Opening Apollo-SV in Protege
56 | After you launch Protege, depending on the version, you will either be presented with a set of options for opening an ontology, or you will get a blank ontology.
57 |
58 | #### For the menu options:
59 |
60 | 1. Choose Open OWL Ontology from URI
61 | 2. Paste the following URL into the URI text box: http://purl.obolibrary.org/obo/apollo_sv.owl
62 | 3. Click OK or Next
63 |
64 | #### For the blank ontology scenario:
65 |
66 | 1. Choose File->Open from URL...
67 | 2. Paste the following URL into the URI text box: http://purl.obolibrary.org/obo/apollo_sv.owl
68 | 3. Click OK.
69 |
--------------------------------------------------------------------------------
/catalog-v001.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/docs/cite.md:
--------------------------------------------------------------------------------
1 | # How to cite APOLLO_SV
2 |
--------------------------------------------------------------------------------
/docs/contributing.md:
--------------------------------------------------------------------------------
1 | # How to contribute to APOLLO_SV
2 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # APOLLO_SV Ontology Documentation
2 |
3 | [//]: # "This file is meant to be edited by the ontology maintainer."
4 |
5 | Welcome to the APOLLO_SV documentation!
6 |
7 | You can find descriptions of the standard ontology engineering workflows [here](odk-workflows/index.md).
8 |
--------------------------------------------------------------------------------
/docs/odk-workflows/ContinuousIntegration.md:
--------------------------------------------------------------------------------
1 | # Introduction to Continuous Integration Workflows with ODK
2 |
3 | Historically, most repos have been using Travis CI for continuous integration testing and building, but due to
4 | runtime restrictions, we recently switched a lot of our repos to GitHub actions. You can set up your repo with CI by adding
5 | this to your configuration file (src/ontology/apollo_sv-odk.yaml):
6 |
7 | ```
8 | ci:
9 | - github_actions
10 | ```
11 |
12 | When [updateing your repo](RepoManagement.md), you will notice a new file being added: `.github/workflows/qc.yml`.
13 |
14 | This file contains your CI logic, so if you need to change, or add anything, this is the place!
15 |
16 | Alternatively, if your repo is in GitLab instead of GitHub, you can set up your repo with GitLab CI by adding
17 | this to your configuration file (src/ontology/apollo_sv-odk.yaml):
18 |
19 | ```
20 | ci:
21 | - gitlab-ci
22 | ```
23 |
24 | This will add a file called `.gitlab-ci.yml` in the root of your repo.
25 |
26 |
--------------------------------------------------------------------------------
/docs/odk-workflows/EditorsWorkflow.md:
--------------------------------------------------------------------------------
1 | # Editors Workflow
2 |
3 | The editors workflow is one of the formal [workflows](index.md) to ensure that the ontology is developed correctly according to ontology engineering principles. There are a few different editors workflows:
4 |
5 | 1. Local editing workflow: Editing the ontology in your local environment by hand, using tools such as Protégé, ROBOT templates or DOSDP patterns.
6 | 2. Completely automated data pipeline (GitHub Actions)
7 | 3. DROID workflow
8 |
9 | This document only covers the first editing workflow, but more will be added in the future
10 |
11 | ### Local editing workflow
12 |
13 | Workflow requirements:
14 |
15 | - git
16 | - github
17 | - docker
18 | - editing tool of choice, e.g. Protégé, your favourite text editor, etc
19 |
20 | #### 1. _Create issue_
21 | Ensure that there is a ticket on your issue tracker that describes the change you are about to make. While this seems optional, this is a very important part of the social contract of building an ontology - no change to the ontology should be performed without a good ticket, describing the motivation and nature of the intended change.
22 |
23 | #### 2. _Update main branch_
24 | In your local environment (e.g. your laptop), make sure you are on the `main` (prev. `master`) branch and ensure that you have all the upstream changes, for example:
25 |
26 | ```
27 | git checkout main
28 | git pull
29 | ```
30 |
31 | #### 3. _Create feature branch_
32 | Create a new branch. Per convention, we try to use meaningful branch names such as:
33 | - issue23removeprocess (where issue 23 is the related issue on GitHub)
34 | - issue26addcontributor
35 | - release20210101 (for releases)
36 |
37 | On your command line, this looks like this:
38 |
39 | ```
40 | git checkout -b issue23removeprocess
41 | ```
42 |
43 | #### 4. _Perform edit_
44 | Using your editor of choice, perform the intended edit. For example:
45 |
46 | _Protégé_
47 |
48 | 1. Open `src/ontology/apollo_sv-edit.owl` in Protégé
49 | 2. Make the change
50 | 3. Save the file
51 |
52 | _TextEdit_
53 |
54 | 1. Open `src/ontology/apollo_sv-edit.owl` in TextEdit (or Sublime, Atom, Vim, Nano)
55 | 2. Make the change
56 | 3. Save the file
57 |
58 | Consider the following when making the edit.
59 |
60 | 1. According to our development philosophy, the only places that should be manually edited are:
61 | - `src/ontology/apollo_sv-edit.owl`
62 | - Any ROBOT templates you chose to use (the TSV files only)
63 | - Any DOSDP data tables you chose to use (the TSV files, and potentially the associated patterns)
64 | - components (anything in `src/ontology/components`), see [here](RepositoryFileStructure.md).
65 | 2. Imports should not be edited (any edits will be flushed out with the next update). However, refreshing imports is a potentially breaking change - and is discussed [elsewhere](UpdateImports.md).
66 | 3. Changes should usually be small. Adding or changing 1 term is great. Adding or changing 10 related terms is ok. Adding or changing 100 or more terms at once should be considered very carefully.
67 |
68 | #### 4. _Check the Git diff_
69 | This step is very important. Rather than simply trusting your change had the intended effect, we should always use a git diff as a first pass for sanity checking.
70 |
71 | In our experience, having a visual git client like [GitHub Desktop](https://desktop.github.com/) or [sourcetree](https://www.sourcetreeapp.com/) is really helpful for this part. In case you prefer the command line:
72 |
73 | ```
74 | git status
75 | git diff
76 | ```
77 | #### 5. Quality control
78 | Now it's time to run your quality control checks. This can either happen locally ([5a](#5a-local-testing)) or through your continuous integration system ([7/5b](#75b-continuous-integration-testing)).
79 |
80 | #### 5a. Local testing
81 | If you chose to run your test locally:
82 |
83 | ```
84 | sh run.sh make IMP=false test
85 | ```
86 | This will run the whole set of configured ODK tests on including your change. If you have a complex DOSDP pattern pipeline you may want to add `PAT=false` to skip the potentially lengthy process of rebuilding the patterns.
87 |
88 | ```
89 | sh run.sh make IMP=false PAT=false test
90 | ```
91 |
92 | #### 6. Pull request
93 |
94 | When you are happy with the changes, you commit your changes to your feature branch, push them upstream (to GitHub) and create a pull request. For example:
95 |
96 | ```
97 | git add NAMEOFCHANGEDFILES
98 | git commit -m "Added biological process term #12"
99 | git push -u origin issue23removeprocess
100 | ```
101 |
102 | Then you go to your project on GitHub, and create a new pull request from the branch, for example: https://github.com/INCATools/ontology-development-kit/pulls
103 |
104 | There is a lot of great advise on how to write pull requests, but at the very least you should:
105 | - mention the tickets affected: `see #23` to link to a related ticket, or `fixes #23` if, by merging this pull request, the ticket is fixed. Tickets in the latter case will be closed automatically by GitHub when the pull request is merged.
106 | - summarise the changes in a few sentences. Consider the reviewer: what would they want to know right away.
107 | - If the diff is large, provide instructions on how to review the pull request best (sometimes, there are many changed files, but only one important change).
108 |
109 | #### 7/5b. Continuous Integration Testing
110 | If you didn't run and local quality control checks (see [5a](#5a-local-testing)), you should have Continuous Integration (CI) set up, for example:
111 | - Travis
112 | - GitHub Actions
113 |
114 | More on how to set this up [here](ContinuousIntegration.md). Once the pull request is created, the CI will automatically trigger. If all is fine, it will show up green, otherwise red.
115 |
116 | #### 8. Community review
117 | Once all the automatic tests have passed, it is important to put a second set of eyes on the pull request. Ontologies are inherently social - as in that they represent some kind of community consensus on how a domain is organised conceptually. This seems high brow talk, but it is very important that as an ontology editor, you have your work validated by the community you are trying to serve (e.g. your colleagues, other contributors etc.). In our experience, it is hard to get more than one review on a pull request - two is great. You can set up GitHub branch protection to actually require a review before a pull request can be merged! We recommend this.
118 |
119 | This step seems daunting to some hopefully under-resourced ontologies, but we recommend to put this high up on your list of priorities - train a colleague, reach out!
120 |
121 | #### 9. Merge and cleanup
122 | When the QC is green and the reviews are in (approvals), it is time to merge the pull request. After the pull request is merged, remember to delete the branch as well (this option will show up as a big button right after you have merged the pull request). If you have not done so, close all the associated tickets fixed by the pull request.
123 |
124 | #### 10. Changelog (Optional)
125 | It is sometimes difficult to keep track of changes made to an ontology. Some ontology teams opt to document changes in a changelog (simply a text file in your repository) so that when release day comes, you know everything you have changed. This is advisable at least for major changes (such as a new release system, a new pattern or template etc.).
126 |
--------------------------------------------------------------------------------
/docs/odk-workflows/ManageDocumentation.md:
--------------------------------------------------------------------------------
1 | # Updating the Documentation
2 |
3 | The documentation for APOLLO_SV is managed in two places (relative to the repository root):
4 |
5 | 1. The `docs` directory contains all the files that pertain to the content of the documentation (more below)
6 | 2. the `mkdocs.yaml` file contains the documentation config, in particular its navigation bar and theme.
7 |
8 | The documentation is hosted using GitHub pages, on a special branch of the repository (called `gh-pages`). It is important that this branch is never deleted - it contains all the files GitHub pages needs to render and deploy the site. It is also important to note that _the gh-pages branch should never be edited manually_. All changes to the docs happen inside the `docs` directory on the `main` branch.
9 |
10 | ## Editing the docs
11 |
12 | ### Changing content
13 | All the documentation is contained in the `docs` directory, and is managed in _Markdown_. Markdown is a very simple and convenient way to produce text documents with formatting instructions, and is very easy to learn - it is also used, for example, in GitHub issues. This is a normal editing workflow:
14 |
15 | 1. Open the `.md` file you want to change in an editor of choice (a simple text editor is often best). _IMPORTANT_: Do not edit any files in the `docs/odk-workflows/` directory. These files are managed by the ODK system and will be overwritten when the repository is upgraded! If you wish to change these files, make an issue on the [ODK issue tracker](https://github.com/INCATools/ontology-development-kit/issues).
16 | 2. Perform the edit and save the file
17 | 3. Commit the file to a branch, and create a pull request as usual.
18 | 4. If your development team likes your changes, merge the docs into main branch.
19 | 5. Deploy the documentation (see below)
20 |
21 | ## Deploy the documentation
22 |
23 | The documentation is _not_ automatically updated from the Markdown, and needs to be deployed deliberately. To do this, perform the following steps:
24 |
25 | 1. In your terminal, navigate to the edit directory of your ontology, e.g.:
26 | ```
27 | cd apollo_sv/src/ontology
28 | ```
29 | 2. Now you are ready to build the docs as follows:
30 | ```
31 | sh run.sh make update_docs
32 | ```
33 | [Mkdocs](https://www.mkdocs.org/) now sets off to build the site from the markdown pages. You will be asked to
34 | - Enter your username
35 | - Enter your password (see [here](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) for using GitHub access tokens instead)
36 | _IMPORTANT_: Using password based authentication will be deprecated this year (2021). Make sure you read up on [personal access tokens](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) if that happens!
37 |
38 | If everything was successful, you will see a message similar to this one:
39 |
40 | ```
41 | INFO - Your documentation should shortly be available at: https://ApolloDev.github.io/apollo-sv/
42 | ```
43 | 3. Just to double check, you can now navigate to your documentation pages (usually https://ApolloDev.github.io/apollo-sv/).
44 | Just make sure you give GitHub 2-5 minutes to build the pages!
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/docs/odk-workflows/ReleaseWorkflow.md:
--------------------------------------------------------------------------------
1 | # The release workflow
2 | The release workflow recommended by the ODK is based on GitHub releases and works as follows:
3 |
4 | 1. Run a release with the ODK
5 | 2. Review the release
6 | 3. Merge to main branch
7 | 4. Create a GitHub release
8 |
9 | These steps are outlined in detail in the following.
10 |
11 | ## Run a release with the ODK
12 |
13 | Preparation:
14 |
15 | 1. Ensure that all your pull requests are merged into your main (master) branch
16 | 2. Make sure that all changes to main are committed to GitHub (`git status` should say that there are no modified files)
17 | 3. Locally make sure you have the latest changes from main (`git pull`)
18 | 4. Checkout a new branch (e.g. `git checkout -b release-2021-01-01`)
19 | 5. You may or may not want to refresh your imports as part of your release strategy (see [here](UpdateImports.md))
20 | 6. Make sure you have the latest ODK installed by running `docker pull obolibrary/odkfull`
21 |
22 | To actually run the release, you:
23 |
24 | 1. Open a command line terminal window and navigate to the src/ontology directory (`cd apollo_sv/src/ontology`)
25 | 2. Run release pipeline:`sh run.sh make prepare_release -B`. Note that for some ontologies, this process can take up to 90 minutes - especially if there are large ontologies you depend on, like PRO or CHEBI.
26 | 3. If everything went well, you should see the following output on your machine: `Release files are now in ../.. - now you should commit, push and make a release on your git hosting site such as GitHub or GitLab`.
27 |
28 | This will create all the specified release targets (OBO, OWL, JSON, and the variants, ont-full and ont-base) and copy them into your release directory (the top level of your repo).
29 |
30 | ## Review the release
31 |
32 | 1. (Optional) Rough check. This step is frequently skipped, but for the more paranoid among us (like the author of this doc), this is a 3 minute additional effort for some peace of mind. Open the main release (apollo_sv.owl) in you favourite development environment (i.e. Protégé) and eyeball the hierarchy. We recommend two simple checks:
33 | 1. Does the very top level of the hierarchy look ok? This means that all new terms have been imported/updated correctly.
34 | 2. Does at least one change that you know should be in this release appear? For example, a new class. This means that the release was actually based on the recent edit file.
35 | 2. Commit your changes to the branch and make a pull request
36 | 3. In your GitHub pull request, review the following three files in detail (based on our experience):
37 | 1. `apollo_sv.obo` - this reflects a useful subset of the whole ontology (everything that can be covered by OBO format). OBO format has that speaking for it: it is very easy to review!
38 | 2. `apollo_sv-base.owl` - this reflects the asserted axioms in your ontology that you have actually edited.
39 | 3. Ideally also take a look at `apollo_sv-full.owl`, which may reveal interesting new inferences you did not know about. Note that the diff of this file is sometimes quite large.
40 | 4. Like with every pull request, we recommend to always employ a second set of eyes when reviewing a PR!
41 |
42 | ## Merge the main branch
43 | Once your [CI checks](ContinuousIntegration.md) have passed, and your reviews are completed, you can now merge the branch into your main branch (don't forget to delete the branch afterwards - a big button will appear after the merge is finished).
44 |
45 | ## Create a GitHub release
46 |
47 | 1. Go to your releases page on GitHub by navigating to your repository, and then clicking on releases (usually on the right, for example: https://github.com/ApolloDev/apollo-sv/releases). Then click "Draft new release"
48 | 1. As the tag version you **need to choose the date on which your ontologies were build.** You can find this, for example, by looking at the `apollo_sv.obo` file and check the `data-version:` property. The date needs to be prefixed with a `v`, so, for example `v2020-02-06`.
49 | 1. You can write whatever you want in the release title, but we typically write the date again. The description underneath should contain a concise list of changes or term additions.
50 | 1. Click "Publish release". Done.
51 |
52 | ## Debugging typical ontology release problems
53 |
54 | ### Problems with memory
55 |
56 | When you are dealing with large ontologies, you need a lot of memory. When you see error messages relating to large ontologies such as CHEBI, PRO, NCBITAXON, or Uberon, you should think of memory first, see [here](https://github.com/INCATools/ontology-development-kit/blob/master/docs/DealWithLargeOntologies.md).
57 |
58 | ### Problems when using OBO format based tools
59 |
60 | Sometimes you will get cryptic error messages when using legacy tools using OBO format, such as the ontology release tool (OORT), which is also available as part of the ODK docker container. In these cases, you need to track down what axiom or annotation actually caused the breakdown. In our experience (in about 60% of the cases) the problem lies with duplicate annotations (`def`, `comment`) which are illegal in OBO. Here is an example recipe of how to deal with such a problem:
61 |
62 | 1. If you get a message like `make: *** [cl.Makefile:84: oort] Error 255` you might have a OORT error.
63 | 2. To debug this, in your terminal enter `sh run.sh make IMP=false PAT=false oort -B` (assuming you are already in the ontology folder in your directory)
64 | 3. This should show you where the error is in the log (eg multiple different definitions)
65 | WARNING: THE FIX BELOW IS NOT IDEAL, YOU SHOULD ALWAYS TRY TO FIX UPSTREAM IF POSSIBLE
66 | 4. Open `apollo_sv-edit.owl` in Protégé and find the offending term and delete all offending issue (e.g. delete ALL definition, if the problem was "multiple def tags not allowed") and save.
67 | *While this is not idea, as it will remove all definitions from that term, it will be added back again when the term is fixed in the ontology it was imported from and added back in.
68 | 5. Rerun `sh run.sh make IMP=false PAT=false oort -B` and if it all passes, commit your changes to a branch and make a pull request as usual.
69 |
70 |
--------------------------------------------------------------------------------
/docs/odk-workflows/RepoManagement.md:
--------------------------------------------------------------------------------
1 | # Managing your ODK repository
2 |
3 | ## Updating your ODK repository
4 |
5 | Your ODK repositories configuration is managed in `src/ontology/apollo_sv-odk.yaml`. The [ODK Project Configuration Schema](https://github.com/INCATools/ontology-development-kit/blob/master/docs/project-schema.md) defines all possible parameters that can be used in this config YAML. Once you have made your changes, you can run the following to apply your changes to the repository:
6 |
7 |
8 | ```
9 | sh run.sh make update_repo
10 | ```
11 |
12 | There are a large number of options that can be set to configure your ODK, but we will only discuss a few of them here.
13 |
14 | NOTE for Windows users:
15 |
16 | You may get a cryptic failure such as `Set Illegal Option -` if the update script located in `src/scripts/update_repo.sh`
17 | was saved using Windows Line endings. These need to change to unix line endings. In Notepad++, for example, you can
18 | click on Edit->EOL Conversion->Unix LF to change this.
19 |
20 | ## Managing imports
21 |
22 | You can use the update repository workflow described on this page to perform the following operations to your imports:
23 |
24 | 1. Add a new import
25 | 2. Modify an existing import
26 | 3. Remove an import you no longer want
27 | 4. Customise an import
28 |
29 | We will discuss all these workflows in the following.
30 |
31 |
32 | ### Add new import
33 |
34 | To add a new import, you first edit your odk config as described [above](#updating-your-odk-repository), adding an `id` to the `product` list in the `import_group` section (for the sake of this example, we assume you already import RO, and your goal is to also import GO):
35 |
36 | ```
37 | import_group:
38 | products:
39 | - id: ro
40 | - id: go
41 | ```
42 |
43 | Note: our ODK file should only have one `import_group` which can contain multiple imports (in the `products` section). Next, you run the [update repo workflow](#updating-your-odk-repository) to apply these changes. Note that by default, this module is going to be a SLME Bottom module, see [here](http://robot.obolibrary.org/extract). To change that or customise your module, see section "Customise an import". To finalise the addition of your import, perform the following steps:
44 |
45 | 1. Add an import statement to your `src/ontology/apollo_sv-edit.owl` file. We suggest to do this using a text editor, by simply copying an existing import declaration and renaming it to the new ontology import, for example as follows:
46 | ```
47 | ...
48 | Ontology(
49 | Import()
50 | Import()
51 | ...
52 | ```
53 | 2. Add your imports redirect to your catalog file `src/ontology/catalog-v001.xml`, for example:
54 | ```
55 |
56 | ```
57 | 3. Test whether everything is in order:
58 | 1. [Refresh your import](UpdateImports.md)
59 | 2. Open in your Ontology Editor of choice (Protege) and ensure that the expected terms are imported.
60 |
61 | Note: The catalog file `src/ontology/catalog-v001.xml` has one purpose: redirecting
62 | imports from URLs to local files. For example, if you have
63 |
64 | ```
65 | Import()
66 | ```
67 |
68 | in your editors file (the ontology) and
69 |
70 | ```
71 |
72 | ```
73 |
74 | in your catalog, tools like `robot` or Protégé will recognize the statement
75 | in the catalog file to redirect the URL `http://purl.obolibrary.org/obo/apollo_sv/imports/go_import.owl`
76 | to the local file `imports/go_import.owl` (which is in your `src/ontology` directory).
77 |
78 | ### Modify an existing import
79 |
80 | If you simply wish to refresh your import in light of new terms, see [here](UpdateImports.md). If you wish to change the type of your module see section "Customise an import".
81 |
82 | ### Remove an existing import
83 |
84 | To remove an existing import, perform the following steps:
85 |
86 | 1. remove the import declaration from your `src/ontology/apollo_sv-edit.owl`.
87 | 2. remove the id from your `src/ontology/apollo_sv-odk.yaml`, eg. `- id: go` from the list of `products` in the `import_group`.
88 | 3. run [update repo workflow](#updating-your-odk-repository)
89 | 4. delete the associated files manually:
90 | - `src/imports/go_import.owl`
91 | - `src/imports/go_terms.txt`
92 | 5. Remove the respective entry from the `src/ontology/catalog-v001.xml` file.
93 |
94 | ### Customise an import
95 |
96 | By default, an import module extracted from a source ontology will be a SLME module, see [here](http://robot.obolibrary.org/extract). There are various options to change the default.
97 |
98 | The following change to your repo config (`src/ontology/apollo_sv-odk.yaml`) will switch the go import from an SLME module to a simple ROBOT filter module:
99 |
100 | ```
101 | import_group:
102 | products:
103 | - id: ro
104 | - id: go
105 | module_type: filter
106 | ```
107 |
108 | A ROBOT filter module is, essentially, importing all external terms declared by your ontology (see [here](UpdateImports.md) on how to declare external terms to be imported). Note that the `filter` module does
109 | not consider terms/annotations from namespaces other than the base-namespace of the ontology itself. For example, in the
110 | example of GO above, only annotations / axioms related to the GO base IRI (http://purl.obolibrary.org/obo/GO_) would be considered. This
111 | behaviour can be changed by adding additional base IRIs as follows:
112 |
113 |
114 | ```
115 | import_group:
116 | products:
117 | - id: go
118 | module_type: filter
119 | base_iris:
120 | - http://purl.obolibrary.org/obo/GO_
121 | - http://purl.obolibrary.org/obo/CL_
122 | - http://purl.obolibrary.org/obo/BFO
123 | ```
124 |
125 | If you wish to customise your import entirely, you can specify your own ROBOT command to do so. To do that, add the following to your repo config (`src/ontology/apollo_sv-odk.yaml`):
126 |
127 | ```
128 | import_group:
129 | products:
130 | - id: ro
131 | - id: go
132 | module_type: custom
133 | ```
134 |
135 | Now add a new goal in your custom Makefile (`src/ontology/apollo_sv.Makefile`, _not_ `src/ontology/Makefile`).
136 |
137 | ```
138 | imports/go_import.owl: mirror/ro.owl imports/ro_terms_combined.txt
139 | if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
140 | extract -T imports/ro_terms_combined.txt --force true --individuals exclude --method BOT \
141 | query --update ../sparql/inject-subset-declaration.ru --update ../sparql/postprocess-module.ru \
142 | annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@; fi
143 | ```
144 |
145 | Now feel free to change this goal to do whatever you wish it to do! It probably makes some sense (albeit not being a strict necessity), to leave most of the goal instead and replace only:
146 |
147 | ```
148 | extract -T imports/ro_terms_combined.txt --force true --individuals exclude --method BOT \
149 | ```
150 |
151 | to another ROBOT pipeline.
152 |
153 | ## Add a component
154 |
155 | A component is an import which _belongs_ to your ontology, e.g. is managed by
156 | you and your team.
157 |
158 | 1. Open `src/ontology/apollo_sv-odk.yaml`
159 | 1. If you dont have it yet, add a new top level section `components`
160 | 1. Under the `components` section, add a new section called `products`.
161 | This is where all your components are specified
162 | 1. Under the `products` section, add a new component, e.g. `- filename: mycomp.owl`
163 |
164 | _Example_
165 |
166 | ```
167 | components:
168 | products:
169 | - filename: mycomp.owl
170 | ```
171 |
172 | When running `sh run.sh make update_repo`, a new file `src/ontology/components/mycomp.owl` will
173 | be created which you can edit as you see fit. Typical ways to edit:
174 |
175 | 1. Using a ROBOT template to generate the component (see below)
176 | 1. Manually curating the component separately with Protégé or any other editor
177 | 1. Providing a `components/mycomp.owl:` make target in `src/ontology/apollo_sv.Makefile`
178 | and provide a custom command to generate the component
179 | - `WARNING`: Note that the custom rule to generate the component _MUST NOT_ depend on any other ODK-generated file such as seed files and the like (see [issue](https://github.com/INCATools/ontology-development-kit/issues/637)).
180 | 1. Providing an additional attribute for the component in `src/ontology/apollo_sv-odk.yaml`, `source`,
181 | to specify that this component should simply be downloaded from somewhere on the web.
182 |
183 | ### Adding a new component based on a ROBOT template
184 |
185 | Since ODK 1.3.2, it is possible to simply link a ROBOT template to a component without having to specify any of the import logic. In order to add a new component that is connected to one or more template files, follow these steps:
186 |
187 | 1. Open `src/ontology/apollo_sv-odk.yaml`.
188 | 1. Make sure that `use_templates: TRUE` is set in the global project options. You should also make sure that `use_context: TRUE` is set in case you are using prefixes in your templates that are not known to `robot`, such as `OMOP:`, `CPONT:` and more. All non-standard prefixes you are using should be added to `config/context.json`.
189 | 1. Add another component to the `products` section.
190 | 1. To activate this component to be template-driven, simply say: `use_template: TRUE`. This will create an empty template for you in the templates directory, which will automatically be processed when recreating the component (e.g. `run.bat make recreate-mycomp`).
191 | 1. If you want to use more than one component, use the `templates` field to add as many template names as you wish. ODK will look for them in the `src/templates` directory.
192 | 1. Advanced: If you want to provide additional processing options, you can use the `template_options` field. This should be a string with option from [robot template](http://robot.obolibrary.org/template). One typical example for additional options you may want to provide is `--add-prefixes config/context.json` to ensure the prefix map of your context is provided to `robot`, see above.
193 |
194 | _Example_:
195 |
196 | ```
197 | components:
198 | products:
199 | - filename: mycomp.owl
200 | use_template: TRUE
201 | template_options: --add-prefixes config/context.json
202 | templates:
203 | - template1.tsv
204 | - template2.tsv
205 | ```
206 |
207 | _Note_: if your mirror is particularly large and complex, read [this ODK recommendation](https://github.com/INCATools/ontology-development-kit/blob/master/docs/DealWithLargeOntologies.md).
208 |
--------------------------------------------------------------------------------
/docs/odk-workflows/RepositoryFileStructure.md:
--------------------------------------------------------------------------------
1 | # Repository structure
2 |
3 | The main kinds of files in the repository:
4 |
5 | 1. Release files
6 | 2. Imports
7 | 3. [Components](#components)
8 |
9 | ## Release files
10 | Release file are the file that are considered part of the official ontology release and to be used by the community. A detailed description of the release artefacts can be found [here](https://github.com/INCATools/ontology-development-kit/blob/master/docs/ReleaseArtefacts.md).
11 |
12 | ## Imports
13 | Imports are subsets of external ontologies that contain terms and axioms you would like to re-use in your ontology. These are considered "external", like dependencies in software development, and are not included in your "base" product, which is the [release artefact](https://github.com/INCATools/ontology-development-kit/blob/master/docs/ReleaseArtefacts.md) which contains only those axioms that you personally maintain.
14 |
15 | These are the current imports in APOLLO_SV
16 |
17 | | Import | URL | Type |
18 | | ------ | --- | ---- |
19 | | ro | http://purl.obolibrary.org/obo/ro.owl | slme |
20 | | geo | http://purl.obolibrary.org/obo/geo/dev/geo.owl | mirror |
21 | | ido | http://purl.obolibrary.org/obo/ido.owl | slme |
22 | | mf | http://purl.obolibrary.org/obo/mf.owl | slme |
23 | | go | http://purl.obolibrary.org/obo/go.owl | slme |
24 | | iao | http://purl.obolibrary.org/obo/iao.owl | mirror |
25 | | omrse | http://purl.obolibrary.org/obo/omrse.owl | slme |
26 |
27 | ## Components
28 | Components, in contrast to imports, are considered full members of the ontology. This means that any axiom in a component is also included in the ontology base - which means it is considered _native_ to the ontology. While this sounds complicated, consider this: conceptually, no component should be part of more than one ontology. If that seems to be the case, we are most likely talking about an import. Components are often not needed for ontologies, but there are some use cases:
29 |
30 | 1. There is an automated process that generates and re-generates a part of the ontology
31 | 2. A part of the ontology is managed in ROBOT templates
32 | 3. The expressivity of the component is higher than the format of the edit file. For example, people still choose to manage their ontology in OBO format (they should not) missing out on a lot of owl features. They may choose to manage logic that is beyond OBO in a specific OWL component.
33 |
34 |
35 |
--------------------------------------------------------------------------------
/docs/odk-workflows/SettingUpDockerForODK.md:
--------------------------------------------------------------------------------
1 | # Setting up your Docker environment for ODK use
2 |
3 | One of the most frequent problems with running the ODK for the first time is failure because of lack of memory. This can look like a Java OutOfMemory exception,
4 | but more often than not it will appear as something like an `Error 137`. There are two places you need to consider to set your memory:
5 |
6 | 1. Your src/ontology/run.sh (or run.bat) file. You can set the memory in there by adding
7 | `robot_java_args: '-Xmx8G'` to your src/ontology/apollo_sv-odk.yaml file, see for example [here](https://github.com/INCATools/ontology-development-kit/blob/0e0aef2b26b8db05f5e78b7c38f807d04312d06a/configs/uberon-odk.yaml#L36).
8 | 2. Set your docker memory. By default, it should be about 10-20% more than your `robot_java_args` variable. You can manage your memory settings
9 | by right-clicking on the docker whale in your system bar-->Preferences-->Resources-->Advanced, see picture below.
10 |
11 | 
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/odk-workflows/UpdateImports.md:
--------------------------------------------------------------------------------
1 | # Update Imports Workflow
2 |
3 | This page discusses how to update the contents of your imports, like adding or removing terms. If you are looking to customise imports, like changing the module type, see [here](RepoManagement.md).
4 |
5 | ## Importing a new term
6 |
7 | Note: some ontologies now use a merged-import system to manage dynamic imports, for these please follow instructions in the section title "Using the Base Module approach".
8 |
9 | Importing a new term is split into two sub-phases:
10 |
11 | 1. Declaring the terms to be imported
12 | 2. Refreshing imports dynamically
13 |
14 | ### Declaring terms to be imported
15 | There are three ways to declare terms that are to be imported from an external ontology. Choose the appropriate one for your particular scenario (all three can be used in parallel if need be):
16 |
17 | 1. Protégé-based declaration
18 | 2. Using term files
19 | 3. Using the custom import template
20 |
21 | #### Protégé-based declaration
22 |
23 | This workflow is to be avoided, but may be appropriate if the editor _does not have access to the ODK docker container_.
24 | This approach also applies to ontologies that use base module import approach.
25 |
26 | 1. Open your ontology (edit file) in Protégé (5.5+).
27 | 1. Select 'owl:Thing'
28 | 1. Add a new class as usual.
29 | 1. Paste the _full iri_ in the 'Name:' field, for example, http://purl.obolibrary.org/obo/CHEBI_50906.
30 | 1. Click 'OK'
31 |
32 |
33 |
34 | Now you can use this term for example to construct logical definitions. The next time the imports are refreshed (see how to refresh [here](#refresh-imports)), the metadata (labels, definitions, etc.) for this term are imported from the respective external source ontology and becomes visible in your ontology.
35 |
36 |
37 | #### Using term files
38 |
39 | Every import has, by default a term file associated with it, which can be found in the imports directory. For example, if you have a GO import in `src/ontology/go_import.owl`, you will also have an associated term file `src/ontology/go_terms.txt`. You can add terms in there simply as a list:
40 |
41 | ```
42 | GO:0008150
43 | GO:0008151
44 | ```
45 |
46 | Now you can run the [refresh imports workflow](#refresh-imports)) and the two terms will be imported.
47 |
48 | #### Using the custom import template
49 |
50 | This workflow is appropriate if:
51 |
52 | 1. You prefer to manage all your imported terms in a single file (rather than multiple files like in the "Using term files" workflow above).
53 | 2. You wish to augment your imported ontologies with additional information. This requires a cautionary discussion.
54 |
55 | To enable this workflow, you add the following to your ODK config file (`src/ontology/apollo_sv-odk.yaml`), and [update the repository](RepoManagement.md):
56 |
57 | ```
58 | use_custom_import_module: TRUE
59 | ```
60 |
61 | Now you can manage your imported terms directly in the custom external terms template, which is located at `src/templates/external_import.owl`. Note that this file is a [ROBOT template](http://robot.obolibrary.org/template), and can, in principle, be extended to include any axioms you like. Before extending the template, however, read the following carefully.
62 |
63 | The main purpose of the custom import template is to enable the management off all terms to be imported in a centralised place. To enable that, you do not have to do anything other than maintaining the template. So if you, say currently import `APOLLO_SV:00000480`, and you wish to import `APOLLO_SV:00000532`, you simply add a row like this:
64 |
65 | ```
66 | ID Entity Type
67 | ID TYPE
68 | APOLLO_SV:00000480 owl:Class
69 | APOLLO_SV:00000532 owl:Class
70 | ```
71 |
72 | When the imports are refreshed [see imports refresh workflow](#refresh-imports), the term(s) will simply be imported from the configured ontologies.
73 |
74 | Now, if you wish to extend the Makefile (which is beyond these instructions) and add, say, synonyms to the imported terms, you can do that, but you need to (a) preserve the `ID` and `ENTITY` columns and (b) ensure that the ROBOT template is valid otherwise, [see here](http://robot.obolibrary.org/template).
75 |
76 | _WARNING_. Note that doing this is a _widespread antipattern_ (see related [issue](https://github.com/OBOFoundry/OBOFoundry.github.io/issues/1443)). You should not change the axioms of terms that do not belong into your ontology unless necessary - such changes should always be pushed into the ontology where they belong. However, since people are doing it, whether the OBO Foundry likes it or not, at least using the _custom imports module_ as described here localises the changes to a single simple template and ensures that none of the annotations added this way are merged into the [base file](https://github.com/INCATools/ontology-development-kit/blob/master/docs/ReleaseArtefacts.md#release-artefact-1-base-required).
77 |
78 | ### Refresh imports
79 |
80 | If you want to refresh the import yourself (this may be necessary to pass the travis tests), and you have the ODK installed, you can do the following (using go as an example):
81 |
82 | First, you navigate in your terminal to the ontology directory (underneath src in your hpo root directory).
83 | ```
84 | cd src/ontology
85 | ```
86 |
87 | Then, you regenerate the import that will now include any new terms you have added. Note: You must have [docker installed](SettingUpDockerForODK.md).
88 |
89 | ```
90 | sh run.sh make PAT=false imports/go_import.owl -B
91 | ```
92 |
93 | Since ODK 1.2.27, it is also possible to simply run the following, which is the same as the above:
94 |
95 | ```
96 | sh run.sh make refresh-go
97 | ```
98 |
99 | Note that in case you changed the defaults, you need to add `IMP=true` and/or `MIR=true` to the command below:
100 |
101 | ```
102 | sh run.sh make IMP=true MIR=true PAT=false imports/go_import.owl -B
103 | ```
104 |
105 | If you wish to skip refreshing the mirror, i.e. skip downloading the latest version of the source ontology for your import (e.g. `go.owl` for your go import) you can set `MIR=false` instead, which will do the exact same thing as the above, but is easier to remember:
106 |
107 | ```
108 | sh run.sh make IMP=true MIR=false PAT=false imports/go_import.owl -B
109 | ```
110 |
111 | ## Using the Base Module approach
112 |
113 | Since ODK 1.2.31, we support an entirely new approach to generate modules: Using base files.
114 | The idea is to only import axioms from ontologies that _actually belong to it_.
115 | A base file is a subset of the ontology that only contains those axioms that nominally
116 | belong there. In other words, the base file does not contain any axioms that belong
117 | to another ontology. An example would be this:
118 |
119 | Imagine this being the full Uberon ontology:
120 |
121 | ```
122 | Axiom 1: BFO:123 SubClassOf BFO:124
123 | Axiom 1: UBERON:123 SubClassOf BFO:123
124 | Axiom 1: UBERON:124 SubClassOf UBERON 123
125 | ```
126 |
127 | The base file is the set of all axioms that are about UBERON terms:
128 |
129 | ```
130 | Axiom 1: UBERON:123 SubClassOf BFO:123
131 | Axiom 1: UBERON:124 SubClassOf UBERON 123
132 | ```
133 |
134 | I.e.
135 |
136 | ```
137 | Axiom 1: BFO:123 SubClassOf BFO:124
138 | ```
139 |
140 | Gets removed.
141 |
142 | The base file pipeline is a bit more complex than the normal pipelines, because
143 | of the logical interactions between the imported ontologies. This is solved by _first
144 | merging all mirrors into one huge file and then extracting one mega module from it.
145 |
146 | Example: Let's say we are importing terms from Uberon, GO and RO in our ontologies.
147 | When we use the base pipelines, we
148 |
149 | 1) First obtain the base (usually by simply downloading it, but there is also an option now to create it with ROBOT)
150 | 2) We merge all base files into one big pile
151 | 3) Then we extract a single module `imports/merged_import.owl`
152 |
153 | The first implementation of this pipeline is PATO, see https://github.com/pato-ontology/pato/blob/master/src/ontology/pato-odk.yaml.
154 |
155 | To check if your ontology uses this method, check src/ontology/apollo_sv-odk.yaml to see if `use_base_merging: TRUE` is declared under `import_group`
156 |
157 | If your ontology uses Base Module approach, please use the following steps:
158 |
159 | First, add the term to be imported to the term file associated with it (see above "Using term files" section if this is not clear to you)
160 |
161 | Next, you navigate in your terminal to the ontology directory (underneath src in your hpo root directory).
162 | ```
163 | cd src/ontology
164 | ```
165 |
166 | Then refresh imports by running
167 |
168 | ```
169 | sh run.sh make imports/merged_import.owl
170 | ```
171 | Note: if your mirrors are updated, you can run `sh run.sh make no-mirror-refresh-merged`
172 |
173 | This requires quite a bit of memory on your local machine, so if you encounter an error, it might be a lack of memory on your computer. A solution would be to create a ticket in an issue tracker requesting for the term to be imported, and one of the local devs should pick this up and run the import for you.
174 |
175 | Lastly, restart Protégé, and the term should be imported in ready to be used.
176 |
177 |
--------------------------------------------------------------------------------
/docs/odk-workflows/components.md:
--------------------------------------------------------------------------------
1 |
2 | # Adding components to an ODK repo
3 |
4 | For details on what components are, please see component section of [repository file structure document](../odk-workflows/RepositoryFileStructure.md).
5 |
6 | To add custom components to an ODK repo, please follow the following steps:
7 |
8 | 1) Locate your odk yaml file and open it with your favourite text editor (src/ontology/apollo_sv-odk.yaml)
9 | 2) Search if there is already a component section to the yaml file, if not add it accordingly, adding the name of your component:
10 |
11 | ```
12 | components:
13 | products:
14 | - filename: your-component-name.owl
15 | ```
16 |
17 | 3) Add the component to your catalog file (src/ontology/catalog-v001.xml)
18 |
19 | ```
20 |
21 | ```
22 |
23 | 4) Add the component to the edit file (src/ontology/apollo_sv-edit.obo)
24 | for .obo formats:
25 |
26 | ```
27 | import: http://purl.obolibrary.org/obo/apollo_sv/components/your-component-name.owl
28 | ```
29 |
30 | for .owl formats:
31 |
32 | ```
33 | Import()
34 | ```
35 |
36 | 5) Refresh your repo by running `sh run.sh make update_repo` - this should create a new file in src/ontology/components.
37 | 6) In your custom makefile (src/ontology/apollo_sv.Makefile) add a goal for your custom make file. In this example, the goal is a ROBOT template.
38 |
39 | ```
40 | $(COMPONENTSDIR)/your-component-name.owl: $(SRC) ../templates/your-component-template.tsv
41 | $(ROBOT) template --template ../templates/your-component-template.tsv \
42 | annotate --ontology-iri $(ONTBASE)/$@ --output $(COMPONENTSDIR)/your-component-name.owl
43 | ```
44 |
45 | (If using a ROBOT template, do not forget to add your template tsv in src/templates/)
46 |
47 | 7) Make the file by running `sh run.sh make components/your-component-name.owl`
48 |
49 |
--------------------------------------------------------------------------------
/docs/odk-workflows/index.md:
--------------------------------------------------------------------------------
1 | # Default ODK Workflows
2 |
3 | - [Daily Editors Workflow](EditorsWorkflow.md)
4 | - [Release Workflow](ReleaseWorkflow.md)
5 | - [Manage your ODK Repository](RepoManagement.md)
6 | - [Setting up Docker for ODK](SettingUpDockerForODK.md)
7 | - [Imports management](UpdateImports.md)
8 | - [Managing the documentation](ManageDocumentation.md)
9 | - [Managing your Automated Testing](ManageAutomatedTest.md)
10 |
11 |
--------------------------------------------------------------------------------
/find-highest-obo-id.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | grep -o -r --include="*.owl" "APOLLO_SV_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" ./ | cut -d":" -f2 | sort -u | tail -10
--------------------------------------------------------------------------------
/mkdocs.yaml:
--------------------------------------------------------------------------------
1 | site_name: Apollo Structured Vocabulary
2 | theme:
3 | name: material
4 | features:
5 | - content.tabs.link
6 | plugins:
7 | - search
8 | markdown_extensions:
9 | - pymdownx.highlight:
10 | - pymdownx.inlinehilite
11 | - pymdownx.snippets
12 | - pymdownx.superfences
13 | - pymdownx.tabbed:
14 | - pymdownx.critic
15 | - pymdownx.caret
16 | - pymdownx.keys
17 | - pymdownx.mark
18 | - pymdownx.tilde
19 |
20 | site_url: https://ApolloDev.github.io/apollo-sv/
21 | repo_url: https://github.com/ApolloDev/apollo-sv/
22 |
23 | nav:
24 | - Getting started: index.md
25 | - Cite: cite.md
26 | - How-to guides:
27 | - Standard ODK workflows:
28 | - Overview: odk-workflows/index.md
29 | - Editors Workflow: odk-workflows/EditorsWorkflow.md
30 | - Release Workflow: odk-workflows/ReleaseWorkflow.md
31 | - Manage your ODK Repository: odk-workflows/RepoManagement.md
32 | - Setting up Docker for ODK: odk-workflows/SettingUpDockerForODK.md
33 | - Imports management: odk-workflows/UpdateImports.md
34 | - Components management: odk-workflows/components.md
35 | - Managing the documentation: odk-workflows/ManageDocumentation.md
36 | - Managing your automated testing: odk-workflows/ManageAutomatedTest.md
37 | - Continuous Integration: odk-workflows/ContinuousIntegration.md
38 | - Your ODK Repository Overview: odk-workflows/RepositoryFileStructure.md
39 | - Contributing: contributing.md
40 |
41 |
--------------------------------------------------------------------------------
/src/ontology/Makefile:
--------------------------------------------------------------------------------
1 | # ----------------------------------------
2 | # Makefile for apollo_sv
3 | # Generated using ontology-development-kit
4 | # ODK Version: v1.5.2
5 | # ----------------------------------------
6 | # IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use apollo_sv.Makefile instead
7 |
8 | ### Workflow
9 | #
10 | # Tasks to edit and release OMRSE.
11 | #
12 | # #### Edit
13 | #
14 | # 1. [Prepare release](prepare_release)
15 | # 2. [Refresh imports](all_imports)
16 | # 3. [Update repo to latest ODK](update_repo)
17 |
18 | # Fingerprint of the configuration file when this Makefile was last generated
19 | CONFIG_HASH= 4c4d6cc789d818fbe915ac259c1dd0e97c415ffd56c74ba1d7866e6691c26c0b
20 |
21 |
22 | # ----------------------------------------
23 | # Standard Constants
24 | # ----------------------------------------
25 | # these can be overwritten on the command line
26 |
27 | OBOBASE= http://purl.obolibrary.org/obo
28 | URIBASE= http://purl.obolibrary.org/obo
29 | ONT= apollo_sv
30 | ONTBASE= http://purl.obolibrary.org/obo/apollo_sv
31 | EDIT_FORMAT= owl
32 | SRC = $(ONT)-edit.$(EDIT_FORMAT)
33 | MAKE_FAST= $(MAKE) IMP=false PAT=false COMP=false MIR=false
34 | CATALOG= catalog-v001.xml
35 | ROBOT= robot --catalog $(CATALOG)
36 |
37 | OWLTOOLS= owltools --use-catalog
38 | RELEASEDIR= ../..
39 | REPORTDIR= reports
40 | TEMPLATEDIR= ../templates
41 | TMPDIR= tmp
42 | MIRRORDIR= mirror
43 | IMPORTDIR= imports
44 | SUBSETDIR= subsets
45 | SCRIPTSDIR= ../scripts
46 | UPDATEREPODIR= target
47 | SPARQLDIR = ../sparql
48 | COMPONENTSDIR = components
49 | REPORT_FAIL_ON = ERROR
50 | REPORT_LABEL =
51 | REPORT_PROFILE_OPTS =
52 | OBO_FORMAT_OPTIONS =
53 | SPARQL_VALIDATION_CHECKS = owldef-self-reference iri-range
54 | SPARQL_EXPORTS = basic-report
55 | ODK_VERSION_MAKEFILE = v1.5.2
56 |
57 | TODAY ?= $(shell date +%Y-%m-%d)
58 | OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
59 | VERSION= $(TODAY)
60 | ANNOTATE_ONTOLOGY_VERSION = annotate -V $(ONTBASE)/releases/$(VERSION)/$@ --annotation owl:versionInfo $(VERSION)
61 | ANNOTATE_CONVERT_FILE = annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output $@.tmp.owl && mv $@.tmp.owl $@
62 | OTHER_SRC =
63 | ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt
64 | EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl
65 |
66 | FORMATS = $(sort owl obo json owl)
67 | FORMATS_INCL_TSV = $(sort $(FORMATS) tsv)
68 | RELEASE_ARTEFACTS = $(sort $(ONT)-base $(ONT)-full )
69 |
70 | ifeq ($(ODK_DEBUG),yes)
71 | ODK_DEBUG_FILE = debug.log
72 | SHELL = $(SCRIPTSDIR)/run-command.sh
73 | endif
74 |
75 | # ----------------------------------------
76 | # Top-level targets
77 | # ----------------------------------------
78 |
79 | .PHONY: .FORCE
80 |
81 | .PHONY: all
82 | all: all_odk
83 |
84 | .PHONY: all_odk
85 | all_odk: odkversion config_check test custom_reports all_assets
86 |
87 | .PHONY: test
88 | test: odkversion reason_test sparql_test robot_reports $(REPORTDIR)/validate_profile_owl2dl_$(ONT).owl.txt
89 | echo "Finished running all tests successfully."
90 |
91 | .PHONY: test
92 | test_fast:
93 | $(MAKE_FAST) test
94 |
95 | .PHONY: release_diff
96 | release_diff: $(REPORTDIR)/release-diff.md
97 |
98 | .PHONY: reason_test
99 | reason_test: $(EDIT_PREPROCESSED)
100 | $(ROBOT) reason --input $< --reasoner ELK --equivalent-classes-allowed asserted-only \
101 | --exclude-tautologies structural --output test.owl && rm test.owl
102 |
103 | .PHONY: odkversion
104 | odkversion:
105 | @echo "ODK Makefile $(ODK_VERSION_MAKEFILE)"
106 | @odk-info --tools
107 | .PHONY: config_check
108 | config_check:
109 | @if [ "$$(sha256sum $(ONT)-odk.yaml | cut -c1-64)" = "$(CONFIG_HASH)" ]; then \
110 | echo "Repository is up-to-date." ; else \
111 | echo "Your ODK configuration has changed since this Makefile was generated. You may need to run 'make update_repo'." ; fi
112 |
113 |
114 | $(TMPDIR) $(REPORTDIR) $(MIRRORDIR) $(IMPORTDIR) $(COMPONENTSDIR) $(SUBSETDIR):
115 | mkdir -p $@
116 |
117 | # ----------------------------------------
118 | # ODK-managed ROBOT plugins
119 | # ----------------------------------------
120 |
121 | # Make sure ROBOT knows where to find plugins
122 | export ROBOT_PLUGINS_DIRECTORY=$(TMPDIR)/plugins
123 |
124 | # Override this rule in apollo_sv.Makefile to install custom plugins
125 | .PHONY: custom_robot_plugins
126 | custom_robot_plugins:
127 |
128 |
129 | .PHONY: extra_robot_plugins
130 | extra_robot_plugins:
131 |
132 |
133 | # Install all ROBOT plugins to the runtime plugins directory
134 | .PHONY: all_robot_plugins
135 | all_robot_plugins: $(foreach plugin,$(notdir $(wildcard /tools/robot-plugins/*.jar)),$(ROBOT_PLUGINS_DIRECTORY)/$(plugin)) \
136 | $(foreach plugin,$(notdir $(wildcard ../../plugins/*.jar)),$(ROBOT_PLUGINS_DIRECTORY)/$(plugin)) \
137 | custom_robot_plugins extra_robot_plugins \
138 |
139 | # Default rule to install plugins
140 | $(ROBOT_PLUGINS_DIRECTORY)/%.jar:
141 | @mkdir -p $(ROBOT_PLUGINS_DIRECTORY)
142 | @if [ -f ../../plugins/$*.jar ]; then \
143 | ln ../../plugins/$*.jar $@ ; \
144 | elif [ -f /tools/robot-plugins/$*.jar ]; then \
145 | cp /tools/robot-plugins/$*.jar $@ ; \
146 | fi
147 |
148 | # Specific rules for supplementary plugins defined in configuration
149 |
150 |
151 | # ----------------------------------------
152 | # Release assets
153 | # ----------------------------------------
154 |
155 | MAIN_PRODUCTS = $(sort $(foreach r,$(RELEASE_ARTEFACTS), $(r)) $(ONT))
156 | MAIN_GZIPPED =
157 | MAIN_FILES = $(foreach n,$(MAIN_PRODUCTS), $(foreach f,$(FORMATS), $(n).$(f))) $(MAIN_GZIPPED)
158 | SRCMERGED = $(TMPDIR)/merged-$(SRC)
159 |
160 | .PHONY: all_main
161 | all_main: $(MAIN_FILES)
162 |
163 | # ----------------------------------------
164 | # Import assets
165 | # ----------------------------------------
166 |
167 |
168 | IMPORTS = ro geo ido mf go iao omrse
169 |
170 | IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
171 | IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
172 | IMPORT_FILES = $(IMPORT_OWL_FILES)
173 |
174 |
175 | .PHONY: all_imports
176 | all_imports: $(IMPORT_FILES)
177 |
178 | # ----------------------------------------
179 | # Subset assets
180 | # ----------------------------------------
181 |
182 |
183 | SUBSETS =
184 |
185 | SUBSET_ROOTS = $(patsubst %, $(SUBSETDIR)/%, $(SUBSETS))
186 | SUBSET_FILES = $(foreach n,$(SUBSET_ROOTS), $(foreach f,$(FORMATS_INCL_TSV), $(n).$(f)))
187 |
188 | .PHONY: all_subsets
189 | all_subsets: $(SUBSET_FILES)
190 |
191 | # ----------------------------------------
192 | # Mapping assets
193 | # ----------------------------------------
194 |
195 |
196 | MAPPINGS =
197 |
198 | MAPPING_FILES = $(patsubst %, $(MAPPINGDIR)/%.sssom.tsv, $(MAPPINGS))
199 |
200 | .PHONY: all_mappings
201 | all_mappings: $(MAPPING_FILES)
202 |
203 |
204 | # ----------------------------------------
205 | # QC Reports & Utilities
206 | # ----------------------------------------
207 |
208 | OBO_REPORT = $(SRC)-obo-report apollo_sv-base.owl-obo-report
209 | REPORTS = $(OBO_REPORT)
210 | REPORT_FILES = $(patsubst %, $(REPORTDIR)/%.tsv, $(REPORTS))
211 |
212 | .PHONY: robot_reports
213 | robot_reports: $(REPORT_FILES)
214 |
215 | .PHONY: all_reports
216 | all_reports: custom_reports robot_reports
217 |
218 | # ----------------------------------------
219 | # ROBOT OWL Profile checking
220 | # ----------------------------------------
221 |
222 | # The merge step is necessary to avoid undeclared entity violations.
223 | $(REPORTDIR)/validate_profile_owl2dl_%.txt: % | $(REPORTDIR) $(TMPDIR)
224 | $(ROBOT) merge -i $< convert -f ofn -o $(TMPDIR)/validate.ofn
225 | $(ROBOT) validate-profile --profile DL -i $(TMPDIR)/validate.ofn -o $@ || { cat $@ && exit 1; }
226 | .PRECIOUS: $(REPORTDIR)/validate_profile_owl2dl_%.txt
227 |
228 | validate_profile_%: $(REPORTDIR)/validate_profile_owl2dl_%.txt
229 | echo "$* profile validation completed."
230 |
231 | # ----------------------------------------
232 | # Sparql queries: Q/C
233 | # ----------------------------------------
234 |
235 | # these live in the ../sparql directory, and have suffix -violation.sparql
236 | # adding the name here will make the violation check live.
237 |
238 | SPARQL_VALIDATION_QUERIES = $(foreach V,$(SPARQL_VALIDATION_CHECKS),$(SPARQLDIR)/$(V)-violation.sparql)
239 |
240 | sparql_test: $(EDIT_PREPROCESSED) apollo_sv-base.owl | $(REPORTDIR)
241 | ifneq ($(SPARQL_VALIDATION_QUERIES),)
242 |
243 | $(ROBOT) verify -i $(EDIT_PREPROCESSED) --queries $(SPARQL_VALIDATION_QUERIES) -O $(REPORTDIR)
244 |
245 | $(ROBOT) verify -i apollo_sv-base.owl --queries $(SPARQL_VALIDATION_QUERIES) -O $(REPORTDIR)
246 | endif
247 |
248 | # ----------------------------------------
249 | # ROBOT report
250 | # ----------------------------------------
251 |
252 | $(REPORTDIR)/$(SRC)-obo-report.tsv: $(SRCMERGED) | $(REPORTDIR)
253 | $(ROBOT) report -i $< $(REPORT_LABEL) $(REPORT_PROFILE_OPTS) --fail-on $(REPORT_FAIL_ON) --base-iri $(URIBASE)/APOLLO_SV_ --base-iri $(URIBASE)/apollo_sv --print 5 -o $@
254 |
255 | $(REPORTDIR)/%-obo-report.tsv: % | $(REPORTDIR)
256 | $(ROBOT) report -i $< $(REPORT_LABEL) $(REPORT_PROFILE_OPTS) --fail-on $(REPORT_FAIL_ON) --base-iri $(URIBASE)/APOLLO_SV_ --base-iri $(URIBASE)/apollo_sv --print 5 -o $@
257 |
258 | check_for_robot_updates:
259 | echo "You are not using a custom profile, so you are getting the joy of the latest ROBOT report!"
260 |
261 |
262 | # ----------------------------------------
263 | # Release assets
264 | # ----------------------------------------
265 |
266 | ASSETS = \
267 | $(IMPORT_FILES) \
268 | $(MAIN_FILES) \
269 | $(REPORT_FILES) \
270 | $(SUBSET_FILES) \
271 | $(MAPPING_FILES)
272 |
273 | RELEASE_ASSETS = \
274 | $(MAIN_FILES) \
275 | $(SUBSET_FILES)
276 |
277 | .PHONY: all_assets
278 | all_assets: $(ASSETS) check_rdfxml_assets
279 |
280 | .PHONY: show_assets
281 | show_assets:
282 | echo $(ASSETS)
283 | du -sh $(ASSETS)
284 |
285 | check_rdfxml_%: %
286 | @check-rdfxml $<
287 |
288 | .PHONY: check_rdfxml_assets
289 | check_rdfxml_assets: $(foreach product,$(MAIN_PRODUCTS),check_rdfxml_$(product).owl)
290 |
291 | # ----------------------------------------
292 | # Release Management
293 | # ----------------------------------------
294 |
295 | CLEANFILES=$(MAIN_FILES) $(SRCMERGED) $(EDIT_PREPROCESSED)
296 | # This should be executed by the release manager whenever time comes to make a release.
297 | # It will ensure that all assets/files are fresh, and will copy to release folder
298 |
299 | .PHONY: prepare_release
300 | prepare_release: all_odk
301 | rsync -R $(RELEASE_ASSETS) $(RELEASEDIR) &&\
302 | rm -f $(CLEANFILES) &&\
303 | echo "Release files are now in $(RELEASEDIR) - now you should commit, push and make a release \
304 | on your git hosting site such as GitHub or GitLab"
305 |
306 | .PHONY: prepare_initial_release
307 | prepare_initial_release: all_assets
308 | rsync -R $(RELEASE_ASSETS) $(RELEASEDIR) &&\
309 | rm -f $(patsubst %, ./%, $(CLEANFILES)) &&\
310 | cd $(RELEASEDIR) && git add $(RELEASE_ASSETS)
311 |
312 | .PHONY: prepare_release_fast
313 | prepare_release_fast:
314 | $(MAKE) prepare_release IMP=false PAT=false MIR=false COMP=false
315 |
316 | CURRENT_RELEASE=$(ONTBASE).owl
317 |
318 | $(TMPDIR)/current-release.owl:
319 | wget $(CURRENT_RELEASE) -O $@
320 |
321 | $(REPORTDIR)/release-diff.md: $(ONT).owl $(TMPDIR)/current-release.owl
322 | $(ROBOT) diff --labels true --left $(TMPDIR)/current-release.owl --right $(ONT).owl -f markdown -o $@
323 |
324 | # ------------------------
325 | # Imports: Seeding system
326 | # ------------------------
327 |
328 | # seed.txt contains all referenced entities
329 | IMPORTSEED=$(TMPDIR)/seed.txt
330 | PRESEED=$(TMPDIR)/pre_seed.txt
331 |
332 | $(SRCMERGED): $(EDIT_PREPROCESSED) $(OTHER_SRC)
333 | $(ROBOT) remove --input $< --select imports --trim false \
334 | merge $(patsubst %, -i %, $(OTHER_SRC)) -o $@
335 |
336 | $(EDIT_PREPROCESSED): $(SRC)
337 | $(ROBOT) convert --input $< --format ofn --output $@
338 |
339 | $(PRESEED): $(SRCMERGED)
340 | $(ROBOT) query -f csv -i $< --query ../sparql/terms.sparql $@.tmp &&\
341 | cat $@.tmp | sort | uniq > $@
342 |
343 |
344 | IMPORT_MODULE_TEMPLATE=$(TEMPLATEDIR)/external_import.tsv
345 | IMPORT_MODULE_SIGNATURE=$(TMPDIR)/external_import_terms.txt
346 | IMPORT_MODULE=$(IMPORTDIR)/external_import.owl
347 | $(IMPORT_MODULE): $(IMPORT_MODULE_TEMPLATE) | $(TMPDIR)
348 | $(ROBOT) template --template $< \
349 | --ontology-iri "$(ONTBASE)/external_import.owl" \
350 | convert -f ofn \
351 | --output $@
352 |
353 | $(IMPORT_MODULE_SIGNATURE): $(IMPORT_MODULE) | $(TMPDIR)
354 | $(ROBOT) query -f csv -i $< --query ../sparql/terms.sparql $@.tmp &&\
355 | cat $@.tmp | sort | uniq > $@
356 |
357 |
358 | ALLSEED = $(PRESEED) \
359 | $(IMPORT_MODULE_SIGNATURE)
360 |
361 | $(IMPORTSEED): $(ALLSEED) | $(TMPDIR)
362 | if [ $(IMP) = true ]; then cat $(ALLSEED) | sort | uniq > $@; fi
363 |
364 | ANNOTATION_PROPERTIES=rdfs:label IAO:0000115 IAO:0000116 IAO:0000111 oboInOwl:hasDbXref rdfs:comment
365 |
366 | # ----------------------------------------
367 | # Import modules
368 | # ----------------------------------------
369 | # Most ontologies are modularly constructed using portions of other ontologies
370 | # These live in the imports/ folder
371 | # This pattern uses ROBOT to generate an import module
372 |
373 | # Should be able to drop this if robot can just take a big messy list of terms as input.
374 | $(IMPORTDIR)/%_terms_combined.txt: $(IMPORTSEED) $(IMPORTDIR)/%_terms.txt
375 | if [ $(IMP) = true ]; then cat $^ | grep -v ^# | sort | uniq > $@; fi
376 |
377 |
378 |
379 |
380 | $(IMPORTDIR)/%_import.owl: $(MIRRORDIR)/%.owl $(IMPORTDIR)/%_terms_combined.txt
381 | if [ $(IMP) = true ]; then $(ROBOT) merge -i $< \
382 | query --update ../sparql/preprocess-module.ru \
383 | remove --base-iri $(OBOBASE)"/$(shell echo $* | tr a-z A-Z)_" --axioms external --preserve-structure false --trim false \
384 | remove $(patsubst %, --term %, $(ANNOTATION_PROPERTIES)) -T $(IMPORTDIR)/$*_terms_combined.txt --select complement \
385 | query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
386 | $(ANNOTATE_CONVERT_FILE); fi
387 |
388 | .PRECIOUS: $(IMPORTDIR)/%_import.owl
389 |
390 | ## Module for ontology: ro
391 |
392 | $(IMPORTDIR)/ro_import.owl: $(MIRRORDIR)/ro.owl $(IMPORTDIR)/ro_terms_combined.txt
393 | if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
394 | extract -T $(IMPORTDIR)/ro_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \
395 | query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
396 | $(ANNOTATE_CONVERT_FILE); fi
397 |
398 | ## Module for ontology: geo
399 |
400 | $(IMPORTDIR)/geo_import.owl: $(MIRRORDIR)/geo.owl $(IMPORTDIR)/geo_terms_combined.txt
401 | if [ $(IMP) = true ]; then $(ROBOT) merge -i $< query --update ../sparql/preprocess-module.ru --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
402 | $(ANNOTATE_CONVERT_FILE); fi
403 |
404 | ## Module for ontology: ido
405 |
406 | $(IMPORTDIR)/ido_import.owl: $(MIRRORDIR)/ido.owl $(IMPORTDIR)/ido_terms_combined.txt
407 | if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
408 | extract -T $(IMPORTDIR)/ido_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \
409 | query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
410 | $(ANNOTATE_CONVERT_FILE); fi
411 |
412 | ## Module for ontology: mf
413 |
414 | $(IMPORTDIR)/mf_import.owl: $(MIRRORDIR)/mf.owl $(IMPORTDIR)/mf_terms_combined.txt
415 | if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
416 | extract -T $(IMPORTDIR)/mf_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \
417 | query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
418 | $(ANNOTATE_CONVERT_FILE); fi
419 |
420 | ## Module for ontology: go
421 |
422 | $(IMPORTDIR)/go_import.owl: $(MIRRORDIR)/go.owl $(IMPORTDIR)/go_terms_combined.txt
423 | if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
424 | extract -T $(IMPORTDIR)/go_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \
425 | query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
426 | $(ANNOTATE_CONVERT_FILE); fi
427 |
428 | ## Module for ontology: iao
429 |
430 | $(IMPORTDIR)/iao_import.owl: $(MIRRORDIR)/iao.owl $(IMPORTDIR)/iao_terms_combined.txt
431 | if [ $(IMP) = true ]; then $(ROBOT) merge -i $< query --update ../sparql/preprocess-module.ru --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
432 | $(ANNOTATE_CONVERT_FILE); fi
433 |
434 | ## Module for ontology: omrse
435 |
436 | $(IMPORTDIR)/omrse_import.owl: $(MIRRORDIR)/omrse.owl $(IMPORTDIR)/omrse_terms_combined.txt
437 | if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
438 | extract -T $(IMPORTDIR)/omrse_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \
439 | query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
440 | $(ANNOTATE_CONVERT_FILE); fi
441 |
442 |
443 | .PHONY: refresh-imports
444 | refresh-imports:
445 | $(MAKE) IMP=true MIR=true PAT=false IMP_LARGE=true all_imports -B
446 |
447 | .PHONY: no-mirror-refresh-imports
448 | no-mirror-refresh-imports:
449 | $(MAKE) IMP=true MIR=false PAT=false IMP_LARGE=true all_imports -B
450 |
451 | .PHONY: refresh-imports-excluding-large
452 | refresh-imports-excluding-large:
453 | $(MAKE) IMP=true MIR=true PAT=false IMP_LARGE=false all_imports -B
454 |
455 | .PHONY: refresh-%
456 | refresh-%:
457 | $(MAKE) IMP=true IMP_LARGE=true MIR=true PAT=false $(IMPORTDIR)/$*_import.owl -B
458 |
459 | .PHONY: no-mirror-refresh-%
460 | no-mirror-refresh-%:
461 | $(MAKE) IMP=true IMP_LARGE=true MIR=false PAT=false $(IMPORTDIR)/$*_import.owl -B
462 |
463 | # ----------------------------------------
464 | # Mirroring upstream ontologies
465 | # ----------------------------------------
466 |
467 | IMP=true # Global parameter to bypass import generation
468 | MIR=true # Global parameter to bypass mirror generation
469 | IMP_LARGE=true # Global parameter to bypass handling of large imports
470 |
471 | ifeq ($(strip $(MIR)),true)
472 |
473 |
474 | ## ONTOLOGY: ro
475 | .PHONY: mirror-ro
476 | .PRECIOUS: $(MIRRORDIR)/ro.owl
477 | mirror-ro: | $(TMPDIR)
478 | curl -L $(OBOBASE)/ro.owl --create-dirs -o $(TMPDIR)/ro-download.owl --retry 4 --max-time 200 && \
479 | $(ROBOT) convert -i $(TMPDIR)/ro-download.owl -o $(TMPDIR)/$@.owl
480 |
481 |
482 | ## ONTOLOGY: geo
483 | .PHONY: mirror-geo
484 | .PRECIOUS: $(MIRRORDIR)/geo.owl
485 | mirror-geo: | $(TMPDIR)
486 | $(ROBOT) convert -I http://purl.obolibrary.org/obo/geo/dev/geo.owl -o $(TMPDIR)/$@.owl
487 |
488 |
489 | ## ONTOLOGY: ido
490 | .PHONY: mirror-ido
491 | .PRECIOUS: $(MIRRORDIR)/ido.owl
492 | mirror-ido: | $(TMPDIR)
493 | curl -L $(OBOBASE)/ido.owl --create-dirs -o $(TMPDIR)/ido-download.owl --retry 4 --max-time 200 && \
494 | $(ROBOT) convert -i $(TMPDIR)/ido-download.owl -o $(TMPDIR)/$@.owl
495 |
496 |
497 | ## ONTOLOGY: mf
498 | .PHONY: mirror-mf
499 | .PRECIOUS: $(MIRRORDIR)/mf.owl
500 | mirror-mf: | $(TMPDIR)
501 | curl -L $(OBOBASE)/mf.owl --create-dirs -o $(TMPDIR)/mf-download.owl --retry 4 --max-time 200 && \
502 | $(ROBOT) convert -i $(TMPDIR)/mf-download.owl -o $(TMPDIR)/$@.owl
503 |
504 |
505 | ## ONTOLOGY: go
506 | .PHONY: mirror-go
507 | .PRECIOUS: $(MIRRORDIR)/go.owl
508 | mirror-go: | $(TMPDIR)
509 | curl -L $(OBOBASE)/go.owl --create-dirs -o $(TMPDIR)/go-download.owl --retry 4 --max-time 200 && \
510 | $(ROBOT) convert -i $(TMPDIR)/go-download.owl -o $(TMPDIR)/$@.owl
511 |
512 |
513 | ## ONTOLOGY: iao
514 | .PHONY: mirror-iao
515 | .PRECIOUS: $(MIRRORDIR)/iao.owl
516 | mirror-iao: | $(TMPDIR)
517 | curl -L $(OBOBASE)/iao.owl --create-dirs -o $(TMPDIR)/iao-download.owl --retry 4 --max-time 200 && \
518 | $(ROBOT) convert -i $(TMPDIR)/iao-download.owl -o $(TMPDIR)/$@.owl
519 |
520 |
521 | ## ONTOLOGY: omrse
522 | .PHONY: mirror-omrse
523 | .PRECIOUS: $(MIRRORDIR)/omrse.owl
524 | mirror-omrse: | $(TMPDIR)
525 | curl -L $(OBOBASE)/omrse.owl --create-dirs -o $(TMPDIR)/omrse-download.owl --retry 4 --max-time 200 && \
526 | $(ROBOT) convert -i $(TMPDIR)/omrse-download.owl -o $(TMPDIR)/$@.owl
527 |
528 |
529 | $(MIRRORDIR)/%.owl: mirror-% | $(MIRRORDIR)
530 | if [ -f $(TMPDIR)/mirror-$*.owl ]; then if cmp -s $(TMPDIR)/mirror-$*.owl $@ ; then echo "Mirror identical, ignoring."; else echo "Mirrors different, updating." &&\
531 | cp $(TMPDIR)/mirror-$*.owl $@; fi; fi
532 |
533 | else # MIR=false
534 | $(MIRRORDIR)/%.owl:
535 | @echo "Not refreshing $@ because the mirrorring pipeline is disabled (MIR=$(MIR))."
536 | endif
537 |
538 |
539 |
540 | # ----------------------------------------
541 | # Subsets
542 | # ----------------------------------------
543 | $(SUBSETDIR)/%.tsv: $(SUBSETDIR)/%.owl
544 | $(ROBOT) query -f tsv -i $< -s ../sparql/labels.sparql $@
545 | .PRECIOUS: $(SUBSETDIR)/%.tsv
546 |
547 | $(SUBSETDIR)/%.owl: $(ONT).owl | $(SUBSETDIR)
548 | $(OWLTOOLS) $< --extract-ontology-subset --fill-gaps --subset $* -o $@.tmp.owl && mv $@.tmp.owl $@ &&\
549 | $(ROBOT) annotate --input $@ --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) -o $@.tmp.owl && mv $@.tmp.owl $@
550 | .PRECIOUS: $(SUBSETDIR)/%.owl
551 |
552 |
553 | $(SUBSETDIR)/%.obo: $(SUBSETDIR)/%.owl
554 | $(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
555 |
556 | $(SUBSETDIR)/%.json: $(SUBSETDIR)/%.owl
557 | $(ROBOT) convert --input $< --check false -f json -o $@.tmp.json &&\
558 | mv $@.tmp.json $@
559 |
560 |
561 | # ---------------------------------------------
562 | # Sparql queries: Table exports / Query Reports
563 | # ---------------------------------------------
564 |
565 | SPARQL_EXPORTS_ARGS = $(foreach V,$(SPARQL_EXPORTS),-s $(SPARQLDIR)/$(V).sparql $(REPORTDIR)/$(V).tsv)
566 | # This combines all into one single command
567 |
568 | .PHONY: custom_reports
569 | custom_reports: $(EDIT_PREPROCESSED) | $(REPORTDIR)
570 | ifneq ($(SPARQL_EXPORTS_ARGS),)
571 | $(ROBOT) query -f tsv --use-graphs true -i $< $(SPARQL_EXPORTS_ARGS)
572 | endif
573 |
574 | # ----------------------------------------
575 | # Release artefacts: export formats
576 | # ----------------------------------------
577 |
578 |
579 | $(ONT)-base.obo: $(ONT)-base.owl
580 | $(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
581 | $(ONT)-base.json: $(ONT)-base.owl
582 | $(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
583 | convert --check false -f json -o $@.tmp.json &&\
584 | mv $@.tmp.json $@
585 | $(ONT)-full.obo: $(ONT)-full.owl
586 | $(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
587 | $(ONT)-full.json: $(ONT)-full.owl
588 | $(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
589 | convert --check false -f json -o $@.tmp.json &&\
590 | mv $@.tmp.json $@
591 | # ----------------------------------------
592 | # Release artefacts: main release artefacts
593 | # ----------------------------------------
594 |
595 | $(ONT).owl: $(ONT)-full.owl
596 | $(ROBOT) annotate --input $< --ontology-iri $(URIBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
597 | convert -o $@.tmp.owl && mv $@.tmp.owl $@
598 |
599 | $(ONT).obo: $(ONT).owl
600 | $(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
601 | $(ONT).json: $(ONT).owl
602 | $(ROBOT) annotate --input $< --ontology-iri $(URIBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
603 | convert --check false -f json -o $@.tmp.json &&\
604 | mv $@.tmp.json $@
605 | # -----------------------------------------------------
606 | # Release artefacts: variants (base, full, simple, etc)
607 | # -----------------------------------------------------
608 | SHARED_ROBOT_COMMANDS =
609 |
610 | $(ONTOLOGYTERMS): $(SRCMERGED)
611 | $(ROBOT) query -f csv -i $< --query ../sparql/apollo_sv_terms.sparql $@
612 |
613 | # ROBOT pipeline that merges imports, including components.
614 | ROBOT_RELEASE_IMPORT_MODE=$(ROBOT) merge --input $<
615 |
616 | # ROBOT pipeline that removes imports, then merges components. This is for release artefacts that start from "base"
617 | ROBOT_RELEASE_IMPORT_MODE_BASE=$(ROBOT) remove --input $< --select imports --trim false merge $(patsubst %, -i %, $(OTHER_SRC))
618 |
619 | # base: A version of the ontology that does not include any externally imported axioms.
620 | $(ONT)-base.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(IMPORT_FILES)
621 | $(ROBOT_RELEASE_IMPORT_MODE) \
622 | reason --reasoner ELK --equivalent-classes-allowed asserted-only --exclude-tautologies structural --annotate-inferred-axioms False \
623 | relax \
624 | reduce -r ELK \
625 | remove --base-iri $(URIBASE)/APOLLO_SV --axioms external --preserve-structure false --trim false \
626 | $(SHARED_ROBOT_COMMANDS) \
627 | annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
628 | --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
629 | --output $@.tmp.owl && mv $@.tmp.owl $@
630 | # Full: The full artefacts with imports merged, reasoned.
631 | $(ONT)-full.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(IMPORT_FILES)
632 | $(ROBOT_RELEASE_IMPORT_MODE) \
633 | reason --reasoner ELK --equivalent-classes-allowed asserted-only --exclude-tautologies structural \
634 | relax \
635 | reduce -r ELK \
636 | $(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@
637 | # ----------------------------------------
638 | # Debugging Tools
639 | # ----------------------------------------
640 |
641 | explain_unsat: $(EDIT_PREPROCESSED)
642 | $(ROBOT) explain -i $< -M unsatisfiability --unsatisfiable random:10 --explanation $(TMPDIR)/$@.md
643 |
644 |
645 |
646 | RELEASE_ASSETS_AFTER_RELEASE=$(foreach n,$(RELEASE_ASSETS), ../../$(n))
647 | GHVERSION=v$(VERSION)
648 |
649 | .PHONY: public_release
650 | public_release:
651 | @test $(GHVERSION)
652 | ls -alt $(RELEASE_ASSETS_AFTER_RELEASE)
653 | gh release create $(GHVERSION) --title "$(VERSION) Release" --draft $(RELEASE_ASSETS_AFTER_RELEASE) --generate-notes
654 |
655 | # ----------------------------------------
656 | # General Validation
657 | # ----------------------------------------
658 | TSV=
659 | ALL_TSV_FILES=
660 |
661 | validate-tsv: $(TSV) | $(TMPDIR)
662 | for FILE in $< ; do \
663 | tsvalid $$FILE > $(TMPDIR)/validate.txt; \
664 | if [ -s $(TMPDIR)/validate.txt ]; then cat $(TMPDIR)/validate.txt && exit 1; fi ; \
665 | done
666 |
667 | validate-all-tsv: $(ALL_TSV_FILES)
668 | $(MAKE) validate-tsv TSV="$^"
669 |
670 | # ----------------------------------------
671 | # Editors Utilities
672 | # ----------------------------------------
673 |
674 |
675 |
676 | .PHONY: normalize_src
677 | normalize_src: $(SRC)
678 | $(ROBOT) convert -i $< -f ofn -o $(TMPDIR)/normalise && mv $(TMPDIR)/normalise $<
679 |
680 | .PHONY: validate_idranges
681 | validate_idranges:
682 | amm $(SCRIPTSDIR)/validate_id_ranges.sc apollo_sv-idranges.owl
683 |
684 | .PHONY: update_repo
685 | update_repo:
686 | sh $(SCRIPTSDIR)/update_repo.sh
687 |
688 |
689 | update_docs:
690 | mkdocs gh-deploy --config-file ../../mkdocs.yaml
691 |
692 | # Note to future generations: computing the real path relative to the
693 | # current directory is a way to ensure we only clean up directories that
694 | # are located below the current directory, regardless of the contents of
695 | # the *DIR variables.
696 | .PHONY: clean
697 | clean:
698 | for dir in $(MIRRORDIR) $(TMPDIR) $(UPDATEREPODIR) ; do \
699 | reldir=$$(realpath --relative-to=$$(pwd) $$dir) ; \
700 | case $$reldir in .*|"") ;; *) rm -rf $$reldir/* ;; esac \
701 | done
702 | rm -f $(CLEANFILES)
703 |
704 | .PHONY: help
705 | help:
706 | @echo "$$data"
707 |
708 | define data
709 | Usage: [IMAGE=(odklite|odkfull)] [ODK_DEBUG=yes] sh run.sh make [(IMP|MIR|IMP_LARGE|PAT)=(false|true)] command
710 |
711 | ----------------------------------------
712 | Command reference
713 | ----------------------------------------
714 |
715 | Core commands:
716 | * prepare_release: Run the entire release pipeline. Use make IMP=false prepare_release to avoid rerunning the imports
717 | * prepare_release_fast: Run the entire release pipeline without refreshing imports, recreating components or recompiling patterns.
718 | * update_repo: Update the ODK repository setup using the config file apollo_sv-odk.yaml
719 | * test: Running all validation tests
720 | * test_fast: Runs the test suite, but without updating imports or components
721 | * odkversion: Show the current version of the ODK Makefile and ROBOT.
722 | * clean: Delete all temporary files
723 | * help: Print ODK Usage information
724 | * public_release: Uploads the release file to a release management system, such as GitHub releases. Must be configured.
725 |
726 |
727 | Imports management:
728 | * refresh-imports: Refresh all imports and mirrors.
729 | * recreate-components: Recreate all components.
730 | * no-mirror-refresh-imports: Refresh all imports without downloading mirrors.
731 | * refresh-imports-excluding-large: Refresh all imports and mirrors, but skipping the ones labelled as 'is_large'.
732 | * refresh-%: Refresh a single import, i.e. refresh-go will refresh 'imports/go_import.owl'.
733 | * no-mirror-refresh-%: Refresh a single import without updating the mirror, i.e. refresh-go will refresh 'imports/go_import.owl'.
734 | * mirror-%: Refresh a single mirror.
735 |
736 | Editor utilities:
737 | * validate_idranges: Make sure your ID ranges file is formatted correctly
738 | * normalize_src: Load and save your apollo_sv-edit file after you to make sure its serialised correctly
739 | * explain_unsat: If you have unsatisfiable classes, this command will create a markdown file (tmp/explain_unsat.md) which will explain all your unsatisfiable classes
740 | * validate-all-tsv: Check all your tsv files for possible problems in syntax. Use ALL_TSV_FILES variable to list files
741 | * validate-tsv: Check a tsv file for syntactic problems with tsvalid. Use TSV variable to pass filepath, e.g. make TSV=../my.tsv validate-tsv.
742 | * release_diff: Create a diff between the current release and the new release
743 |
744 | Additional build commands (advanced users)
745 | * all: Run the entire pipeline (like prepare_release), but without copying the release files to the release directory.
746 | * all_subsets: Build all subsets
747 | * custom_reports: Generate all custom sparql reports you have configured in your apollo_sv-odk.yaml file.
748 | * all_assets: Build all assets
749 | * show_assets: Print a list of all assets that would be build by the release pipeline
750 | * all_mappings: Update all SSSOM mapping sets
751 |
752 | Additional QC commands (advanced users)
753 | * robot_reports: Run all configured ROBOT reports
754 | * validate_profile_%: Run an OWL2 DL profile validation check, for example validate_profile_apollo_sv-edit.owl.
755 | * reason_test: Run a basic reasoning test
756 |
757 | Examples:
758 | * sh run.sh make IMP=false prepare_release
759 | * sh run.sh make update_repo
760 | * sh run.sh make test
761 |
762 | Tricks:
763 | * Add -B to the end of your command to force re-running it even if nothing has changed
764 | * Use the IMAGE parameter to the run.sh script to use a different image like odklite
765 | * Use ODK_DEBUG=yes sh run.sh make ... to print information about timing and debugging
766 |
767 | endef
768 | export data
769 |
770 | include apollo_sv.Makefile
--------------------------------------------------------------------------------
/src/ontology/README-editors.md:
--------------------------------------------------------------------------------
1 | These notes are for the EDITORS of apollo_sv
2 |
3 | This project was created using the [ontology development kit](https://github.com/INCATools/ontology-development-kit). See the site for details.
4 |
5 | For more details on ontology management, please see the
6 | [OBO Academy Tutorials](https://oboacademy.github.io/obook/), the
7 | [OBO tutorial](https://github.com/jamesaoverton/obo-tutorial) or the [Gene Ontology Editors Tutorial](https://go-protege-tutorial.readthedocs.io/en/latest/)
8 |
9 | This documentation has been superceded by the ODK automatic documentation, which you can
10 | activate by adding:
11 |
12 | ```
13 | documentation:
14 | documentation_system: mkdocs
15 | ```
16 |
17 | to your Makefile and running:
18 |
19 | ```
20 | sh run.sh make update_repo
21 | ```
22 | (Unix)
23 |
24 | ```
25 | run.bat make update_repo
26 | ```
27 | (Windows)
--------------------------------------------------------------------------------
/src/ontology/apollo_sv-idranges.owl:
--------------------------------------------------------------------------------
1 | ## ID Ranges File
2 | Prefix: rdf:
3 | Prefix: idsfor:
4 | Prefix: dce:
5 | Prefix: xsd:
6 | Prefix: allocatedto:
7 | Prefix: xml:
8 | Prefix: idprefix:
9 | Prefix: iddigits:
10 | Prefix: rdfs:
11 | Prefix: idrange:
12 | Prefix: owl:
13 |
14 | Ontology:
15 |
16 |
17 | Annotations:
18 | idsfor: "APOLLO_SV",
19 | idprefix: "http://purl.obolibrary.org/obo/APOLLO_SV_",
20 | iddigits: 7
21 |
22 | AnnotationProperty: idprefix:
23 |
24 |
25 | AnnotationProperty: iddigits:
26 |
27 |
28 | AnnotationProperty: idsfor:
29 |
30 |
31 | AnnotationProperty: allocatedto:
32 |
33 | Datatype: idrange:1
34 |
35 | Annotations:
36 | allocatedto: "ONTOLOGY-CREATOR"
37 |
38 | EquivalentTo:
39 | xsd:integer[>= 0 , <= 999999]
40 |
41 |
42 | Datatype: idrange:2
43 |
44 | Annotations:
45 | allocatedto: "ADDITIONAL EDITOR"
46 |
47 | EquivalentTo:
48 | xsd:integer[>= 1000000 , <= 1999999]
49 |
50 |
51 | Datatype: xsd:integer
52 | Datatype: rdf:PlainLiteral
53 |
54 |
--------------------------------------------------------------------------------
/src/ontology/apollo_sv-odk.yaml:
--------------------------------------------------------------------------------
1 | id: apollo_sv
2 | title: "Apollo Structured Vocabulary"
3 | github_org: ApolloDev
4 | repo: apollo-sv
5 | report_fail_on: ERROR
6 | export_formats:
7 | - owl
8 | - obo
9 | - json
10 | release_artefacts:
11 | - base
12 | - full
13 | import_group:
14 | module_type: filter
15 | annotation_properties:
16 | - rdfs:label
17 | - IAO:0000115
18 | - IAO:0000116
19 | - IAO:0000111
20 | - oboInOwl:hasDbXref
21 | - rdfs:comment
22 | products:
23 | - id: ro
24 | module_type: slme
25 | slme_individuals: exclude
26 | - id: geo
27 | mirror_from: http://purl.obolibrary.org/obo/geo/dev/geo.owl
28 | module_type: mirror
29 | - id: ido
30 | module_type: slme
31 | slme_individuals: exclude
32 | - id: mf
33 | module_type: slme
34 | slme_individuals: exclude
35 | - id: go
36 | module_type: slme
37 | slme_individuals: exclude
38 | - id: iao
39 | module_type: mirror
40 | - id: omrse
41 | module_type: slme
42 | slme_individuals: exclude
43 | use_custom_import_module: TRUE
44 | robot_java_args: '-Xmx8G'
45 | custom_makefile_header: |
46 | ### Workflow
47 | #
48 | # Tasks to edit and release OMRSE.
49 | #
50 | # #### Edit
51 | #
52 | # 1. [Prepare release](prepare_release)
53 | # 2. [Refresh imports](all_imports)
54 | # 3. [Update repo to latest ODK](update_repo)
55 | create_obo_metadata: FALSE
56 | documentation:
57 | documentation_system: mkdocs
58 | robot_report:
59 | use_base_iris: True
60 | release_reports: False
61 | fail_on : ERROR
62 | use_labels : False
63 | report_on :
64 | - edit
65 | - apollo_sv-base.owl
66 | sparql_test_on:
67 | - edit
68 | - apollo_sv-base.owl
69 | custom_sparql_checks :
70 | - owldef-self-reference
71 | - iri-range
72 | custom_sparql_exports :
73 | - basic-report
74 |
--------------------------------------------------------------------------------
/src/ontology/apollo_sv.Makefile:
--------------------------------------------------------------------------------
1 | ## Customize Makefile settings for apollo_sv
2 | ##
3 | ## If you need to customize your Makefile, make
4 | ## changes here rather than in the main Makefile
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/ontology/catalog-v001.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/ontology/imports/external_import.owl:
--------------------------------------------------------------------------------
1 | Prefix(:=)
2 | Prefix(owl:=)
3 | Prefix(rdf:=)
4 | Prefix(xml:=)
5 | Prefix(xsd:=)
6 | Prefix(rdfs:=)
7 |
8 |
9 | Ontology(
10 |
11 | Declaration(Class(owl:Thing))
12 |
13 | )
--------------------------------------------------------------------------------
/src/ontology/imports/geo_terms.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/ontology/imports/go_import.owl:
--------------------------------------------------------------------------------
1 | Prefix(:=)
2 | Prefix(owl:=)
3 | Prefix(rdf:=)
4 | Prefix(xml:=)
5 | Prefix(xsd:=)
6 | Prefix(rdfs:=)
7 |
8 |
9 | Ontology(
10 |
11 | Annotation( )
12 | Annotation(owl:versionInfo "2024-12-24")
13 |
14 | Declaration(Class())
15 | Declaration(Class())
16 | Declaration(Class())
17 | Declaration(Class())
18 | Declaration(Class())
19 | Declaration(Class())
20 | Declaration(Class())
21 | Declaration(Class())
22 | Declaration(Class())
23 | Declaration(Class())
24 | Declaration(Class())
25 | Declaration(Class())
26 | Declaration(Class())
27 | Declaration(Class())
28 | Declaration(Class())
29 | Declaration(ObjectProperty())
30 | Declaration(ObjectProperty())
31 | Declaration(ObjectProperty())
32 | Declaration(ObjectProperty())
33 | Declaration(ObjectProperty())
34 | Declaration(ObjectProperty())
35 | Declaration(ObjectProperty())
36 | Declaration(AnnotationProperty())
37 | Declaration(AnnotationProperty())
38 | Declaration(AnnotationProperty())
39 | Declaration(AnnotationProperty())
40 | Declaration(AnnotationProperty())
41 | Declaration(AnnotationProperty())
42 | Declaration(AnnotationProperty())
43 | Declaration(AnnotationProperty())
44 | Declaration(AnnotationProperty())
45 | Declaration(AnnotationProperty())
46 | Declaration(AnnotationProperty())
47 | Declaration(AnnotationProperty())
48 | Declaration(AnnotationProperty())
49 | Declaration(AnnotationProperty())
50 | Declaration(AnnotationProperty())
51 | Declaration(AnnotationProperty())
52 | Declaration(AnnotationProperty())
53 | Declaration(AnnotationProperty())
54 | Declaration(AnnotationProperty())
55 | Declaration(AnnotationProperty())
56 | Declaration(AnnotationProperty())
57 | Declaration(AnnotationProperty())
58 | Declaration(AnnotationProperty())
59 | Declaration(AnnotationProperty())
60 | Declaration(AnnotationProperty())
61 | Declaration(AnnotationProperty())
62 | Declaration(AnnotationProperty())
63 | Declaration(AnnotationProperty())
64 | Declaration(AnnotationProperty())
65 | Declaration(AnnotationProperty())
66 | Declaration(AnnotationProperty())
67 | Declaration(AnnotationProperty())
68 | Declaration(AnnotationProperty())
69 | Declaration(AnnotationProperty())
70 | Declaration(AnnotationProperty())
71 | Declaration(AnnotationProperty())
72 | Declaration(AnnotationProperty())
73 | Declaration(AnnotationProperty())
74 | Declaration(AnnotationProperty())
75 | Declaration(AnnotationProperty())
76 | Declaration(AnnotationProperty())
77 | Declaration(AnnotationProperty(rdfs:comment))
78 | Declaration(AnnotationProperty(rdfs:label))
79 | ############################
80 | # Annotation Properties
81 | ############################
82 |
83 | # Annotation Property: (definition)
84 |
85 | AnnotationAssertion(rdfs:label "definition")
86 |
87 | # Annotation Property: (term replaced by)
88 |
89 | AnnotationAssertion(rdfs:label "term replaced by")
90 |
91 | # Annotation Property: ()
92 |
93 | SubAnnotationPropertyOf( )
94 |
95 | # Annotation Property: ()
96 |
97 | SubAnnotationPropertyOf( )
98 |
99 | # Annotation Property: ()
100 |
101 | SubAnnotationPropertyOf( )
102 |
103 | # Annotation Property: ()
104 |
105 | SubAnnotationPropertyOf( )
106 |
107 | # Annotation Property: ()
108 |
109 | SubAnnotationPropertyOf( )
110 |
111 | # Annotation Property: ()
112 |
113 | SubAnnotationPropertyOf( )
114 |
115 | # Annotation Property: ()
116 |
117 | SubAnnotationPropertyOf( )
118 |
119 | # Annotation Property: ()
120 |
121 | SubAnnotationPropertyOf( )
122 |
123 | # Annotation Property: ()
124 |
125 | SubAnnotationPropertyOf( )
126 |
127 | # Annotation Property: ()
128 |
129 | SubAnnotationPropertyOf( )
130 |
131 | # Annotation Property: ()
132 |
133 | SubAnnotationPropertyOf( )
134 |
135 | # Annotation Property: ()
136 |
137 | SubAnnotationPropertyOf( )
138 |
139 | # Annotation Property: ()
140 |
141 | SubAnnotationPropertyOf( )
142 |
143 | # Annotation Property: ()
144 |
145 | SubAnnotationPropertyOf( )
146 |
147 | # Annotation Property: (has_alternative_id)
148 |
149 | AnnotationAssertion(rdfs:label "has_alternative_id")
150 |
151 | # Annotation Property: (has_broad_synonym)
152 |
153 | AnnotationAssertion(rdfs:label "has_broad_synonym")
154 |
155 | # Annotation Property: (database_cross_reference)
156 |
157 | AnnotationAssertion(rdfs:label "database_cross_reference")
158 |
159 | # Annotation Property: (has_exact_synonym)
160 |
161 | AnnotationAssertion(rdfs:label "has_exact_synonym")
162 |
163 | # Annotation Property: (has_narrow_synonym)
164 |
165 | AnnotationAssertion(rdfs:label "has_narrow_synonym")
166 |
167 | # Annotation Property: (has_obo_namespace)
168 |
169 | AnnotationAssertion(rdfs:label "has_obo_namespace")
170 |
171 | # Annotation Property: (has_related_synonym)
172 |
173 | AnnotationAssertion(rdfs:label "has_related_synonym")
174 |
175 | # Annotation Property: (has_synonym_type)
176 |
177 | AnnotationAssertion(rdfs:label "has_synonym_type")
178 |
179 | # Annotation Property: (in_subset)
180 |
181 | AnnotationAssertion(rdfs:label "in_subset")
182 |
183 | # Annotation Property: (shorthand)
184 |
185 | AnnotationAssertion(rdfs:label "shorthand")
186 |
187 |
188 | ############################
189 | # Object Properties
190 | ############################
191 |
192 | # Object Property: (part of)
193 |
194 | AnnotationAssertion( "BFO:0000050")
195 | AnnotationAssertion( "external")
196 | AnnotationAssertion( "part_of")
197 | AnnotationAssertion( "part_of")
198 | AnnotationAssertion(rdfs:label "part of")
199 | InverseObjectProperties( )
200 | TransitiveObjectProperty()
201 |
202 | # Object Property: (has part)
203 |
204 | AnnotationAssertion( "BFO:0000051")
205 | AnnotationAssertion( "external")
206 | AnnotationAssertion( "has_part")
207 | AnnotationAssertion( "has_part")
208 | AnnotationAssertion(rdfs:label "has part")
209 | TransitiveObjectProperty()
210 |
211 | # Object Property: (occurs in)
212 |
213 | AnnotationAssertion( "BFO:0000066")
214 | AnnotationAssertion( "external")
215 | AnnotationAssertion( "occurs_in")
216 | AnnotationAssertion( "occurs_in")
217 | AnnotationAssertion(rdfs:label "occurs in")
218 |
219 | # Object Property: (ends during)
220 |
221 | AnnotationAssertion( "RO:0002093")
222 | AnnotationAssertion( "external")
223 | AnnotationAssertion( "ends_during")
224 | AnnotationAssertion( "ends_during")
225 | AnnotationAssertion(rdfs:label "ends during")
226 |
227 | # Object Property: (regulates)
228 |
229 | AnnotationAssertion( "RO:0002211")
230 | AnnotationAssertion( "external")
231 | AnnotationAssertion( "regulates")
232 | AnnotationAssertion( "regulates")
233 | AnnotationAssertion(rdfs:label "regulates")
234 | TransitiveObjectProperty()
235 |
236 | # Object Property: (negatively regulates)
237 |
238 | AnnotationAssertion( "RO:0002212")
239 | AnnotationAssertion( "external")
240 | AnnotationAssertion( "negatively_regulates")
241 | AnnotationAssertion( "negatively_regulates")
242 | AnnotationAssertion(rdfs:label "negatively regulates")
243 | SubObjectPropertyOf( )
244 |
245 | # Object Property: (positively regulates)
246 |
247 | AnnotationAssertion( "RO:0002213")
248 | AnnotationAssertion( "external")
249 | AnnotationAssertion( "positively_regulates")
250 | AnnotationAssertion( "positively_regulates")
251 | AnnotationAssertion(rdfs:label "positively regulates")
252 | SubObjectPropertyOf( )
253 |
254 |
255 |
256 | ############################
257 | # Classes
258 | ############################
259 |
260 | # Class: