Skip to content

Commit

Permalink
Makefile updates to publish go-plus, go-gaf, go-lego as standalone fi…
Browse files Browse the repository at this point in the history
…les (no imports). Fixes #16876.
  • Loading branch information
balhoff committed May 1, 2019
1 parent cf53839 commit 66395e6
Show file tree
Hide file tree
Showing 5 changed files with 16,895 additions and 14,776 deletions.
25 changes: 22 additions & 3 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ GO_BASIC_RELATIONS = BFO:0000050 RO:0002211 RO:0002212 RO:0002213
GO_MAIN_RELATIONS = $(GO_BASIC_RELATIONS) BFO:0000051 BFO:0000066 RO:0002091 RO:0002092 RO:0002093

GO_PLUS = extensions/go-plus
GO_GAF = extensions/go-gaf
GO_LEGO = extensions/go-lego

SPARQLDIR = ../sparql
REPORTDIR = $(RELEASEDIR)/reports
Expand Down Expand Up @@ -187,16 +189,25 @@ reasoned.owl: enhanced.owl $(SRC)-check regulates_chains.ofn
$(ROBOT) reason -i $< -r ELK -e asserted-only relax reduce annotate -V $(RELEASE_URIBASE)/$(ONT).owl unmerge -i regulates_chains.ofn -o $@

# equivalent to reasoned, but we rename
# TODO cleanup redundancies with merge here and with go-base
$(GO_PLUS).owl: reasoned.owl
$(ROBOT) annotate -i $< -O $(BASE)/$@ -V $(RELEASE_URIBASE)/$@ -o $@
$(ROBOT) merge -i $< --collapse-import-closure true --include-annotations false annotate -O $(BASE)/$@ -V $(RELEASE_URIBASE)/$@ -o $@
.PRECIOUS: $(GO_PLUS).owl

# Create release file containing GO-asserted axioms, no external axioms, and no inferences.
# GO artifacts to merge are hardcoded here.
# GO artifacts to merge are hardcoded here. Would make sense to eventually consolidate go-plus
# as just the merge of go-base.
go-base.owl: enhanced.owl
$(OWLTOOLS) $(USECAT) $< --remove-imports-declarations -o -f ofn $@.tmp &&\
$(ROBOT) merge -i $@.tmp -i extensions/go-gci.owl -i extensions/go-bridge.owl -i extensions/ro_pending.owl -i imports/x-disjoint.owl annotate -O $(BASE)/$@ -V $(RELEASE_URIBASE)/$@ -o $@ && rm $@.tmp

$(GO_GAF).owl: extensions/go-gaf-edit.ofn $(GO_PLUS).owl extensions/gorel.owl mirror/cl-download.owl mirror/taxslim.owl mirror/taxslim-disjoint-over-in-taxon.owl
$(ROBOT) merge -i $< --collapse-import-closure true --include-annotations false annotate -O $(BASE)/$@ -V $(RELEASE_URIBASE)/$@ -o $@

# Not all imports are being pre-mirrored; the ones that are should be dependencies
$(GO_LEGO).owl: extensions/go-lego-edit.ofn $(GO_PLUS).owl mirror/ro-download.owl extensions/legorel.owl extensions/go-bfo-bridge.owl mirror/taxslim.owl mirror/taxslim-disjoint-over-in-taxon.owl
$(ROBOT) merge -i $< --collapse-import-closure true --include-annotations false annotate -O $(BASE)/$@ -V $(RELEASE_URIBASE)/$@ -o $@

# ----------------------------------------
# OBO and subsets
# ----------------------------------------
Expand Down Expand Up @@ -336,6 +347,14 @@ mirror/ncbitaxon-download.owl: imports/ncbitaxon_terms.txt
# OWLTOOLS_MEMORY=12G owltools $< --create-taxon-disjoint-over-in-taxon -s -r NCBITaxon:1 -m --set-ontology-id $OBO/zz -o
#.PRECIOUS: mirror/ncbitaxon-download-enhanced.owl

mirror/taxslim.owl: $(SRC)
wget --no-check-certificate $(OBO)/ncbitaxon/subsets/taxslim.owl $(WGET_OUT)
.PRECIOUS: mirror/taxslim.owl

mirror/taxslim-disjoint-over-in-taxon.owl: $(SRC)
wget --no-check-certificate $(OBO)/ncbitaxon/subsets/taxslim-disjoint-over-in-taxon.owl $(WGET_OUT)
.PRECIOUS: mirror/taxslim-disjoint-over-in-taxon.owl

# special case: download obo for speed for ncbitaxon
mirror/pr-download.owl: $(SRC)
wget --no-check-certificate $(OBO)/pr.obo $(WGET_OUT)
Expand Down Expand Up @@ -369,7 +388,7 @@ mirror/cl-download.owl: $(SRC)
# see https://github.com/geneontology/go-ontology/issues/12946
mirror/ro-download.owl: $(SRC)
$(OWLTOOLS) $(OBO)/ro.owl --merge-imports-closure -o $@
.PRECIOUS: mirror/cl-download.owl
.PRECIOUS: mirror/ro-download.owl

# general case: download remote OWL first
mirror/%-download.owl: $(SRC)
Expand Down
9 changes: 7 additions & 2 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/extensions/chebi_roles.owl" uri="imports/chebi_roles.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/chebi_import.owl" uri="imports/chebi_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/cl_import.owl" uri="imports/cl_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/cl/cl-basic.owl" uri="mirror/cl-download.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/po_import.owl" uri="imports/po_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/caro_import.owl" uri="imports/caro_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/fao_import.owl" uri="imports/fao_import.owl"/>
Expand All @@ -20,12 +21,15 @@
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/oba_import.owl" uri="imports/oba_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/so_import.owl" uri="imports/so_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/ro_import.owl" uri="imports/ro_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro.owl" uri="mirror/ro-download.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/annotation_properties.owl" uri="imports/annotation_properties.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/pato_import.owl" uri="imports/pato_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/ncbitaxon_import.owl" uri="imports/ncbitaxon_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl" uri="mirror/taxslim.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim-disjoint-over-in-taxon.owl" uri="mirror/taxslim-disjoint-over-in-taxon.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/fao_import.owl" uri="imports/fao_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/go-plus.owl" uri="imports/go-plus.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/go-gaf.owl" uri="imports/go-gaf.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/extensions/go-plus.owl" uri="extensions/go-plus.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/extensions/go-gaf.owl" uri="extensions/go-gaf.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/chebi.owl" uri="mirror/chebi.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/uberon/reasoner_axioms.owl" uri="go_inferences_null.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/go-taxon-groupings.owl" uri="imports/go-taxon-groupings.owl"/>
Expand All @@ -34,4 +38,5 @@
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/gorel.owl" uri="imports/gorel.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/x-disjoint.owl" uri="imports/x-disjoint.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/go/imports/reactome_xrefs_import.owl" uri="imports/reactome_xrefs_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/uberon/bridge/uberon-bridge-to-caro.owl" uri="mirror/uberon-bridge-to-caro.owl"/>
</catalog>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/go/extensions/go-gaf.owl>
# When adding an import, ensure this dependency is captured in the go-gaf makefile target
Import(<http://purl.obolibrary.org/obo/go/extensions/gorel.owl>)
Import(<http://purl.obolibrary.org/obo/cl/cl-basic.owl>)
Import(<http://purl.obolibrary.org/obo/go/extensions/go-plus.owl>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Import(<http://purl.obolibrary.org/obo/go/extensions/go-plus.owl>)
Import(<http://purl.obolibrary.org/obo/go/extensions/go-bfo-bridge.owl>)
Import(<http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl>)
Import(<http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim-disjoint-over-in-taxon.owl>)
Import(<http://purl.obolibrary.org/obo/eco/eco-base.owl>)
Import(<http://purl.obolibrary.org/obo/eco/eco-basic.owl>)
Import(<http://purl.obolibrary.org/obo/wbbt.owl>)
Import(<http://purl.obolibrary.org/obo/wbphenotype/wbphenotype-base.owl>)
Import(<http://purl.obolibrary.org/obo/wbphenotype/imports/wbls_import.owl>)
Expand Down
Loading

0 comments on commit 66395e6

Please sign in to comment.