aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/classification.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/classification.scm b/examples/classification.scm
index ecc071b..5c29238 100755
--- a/examples/classification.scm
+++ b/examples/classification.scm
@@ -119,6 +119,19 @@
(set gnt:has_strain
(string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_"))))
+(define-transformer species-families
+ (tables (Species)
+ "GROUP BY FAMILY")
+ (schema-triples
+ (gnt:has_family_order_id a owl:DatatypeProperty))
+ (triples (string->identifier "family" (field Species Family) #:separator "_")
+ (set gnt:has_species
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))))
+ (set rdfs:label (field Species Family))
+ (set gnt:has_family_order_id
+ (annotate-field (field Species OrderId)
+ '^^xsd:integer))))
+
(define-transformer inbred-set
(tables (InbredSet
(left-join Species "ON InbredSet.SpeciesId=Species.Id")
@@ -200,6 +213,8 @@
species
species-fan-out
inbred-set))
+ species-families
+ inbredset-families
(outputs
`(#:documentation ,documentation
#:rdf ,output))))