aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-01-10 12:51:18 +0300
committerBonfaceKilz2024-01-10 13:56:55 +0300
commita3f0be01324f0e9430e6376e70537a8c90a41378 (patch)
tree4c9278cb6f04d517ad2c3755e36eecfbd9cb821c
parent19cb781f5eb96d71d0bebdd8ec5c9930e30f1b58 (diff)
downloadgenenetwork3-a3f0be01324f0e9430e6376e70537a8c90a41378.tar.gz
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 <me@bonfacemunyoki.com>
-rw-r--r--gn3/api/metadata.py11
1 files 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": {