Skip to content

Commit

Permalink
Merge pull request #496 from monarch-initiative/docs-add-new-source-u…
Browse files Browse the repository at this point in the history
…pdates

Update `add-new-source.md`
  • Loading branch information
joeflack4 authored Apr 18, 2024
2 parents a3cc936 + 4c265e7 commit 2fa102c
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions docs/developer/add-new-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ In several of the filename patterns below, `*` represents the ontology name/id.
### 1.1. Add source info
Add a new filename and URL to the `products` > `components` section in [src/ontology/mondo-ingest-odk.yaml](https://github.com/monarch-initiative/mondo-ingest/blob/main/src/ontology/mondo-ingest-odk.yaml).

### 1.2. `update_repo`
### 1.2. Run `update_repo`
From `src/ontology`, run `sh run.sh make update_repo`.

What this does: This will update several files, including the addition of components goals to src/ontology/Makefile.
What this does: This will update several files, including the addition of components goals to `src/ontology/Makefile`.

It is possible you may need to run this command twice. The first time will update the update process itself, and the
second time will run the update.
Expand Down Expand Up @@ -50,7 +50,24 @@ Run `sh run.sh make ../../docs/metrics/*.md` from `src/ontology`.
### 3.5. `docs/metrics.md`
Add a link to your new `.md` file created in the last step.

## 4. Everything else
## 4. The `components/` goal
When `mondo-ingest-odk.yaml` is edited and `update_repo` is run, a new `component-download-SOURCE.owl` goal is added to
`src/ontology/Makefile`. This essentially downloads a copy of the source. But, for it to be used in `mondo-ingest`, it
needs to be modified. This is done by creating a `$(COMPONENTSDIR)/omim.owl` goal in `mondo-ingest.Makefile` which runs
a composite `robot` command. Here are some sections you'll likely want to add that command:
- `rename --mappings config/SOURCE-property-map.sssom.tsv`: You'll notice that there are two other lines on most goals
for `property-map.sssom.tsv` and `property-map-2.sssom.tsv`. These handle some common renamings. However,
if your source has any properties that need to be renamed which are specific to that source, then you should create a
new file for that. While doing this, it might be useful to check any other `SOURCE-property-map.sssom.tsv` files to see
if they share any of the same property renamings. If so, it might be a good idea to move them to
`property-map.sssom.tsv` instead.
- `query --update ../sparql/SPARQL.ru`: There may be more complex modifications that need to be made to the ontology. If
so, this can be done by 1 or more SPARQL queries.
- `remove -T config/properties.txt --select complement --select properties --trim true`: `properties.txt` contains a
list of the only allowable properties for any component. If there are any properties in the source that are not in this
file that you wish to keep, they should be added.

## 5. Everything else
Steps 1-3 take care of the basic setup. Ideally, if everything is automated correctly and the nature of the ontology
being ingested is not significantly different than what has been ingested before, running `make build-mondo-ingest`
should include all of the output artefacts and remaining documentation for the new ontology.
Expand Down

0 comments on commit 2fa102c

Please sign in to comment.