aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-12-20 14:47:42 +0300
committerBonfaceKilz2024-01-06 14:15:26 +0300
commit251987489eb02ff0b781e4e9d419fcf34a7c8eca (patch)
tree31c60ade5ff47430e374e441ab9877ef5ae0fec6 /gn3
parent507f35a6027d263159d37816e033021b578d27db (diff)
downloadgenenetwork3-251987489eb02ff0b781e4e9d419fcf34a7c8eca.tar.gz
Use gnt:geneSymbol property to fetch genes in Probeset RDF query.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3')
-rw-r--r--gn3/api/metadata.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py
index e85ac87..45b731e 100644
--- a/gn3/api/metadata.py
+++ b/gn3/api/metadata.py
@@ -903,7 +903,8 @@ def probesets(name):
$prefix
CONSTRUCT {
- ?probeset ?predicate ?object .
+ ?probeset ?predicate ?object ;
+ gnt:geneSymbol ?symbol .
?symbol ?symbolPred ?symbolObj .
?resource rdfs:label ?resourceLabel ;
rdfs:comments ?resourceComments .
@@ -912,9 +913,11 @@ CONSTRUCT {
?probeset rdf:type gnc:Probeset ;
rdfs:label "$name" ;
?predicate ?object .
+ FILTER (!regex(str(?predicate), '(geneSymbol)', 'i')) .
OPTIONAL {
- ?symbol ^gnt:symbol ?probeset ;
- rdf:type gnc:GeneSymbol ;
+ ?probeset gnt:geneSymbol ?symbolName .
+ ?symbol gnt:geneSymbol ?symbolName ;
+ rdf:type gnc:Gene ;
?symbolPred ?symbolObj .
?resource ^dct:references ?symbol ;
a ?resourceLink .