Skip to content

Commit

Permalink
#97 minimal_markers 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 930edaa commit 29ac975
Show file tree
Hide file tree
Showing 10 changed files with 190 additions and 403 deletions.
18 changes: 7 additions & 11 deletions src/dendrograms/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
JOBS = CCN202002013 #CCN201912131 CCN201912132 CCN201908210 CCN201810310 CCN201908211

TEMPLATE_FILES = $(patsubst %, ../templates/%.tsv, $(JOBS))
TEMPLATE_CLASS_FILES = $(patsubst %, ../patterns/data/bds/%_class.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/bds/%_equivalent_reification.tsv, $(JOBS))
TEMPLATE_MINIMAL_MARKER_FILES = $(patsubst %, ../patterns/data/bds/%_minimal_markers.tsv, $(JOBS))
NOMENCLATURE_TEMPLATE_FILES = $(patsubst %, ../patterns/data/bds/%_non_taxonomy_classification.tsv, $(JOBS))
EQUIVALENT_CLASS_REIFICATION_FILES = $(patsubst %, ../patterns/data/default/%_equivalent_reification.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) $(TEMPLATE_MINIMAL_MARKER_FILES) $(NOMENCLATURE_TEMPLATE_FILES)
all: $(TEMPLATE_FILES) $(TEMPLATE_CLASS_FILES) $(MARKER_DENORMALIZED_FILES) $(EQUIVALENT_CLASS_MARKER_FILES) $(EQUIVALENT_CLASS_REIFICATION_FILES) $(NOMENCLATURE_TEMPLATE_FILES)

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

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

../markers/%_markers_denormalized.tsv: %.json
Expand All @@ -23,12 +22,9 @@ all: $(TEMPLATE_FILES) $(TEMPLATE_CLASS_FILES) $(MARKER_DENORMALIZED_FILES) $(EQ
../templates/%_equivalent_markers.tsv: %.json
python ../scripts/template_runner.py -em $< $@

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

../patterns/data/bds/%_minimal_markers.tsv: %.json
python ../scripts/template_runner.py -mm $< $@

../patterns/data/bds/%_non_taxonomy_classification.tsv: %.json
../patterns/data/default/%_non_taxonomy_classification.tsv: %.json
python ../scripts/template_runner.py -n $< $@

9 changes: 1 addition & 8 deletions src/ontology/bdscratch.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ 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_MIN_MARKER_FILES = $(patsubst %, components/%_minimal_markers.owl, $(JOBS))
OWL_NOMENCLATURE_FILES = $(patsubst %, components/%_non_taxonomy_classification.owl, $(JOBS))

#DEND_FILES = $(patsubst %, ../dendrograms/%.json, $(JOBS))
Expand Down Expand Up @@ -45,8 +44,7 @@ dosdp_patterns_default: $(SRC) all_imports .FORCE
$(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_minimal_markers.tsv --template=$(PATTERNDIR)/dosdp-patterns/taxonomy_minimal_markers.yaml --obo-prefixes=true --prefixes=template_prefixes.yaml --outfile=$(PATTERNDIR)/data/default/CCN202002013_minimal_markers.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=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)/CCN202002013_non_taxonomy_classification.txt; fi

# hard wiring for now. Work on patsubst later
mirror/ensmusg.owl: ../templates/ensmusg.tsv .FORCE
Expand Down Expand Up @@ -80,11 +78,6 @@ components/%_equivalent_class.owl: ../patterns/data/default/%_equivalent_reifica
--infile=$< --template=../patterns/dosdp-patterns/taxonomy_equivalent_class.yaml \
--ontology=$(SRC) --obo-prefixes=true --outfile=$@

components/%_minimal_markers.owl: ../patterns/data/default/%_minimal_markers.tsv ../patterns/dosdp-patterns/taxonomy_minimal_markers.yaml $(SRC) all_imports .FORCE
$(DOSDPT) generate --catalog=catalog-v001.xml --prefixes=template_prefixes.yaml \
--infile=$< --template=../patterns/dosdp-patterns/taxonomy_minimal_markers.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 29ac975

Please sign in to comment.