Skip to content

Commit

Permalink
#97 equivalent_reification template merged with class template
Browse files Browse the repository at this point in the history
  • Loading branch information
hkir-dev committed Sep 8, 2021
1 parent 29ac975 commit 191241b
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 760 deletions.
16 changes: 4 additions & 12 deletions src/dendrograms/Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
JOBS = CCN202002013 #CCN201912131 CCN201912132 CCN201908210 CCN201810310 CCN201908211

TEMPLATE_FILES = $(patsubst %, ../templates/%.tsv, $(JOBS))
TEMPLATE_CLASS_FILES = $(patsubst %, ../patterns/data/default/%_class.tsv, $(JOBS))
MARKER_DENORMALIZED_FILES = $(patsubst %, ../markers/%_markers_denormalized.tsv, $(JOBS))
EQUIVALENT_CLASS_MARKER_FILES = $(patsubst %, ../templates/%_equivalent_markers.tsv, $(JOBS))
EQUIVALENT_CLASS_REIFICATION_FILES = $(patsubst %, ../patterns/data/default/%_equivalent_reification.tsv, $(JOBS))
TEMPLATE_CLASS_FILES = $(patsubst %, ../patterns/data/default/%_class.tsv, $(JOBS))
NOMENCLATURE_TEMPLATE_FILES = $(patsubst %, ../patterns/data/default/%_non_taxonomy_classification.tsv, $(JOBS))


all: $(TEMPLATE_FILES) $(TEMPLATE_CLASS_FILES) $(MARKER_DENORMALIZED_FILES) $(EQUIVALENT_CLASS_MARKER_FILES) $(EQUIVALENT_CLASS_REIFICATION_FILES) $(NOMENCLATURE_TEMPLATE_FILES)
all: $(TEMPLATE_FILES) $(TEMPLATE_CLASS_FILES) $(MARKER_DENORMALIZED_FILES) $(NOMENCLATURE_TEMPLATE_FILES)

../templates/%.tsv: %.json
python ../scripts/template_runner.py $< $@

../patterns/data/default/%_class.tsv: %.json
python ../scripts/template_runner.py -c $< $@

../markers/%_markers_denormalized.tsv: %.json
python ../scripts/template_runner.py -md $< $@

../templates/%_equivalent_markers.tsv: %.json
python ../scripts/template_runner.py -em $< $@

../patterns/data/default/%_equivalent_reification.tsv: %.json
python ../scripts/template_runner.py -er $< $@
../patterns/data/default/%_class.tsv: %.json
python ../scripts/template_runner.py -c $< $@

../patterns/data/default/%_non_taxonomy_classification.tsv: %.json
python ../scripts/template_runner.py -n $< $@
Expand Down
11 changes: 2 additions & 9 deletions src/ontology/bdscratch.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ BDS_BASE = http://www.semanticweb.org/brain_data_standards/

OWL_FILES = $(patsubst %, components/%.owl, $(JOBS))
OWL_CLASS_FILES = $(patsubst %, components/%_class.owl, $(JOBS))
OWL_EQUIVALENT_CLASS_FILES = $(patsubst %, components/%_equivalent_class.owl, $(JOBS))
GENE_FILES = $(patsubst %, mirror/%.owl, $(JOBS))
OWL_NOMENCLATURE_FILES = $(patsubst %, components/%_non_taxonomy_classification.owl, $(JOBS))

Expand Down Expand Up @@ -43,8 +42,7 @@ dosdp_patterns_default: $(SRC) all_imports .FORCE
# extract pattern terms even template name is different
$(PATTERNDIR)/data/default/%.txt: $(PATTERNDIR)/data/default/%.tsv .FORCE
if [ $(PAT) = true ]; then $(DOSDPT) terms --infile=$(PATTERNDIR)/data/default/CCN202002013_class.tsv --template=$(PATTERNDIR)/dosdp-patterns/taxonomy_class.yaml --obo-prefixes=true --prefixes=template_prefixes.yaml --outfile=$(PATTERNDIR)/data/default/CCN202002013_class.txt; fi
if [ $(PAT) = true ]; then $(DOSDPT) terms --infile=$(PATTERNDIR)/data/default/CCN202002013_equivalent_reification.tsv --template=$(PATTERNDIR)/dosdp-patterns/taxonomy_equivalent_class.yaml --obo-prefixes=true --prefixes=template_prefixes.yaml --outfile=$(PATTERNDIR)/data/default/CCN202002013_equivalent_reification.txt; fi
if [ $(PAT) = true ]; then $(DOSDPT) terms --infile=$(PATTERNDIR)/data/default/CCN202002013_non_taxonomy_classification.tsv --template=$(PATTERNDIR)/dosdp-patterns/taxonomy_non_taxonomy_classification.yaml --obo-prefixes=true --prefixes=template_prefixes.yaml --outfile=$(PATTERNDIR)/CCN202002013_non_taxonomy_classification.txt; fi
if [ $(PAT) = true ]; then $(DOSDPT) terms --infile=$(PATTERNDIR)/data/default/CCN202002013_non_taxonomy_classification.tsv --template=$(PATTERNDIR)/dosdp-patterns/taxonomy_non_taxonomy_classification.yaml --obo-prefixes=true --prefixes=template_prefixes.yaml --outfile=$(PATTERNDIR)/data/default/CCN202002013_non_taxonomy_classification.txt; fi

# hard wiring for now. Work on patsubst later
mirror/ensmusg.owl: ../templates/ensmusg.tsv .FORCE
Expand All @@ -53,7 +51,7 @@ mirror/ensmusg.owl: ../templates/ensmusg.tsv .FORCE
annotate --ontology-iri ${BDS_BASE}$@ \
convert --format ofn --output $@; fi

components/all_templates.owl: $(OWL_FILES) $(OWL_CLASS_FILES) $(OWL_EQUIVALENT_CLASS_FILES) $(OWL_MIN_MARKER_FILES) $(OWL_NOMENCLATURE_FILES)
components/all_templates.owl: $(OWL_FILES) $(OWL_CLASS_FILES) $(OWL_MIN_MARKER_FILES) $(OWL_NOMENCLATURE_FILES)
$(ROBOT) merge $(patsubst %, -i %, $^) \
--collapse-import-closure false \
annotate --ontology-iri ${BDS_BASE}$@ \
Expand All @@ -73,11 +71,6 @@ components/%_class.owl: ../patterns/data/default/%_class.tsv bdscratch-edit.owl
--infile=$< --template=../patterns/dosdp-patterns/taxonomy_class.yaml \
--ontology=$(SRC) --obo-prefixes=true --outfile=$@

components/%_equivalent_class.owl: ../patterns/data/default/%_equivalent_reification.tsv ../patterns/dosdp-patterns/taxonomy_equivalent_class.yaml $(SRC) all_imports .FORCE
$(DOSDPT) generate --catalog=catalog-v001.xml --prefixes=template_prefixes.yaml \
--infile=$< --template=../patterns/dosdp-patterns/taxonomy_equivalent_class.yaml \
--ontology=$(SRC) --obo-prefixes=true --outfile=$@

components/%_non_taxonomy_classification.owl: ../patterns/data/default/%_non_taxonomy_classification.tsv ../patterns/dosdp-patterns/taxonomy_non_taxonomy_classification.yaml $(SRC) all_imports .FORCE
$(DOSDPT) generate --catalog=catalog-v001.xml --prefixes=template_prefixes.yaml \
--infile=$< --template=../patterns/dosdp-patterns/taxonomy_non_taxonomy_classification.yaml \
Expand Down
Loading

0 comments on commit 191241b

Please sign in to comment.