From f5f498d23aa03eca0a0b7cec8db6211e884eeec7 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Wed, 19 Aug 2020 15:17:07 -0400 Subject: [PATCH 01/15] Compute relation graphs --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 97b20fe..f47e09b 100644 --- a/Makefile +++ b/Makefile @@ -238,6 +238,12 @@ $(BUILD_DIR)/anatomical-entity-phenotypeOf-developsFrom.ofn # ----- +$(BUILD_DIR)/bio-ontologies-property-graphs.ttl : $(BUILD_DIR)/bio-ontologies-merged.ttl + relation-graph --ontology-file $< \ + --non-redundant-output-file $@ \ + --redundant-output-file $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl \ + --mode rdf + $(BUILD_DIR)/defined-by-links.ttl: $(BUILD_DIR)/bio-ontologies-merged.ttl $(SPARQL)/isDefinedBy.sparql $(ROBOT) query \ --use-graphs true \ From f692ea1a4814888f622a73d4be85212d7657f957 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Wed, 19 Aug 2020 15:36:10 -0400 Subject: [PATCH 02/15] Load property graphs to blazegraph --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index f47e09b..5d35279 100644 --- a/Makefile +++ b/Makefile @@ -692,6 +692,7 @@ $(BUILD_DIR)/build-time.ttl: $(SPARQL)/build-time.sparql $(DB_FILE): $(BLAZEGRAPH_PROPERTIES) \ $(BUILD_DIR)/phenoscape-kb.ttl \ $(BUILD_DIR)/subclass-closure.ttl $(BUILD_DIR)/instance-closure.ttl \ + $(BUILD_DIR)/bio-ontologies-property-graphs.ttl $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl \ $(BUILD_DIR)/corpus-ics-taxa.ttl $(BUILD_DIR)/taxa-expect-scores.ttl $(BUILD_DIR)/taxa-pairwise-sim.ttl \ $(BUILD_DIR)/corpus-ics-genes.ttl $(BUILD_DIR)/gene-expect-scores.ttl $(BUILD_DIR)/gene-pairwise-sim.ttl \ $(BUILD_DIR)/phylopics.owl \ @@ -701,6 +702,8 @@ $(DB_FILE): $(BLAZEGRAPH_PROPERTIES) \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/" $(BUILD_DIR)/phenoscape-kb.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/closure" $(BUILD_DIR)/subclass-closure.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/closure" $(BUILD_DIR)/instance-closure.ttl && \ + $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs" $(BUILD_DIR)/bio-ontologies-property-graphs.ttl && \ + $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs" $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/corpus-ics-taxa.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/taxa-expect-scores.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/taxa-pairwise-sim.ttl && \ From efcfbf4c12dce355ae194a895e79f5b89e2e3275 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Wed, 19 Aug 2020 15:40:53 -0400 Subject: [PATCH 03/15] Remove dosdp generated subsumer patterns --- Makefile | 129 +------------------------------------------------------ 1 file changed, 1 insertion(+), 128 deletions(-) diff --git a/Makefile b/Makefile index 5d35279..85009f5 100644 --- a/Makefile +++ b/Makefile @@ -205,38 +205,15 @@ $(BUILD_DIR)/phenoscape-kb-tbox-classified-pre-absence-reasoning.ofn: $(BUILD_DI # ---------- # Generate phenoscape-kb-tbox.ofn -$(BUILD_DIR)/phenoscape-kb-tbox.ofn: $(BUILD_DIR)/bio-ontologies-classified.ttl \ -$(BUILD_DIR)/defined-by-links.ttl \ -$(BUILD_DIR)/phenex-tbox.ofn \ -$(BUILD_DIR)/anatomical-entity-presences.ofn \ -$(BUILD_DIR)/anatomical-entity-absences.ofn \ -$(BUILD_DIR)/anatomical-entity-partOf.ofn \ -$(BUILD_DIR)/hasParts.ofn \ -$(BUILD_DIR)/anatomical-entity-hasPartsInheringIns.ofn \ -$(BUILD_DIR)/anatomical-entity-phenotypeOfs.ofn \ -$(BUILD_DIR)/anatomical-entity-phenotypeOf-partOf.ofn \ -$(BUILD_DIR)/anatomical-entity-phenotypeOf-developsFrom.ofn +$(BUILD_DIR)/phenoscape-kb-tbox.ofn: $(BUILD_DIR)/bio-ontologies-classified.ttl $(BUILD_DIR)/defined-by-links.ttl $(BUILD_DIR)/phenex-tbox.ofn $(ROBOT) merge \ -i $(BUILD_DIR)/bio-ontologies-classified.ttl \ -i $(BUILD_DIR)/defined-by-links.ttl \ -i $(BUILD_DIR)/phenex-tbox.ofn \ - -i $(BUILD_DIR)/anatomical-entity-presences.ofn \ - -i $(BUILD_DIR)/anatomical-entity-absences.ofn \ - -i $(BUILD_DIR)/anatomical-entity-partOf.ofn \ - -i $(BUILD_DIR)/hasParts.ofn \ - -i $(BUILD_DIR)/anatomical-entity-hasPartsInheringIns.ofn \ - -i $(BUILD_DIR)/anatomical-entity-phenotypeOfs.ofn \ - -i $(BUILD_DIR)/anatomical-entity-phenotypeOf-partOf.ofn \ - -i $(BUILD_DIR)/anatomical-entity-phenotypeOf-developsFrom.ofn \ convert --format ofn \ -o $@.tmp \ && mv $@.tmp $@ -# ---------- - -# *** Subsumers *** - -# ----- $(BUILD_DIR)/bio-ontologies-property-graphs.ttl : $(BUILD_DIR)/bio-ontologies-merged.ttl relation-graph --ontology-file $< \ @@ -251,110 +228,6 @@ $(BUILD_DIR)/defined-by-links.ttl: $(BUILD_DIR)/bio-ontologies-merged.ttl $(SPAR --input $< \ --query $(SPARQL)/isDefinedBy.sparql $@ -$(BUILD_DIR)/anatomical-entity-presences.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/implies_presence_of.yaml - mkdir -p $(dir $@) \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/implies_presence_of.yaml \ - --infile=$< \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -$(BUILD_DIR)/anatomical-entity-absences.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/absences.yaml - mkdir -p $(dir $@) \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/absences.yaml \ - --infile=$< \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -$(BUILD_DIR)/anatomical-entity-partOf.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/part_of.yaml - mkdir -p $(dir $@) \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/part_of.yaml \ - --infile=$< \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -$(BUILD_DIR)/hasParts.ofn: $(BUILD_DIR)/anatomical-entities.txt $(BUILD_DIR)/qualities.txt patterns/has_part.yaml - mkdir -p $(dir $@) \ - && sed '1d' $(BUILD_DIR)/qualities.txt > $(BUILD_DIR)/qualities--header.txt \ - && cat $(BUILD_DIR)/anatomical-entities.txt $(BUILD_DIR)/qualities--header.txt > $(BUILD_DIR)/anatomical-entities++qualities.txt \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/has_part.yaml \ - --infile=$(BUILD_DIR)/anatomical-entities++qualities.txt \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -$(BUILD_DIR)/anatomical-entity-hasPartsInheringIns.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/has_part_inhering_in.yaml - mkdir -p $(dir $@) \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/has_part_inhering_in.yaml \ - --infile=$< \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -$(BUILD_DIR)/anatomical-entity-phenotypeOfs.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/phenotype_of.yaml - mkdir -p $(dir $@) \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/phenotype_of.yaml \ - --infile=$< \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -$(BUILD_DIR)/anatomical-entity-phenotypeOf-partOf.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/phenotype_of_part_of.yaml - mkdir -p $(dir $@) \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/phenotype_of_part_of.yaml \ - --infile=$< \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -$(BUILD_DIR)/anatomical-entity-phenotypeOf-developsFrom.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/phenotype_of_develops_from.yaml - mkdir -p $(dir $@) \ - && dosdp-tools generate \ - --generate-defined-class=true \ - --obo-prefixes=true \ - --template=patterns/phenotype_of_develops_from.yaml \ - --infile=$< \ - --outfile=$@.tmp \ - && mv $@.tmp $@ - -# ----- - -# Generate anatomical-entities.txt -$(BUILD_DIR)/anatomical-entities.txt: $(BUILD_DIR)/bio-ontologies-classified.ttl $(BUILD_DIR)/defined-by-links.ttl $(SPARQL)/anatomicalEntities.sparql - $(ARQ) \ - -q \ - --data=$< \ - --data=$(BUILD_DIR)/defined-by-links.ttl \ - --results=TSV \ - --query=$(SPARQL)/anatomicalEntities.sparql > $@.tmp \ - && sed 's/^\?//' -i $@.tmp \ - && mv $@.tmp $@ - -# Generate qualities.txt -$(BUILD_DIR)/qualities.txt: $(BUILD_DIR)/bio-ontologies-classified.ttl $(SPARQL)/qualities.sparql - $(ROBOT) query \ - -i $< \ - --use-graphs true \ - --query $(SPARQL)/qualities.sparql $@.tmp \ - && mv $@.tmp $@ - -# ----- # ---------- From 9d47c82bcf935eced9060cc264b6f89dc156213e Mon Sep 17 00:00:00 2001 From: Shalsh Date: Thu, 20 Aug 2020 17:22:47 -0400 Subject: [PATCH 04/15] Put both relation graphs in different locations in blazegraph --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 85009f5..95ca0c8 100644 --- a/Makefile +++ b/Makefile @@ -575,8 +575,8 @@ $(DB_FILE): $(BLAZEGRAPH_PROPERTIES) \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/" $(BUILD_DIR)/phenoscape-kb.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/closure" $(BUILD_DIR)/subclass-closure.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/closure" $(BUILD_DIR)/instance-closure.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs" $(BUILD_DIR)/bio-ontologies-property-graphs.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs" $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl && \ + $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs/non-redundant" $(BUILD_DIR)/bio-ontologies-property-graphs.ttl && \ + $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs/redundant" $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/corpus-ics-taxa.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/taxa-expect-scores.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/taxa-pairwise-sim.ttl && \ From c574e1c8baac2f93a2209af735588a9ac6eb408c Mon Sep 17 00:00:00 2001 From: Shalsh Date: Thu, 20 Aug 2020 17:26:15 -0400 Subject: [PATCH 05/15] Partial update to the queries to work with relation graphs; needs more modifications though --- sparql/absences.sparql | 2 +- sparql/presences.sparql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sparql/absences.sparql b/sparql/absences.sparql index 6a810ab..ea40c83 100644 --- a/sparql/absences.sparql +++ b/sparql/absences.sparql @@ -8,7 +8,7 @@ PREFIX obo: SELECT DISTINCT ?taxon (ps:has_absence_of AS ?p) ?entity WHERE { ?taxon ps:exhibits_state/ps:describes_phenotype/rdfs:subClassOf/ps:absence_of ?phenotypeEntity . -?entity ^ps:implies_presence_of_some/rdfs:subClassOf/ps:implies_presence_of_some ?phenotypeEntity . +?phenotypeEntity ps:implies_presence_of|^rdfs:subClassOf ?entity . ?entity rdfs:isDefinedBy . ?taxon rdfs:isDefinedBy . } diff --git a/sparql/presences.sparql b/sparql/presences.sparql index 146b83e..445c71a 100644 --- a/sparql/presences.sparql +++ b/sparql/presences.sparql @@ -6,7 +6,7 @@ WHERE { ?taxon . ?entity . -?taxon //()/ ?entity . +?taxon ps:exhibits_state/ps:describes_phenotype/ps:implies_presence_of ?entity . #?taxon rdfs:subClassOf* . #?entity rdfs:subClassOf* From 44862e5869479578669193006fdcd7c64671b6a5 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Fri, 21 Aug 2020 13:27:59 -0400 Subject: [PATCH 06/15] Add target for redundant property graph --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 95ca0c8..fa4cdfd 100644 --- a/Makefile +++ b/Makefile @@ -221,6 +221,10 @@ $(BUILD_DIR)/bio-ontologies-property-graphs.ttl : $(BUILD_DIR)/bio-ontologies-me --redundant-output-file $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl \ --mode rdf +# Built along with $(BUILD_DIR)/bio-ontologies-property-graphs.ttl +$(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl: $(BUILD_DIR)/bio-ontologies-property-graphs.ttl + touch $@ + $(BUILD_DIR)/defined-by-links.ttl: $(BUILD_DIR)/bio-ontologies-merged.ttl $(SPARQL)/isDefinedBy.sparql $(ROBOT) query \ --use-graphs true \ From a338e2a9c9e7916fd85a5d2df865360df9e19ea5 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Fri, 21 Aug 2020 13:40:20 -0400 Subject: [PATCH 07/15] Add back targets using absences dodsdp pattern --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Makefile b/Makefile index fa4cdfd..c43f4e6 100644 --- a/Makefile +++ b/Makefile @@ -232,6 +232,27 @@ $(BUILD_DIR)/defined-by-links.ttl: $(BUILD_DIR)/bio-ontologies-merged.ttl $(SPAR --input $< \ --query $(SPARQL)/isDefinedBy.sparql $@ +$(BUILD_DIR)/anatomical-entity-absences.ofn: $(BUILD_DIR)/anatomical-entities.txt patterns/absences.yaml + mkdir -p $(dir $@) \ + && dosdp-tools generate \ + --generate-defined-class=true \ + --obo-prefixes=true \ + --template=patterns/absences.yaml \ + --infile=$< \ + --outfile=$@.tmp \ + && mv $@.tmp $@ + +# Generate anatomical-entities.txt +$(BUILD_DIR)/anatomical-entities.txt: $(BUILD_DIR)/bio-ontologies-classified.ttl $(BUILD_DIR)/defined-by-links.ttl $(SPARQL)/anatomicalEntities.sparql + $(ARQ) \ + -q \ + --data=$< \ + --data=$(BUILD_DIR)/defined-by-links.ttl \ + --results=TSV \ + --query=$(SPARQL)/anatomicalEntities.sparql > $@.tmp \ + && sed 's/^\?//' -i $@.tmp \ + && mv $@.tmp $@ + # ---------- From e8146a72cb82bd0eb0e31a9b66ab8866a9c39813 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Fri, 21 Aug 2020 13:42:12 -0400 Subject: [PATCH 08/15] Remove dosdp patterns no longer being used --- patterns/has_part.yaml | 23 ----------------------- patterns/has_part_inhering_in.yaml | 23 ----------------------- patterns/implies_presence_of.yaml | 23 ----------------------- patterns/part_of.yaml | 23 ----------------------- patterns/phenotype_of.yaml | 23 ----------------------- patterns/phenotype_of_develops_from.yaml | 18 ------------------ patterns/phenotype_of_part_of.yaml | 18 ------------------ 7 files changed, 151 deletions(-) delete mode 100644 patterns/has_part.yaml delete mode 100644 patterns/has_part_inhering_in.yaml delete mode 100644 patterns/implies_presence_of.yaml delete mode 100644 patterns/part_of.yaml delete mode 100644 patterns/phenotype_of.yaml delete mode 100644 patterns/phenotype_of_develops_from.yaml delete mode 100644 patterns/phenotype_of_part_of.yaml diff --git a/patterns/has_part.yaml b/patterns/has_part.yaml deleted file mode 100644 index 8ee1dc8..0000000 --- a/patterns/has_part.yaml +++ /dev/null @@ -1,23 +0,0 @@ -pattern_name: has_part -pattern_iri: http://purl.org/phenoscape/kb/patterns/has_part.yaml - -classes: - thing: owl:Thing - -relations: - has_part: BFO:0000051 - -annotationProperties: - has_part_some: BFO:0000051_some - -vars: - anatomical_entity: thing - -annotations: - - annotationProperty: has_part_some - var: anatomical_entity - -equivalentTo: - text: "'has_part' some %s" - vars: - - anatomical_entity diff --git a/patterns/has_part_inhering_in.yaml b/patterns/has_part_inhering_in.yaml deleted file mode 100644 index f4dea19..0000000 --- a/patterns/has_part_inhering_in.yaml +++ /dev/null @@ -1,23 +0,0 @@ -pattern_name: has_part_inhering_in -pattern_iri: http://purl.org/phenoscape/kb/patterns/has_part_inhering_in.yaml - -classes: - thing: owl:Thing - -relations: - has_part_inhering_in: http://purl.org/phenoscape/vocab.owl#has_part_inhering_in - -annotationProperties: - has_part_inhering_in_some: http://purl.org/phenoscape/vocab.owl#has_part_inhering_in_some - -vars: - anatomical_entity: thing - -annotations: - - annotationProperty: has_part_inhering_in_some - var: anatomical_entity - -equivalentTo: - text: "'has_part_inhering_in' some %s" - vars: - - anatomical_entity diff --git a/patterns/implies_presence_of.yaml b/patterns/implies_presence_of.yaml deleted file mode 100644 index 104385f..0000000 --- a/patterns/implies_presence_of.yaml +++ /dev/null @@ -1,23 +0,0 @@ -pattern_name: implies_presence_of -pattern_iri: http://purl.org/phenoscape/kb/patterns/implies_presence_of.yaml - -classes: - thing: owl:Thing - -relations: - implies_presence_of: http://purl.org/phenoscape/vocab.owl#implies_presence_of - -annotationProperties: - implies_presence_of_some: http://purl.org/phenoscape/vocab.owl#implies_presence_of_some - -vars: - anatomical_entity: thing - -annotations: - - annotationProperty: implies_presence_of_some - var: anatomical_entity - -equivalentTo: - text: "'implies_presence_of' some %s" - vars: - - anatomical_entity diff --git a/patterns/part_of.yaml b/patterns/part_of.yaml deleted file mode 100644 index 7149f58..0000000 --- a/patterns/part_of.yaml +++ /dev/null @@ -1,23 +0,0 @@ -pattern_name: part_of -pattern_iri: http://purl.org/phenoscape/kb/patterns/part_of.yaml - -classes: - thing: owl:Thing - -relations: - part_of: BFO:0000050 - -annotationProperties: - part_of_some: BFO:0000050_some - -vars: - anatomical_entity: thing - -annotations: - - annotationProperty: part_of_some - var: anatomical_entity - -equivalentTo: - text: "'part_of' some %s" - vars: - - anatomical_entity diff --git a/patterns/phenotype_of.yaml b/patterns/phenotype_of.yaml deleted file mode 100644 index f0ca032..0000000 --- a/patterns/phenotype_of.yaml +++ /dev/null @@ -1,23 +0,0 @@ -pattern_name: phenotype_of -pattern_iri: http://purl.org/phenoscape/kb/patterns/phenotype_of.yaml - -classes: - thing: owl:Thing - -relations: - phenotype_of: http://purl.org/phenoscape/vocab.owl#phenotype_of - -annotationProperties: - phenotype_of_some: http://purl.org/phenoscape/vocab.owl#phenotype_of_some - -vars: - anatomical_entity: thing - -annotations: - - annotationProperty: phenotype_of_some - var: anatomical_entity - -equivalentTo: - text: "'phenotype_of' some %s" - vars: - - anatomical_entity diff --git a/patterns/phenotype_of_develops_from.yaml b/patterns/phenotype_of_develops_from.yaml deleted file mode 100644 index 2dff9cf..0000000 --- a/patterns/phenotype_of_develops_from.yaml +++ /dev/null @@ -1,18 +0,0 @@ -pattern_name: phenotype_of_develops_from -pattern_iri: http://purl.org/phenoscape/kb/patterns/phenotype_of_develops_from.yaml - -classes: - thing: owl:Thing - -relations: - phenotype_of: http://purl.org/phenoscape/vocab.owl#phenotype_of - reflexive_develops_from: http://purl.org/phenoscape/vocab.owl#reflexive_develops_from - -vars: - anatomical_entity: thing - -equivalentTo: - text: "'phenotype_of' some ('reflexive_develops_from' some %s)" - vars: - - anatomical_entity - - anatomical_entity diff --git a/patterns/phenotype_of_part_of.yaml b/patterns/phenotype_of_part_of.yaml deleted file mode 100644 index 7e853d7..0000000 --- a/patterns/phenotype_of_part_of.yaml +++ /dev/null @@ -1,18 +0,0 @@ -pattern_name: phenotype_of_part_of -pattern_iri: http://purl.org/phenoscape/kb/patterns/phenotype_of_part_of.yaml - -classes: - thing: owl:Thing - -relations: - phenotype_of: http://purl.org/phenoscape/vocab.owl#phenotype_of - reflexive_part_of: http://purl.org/phenoscape/vocab.owl#reflexive_part_of - -vars: - anatomical_entity: thing - -equivalentTo: - text: "'phenotype_of' some ('reflexive_part_of' some %s)" - vars: - - anatomical_entity - - anatomical_entity From bb3c0af9bea7594791a27d0b645fed1544780a17 Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Fri, 21 Aug 2020 13:44:20 -0400 Subject: [PATCH 09/15] Need newer run.sh to use relation-graph tool --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 694bd70..54d36a9 100755 --- a/run.sh +++ b/run.sh @@ -7,7 +7,7 @@ # Usage example # ./run.sh make all -IMAGE_VERSION=v1.1 +IMAGE_VERSION=v1.3 # cd pipeline_dir # docker pull phenoscape/pipeline-tools:$IMAGE_VERSION From 7819f50993efbff90487c2a519a8ae11aa1cd6d2 Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Fri, 21 Aug 2020 13:46:24 -0400 Subject: [PATCH 10/15] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 16c5869..31a06a5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent { docker { - image 'phenoscape/pipeline-tools:v1.1' + image 'phenoscape/pipeline-tools:v1.3' label 'zeppo' } } From ffdaacfb389c848790720de968fae46c2924d086 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Fri, 21 Aug 2020 15:44:58 -0400 Subject: [PATCH 11/15] Update pipeline-tools docker image version --- Jenkinsfile | 2 +- run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 16c5869..1f779d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent { docker { - image 'phenoscape/pipeline-tools:v1.1' + image 'phenoscape/pipeline-tools:v1.3.1' label 'zeppo' } } diff --git a/run.sh b/run.sh index 694bd70..1151233 100755 --- a/run.sh +++ b/run.sh @@ -7,7 +7,7 @@ # Usage example # ./run.sh make all -IMAGE_VERSION=v1.1 +IMAGE_VERSION=v1.3.1 # cd pipeline_dir # docker pull phenoscape/pipeline-tools:$IMAGE_VERSION From f703e728cc6ed7dfc37bad1ec697d5ff9aa7f3b3 Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Fri, 21 Aug 2020 16:17:50 -0400 Subject: [PATCH 12/15] Need to set memory for relation-graph tool. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c43f4e6..0f17b1e 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ JVM_ARGS=JVM_ARGS=-Xmx80G ARQ=$(JVM_ARGS) arq RIOT=riot BLAZEGRAPH-RUNNER=JAVA_OPTS=-Xmx80G blazegraph-runner +RELATIONGRAPH=JAVA_OPTS=-Xmx80G relation-graph BIO-ONTOLOGIES=ontologies.ofn # Path to data repo; must be separately downloaded/cloned @@ -216,7 +217,7 @@ $(BUILD_DIR)/phenoscape-kb-tbox.ofn: $(BUILD_DIR)/bio-ontologies-classified.ttl $(BUILD_DIR)/bio-ontologies-property-graphs.ttl : $(BUILD_DIR)/bio-ontologies-merged.ttl - relation-graph --ontology-file $< \ + $(RELATIONGRAPH) --ontology-file $< \ --non-redundant-output-file $@ \ --redundant-output-file $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl \ --mode rdf From 75238c54deffeb6486a7cb36b21297558d2fef60 Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Sat, 22 Aug 2020 11:18:11 -0400 Subject: [PATCH 13/15] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0f17b1e..7e71f47 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ JVM_ARGS=JVM_ARGS=-Xmx80G ARQ=$(JVM_ARGS) arq RIOT=riot BLAZEGRAPH-RUNNER=JAVA_OPTS=-Xmx80G blazegraph-runner -RELATIONGRAPH=JAVA_OPTS=-Xmx80G relation-graph +RELATIONGRAPH=JAVA_OPTS=-Xmx160G relation-graph BIO-ONTOLOGIES=ontologies.ofn # Path to data repo; must be separately downloaded/cloned From 84efcf8a87e192ab82b597e52e04b2731cedd64a Mon Sep 17 00:00:00 2001 From: Shalsh Date: Tue, 25 Aug 2020 13:00:33 -0400 Subject: [PATCH 14/15] Merge absences into kb-tbox --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7e71f47..b3a3949 100644 --- a/Makefile +++ b/Makefile @@ -206,10 +206,11 @@ $(BUILD_DIR)/phenoscape-kb-tbox-classified-pre-absence-reasoning.ofn: $(BUILD_DI # ---------- # Generate phenoscape-kb-tbox.ofn -$(BUILD_DIR)/phenoscape-kb-tbox.ofn: $(BUILD_DIR)/bio-ontologies-classified.ttl $(BUILD_DIR)/defined-by-links.ttl $(BUILD_DIR)/phenex-tbox.ofn +$(BUILD_DIR)/phenoscape-kb-tbox.ofn: $(BUILD_DIR)/bio-ontologies-classified.ttl $(BUILD_DIR)/defined-by-links.ttl $(BUILD_DIR)/anatomical-entity-absences.ofn $(BUILD_DIR)/phenex-tbox.ofn $(ROBOT) merge \ -i $(BUILD_DIR)/bio-ontologies-classified.ttl \ -i $(BUILD_DIR)/defined-by-links.ttl \ + -i $(BUILD_DIR)/anatomical-entity-absences.ofn \ -i $(BUILD_DIR)/phenex-tbox.ofn \ convert --format ofn \ -o $@.tmp \ From e0b1a9d994570aa6203413a5d6b51bf70619dcc8 Mon Sep 17 00:00:00 2001 From: Shalsh Date: Tue, 25 Aug 2020 16:57:29 -0400 Subject: [PATCH 15/15] Disable semantic similarity component --- Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index b3a3949..832eb89 100644 --- a/Makefile +++ b/Makefile @@ -35,8 +35,8 @@ clean: # 1. KB build # 2. Semantic similarity - -all: kb-build ss-scores-gen $(DB_FILE) +# disabled semantic similarity component +all: kb-build $(DB_FILE) # ########## # ########## # ########## # ########## @@ -593,23 +593,15 @@ $(DB_FILE): $(BLAZEGRAPH_PROPERTIES) \ $(BUILD_DIR)/phenoscape-kb.ttl \ $(BUILD_DIR)/subclass-closure.ttl $(BUILD_DIR)/instance-closure.ttl \ $(BUILD_DIR)/bio-ontologies-property-graphs.ttl $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl \ - $(BUILD_DIR)/corpus-ics-taxa.ttl $(BUILD_DIR)/taxa-expect-scores.ttl $(BUILD_DIR)/taxa-pairwise-sim.ttl \ - $(BUILD_DIR)/corpus-ics-genes.ttl $(BUILD_DIR)/gene-expect-scores.ttl $(BUILD_DIR)/gene-pairwise-sim.ttl \ $(BUILD_DIR)/phylopics.owl \ - $(BUILD_DIR)/vto_ncbi_common_names.owl \ - $(BUILD_DIR)/build-time.ttl + $(BUILD_DIR)/vto_ncbi_common_names.owl \ + $(BUILD_DIR)/build-time.ttl rm -f $@ && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/" $(BUILD_DIR)/phenoscape-kb.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/closure" $(BUILD_DIR)/subclass-closure.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/closure" $(BUILD_DIR)/instance-closure.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs/non-redundant" $(BUILD_DIR)/bio-ontologies-property-graphs.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/property_graphs/redundant" $(BUILD_DIR)/bio-ontologies-redundant-property-graphs.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/corpus-ics-taxa.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/taxa-expect-scores.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/taxa" $(BUILD_DIR)/taxa-pairwise-sim.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/gene" $(BUILD_DIR)/corpus-ics-genes.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/gene" $(BUILD_DIR)/gene-expect-scores.ttl && \ - $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/sim/gene" $(BUILD_DIR)/gene-pairwise-sim.ttl && \ $(BLAZEGRAPH-RUNNER) load --informat=rdfxml --journal=$@ --properties=$< --graph="http://purl.org/phenoscape/phylopics.owl" $(BUILD_DIR)/phylopics.owl && \ $(BLAZEGRAPH-RUNNER) load --informat=rdfxml --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/" $(BUILD_DIR)/vto_ncbi_common_names.owl && \ $(BLAZEGRAPH-RUNNER) load --informat=turtle --journal=$@ --properties=$< --graph="http://kb.phenoscape.org/" $(BUILD_DIR)/build-time.ttl