diff options
| author | Munyoki Kilyungi | 2026-01-30 00:11:40 +0300 |
|---|---|---|
| committer | Munyoki Kilyungi | 2026-01-30 00:11:40 +0300 |
| commit | 8ac42695d7c20649f50d1527954d2df2d979d292 (patch) | |
| tree | dea6a28185534ee64e5a893fcf4aacbb97cb11f1 /examples | |
| parent | c9e45e7f5243c92c0cb8ff859b46b575d553db9a (diff) | |
| download | gn-transform-databases-8ac42695d7c20649f50d1527954d2df2d979d292.tar.gz | |
Add gn:dataset->gn:set.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/genotype.scm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/genotype.scm b/examples/genotype.scm index cefa450..c3da459 100755 --- a/examples/genotype.scm +++ b/examples/genotype.scm @@ -30,6 +30,14 @@ (triples (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_") (set gnt:has_genotype_data (string->identifier "dataset" (field GenoFreeze Name) #:separator "_")))) +(define-transformer gn:dataset->gn:set + (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") + (triples (string->identifier "dataset" (field GenoFreeze Name) #:separator "_") + (set gnt:has_strain (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")))) (let* ((option-spec @@ -48,7 +56,8 @@ (connection %connection-settings) (table-metadata? #f) (prefixes - '(("dct:" "<http://purl.org/dc/terms/>") + '(("dcat:" "<http://www.w3.org/ns/dcat#>") + ("dct:" "<http://purl.org/dc/terms/>") ("gn:" "<http://rdf.genenetwork.org/v1/id/>") ("gnc:" "<http://rdf.genenetwork.org/v1/category/>") ("gnt:" "<http://rdf.genenetwork.org/v1/term/>") @@ -59,7 +68,7 @@ ("xkos:" "<http://rdf-vocabulary.ddialliance.org/xkos#>") ("xsd:" "<http://www.w3.org/2001/XMLSchema#>"))) (inputs - (list gn:set->gn:dataset)) + (list gn:set->gn:dataset gn:dataset->gn:set)) (outputs `(#:documentation ,documentation #:rdf ,output)))) |
