From 7056a0a08a5a4f9344ebaf4ae4128eaec1ab63e2 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 16 Feb 2026 07:15:20 +0300 Subject: Add example sparql query. Signed-off-by: Munyoki Kilyungi --- issues/ai/search.gmi | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/issues/ai/search.gmi b/issues/ai/search.gmi index 3a104fad..f7ddfd2c 100644 --- a/issues/ai/search.gmi +++ b/issues/ai/search.gmi @@ -30,6 +30,29 @@ We need fan-out to GN-specific pages. Related to task listed below in ⁰ * [X] (johannesm, bonfacem) Design a proper JSON output format for the system * [X] ⁰(johannesm, bonfacem) Teach model how to build link to trait result page in CD +* [X] (bonfacem) Sparql query to fetch phenotypes and dataset metadata. +Dataset metadata for a given phenotype. + +``` +SPARQL +PREFIX gn: +PREFIX gnc: +PREFIX gnt: + +SELECT ?phenotype_dataset + (GROUP_CONCAT(DISTINCT CONCAT(STR(?p), " = ", STR(?o)); separator=" | ") AS ?metadata) +FROM +WHERE { + ?set gnt:has_phenotype_data ?phenotype_dataset . + ?phenotype_dataset gnt:has_strain ?set ; + ?p ?o . +} +GROUP BY ?phenotype_dataset +LIMIT 10; + +``` + + * [ ] (johannesm, bonfacem) Extend / Modify (directly use sparql) corpus to molecular traits (later genotypes, precompute data and RIFs). * [ ] (johannesm, bonfacem) Have a sync on build of xapian search. We want to teach the LLM how to build a xapian search so that the user has a fallback * [ ] (johannesm, ! bonfacem) Add REST API for processing answers from AI processing. @@ -288,4 +311,4 @@ System feedback: "final_answer": "The BXDPublish dataset contains multiple traits related to Intraocular pressure (IOP) measurements in BXD mice. These include: BXD_16337 (IOP in 1-2 months old mice, mean 15.28 mmHg), BXD_16338 (IOP in 2.1-5 months old mice, mean 16.09 mmHg), BXD_16339 (IOP in 5.1-9 months old mice, mean 16.56 mmHg), BXD_16340 (IOP in 9.1-13 months old mice, mean 15.66 mmHg), and BXD_16342 (IOP across all ages 1-30 months, mean 15.80 mmHg). All measurements are from both sexes and represent averages of left and right eyes." } -``` \ No newline at end of file +``` -- cgit 1.4.1