From b4907a5cfc10f3ea33b702dca8cccb9984753cf7 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 3 Feb 2026 10:04:17 +0300 Subject: Fix empty phenotypes trait page. Signed-off-by: Munyoki Kilyungi --- examples/phenotype.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/phenotype.scm b/examples/phenotype.scm index 690b6a9..0fba2c1 100755 --- a/examples/phenotype.scm +++ b/examples/phenotype.scm @@ -32,11 +32,12 @@ (define-transformer gn:dataset->gn:trait (tables (PublishXRef - (left-join InbredSet "ON InbredSet.InbredSetId = PublishXRef.InbredSetId") + (inner-join InbredSet "ON InbredSet.InbredSetId = PublishXRef.InbredSetId") + (inner-join Species "ON InbredSet.SpeciesId = Species.Id") (inner-join PublishFreeze "ON PublishFreeze.InbredSetId = InbredSet.Id") - (left-join Publication "ON Publication.Id = PublishXRef.PublicationId") - (left-join Phenotype "ON Phenotype.Id = PublishXRef.PhenotypeId")) - "WHERE InbredSet.public > 0") + (inner-join Publication "ON Publication.Id = PublishXRef.PublicationId") + (inner-join Phenotype "ON Phenotype.Id = PublishXRef.PhenotypeId")) + "WHERE InbredSet.public > 0 GROUP BY Species.Name, PublishFreeze.Name") (triples (string->identifier "dataset" (field PublishFreeze Name) #:separator "_") (set gnt:has_phenotype_trait (let ((post-abbrev (blank-p (field Phenotype Post_publication_abbreviation))) @@ -47,7 +48,9 @@ "trait" (format #f "~a_~a" (field PublishFreeze Name) (or post-abbrev pre-abbrev post-desc pre-desc)) - #:separator "_"))))) + #:separator "_"))) + (set dct:created (annotate-field (field PublishFreeze CreateTime) '^^xsd:datetime)) + (set gnt:has_strain (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")))) (define-transformer gnc:phenotype->gn:phenotype (tables (Phenotype)) -- cgit 1.4.1