Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate format for OLS #32

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.ttl.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.ttl.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 > [email protected] && mv [email protected] $@

medgen.ttl: medgen.obo
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
Loading