diff options
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/genotype.scm | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/examples/genotype.scm b/examples/genotype.scm index 5261af7..cefa450 100755 --- a/examples/genotype.scm +++ b/examples/genotype.scm @@ -14,20 +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") +(define-transformer gn:set->gn:dataset + (tables (Datasets + (inner-join InfoFiles "ON InfoFiles.DatasetId = Datasets.DatasetId") + (inner-join InbredSet "ON InbredSet.Id = InfoFiles.InbredSetId") + (inner-join GenoFreeze "ON GenoFreeze.InbredSetId = InbredSet.Id")) + "WHERE GenoFreeze.public > 0 GROUP BY Datasets.DatasetId") (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)))) + (gnt:has_genotype_data rdf:type owl:ObjectProperty) + (gnt:has_genotype_data rdfs:label "this resources has genotype data.") + (gnt:has_genotype_data rdfs:comment "Associates a resource with its genotype data.") + (gnt:has_genotype_data rdfs:domain gnc:set) + (gnt:has_genotype_data rdfs:range dcat:Dataset) + (gnt:has_genotype_data rdfs:subPropertyOf dct:relation)) + (triples (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_") + (set gnt:has_genotype_data (string->identifier "dataset" (field GenoFreeze Name) #:separator "_")))) + (let* ((option-spec @@ -57,7 +59,7 @@ ("xkos:" "<http://rdf-vocabulary.ddialliance.org/xkos#>") ("xsd:" "<http://www.w3.org/2001/XMLSchema#>"))) (inputs - (list gn:genotype->metadata)) + (list gn:set->gn:dataset)) (outputs `(#:documentation ,documentation #:rdf ,output)))) |
