INCATools / INCATools/ontology-development-kit

Provide more examples of custom mirrors

Open
#1,201 0 comments 2 reactions 0 assignees View on GitHub
documentation
Dominant language
Dockerfile
Stars
375
Forks
69
Avg merge
3d 5h
Merged PRs (30d)
7

Description

“Custom” mirror types provide a lot of flexibility—since users can do basically whatever they want/need to produce the mirror—, but the feature would probably benefit from more documentation and especially from more examples.

Unclear whether the examples should belong here or to the OBOOK, to be decided.

One example that was discussed on the Slack channel, and that I am copying here so that it is not lost to the Slack blackhole:

### Creating a custom mirror from a OntoFox query

(Could be useful if you need to import only a handful of terms from a very large ontology; basically, you rely on OntoFox to do the heavy lifting, and you get directly the subset of the ontology you need without ever having to load the entire ontology on your machine.)

For example, to create a mirror with a subset of the NCBITaxon ontology:

1) Declare a mirror with type `custom` in your `-odk.yaml` config file:

```yaml
import_group:
products:
- id: myncbitaxon
mirror_type: custom
```

2) Re-generate the standard Makefile as usual:

```sh
sh run.sh make update_repo
sh run.sh make update_repo
```

3) In the custom Makefile, override the `$(MIRRORDIR)/myncbitaxon.owl` rule and make it call the OntoFox service to generate the mirror:

```Makefile
$(MIRRORDIR)/myncbitaxon.owl: $(IMPORTSDIR)/myncbitaxon-query.txt
curl -s -F file=@$^ -o $@ https://ontofox.hegroup.org/service.php
```

4) Create the file `$(IMPORTSDIR)/myncbitaxon-query.txt` as a [OntoFox data input file](https://ontofox.hegroup.org/tutorial/index.php#input_format). (See [here](https://ontofox.hegroup.org/tutorial/use_case.php) for some examples.)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the custom mirror configuration in -odk.yaml, the generated and custom Makefile workflow, and the OBOOK documentation to decide where examples belong. Use the OntoFox example and existing custom mirror guidance as references; done means adding clear, runnable examples and documenting their intended location.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, yaml
Domain
build-system, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.