aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/genotype.scm20
1 files changed, 15 insertions, 5 deletions
diff --git a/examples/genotype.scm b/examples/genotype.scm
index 3b8f385..5261af7 100755
--- a/examples/genotype.scm
+++ b/examples/genotype.scm
@@ -14,11 +14,22 @@
(transform special-forms))
-
-
+(define-transformer gn:genotype->metadata
+ (tables (InbredSet
+ (inner-join GenoFreeze "ON GenoFreeze.InbredSetId = InbredSet.Id")
+ (inner-join InfoFiles "ON InfoFiles.InbredSetId = InbredSet.Id"))
+ "WHERE GenoFreeze.public > 0 GROUP BY GenoFreeze.Id")
+ (schema-triples
+ (gnc:genotype a owl:Class)
+ (gnc:genotype a skos:Concept)
+ (gnc:genotype rdfs:label "A genotype."))
+ (triples (string->identifier "genotype" (field GenoFreeze Name) #:separator "_")
+ (set rdf:type 'gnc:genotype)
+ (set skos:prefLabel (field GenoFreeze FullName))
+ (set skos:altLabel (field GenoFreeze ShortName))
+ (set dct:created (annotate-field (field GenoFreeze CreateTime) '^^xsd:datetime))))
-
(let* ((option-spec
'((settings (single-char #\s) (value #t))
(output (single-char #\o) (value #t))
@@ -46,8 +57,7 @@
("xkos:" "<http://rdf-vocabulary.ddialliance.org/xkos#>")
("xsd:" "<http://www.w3.org/2001/XMLSchema#>")))
(inputs
- (list
- ))
+ (list gn:genotype->metadata))
(outputs
`(#:documentation ,documentation
#:rdf ,output))))