about summary refs log tree commit diff
path: root/examples/strains.scm
diff options
context:
space:
mode:
authorMunyoki Kilyungi2025-12-23 20:06:23 +0300
committerMunyoki Kilyungi2026-01-13 12:02:50 +0300
commit5fec5c4d6d1c07251b06348a00bb040978b5e9ac (patch)
tree41177c39afd7299f9d082e411014e08eb8b4b4a4 /examples/strains.scm
parentf96056e48c83cb5d083bdb59dd5d11306bb5ac31 (diff)
downloadgn-transform-databases-5fec5c4d6d1c07251b06348a00bb040978b5e9ac.tar.gz
Update schema for several transforms.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/strains.scm')
-rwxr-xr-xexamples/strains.scm19
1 files changed, 7 insertions, 12 deletions
diff --git a/examples/strains.scm b/examples/strains.scm
index 976d358..b2332bd 100755
--- a/examples/strains.scm
+++ b/examples/strains.scm
@@ -63,16 +63,11 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
    (gnt:gene_symbol rdfs:domain gnc:strain)
    (gnt:gene_symbol a owl:ObjectProperty))
   (triples (string->identifier
-            ""
-            (regexp-substitute/global
-             #f "[^A-Za-z0-9:]"
-             (field Strain Name)
-             'pre "_" 'post))
+            "strain"
+            (field Strain Name)
+            #:separator "_")
     (set rdf:type 'gnc:strain)
-    (set gnt:belongs_to_species
-         (string->identifier "" (remap-species-identifiers (field Species Fullname))
-                             #:separator "_"
-                             #:proc string-downcase))
+    (set gnt:belongs_to_species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
     ;; 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))))
@@ -85,7 +80,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
    (gnc:mapping_method a skos:Concept)
    (gnc:mapping_method skos:definition "Terms that decribe mapping methods used on this resource"))
   (triples
-      (string->identifier "mapping_method" (field MappingMethod Name))
+      (string->identifier "mapping_method" (field MappingMethod Name) #:separator "_")
     (set rdf:type 'gnc:mapping_method)
     (set rdfs:label (field MappingMethod Name))))
 
@@ -96,7 +91,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
   (schema-triples
    (gnc:avg_method a skos:Concept)
    (gnc:avg_method skos:definition "Terms that decribe normalization methods used on this resource"))
-  (triples (string->identifier "avgMethod" (field AvgMethod Name AvgMethodName))
+  (triples (string->identifier "avg_method" (field AvgMethod Name AvgMethodName) #:separator "_")
     (set rdf:type 'gnc:avg_method)
     (set rdfs:label (field AvgMethod Normalization))))
 
@@ -115,7 +110,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
           read)))
 
   (with-documentation
-   (name "Species Metadata")
+   (name "Strain Metadata")
    (connection %connection-settings)
    (table-metadata? #f)
    (prefixes