From a3f0be01324f0e9430e6376e70537a8c90a41378 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 10 Jan 2024 12:51:18 +0300 Subject: Switch to gnt:belongsToSpecies in genotype queries. * gn3/api/metadata.py (genotypes): Use gnt:belongsToSpecies instead of xkos:classifiedUnder when querying for species. Signed-off-by: Munyoki Kilyungi --- gn3/api/metadata.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py index 6dafef2..7657fe3 100644 --- a/gn3/api/metadata.py +++ b/gn3/api/metadata.py @@ -499,15 +499,15 @@ $prefix CONSTRUCT { ?genotype ?predicate ?object . - ?species rdfs:label ?speciesName . + ?species gnt:shortName ?speciesShortName . } WHERE { ?genotype rdf:type gnc:Genotype ; rdfs:label "$name" ; ?predicate ?object . OPTIONAL { - ?species ^xkos:classifiedUnder ?genotype ; - rdfs:label ?speciesName . - } + ?species ^gnt:belongsToSpecies ?genotype ; + gnt:shortName ?speciesShortName . + } . } """).substitute(prefix=RDF_PREFIXES, name=name) _context = { @@ -524,7 +524,8 @@ CONSTRUCT { "mb2016": "gnt:mb2016", "sequence": "gnt:hasSequence", "source": "gnt:hasSource", - "species": "xkos:classifiedUnder", + "species": "gnt:belongsToSpecies", + "speciesName": "gnt:shortName", "alternateSource": "gnt:hasAltSourceName", "comments": "rdfs:comments", "chrNum": { -- cgit v1.2.3