about summary refs log tree commit diff
path: root/examples/strains.scm
diff options
context:
space:
mode:
authorMunyoki Kilyungi2025-12-23 12:06:06 +0300
committerMunyoki Kilyungi2026-01-13 12:02:49 +0300
commit1ca7e679b834ccaf53a3243d0e1c2f3f9e8d56d8 (patch)
tree514c544706986f3edd0b3f53a89113e334a0b9a3 /examples/strains.scm
parentc42933e8f474d8d14eac387d5a94da6f52210629 (diff)
downloadgn-transform-databases-1ca7e679b834ccaf53a3243d0e1c2f3f9e8d56d8.tar.gz
Snake case gn/gnt/gnc identifiers.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/strains.scm')
-rwxr-xr-xexamples/strains.scm26
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/strains.scm b/examples/strains.scm
index 2e1e24f..ae45a93 100755
--- a/examples/strains.scm
+++ b/examples/strains.scm
@@ -69,8 +69,8 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
   (schema-triples
    (gnt:alias rdfs:domain gnc:strain)
    (gnt:alias a owl:ObjectProperty)
-   (gnt:geneSymbol rdfs:domain gnc:strain)
-   (gnt:geneSymbol a owl:ObjectProperty))
+   (gnt:gene_symbol rdfs:domain gnc:strain)
+   (gnt:gene_symbol a owl:ObjectProperty))
   (triples (string->identifier
             ""
             (regexp-substitute/global
@@ -78,24 +78,24 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
              (field Strain Name)
              'pre "_" 'post))
     (set rdf:type 'gnc:strain)
-    (set gnt:belongsToSpecies
+    (set gnt:belongs_to_species
          (string->identifier "" (remap-species-identifiers (field Species Fullname))
-                             #:separator ""
-                             #:proc string-capitalize-first))
+                             #:separator "_"
+                             #:proc string-downcase))
     ;; 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))))
     (set gnt:alias (sanitize-rdf-string (field ("IF ((Strain.Alias != Strain.Name), Strain.Alias, '')" Alias))))
-    (set gnt:geneSymbol (field Strain Symbol))))
+    (set gnt:gene_symbol (field Strain Symbol))))
 
 (define-transformer mapping-method
   (tables (MappingMethod))
   (schema-triples
-   (gnc:mappingMethod a skos:Concept)
-   (gnc:mappingMethod skos:definition "Terms that decribe mapping methods used on this resource"))
+   (gnc:mapping_method a skos:Concept)
+   (gnc:mapping_method skos:definition "Terms that decribe mapping methods used on this resource"))
   (triples
-      (string->identifier "mappingMethod" (field MappingMethod Name))
-    (set rdf:type 'gnc:mappingMethod)
+      (string->identifier "mapping_method" (field MappingMethod Name))
+    (set rdf:type 'gnc:mapping_method)
     (set rdfs:label (field MappingMethod Name))))
 
 (define-transformer avg-method
@@ -103,10 +103,10 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
   ;; the Name field.
   (tables (AvgMethod))
   (schema-triples
-   (gnc:avgMethod a skos:Concept)
-   (gnc:avgMethod skos:definition "Terms that decribe normalization methods used on this resource"))
+   (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))
-    (set rdf:type 'gnc:avgMethod)
+    (set rdf:type 'gnc:avg_method)
     (set rdfs:label (field AvgMethod Normalization))))