Skip to content

Commit

Permalink
Synchronization: SubClassOf
Browse files Browse the repository at this point in the history
  • Loading branch information
joeflack4 committed Sep 11, 2023
1 parent f4590dc commit 771c2dc
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/ontology/mondo-ingest.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ documentation: j2 $(ALL_DOCS) unmapped-terms-docs mapped-deprecated-terms-docs s
build-mondo-ingest:
$(MAKE) refresh-imports exclusions-all mondo-ingest.db slurp-all mappings matches \
mapped-deprecated-terms mapping-progress-report \
recreate-unmapped-components documentation
recreate-unmapped-components sync documentation
$(MAKE) prepare_release

.PHONY: build-mondo-ingest-no-imports
Expand Down Expand Up @@ -502,6 +502,19 @@ slurp-all-no-updates: $(foreach n,$(ALL_COMPONENT_IDS), slurp-no-updates-$(n))
.PHONY: slurp-all
slurp-all: $(foreach n,$(ALL_COMPONENT_IDS), slurp-$(n))


#############################
###### Synchronization ######
#############################
.PHONY: sync
sync: sync-subclassof

.PHONY: sync-subclassof
sync-subclassof: reports/sync-subclassof.robot.template.tsv

reports/sync-subclassof.robot.template.tsv: tmp/merged.db
python3 $(SCRIPTSDIR)/sync_subclassof.py --ontology-db tmp/merged.db --outpath $@

#############################
######### Analysis ##########
#############################
Expand Down
38 changes: 38 additions & 0 deletions src/scripts/sync_subclassof.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""Create a robot template for purpose of syncing subclassof relations.
Resources
- GitHub issue: https://github.com/monarch-initiative/mondo-ingest/issues/92
- GitHub PR: https://github.com/monarch-initiative/mondo-ingest/pull/363
"""
from argparse import ArgumentParser

# import curies
import pandas as pd
from oaklib import get_implementation_from_shorthand
# from oaklib.types import CURIE, URI
# from sssom.util import is_curie

# from utils import remove_angle_brackets


def sync_subclassof():
"""Run"""
pass


# TODO: --ontology-db tmp/merged.db --outpath reports/sync-subclassof.robot.template.tsv
def cli():
"""Command line interface."""
parser = ArgumentParser('Create a robot template for purpose of syncing subclassof relations.')
parser.add_argument('-d', '--db-path', required=True, help='')
parser.add_argument(
'-o', '--outpath', required=True,
help='')
parser.add_argument(
'-d', '--ontology-db', required=True,
help='Path to SemanticSQL sqlite ONTO_NAME.db.')
sync_subclassof(**vars(parser.parse_args()))


if __name__ == '__main__':
cli()

0 comments on commit 771c2dc

Please sign in to comment.