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

Add a base file #33

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ catalog-v001.xml
graphviz-images/
junk/
lib/
mro-import.owl
mro.xlsx
mro.owl
mro-base.owl
iedb.zip
reference/
src/.cache/
Expand Down
28 changes: 16 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SHELL := bash

OBO = http://purl.obolibrary.org/obo
LIB = lib
ROBOT := java -jar build/robot.jar
ROBOT := java -jar build/robot.jar --prefix "REO: $(OBO)/REO_"
TODAY := $(shell date +%Y-%m-%d)

tables = external core genetic-locus haplotype serotype chain molecule haplotype-molecule serotype-molecule mutant-molecule evidence chain-sequence
Expand Down Expand Up @@ -234,8 +234,6 @@ update-mamu-alleles: src/update_mamu_alleles.py ontology/chain-sequence.tsv onto
mro.owl: build/mro-import.owl index.tsv $(build_files) ontology/metadata.ttl | build/robot.jar
$(ROBOT) template \
--input $< \
--prefix "MRO: $(OBO)/MRO_" \
--prefix "REO: $(OBO)/REO_" \
--template index.tsv \
$(templates) \
--merge-before \
Expand All @@ -249,6 +247,18 @@ mro.owl: build/mro-import.owl index.tsv $(build_files) ontology/metadata.ttl | b
--annotation-file ontology/metadata.ttl \
--output $@

mro-base.owl: mro.owl index.tsv $(build_files) ontology/metadata-base.ttl | build/robot.jar
$(ROBOT) template \
--input $< \
--template index.tsv \
$(foreach i,$(filter-out build/external.tsv,$(build_files)),--template $(i)) \
annotate \
--ontology-iri "$(OBO)/mro/mro-base.owl" \
--version-iri "$(OBO)/mro/$(shell date +%Y-%m-%d)/mro-base.owl" \
--annotation owl:versionInfo "$(shell date +%Y-%m-%d)" \
--annotation-file ontology/metadata-base.ttl \
--output $@

build/mro-import.owl: build/eco-import.ttl build/iao-import.ttl build/obi-import.ttl build/ro-import.ttl ontology/import.txt | build/robot.jar
$(ROBOT) merge \
--input build/eco-import.ttl \
Expand Down Expand Up @@ -308,7 +318,6 @@ IEDB_TARGETS := build/mro-iedb.owl \
# extended version for IEDB use
build/mro-iedb.owl: mro.owl iedb/iedb.tsv iedb/iedb-manual.tsv | build/robot.jar iedb
$(ROBOT) template \
--prefix "MRO: $(OBO)/MRO_" \
--input $< \
--template $(word 2,$^) \
--template $(word 3,$^) \
Expand Down Expand Up @@ -370,15 +379,9 @@ update-iedb: $(IEDB_TARGETS)

VERIFY_QUERIES = $(wildcard src/verify/*.rq)

build/mro-base.owl: mro.owl | build/robot.jar
$(ROBOT) remove --input $< \
--base-iri $(OBO)/MRO_ \
--axioms external \
--output $@

# Run a series of standard OBO checks
.PRECIOUS: build/report.csv
build/report.csv: build/mro-base.owl | build/robot.jar
build/report.csv: mro-base.owl | build/robot.jar
$(ROBOT) report --input $< --print 10 --output $@

# Run a series of MRO-specific queries as checks
Expand Down Expand Up @@ -419,6 +422,7 @@ prepare:
.PHONY: clean
clean:
rm -rf mro.owl
rm -rf mro-base.owl
rm -rf build
rm -f iedb.zip
rm -f mro.owl.gz
Expand All @@ -445,7 +449,7 @@ build/release-notes.txt: | build
# GITHUB_TOKEN env variable must be set to a PAT with "repo" permissions
# https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
.PHONY: release
release: mro.owl iedb.zip build/release-notes.txt
release: mro.owl mro-base.owl iedb.zip build/release-notes.txt
gh release create v$(TODAY) mro.owl iedb.zip \
-t "$(TODAY) Release" \
-F build/release-notes.txt
8 changes: 8 additions & 0 deletions ontology/metadata-base.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dct: <http://purl.org/dc/terms/> .

<http://purl.obolibrary.org/obo/mro/mro-base.owl>
dc:title "MHC Restriction Ontology (Base Version)" ;
dc:description "The MHC Restriction Ontology is an application ontology capturing how Major Histocompatibility Complex (MHC) restriction is defined in experiments, spanning exact protein complexes, individual protein chains, serotypes, haplotypes and mutant molecules, as well as evidence for MHC restrictions. The base version contains all and only native axioms." ;
dct:license <http://creativecommons.org/licenses/by/3.0/> .