Skip to content

Commit

Permalink
Merge pull request #176 from FlyBase/new-rewriter
Browse files Browse the repository at this point in the history
Replace the old EQWriter tool by a ROBOT plugin.
  • Loading branch information
gouttegd authored Dec 20, 2023
2 parents 91d01a9 + 7d6b1aa commit 6b16b60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/ontology/dpo.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,11 @@ reports/obo_qc_%.owl.txt:
# special placeholder string to substitute in definitions from external ontologies, mostly GO
# dpo only uses SUB definitions - to use DOT, copy code and sparql from FBcv.

tmp/merged-source-pre.owl: $(SRC)
$(ROBOT) merge -i $< --output $@
export ROBOT_PLUGINS_DIRECTORY = $(TMPDIR)/plugins

tmp/auto_generated_definitions_seed_sub.txt: tmp/merged-source-pre.owl
$(ROBOT) query --use-graphs false -f csv -i $< --query ../sparql/classes-with-placeholder-definitions.sparql $@.tmp &&\
cat $@.tmp | sort | uniq > $@
rm -f $@.tmp
$(ROBOT_PLUGINS_DIRECTORY)/flybase.jar:
mkdir -p $(ROBOT_PLUGINS_DIRECTORY)
curl -L -o $@ https://github.com/FlyBase/flybase-robot-plugin/releases/download/flybase-robot-plugin-0.1.0/flybase.jar

tmp/auto_generated_definitions_sub.owl: tmp/merged-source-pre.owl tmp/auto_generated_definitions_seed_sub.txt
java -Xmx3G -jar ../scripts/eq-writer.jar $< tmp/auto_generated_definitions_seed_sub.txt sub_external $@ NA source_xref

$(EDIT_PREPROCESSED): $(SRC) tmp/auto_generated_definitions_sub.owl
cat $(SRC) | grep -v 'sub_' > tmp/$(ONT)-edit-release.owl
$(ROBOT) merge -i tmp/$(ONT)-edit-release.owl -i tmp/auto_generated_definitions_sub.owl --collapse-import-closure false -o $@
$(EDIT_PREPROCESSED): $(SRC) $(ROBOT_PLUGINS_DIRECTORY)/flybase.jar
$(ROBOT) flybase:rewrite-def -i $< --sub-definitions --filter-prefix FBcv -o $@
Binary file removed src/scripts/eq-writer.jar
Binary file not shown.

0 comments on commit 6b16b60

Please sign in to comment.