From 5c80650a5866cd71e165f0edbb122d7e092488bd Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Mon, 7 Aug 2023 20:15:10 +0300 Subject: [PATCH 1/2] Update hp.Makefile --- src/ontology/hp.Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ontology/hp.Makefile b/src/ontology/hp.Makefile index 286dde4d6..0d0fc3d93 100644 --- a/src/ontology/hp.Makefile +++ b/src/ontology/hp.Makefile @@ -636,3 +636,18 @@ $(TMPDIR)/hp-%-merged.owl: hp-base.owl tmp/%.owl mappings: $(MAKE_FAST) ../mappings/hp-snomed.lexmatch.sssom.tsv + +export ROBOT_PLUGINS_DIRECTORY := $(PWD)/tmp/pluginsTest + + + +update-plugins: $(ROBOT_PLUGINS_DIRECTORY)/monarch.jar + +$(ROBOT_PLUGINS_DIRECTORY)/monarch.jar: + mkdir -p $(ROBOT_PLUGINS_DIRECTORY) + cp ~/ws/robot-phenotype-toolkit/target/robot-plugins-0.0.1-SNAPSHOT.jar $(ROBOT_PLUGINS_DIRECTORY)/monarch.jar + +export ROBOT_PLUGINS_DIRECTORY=$(PWD)/tmp/plugins + +hp-eq.owl: | tmp/plugins/monarch.jar + $(ROBOT) monarch:upheno-augment -i hp-edit.owl --relation has_phenotype_affecting -o $@ From c61ff7b9252bf3ee7ceea4d3c4c4137a7ccb27e0 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Tue, 8 Aug 2023 16:26:15 +0300 Subject: [PATCH 2/2] Update hp.Makefile --- src/ontology/hp.Makefile | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/ontology/hp.Makefile b/src/ontology/hp.Makefile index 0d0fc3d93..924f5d795 100644 --- a/src/ontology/hp.Makefile +++ b/src/ontology/hp.Makefile @@ -132,8 +132,15 @@ reports/hp_xrefs.csv: $(SRC) ###### SKIP DEFAULTS ############# ################################## +$(EDIT_PREPROCESSED): $(SRC) + # Instead of making the prepare-robot-plugins a dependency, we just call the goal + # to update the plugins when we need it + $(MAKE) prepare-robot-plugins + $(ROBOT) monarch:upheno-augment -i $< --relation has_phenotype_affecting \ + convert --format ofn --output $@ + # We overwrite the .owl release to be, for now, a simple merged version of the editors file. -$(ONT).owl: $(SRC) +$(ONT).owl: $(EDIT_PREPROCESSED) $(ROBOT) merge --input $< \ annotate --ontology-iri $(URIBASE)/$@ --version-iri $(ONTBASE)/releases/$(TODAY)/$@ \ convert -o $@.tmp.owl && mv $@.tmp.owl $@ @@ -637,17 +644,26 @@ $(TMPDIR)/hp-%-merged.owl: hp-base.owl tmp/%.owl mappings: $(MAKE_FAST) ../mappings/hp-snomed.lexmatch.sssom.tsv -export ROBOT_PLUGINS_DIRECTORY := $(PWD)/tmp/pluginsTest +########################################### +### Testing new custom plugin system ###### +########################################### + +# Make sure ROBOT knows where to find plugins +export ROBOT_PLUGINS_DIRECTORY=$(TMPDIR)/plugins +# List of "repository plugins" (plugins permanently installed in top-level plugins directory, entirely managed by users) +ROBOT_REPOSITORY_PLUGINS=$(wildcard ../../plugins/*.jar) +# Standard rule to create symlinks in $(TMPDIR)/plugins, so that the repository plugins +# are visible to ROBOT +prepare-robot-plugins: + for plugin in $(ROBOT_REPOSITORY_PLUGINS) ; do ln $plugin $(TMPDIR)/plugins ; done -update-plugins: $(ROBOT_PLUGINS_DIRECTORY)/monarch.jar +# in the custom.Makefile, users can simply attach any custom plugins they need +# as dependencies to the prepare-robot-plugins goal +prepare-robot-plugins: $(ROBOT_PLUGINS_DIRECTORY)/monarch.jar $(ROBOT_PLUGINS_DIRECTORY)/monarch.jar: mkdir -p $(ROBOT_PLUGINS_DIRECTORY) + # Ignore this obviously this will be replaced by a download step cp ~/ws/robot-phenotype-toolkit/target/robot-plugins-0.0.1-SNAPSHOT.jar $(ROBOT_PLUGINS_DIRECTORY)/monarch.jar - -export ROBOT_PLUGINS_DIRECTORY=$(PWD)/tmp/plugins - -hp-eq.owl: | tmp/plugins/monarch.jar - $(ROBOT) monarch:upheno-augment -i hp-edit.owl --relation has_phenotype_affecting -o $@