Skip to content

Commit

Permalink
Slurp pipeline
Browse files Browse the repository at this point in the history
- Delete: Initialized a variables for 'all relationships' and 'term parent map', but did a more OAK-reliant refactor and removed these.
- Add: Term class
- Update: Big refactor to utilize Term class
- Add: Slurp output TSV files
- Add: utils.py, which includes Term class
- Add: New param: max_id

Misc
- Update: run.sh: This change will allow any Python package updates to be retained.
- Add: SPARQL jinja query to get parents. Used by slurp pipeline.
  • Loading branch information
joeflack4 committed Sep 23, 2022
1 parent e75085c commit 35c8479
Show file tree
Hide file tree
Showing 11 changed files with 23,645 additions and 166 deletions.
11 changes: 8 additions & 3 deletions src/ontology/mondo-ingest.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,21 @@ slurp/:
mkdir -p $@

# min-id: the next available Mondo ID
# TODO: `pip install` stuff is temporary until ODK docker up to date w/ recent OAK updates
# TODO: Check if removing --rf from run.sh will fix need for pip install. havent been able to try yet; docker issue
slurp/%.tsv: $(COMPONENTSDIR)/%.owl $(TMPDIR)/mondo.sssom.tsv $(REPORTDIR)/mirror_signature-mondo.tsv | slurp/
# pip install --upgrade -r $(RELEASEDIR)/requirements-unlocked.txt
python $(SCRIPTSDIR)/migrate.py \
--ontology-path $(COMPONENTSDIR)/$*.owl \
--sssom-map-path $(TMPDIR)/mondo.sssom.tsv \
--onto-config-path metadata/$*.yml \
--min-id 123000 \
--min-id 850000 \
--max-id 999999 \
--mondo-terms-path $(REPORTDIR)/mirror_signature-mondo.tsv \
--slurp-dir-path slurp/ \
--outpath $@

slurp-%:
$(MAKE) slurp/%.tsv
$(MAKE) slurp/$*.tsv

slurp-all: slurp-omim slurp-doid slurp-ncit slurp-ordo slurp-icd10cm slurp-icd10who
slurp-all: slurp-omim slurp-doid slurp-ordo slurp-icd10cm slurp-icd10who slurp-ncit
2 changes: 1 addition & 1 deletion src/ontology/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ -n "$USE_SINGULARITY" ]; then
-W $WORK_DIR \
docker://obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
else
docker run -v $VOLUME_BIND -w $WORK_DIR -e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" --rm -ti obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
docker run -v $VOLUME_BIND -w $WORK_DIR -e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" -ti obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
fi

case "$@" in
Expand Down
1,073 changes: 1,073 additions & 0 deletions src/ontology/slurp/doid.tsv

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions src/ontology/slurp/icd10cm.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
mondo_id xref label definition parents
ID A oboInOwl:hasDbXref LABEL A IAO:0000115 SC %
MONDO:850001 ICD10CM:A00-B99
MONDO:850002 ICD10CM:C00-D49
MONDO:850003 ICD10CM:D50-D89
MONDO:850004 ICD10CM:E00-E89
MONDO:850005 ICD10CM:F01-F99
MONDO:850006 ICD10CM:G00-G99
MONDO:850007 ICD10CM:H00-H59
MONDO:850008 ICD10CM:H60-H95
MONDO:850009 ICD10CM:I00-I99
MONDO:850010 ICD10CM:ICD-10-CM
MONDO:850011 ICD10CM:J00-J99
MONDO:850012 ICD10CM:K00-K95
MONDO:850013 ICD10CM:L00-L99
MONDO:850014 ICD10CM:M00-M99
MONDO:850015 ICD10CM:N00-N99
MONDO:850016 ICD10CM:O00-O9A
MONDO:850017 ICD10CM:P00-P96
MONDO:850018 ICD10CM:Q00-Q99
MONDO:850019 ICD10CM:R00-R99
MONDO:850020 ICD10CM:S00-T88
MONDO:850021 ICD10CM:U00-U85
MONDO:850022 ICD10CM:V00-Y99
MONDO:850023 ICD10CM:Z00-Z99
Loading

0 comments on commit 35c8479

Please sign in to comment.