aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-11-17 11:25:21 +0300
committerMunyoki Kilyungi2023-11-17 11:25:21 +0300
commit2df9eb5a6adf15ddb19d4f00f1bc5a1c35f492c7 (patch)
tree089a3570dbd218081bf12c73878e58c462787c56 /examples
parentb32bf3e486c2d819db8d7af770ab098137173be8 (diff)
downloadgn-transform-databases-2df9eb5a6adf15ddb19d4f00f1bc5a1c35f492c7.tar.gz
Make species identifiers consistent.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/classification.scm12
-rwxr-xr-xexamples/dataset-metadata.scm4
-rwxr-xr-xexamples/genbank.scm4
-rwxr-xr-xexamples/strains.scm4
4 files changed, 18 insertions, 6 deletions
diff --git a/examples/classification.scm b/examples/classification.scm
index 13b086a..8eb440a 100755
--- a/examples/classification.scm
+++ b/examples/classification.scm
@@ -48,7 +48,10 @@
(gnc:Species xkos:depth "3")
(gnc:Species xkos:specializes gnc:Set))
(triples "gnc:Species"
- (set skos:member (string->identifier "" (remap-species-identifiers (field Species Fullname))))))
+ (set skos:member
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))
+ #:separator ""
+ #:proc string-capitalize-first))))
(define-transformer classification-scheme-set
(tables (InbredSet))
@@ -63,7 +66,8 @@
"set" (field InbredSet Name InbredSetName)))))
(define-transformer species
- (tables (Species))
+ (tables (Species
+ (left-join InbredSet "USING (FamilyOrder)")))
(schema-triples
(gnt:family a owl:ObjectProperty)
(gnt:family rdfs:domain gnc:Species)
@@ -72,7 +76,9 @@
(gnt:shortName rdfs:domain gnc:Species)
(gnt:shortName skos:definition "The short name of a given resource"))
(triples
- (string->identifier "" (remap-species-identifiers (field Species Fullname)))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))
+ #:separator ""
+ #:proc string-capitalize-first)
(set skos:inScheme 'gnc:ResourceClassificationScheme)
(set rdfs:label (remap-species-identifiers (field Species Fullname)))
(set skos:prefLabel (field Species MenuName))
diff --git a/examples/dataset-metadata.scm b/examples/dataset-metadata.scm
index 1c02bb3..26ca7f2 100755
--- a/examples/dataset-metadata.scm
+++ b/examples/dataset-metadata.scm
@@ -81,7 +81,9 @@
Title)))
(set gnt:hasGOTreeValue (field GeneChip Go_tree_value))
(set xkos:classifiedUnder
- (string->identifier "" (remap-species-identifiers (field Species Fullname))))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))
+ #:separator ""
+ #:proc string-capitalize-first))
(set gnt:hasGeoSeriesId
(ontology 'geoSeries:
(string-trim-both (field GeneChip GeoPlatform))))))
diff --git a/examples/genbank.scm b/examples/genbank.scm
index 65eed0c..dc40d67 100755
--- a/examples/genbank.scm
+++ b/examples/genbank.scm
@@ -36,7 +36,9 @@
(field Genbank Id))
(set gnt:hasSequence (field Genbank Sequence))
(set xkos:classifiedUnder
- (string->identifier "" (remap-species-identifiers (field Species Fullname))))))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))
+ #:separator ""
+ #:proc string-capitalize-first))))
diff --git a/examples/strains.scm b/examples/strains.scm
index 5ef6f03..8552229 100755
--- a/examples/strains.scm
+++ b/examples/strains.scm
@@ -79,7 +79,9 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
'pre "_" 'post))
(set rdf:type 'gnc:strain)
(set xkos:classifiedUnder
- (string->identifier "" (remap-species-identifiers (field Species Fullname))))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))
+ #:separator ""
+ #:proc string-capitalize-first))
;; Name, and maybe a second name
(set rdfs:label (sanitize-rdf-string (field Strain Name)))
(set skos:altLabel (sanitize-rdf-string (field ("IF ((Strain.Name2 != Strain.Name), Strain.Name2, '')" Name2))))