diff options
| -rwxr-xr-x | examples/phenotype.scm | 13 |
1 files changed, 8 insertions, 5 deletions
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)) |
