aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-11-10 13:21:53 +0300
committerBonfaceKilz2023-11-27 12:29:25 +0300
commit10882755ca6093a0c7aca05d0170575991703f27 (patch)
tree378fc53504df92ded0475eb057aa373d295dfa8f
parentc23d261f47682b8e9844055697463acf17b8cbe7 (diff)
downloadgenenetwork3-10882755ca6093a0c7aca05d0170575991703f27.tar.gz
Fetch a dataset's contributors in RDF.
* gn3/api/metadata.py (DATASET_CONTEXT): Add key for "contributors." (datasets): Fetch a dataset's contributors. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r--gn3/api/metadata.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py
index 08249ae..3fa40fe 100644
--- a/gn3/api/metadata.py
+++ b/gn3/api/metadata.py
@@ -26,6 +26,7 @@ DATASET_CONTEXT = {
"altLabel": "skos:altLabel",
"caseInfo": "gnt:hasCaseInfo",
"classifiedUnder": "xkos:classifiedUnder",
+ "contributors": "dct:creator",
"contactPoint": "dcat:contactPoint",
"created": "dct:created",
"dcat": "http://www.w3.org/ns/dcat#",
@@ -136,6 +137,7 @@ CONSTRUCT {
dcat:contactPoint ?investigatorName ;
xkos:classifiedUnder ?altName ;
gnt:hasContentInfo ?contentInfo ;
+ dct:creator ?contributors ;
ex:platform ?platform ;
ex:tissue ?tissue .
?platform ?platformPred ?platformObject ;
@@ -149,6 +151,7 @@ CONSTRUCT {
rdfs:label ?datasetName ;
(rdfs:label|dct:identifier|skos:prefLabel) "$name" .
OPTIONAL { ?dataset dct:identifier ?accesionId . } .
+ OPTIONAL { ?dataset dct:creator ?contributors . } .
OPTIONAL { ?dataset gnt:hasContentInfo ?contentInfo . } .
OPTIONAL {
?inbredSet ^skos:member gnc:Set ;