aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-10-24 13:15:46 +0300
committerBonfaceKilz2023-10-27 13:45:32 +0300
commit4138e565f52cd3661c1d370d16b543ba137ac826 (patch)
treec2d7dca4b65dda4c6ae00c4d5418c801654c898b /gn3/api
parent8058c1be433bdf6bcfb9bb4871a22249ab094a83 (diff)
downloadgenenetwork3-4138e565f52cd3661c1d370d16b543ba137ac826.tar.gz
Support using AccessionId to fetch datasets.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/metadata.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py
index 88a6d32..542a0a3 100644
--- a/gn3/api/metadata.py
+++ b/gn3/api/metadata.py
@@ -29,6 +29,8 @@ $prefix
CONSTRUCT {
?dataset ?predicate ?term ;
rdf:type dcat:Dataset ;
+ rdfs:label ?datasetName ;
+ dct:identifier ?accesionId ;
ex:belongsToInbredSet ?inbredSetName ;
gnt:usesNormalization ?normalizationLabel ;
dcat:contactPoint ?investigatorName ;
@@ -43,7 +45,9 @@ CONSTRUCT {
} WHERE {
?dataset rdf:type dcat:Dataset ;
xkos:classifiedUnder ?inbredSet ;
- rdfs:label "$name" .
+ rdfs:label ?datasetName ;
+ (rdfs:label|dct:identifier|skos:prefLabel) "$name" .
+ OPTIONAL { ?dataset dct:identifier ?accesionId . } .
OPTIONAL {
?inbredSet ^skos:member gnc:Set ;
rdfs:label ?inbredSetName .