-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change definition pattern to population only
- Loading branch information
1 parent
4089ca4
commit 190ff8b
Showing
7 changed files
with
538 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
146 changes: 86 additions & 60 deletions
146
...tterns/data/default/create_definition.tsv → .../default/create_population_definition.tsv
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/patterns/dosdp-patterns/create_population_definition.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
pattern_name: create_population_definition | ||
pattern_iri: http://purl.obolibrary.org/obo/afpo/patterns/create_population_definition.yaml | ||
|
||
description: "This pattern creates population class definition using annotations from the classes." | ||
|
||
annotationProperties: | ||
xref: oio:hasDbXref | ||
|
||
data_vars: | ||
parent_class_label: "xsd:string" | ||
population_size: "xsd:string" | ||
|
||
data_list_vars: | ||
wiki: "'xref'" | ||
|
||
def: | ||
text: "A %s population with a population size of %s" | ||
vars: | ||
- parent_class_label | ||
- population_size | ||
annotations: | ||
- annotationProperty: xref | ||
value: wiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
src/sparql/annotation_definition.sparql → ...l/population_annotation_definition.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX population_size: <http://purl.obolibrary.org/obo/AfPO_0000459> | ||
PREFIX Population: <http://purl.obolibrary.org/obo/AfPO_0000146> | ||
PREFIX wiki_ref: <http://purl.obolibrary.org/obo/AfPO_0000235> | ||
PREFIX wiki: <https://en.wikipedia.org/wiki/> | ||
|
||
SELECT ?defined_class ?defined_class_label ?parent_class_label ?population_size ?xref | ||
SELECT ?defined_class ?defined_class_label ?parent_class_label ?population_size ?wiki | ||
WHERE { | ||
?dc a owl:Class . | ||
?dc rdfs:label ?defined_class_label . | ||
?dc rdfs:subClassOf ?pc . | ||
?dc population_size: ?population_size . | ||
OPTIONAL { ?dc population_size: ?population_size . } | ||
OPTIONAL { ?dc wiki_ref: ?x . } | ||
?pc a owl:Class . | ||
?pc rdfs:subClassOf* Population: . | ||
?pc rdfs:label ?parent_class_label . | ||
BIND(STR(?dc) AS ?defined_class) | ||
BIND(STR(?x) AS ?xref) | ||
BIND(STR(?x) AS ?wiki) | ||
} |