aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-11-20 17:04:14 +0300
committerBonfaceKilz2023-11-27 12:29:25 +0300
commitcce9170f9e00c7f88e1be774930d1b96a4a3d915 (patch)
tree89886847f79031eee053057ca8eb5277a5269458 /gn3/api
parent143443fc8cbc58ef31c4595a000d374491c11fc9 (diff)
downloadgenenetwork3-cce9170f9e00c7f88e1be774930d1b96a4a3d915.tar.gz
Replace "ex:" prefix with a semantic prefix when fetching phenotype.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/metadata.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py
index ac582ed..97b081f 100644
--- a/gn3/api/metadata.py
+++ b/gn3/api/metadata.py
@@ -101,6 +101,7 @@ PHENOTYPE_CONTEXT = BASE_CONTEXT | PUBLICATION_CONTEXT | {
"skos": "http://www.w3.org/2004/02/skos/core#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"gnt": "http://genenetwork.org/term/",
+ "dcat": "http://www.w3.org/ns/dcat#",
"prism": "http://prismstandard.org/namespaces/basic/2.0/",
"gnc": "http://genenetwork.org/category/",
"traitName": "skos:altLabel",
@@ -110,9 +111,7 @@ PHENOTYPE_CONTEXT = BASE_CONTEXT | PUBLICATION_CONTEXT | {
"abbreviation": "gnt:abbreviation",
"labCode": "gnt:labCode",
"submitter": "gnt:submitter",
- "ex": "http://example.org/stuff/1.0/",
- "species": "ex:species",
- "group": "ex:inbredSet",
+ "dataset": "dcat:Distribution",
"contributor": "dct:contributor",
"mean": "gnt:mean",
"locus": "gnt:locus",
@@ -120,6 +119,8 @@ PHENOTYPE_CONTEXT = BASE_CONTEXT | PUBLICATION_CONTEXT | {
"references": "dct:isReferencedBy",
"additive": "gnt:additive",
"sequence": "gnt:sequence",
+ "species": "gnt:belongsToSpecies",
+ "group": "gnt:belongsToGroup",
}
metadata = Blueprint("metadata", __name__)
@@ -426,9 +427,9 @@ $prefix
CONSTRUCT {
?phenotype ?predicate ?object ;
?pubPredicate ?pubObject ;
- ex:species ?speciesName ;
- ex:inbredSet ?inbredSetName ;
- ex:dataset ?datasetName .
+ gnt:belongsToSpecies ?speciesName ;
+ dcat:Distribution ?dataset ;
+ gnt:belongsToGroup ?inbredSetName .
} WHERE {
?phenotype skos:altLabel "$name" ;
xkos:classifiedUnder ?inbredSet ;