about summary refs log tree commit diff
path: root/examples/generif.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/generif.scm')
-rwxr-xr-xexamples/generif.scm50
1 files changed, 22 insertions, 28 deletions
diff --git a/examples/generif.scm b/examples/generif.scm
index 5fb95f7..994c540 100755
--- a/examples/generif.scm
+++ b/examples/generif.scm
@@ -24,33 +24,30 @@
 GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
   (schema-triples
    (gnc:gene_wiki_entry a rdfs:Class)
-   (gnc:GNWikiEntry rdfs:subClassOf gnc:gene_wiki_entry)
+   (gnc:gn_wiki_entry rdfs:subClassOf gnc:gene_wiki_entry)
    (gnt:initial a owl:ObjectProperty)
    (gnt:initial rdfs:domain gnc:gene_wiki_entry)
    (gnt:initial skos:definition "Optional user or project code or your initials")
    (gnt:reason a owl:ObjectProperty)
    (gnt:reason rdfs:domain gnc:gene_wiki_entry)
    (gnt:reason skos:definition "The reason why this resource was modified")
-   (gnc:GNWikiEntry rdfs:comment "Represents GeneRIF Entries entered from GeneNetwork")
-   (gnt:gene_symbol rdfs:domain gnc:GNWikiEntry))
+   (gnc:gn_wiki_entry rdfs:comment "Represents GeneRIF Entries entered from GeneNetwork")
+   (gnt:gene_symbol rdfs:domain gnc:gn_wiki_entry))
   (triples
-      (format
-       #f "gn:wiki-~a-~a"
-       (field GeneRIF Id)
-       (field GeneRIF versionId))
+      (string->identifier
+       "wiki" (format #f "~a_~a"
+                      (field GeneRIF Id)
+                      (field GeneRIF versionId))
+       #:separator "_")
     (set rdfs:label (string->symbol
                      (format #f "'~a'@en"
                              (replace-substrings
                               (sanitize-rdf-string
                                (field GeneRIF comment))
                               '(("'" . "\\'"))))))
-    (set rdf:type 'gnc:GNWikiEntry)
+    (set rdf:type 'gnc:gn_wiki_entry)
     (set gnt:symbol (field GeneRIF symbol))
-    (set gnt:belongs_to_species (string->identifier
-                               ""
-                               (remap-species-identifiers (field Species Fullname))
-                               #:separator ""
-                               #:proc string-capitalize-first))
+    (set gnt:belongs_to_species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
     (set dct:created
          (string->symbol
           (format #f "~s^^xsd:datetime "
@@ -80,7 +77,7 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
                                         '^^xsd:integer))
     (set gnt:initial (sanitize-rdf-string (field GeneRIF initial)))
     (set gnt:reason (field GeneRIF reason))
-    (multiset gnt:belongsToCategory
+    (multiset gnt:belongs_to_category
               (string-split
                (field ("GROUP_CONCAT(DISTINCT GeneCategory.Name SEPARATOR ';')"
                        GeneCategory))
@@ -93,13 +90,13 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
    (gnc:ncbi_wiki_entry rdfs:subClassOf gnc:gene_wiki_entry)
    (gnc:ncbi_wiki_entry rdfs:comment "Represents GeneRIF Entries obtained from NCBI"))
   (triples
-      (format
-       #f "gn:rif-~a-~a-~a-~a"
-       (field GeneRIF_BASIC GeneId)
-       (field GeneRIF_BASIC PubMed_ID)
-       (field
-        ("DATE_FORMAT(createtime, '%Y-%m-%dT%T')" CreateTime))
-       (field GeneRIF_BASIC VersionId))
+      (string->identifier
+       "rif" (format #f "~a_~a_~a_~a"
+                     (field GeneRIF_BASIC GeneId)
+                     (field GeneRIF_BASIC PubMed_ID)
+                     (field ("DATE_FORMAT(createtime, '%Y-%m-%dT%T')" CreateTime))
+                     (field GeneRIF_BASIC VersionId))
+       #:separator "_")
     (set rdf:type
          (let* ((comment (format #f "'~a'@en"
                                  (replace-substrings
@@ -113,11 +110,7 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
                                      (field
                                       ("CAST(createtime AS CHAR)" EntryCreateTime))))
                 (symbol (field GeneRIF_BASIC symbol))
-                (species (string->identifier
-                          ""
-                          (remap-species-identifiers (field Species Fullname))
-                          #:separator ""
-                          #:proc string-capitalize-first))
+                (species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
                 (gene-id (field GeneRIF_BASIC GeneId))
                 (taxon-id (field GeneRIF_BASIC TaxID TaxonomicId))
                 (pmid (field GeneRIF_BASIC PubMed_ID))
@@ -172,8 +165,9 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
       ("owl:" "<http://www.w3.org/2002/07/owl#>")))
    (inputs
     (list
-     gn-genewiki-entries
-     ncbi-genewiki-entries))
+     ;; gn-genewiki-entries
+     ncbi-genewiki-entries
+     ))
    (outputs
     `(#:documentation ,documentation
       #:rdf ,output))))