Skip to content

Commit

Permalink
Merge pull request #408 from monarch-initiative/bug-sync-ancestor
Browse files Browse the repository at this point in the history
Bug: Sync subclass: ancestor inconsistencies
  • Loading branch information
matentzn authored Feb 1, 2024
2 parents fb8bfb0 + 1ec9345 commit fc5fe2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/ontology/mondo-ingest.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,17 @@ documentation: j2 $(ALL_DOCS) unmapped-terms-docs mapped-deprecated-terms-docs s
build-mondo-ingest:
$(MAKE) refresh-imports exclusions-all slurp-all mappings matches \
mapped-deprecated-terms mapping-progress-report \
recreate-unmapped-components sync documentation
$(MAKE) prepare_release
recreate-unmapped-components sync documentation \
prepare_release
echo "Mondo Ingest has been fully completed"

.PHONY: build-mondo-ingest-no-imports
build-mondo-ingest-no-imports:
$(MAKE_FAST) build-mondo-ingest
$(MAKE_FAST) exclusions-all slurp-all mappings matches \
mapped-deprecated-terms mapping-progress-report \
recreate-unmapped-components sync documentation \
prepare_release
echo "Mondo Ingest has been fully completed"

DEPLOY_ASSETS_MONDO_INGEST=$(OTHER_SRC) $(ALL_MAPPINGS) ../../mondo-ingest.owl ../../mondo-ingest.obo

Expand Down Expand Up @@ -432,6 +436,7 @@ tmp/merged.owl: tmp/mondo.owl mondo-ingest.owl tmp/mondo.sssom.ttl
$(MAPPINGSDIR)/mondo-sources-all-lexical.sssom.tsv: $(SCRIPTSDIR)/match-mondo-sources-all-lexical.py tmp/merged.db $(MAPPINGSDIR)/rejected-mappings.tsv
rm -f $(MAPPINGSDIR)/mondo-sources-all-lexical.sssom.tsv
rm -f $(MAPPINGSDIR)/mondo-sources-all-lexical-2.sssom.tsv
$(MAKE) pip-bioregistry
python $(SCRIPTSDIR)/match-mondo-sources-all-lexical.py run tmp/merged.db \
-c metadata/mondo.sssom.config.yml \
-r config/mondo-match-rules.yaml \
Expand Down
4 changes: 3 additions & 1 deletion src/scripts/sync_subclassof.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ def sync_subclassof(
missing_ancestor_rels = rels_indirect_mondo_mondo.union(rels_direct_mondo_mondo).difference(ancestors_mondo_mondo)
if missing_ancestor_rels:
rels_for_printing = [rel for rel in list(missing_ancestor_rels)[:5]]
logging.error(
# TODO: temp:
raise ValueError(
'Detected error in consistency of sets of terms gathered from Mondo.\n'
f'\n 1. Mondo SCR ancestors: {len(ancestors_mondo_mondo)}'
f'\n 2. Mondo direct SCR relationships: {len(rels_direct_mondo_mondo)}'
Expand Down Expand Up @@ -499,3 +500,4 @@ def run_defaults(use_cache=True): # todo: #remove-temp-defaults

if __name__ == '__main__':
cli()
#run_defaults() # TODO temp

0 comments on commit fc5fe2d

Please sign in to comment.