Skip to content

Commit

Permalink
Alternate format for OLS
Browse files Browse the repository at this point in the history
- Add: Goal for medgen.owl.gz, along with additional intermediate goals and updates to build goals and GH action for this.
  • Loading branch information
joeflack4 committed Oct 19, 2024
1 parent 3d1779c commit a10f0a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/buid_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: build
# todo: reactivate `make all`, pending pending https://github.com/monarch-initiative/medgen/issues/11
# run: make all
run: make minimal
run: export ROBOT_JAVA_ARGS=-Xmx15G; make minimal
- name: Get current time
uses: josStorer/[email protected]
id: current-time
Expand All @@ -31,10 +31,11 @@ jobs:
automatic_release_tag: "${{ steps.current-time.outputs.formattedTime }}"
title: "${{ steps.current-time.outputs.formattedTime }}"
prerelease: false
# todo: add back `release/medgen-disease-extract.owl`, pending https://github.com/monarch-initiative/medgen/issues/11
# todo: add back `release/medgen-disease-extract.owl`?, pending https://github.com/monarch-initiative/medgen/issues/11
# output/release/medgen-disease-extract.owl
files: |
output/release/medgen.obo
output/release/medgen.owl.gz
output/release/medgen-disease-extract.obo
output/release/medgen-xrefs.robot.template.tsv
output/release/medgen-xrefs-mesh.robot.template.tsv
Expand Down
18 changes: 13 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
.PHONY: all build stage stage-% analyze clean deploy-release build-lite minimal sssom sssom-validate

OBO=http://purl.obolibrary.org/obo
PRODUCTS=medgen-disease-extract.obo medgen-disease-extract.owl
# todo: medgen-disease-extract.owl.gz?
PRODUCTS=medgen-disease-extract.obo medgen-disease-extract.owl medgen.owl.gz
TODAY ?=$(shell date +%Y-%m-%d)
VERSION=$(TODAY)

Expand All @@ -15,9 +16,10 @@ minimal: build-lite stage-lite clean
stage-lite: | output/release/
# mv medgen-disease-extract.owl output/release/
mv *.obo output/release/
mv medgen.owl.gz output/release/
mv *.robot.template.tsv output/release/
mv *.sssom.tsv output/release/
build-lite: medgen-disease-extract.obo medgen-xrefs.robot.template.tsv umls-hpo.sssom.tsv sssom-validate
build-lite: medgen.ttl.gz medgen-disease-extract.obo medgen-xrefs.robot.template.tsv umls-hpo.sssom.tsv sssom-validate

all: build stage clean analyze
# analyze: runs more than just this file; that goal creates multiple files
Expand Down Expand Up @@ -68,6 +70,12 @@ ftp.ncbi.nlm.nih.gov/pub/medgen/MedGenIDMappings.txt: ftp.ncbi.nlm.nih.gov/
medgen.obo: ftp.ncbi.nlm.nih.gov/ uid2cui.tsv
./src/medgen2obo.pl > $@.tmp && mv $@.tmp $@

medgen.ttl: medgen.obo
export ROBOT_JAVA_ARGS=-Xmx15G; robot convert --input $< --output $@ --format ttl

medgen.ttl.gz: medgen.ttl
gzip -c $< > $@

# We only care about diseases for now
# - NOTE: some cancers seem to appear under Neoplastic-Process
x-%.obo: medgen.obo
Expand All @@ -76,9 +84,7 @@ x-%.obo: medgen.obo
medgen-disease-extract.obo: x-Disease-or-Syndrome.obo x-Neoplastic-Process.obo
owltools $^ --merge-support-ontologies -o -f obo $@

medgen-disease-extract.json: medgen-disease-extract.obo
owltools $< -o -f json $@

# todo: change this to robot convert w/ format ttl, lower memory usage?
output/medgen-disease-extract.owl: medgen-disease-extract.obo | output/
owltools $< -o $@

Expand All @@ -92,6 +98,8 @@ sssom-validate: umls-hpo.sssom.tsv
# todo: Address GH action build heap space err:
# https://github.com/monarch-initiative/medgen/actions/runs/9150396559/job/25155114016
# Don't need to fix until the case where we need to use `make all` or otherwise need this file.
#medgen-disease-extract.json: medgen-disease-extract.obo
# owltools $< -o -f json $@
output/medgen.obographs.json: output/medgen-disease-extract.owl | output/
robot convert -i $< -o $@

Expand Down

0 comments on commit a10f0a7

Please sign in to comment.