about summary refs log tree commit diff
path: root/examples/classification.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/classification.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/classification.scm')
-rwxr-xr-xexamples/classification.scm114
1 files changed, 57 insertions, 57 deletions
diff --git a/examples/classification.scm b/examples/classification.scm
index 3024af6..8951c85 100755
--- a/examples/classification.scm
+++ b/examples/classification.scm
@@ -27,67 +27,67 @@
 (define-transformer classification-scheme-species
   (tables (Species))
   (schema-triples
-   (gnc:ResourceClassificationScheme a skos:ConceptScheme)
-   (gnc:ResourceClassificationScheme skos:prefLabel "GeneNetwork Classification Scheme For Resources")
-   (gnc:ResourceClassificationScheme xkos:numberOfLevels "3")
-   (gnc:ResourceClassificationScheme xkos:levels "( gnc:DatasetType gnc:Set gnc:Species )")
-   (gnc:DatasetType a xkos:ClassificationLevel)
-   (gnc:DatasetType skos:prefLabel "The Type of a Dataset which can be a ProbeSet, Genotype, or Phenotype")
-   (gnc:DatasetType xkos:depth "1")
-   (gnc:DatasetType skos:member gnc:Probeset)
-   (gnc:DatasetType skos:member gnc:Genotype)
-   (gnc:DatasetType skos:member gnc:Phenotype)
-   (gnc:Probeset skos:prefLabel "mRNA Assay Datasets")
-   (gnc:Probeset skos:altLabel "ProbeSet")
-   (gnc:Genotype skos:prefLabel "Genotype")
-   (gnc:Genotype skos:altLabel "DNA Markers and SNPs")
-   (gnc:Phenotype skos:prefLabel "Phenotype")
-   (gnc:Phenotype skos:altLabel "Traits and Cofactors")
-   (gnc:Species a xkos:ClassificationLevel)
-   (gnc:Species skos:prefLabel "The species in which this resource belongs")
-   (gnc:Species xkos:depth "3")
-   (gnc:Species xkos:specializes gnc:Set))
-  (triples "gnc:Species"
+   (gnc:resource_classification_scheme a skos:ConceptScheme)
+   (gnc:resource_classification_scheme skos:prefLabel "GeneNetwork Classification Scheme For Resources which are either defines as a dataset, an inbred group, or a species.")
+   (gnc:resource_classification_scheme xkos:numberOfLevels "3")
+   (gnc:resource_classification_scheme xkos:levels "( gnc:dataset_type gnc:set gnc:species )")
+   (gnc:dataset_type a xkos:ClassificationLevel)
+   (gnc:dataset_type skos:prefLabel "The Type of a Dataset which can be a ProbeSet, Genotype, or Phenotype")
+   (gnc:dataset_type xkos:depth "1")
+   (gnc:dataset_type skos:member gnc:probeset)
+   (gnc:dataset_type skos:member gnc:genotype)
+   (gnc:dataset_type skos:member gnc:phenotype)
+   (gnc:probeset skos:prefLabel "mRNA Assay Datasets")
+   (gnc:probeset skos:altLabel "ProbeSet")
+   (gnc:genotype skos:prefLabel "Genotype")
+   (gnc:genotype skos:altLabel "DNA Markers and SNPs")
+   (gnc:phenotype skos:prefLabel "Phenotype")
+   (gnc:phenotype skos:altLabel "Traits and Cofactors")
+   (gnc:species a xkos:ClassificationLevel)
+   (gnc:species skos:prefLabel "The species in which this resource belongs")
+   (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))
-                             #:separator ""
-                             #:proc string-capitalize-first))))
+                             #:separator "_"
+                             #:proc string-downcase))))
 
 (define-transformer classification-scheme-set
   (tables (InbredSet))
   (schema-triples
-   (gnc:Set a xkos:ClassificationLevel)
-   (gnc:Set skos:prefLabel "The Type of Set, Ie InbredSet/OutbredSet that a resource can belong to")
-   (gnc:Set xkos:depth "2")
-   (gnc:Set xkos:generalizes gnc:Species))
-  (triples "gnc:Set"
+   (gnc:set a xkos:ClassificationLevel)
+   (gnc:set skos:prefLabel "The Type of Set, Ie InbredSet/OutbredSet that a resource can belong to")
+   (gnc:set xkos:depth "2")
+   (gnc:set xkos:generalizes gnc:species))
+  (triples "gnc:set"
     (set skos:member
          (string->identifier
           "set" (field InbredSet Name InbredSetName)
-          #:separator ""
-          #:proc string-capitalize-first))))
+          #:separator "_"
+          #:proc (lambda (x) x)))))
 
 (define-transformer species
   (tables (Species))
   (schema-triples
    (gnt:family a owl:ObjectProperty)
-   (gnt:family rdfs:domain gnc:Species)
+   (gnt:family rdfs:domain gnc:species)
    (gnt:family skos:definition "This resource belongs to this family")
-   (gnt:shortName a owl:ObjectProperty)
-   (gnt:shortName rdfs:domain gnc:Species)
-   (gnt:shortName skos:definition "The short name of a given resource")
-   (gnt:belongsToSpecies a rdf:property)
-   (gnt:belongsToSpecies rdf:comment "This resource given to this species")
-   (gnt:belongsToSpecies rdf:label "belongsToSpecies"))
+   (gnt:short_name a owl:ObjectProperty)
+   (gnt:short_name rdfs:domain gnc:species)
+   (gnt:short_name skos:definition "The short name of a given resource")
+   (gnt:belongs_to_species a rdf:property)
+   (gnt:belongs_to_species rdf:comment "This resource given to this species")
+   (gnt:belongs_to_species rdf:label "belongsToSpecies"))
   (triples
       (string->identifier "" (remap-species-identifiers (field Species Fullname))
-                          #:separator ""
-                          #:proc string-capitalize-first)
-    (set skos:inScheme 'gnc:ResourceClassificationScheme)
+                          #:separator "_"
+                          #:proc string-downcase)
+    (set skos:inScheme 'gnc:resource_classification_scheme)
     (set rdfs:label (remap-species-identifiers (field Species Fullname)))
     (set skos:prefLabel (field Species MenuName))
     (set skos:altLabel (field Species SpeciesName))
-    (set gnt:shortName (field Species Name))
+    (set gnt:short_name (field Species Name))
     (set gnt:family (field Species Family))
     (set skos:notation (ontology
                         'taxon:
@@ -99,32 +99,32 @@
            (left-join MappingMethod
                       "ON InbredSet.MappingMethodId=MappingMethod.Id")))
   (schema-triples
-   (gnt:geneticType a owl:ObjectProperty)
-   (gnt:geneticType rdfs:domain gnc:set)
+   (gnt:genetic_type a owl:ObjectProperty)
+   (gnt:genetic_type rdfs:domain gnc:set)
    (gnt:code a owl:ObjectProperty)
    (gnt:code rdfs:domain gnc:set)
    ;; Already defined as an owl prop in species
-   (gnt:family rdfs:domain gnc:Set)
-   (gnt:mappingMethod a owl:ObjectProperty)
-   (gnt:mappingMethod rdfs:domain gnc:set)
-   (gnt:belongsToGroup a rdf:property)
-   (gnt:belongsToGroup rdf:comment "This resource given to this group")
-   (gnt:belongsToGroup rdf:label "belongsToGroup"))
+   (gnt:family rdfs:domain gnc:set)
+   (gnt:mapping_method a owl:ObjectProperty)
+   (gnt:mapping_method rdfs:domain gnc:set)
+   (gnt:belongs_to_group a rdf:property)
+   (gnt:belongs_to_group rdf:comment "This resource given to this group")
+   (gnt:belongs_to_group rdf:label "belongs_to_group"))
   (triples (string->identifier
-          "set" (field InbredSet Name InbredSetName)
-          #:separator ""
-          #:proc string-capitalize-first)
-    (set skos:inScheme 'gnc:ResourceClassificationScheme)
+            "set" (field InbredSet Name InbredSetName)
+            #:separator "_"
+            #:proc (lambda (x) x))
+    (set skos:inScheme 'gnc:resource_classification_scheme)
     (set rdfs:label (field InbredSet FullName))
     (set skos:prefLabel (field InbredSet Name InbredSetName))
-    (set gnt:geneticType (field InbredSet GeneticType))
+    (set gnt:genetic_type (field InbredSet GeneticType))
     (set gnt:family (field InbredSet Family))
-    (set gnt:mappingMethod (field MappingMethod Name))
+    (set gnt:mapping_method (field MappingMethod Name))
     (set gnt:code (field InbredSet InbredSetCode))
     (set xkos:generalizes
          (string->identifier "" (remap-species-identifiers (field Species Fullname))
-                             #:separator ""
-                             #:proc string-capitalize-first))))
+                             #:separator "_"
+                             #:proc string-downcase))))