diff options
| -rwxr-xr-x | examples/genotype-datasets.scm | 16 | ||||
| -rwxr-xr-x | examples/ontology.scm | 5 |
2 files changed, 19 insertions, 2 deletions
diff --git a/examples/genotype-datasets.scm b/examples/genotype-datasets.scm index ba31088..ebe2349 100755 --- a/examples/genotype-datasets.scm +++ b/examples/genotype-datasets.scm @@ -36,6 +36,19 @@ (set gnt:has_strain (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")) (set dct:created (annotate-field (field GenoFreeze CreateTime) '^^xsd:datetime)))) +(define-transformer gn:dataset->marker/snp-count + (tables (GenoFreeze + (inner-join InbredSet "ON InbredSet.Id = GenoFreeze.InbredSetId") + (inner-join Species "ON InbredSet.SpeciesId = Species.Id") + (inner-join Geno "ON Geno.SpeciesId = Species.Id")) + "WHERE GenoFreeze.public > 0 AND Species.Name != 'monkey' GROUP BY GenoFreeze.Name") + (triples (string->identifier "dataset" (field GenoFreeze Name) #:separator "_") + (set gnt:has_marker_count + (string->symbol + (format #f "'~s'^^xsd:integer" + (field + ("COUNT(DISTINCT Geno.Marker_Name)" MarkerCount))))))) + (let* ((option-spec '((settings (single-char #\s) (value #t)) @@ -67,7 +80,8 @@ (inputs (list gn:set->gn:dataset - gn:dataset->metadata)) + gn:dataset->metadata + gn:dataset->marker/snp-count)) (outputs `(#:documentation ,documentation #:rdf ,output)))) diff --git a/examples/ontology.scm b/examples/ontology.scm index 561bcd3..3d58ecb 100755 --- a/examples/ontology.scm +++ b/examples/ontology.scm @@ -243,4 +243,7 @@ (triple 'gnt:has_genotype_data 'rdfs:domain 'gnc:set) (triple 'gnt:has_genotype_data 'rdfs:range 'dcat:Dataset) (triple 'gnt:has_genotype_data 'rdfs:subPropertyOf 'dct:relation) - ))) + (triple 'gnt:has_marker_count 'rdf:type 'owl:ObjectProperty) + (triple 'gnt:has_marker_count 'rdfs:label "this resources has N number of dna markers/SNPs.") + (triple 'gnt:has_marker_count 'rdfs:domain 'xsd:integer) + (triple 'gnt:has_marker_count 'rdfs:range 'dcat:Dataset)))) |
