From 4138e565f52cd3661c1d370d16b543ba137ac826 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 24 Oct 2023 13:15:46 +0300 Subject: Support using AccessionId to fetch datasets. Signed-off-by: Munyoki Kilyungi --- gn3/api/metadata.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gn3/api') 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 . -- cgit v1.2.3