about summary refs log tree commit diff
path: root/examples/genbank.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/genbank.scm')
-rwxr-xr-xexamples/genbank.scm31
1 files changed, 9 insertions, 22 deletions
diff --git a/examples/genbank.scm b/examples/genbank.scm
index 391cff0..d09b30f 100755
--- a/examples/genbank.scm
+++ b/examples/genbank.scm
@@ -10,35 +10,22 @@
              (transform strings)
              (transform sql)
              (transform triples)
-             (transform special-forms)
-             (transform uuid))
+             (transform special-forms))
 
 
 
-(define (remap-species-identifiers str)
-  "This procedure remaps identifiers to standard binominal. Obviously this should
-   be sorted by correcting the database!"
-  (match str
-    ["Fly (Drosophila melanogaster dm6)" "Drosophila melanogaster"]
-    ["Oryzias latipes (Japanese medaka)" "Oryzias latipes"]
-    ["Macaca mulatta" "Macaca nemestrina"]
-    ["Bat (Glossophaga soricina)" "Glossophaga soricina"]
-    [str str]))
-
 (define-transformer genbank
   (tables (Genbank
            (left-join Species "USING (SpeciesId)")))
   (schema-triples
    (gnc:nucleotide a skos:Concept)
-   (gnt:hasSequence rdfs:domain gnc:nucleotide))
+   (gnt:has_sequence rdfs:domain gnc:nucleotide))
   (triples (ontology
             'genbank:
             (field Genbank Id))
-    (set gnt:hasSequence (field Genbank Sequence))
-    (set gnt:belongsToSpecies
-         (string->identifier "" (remap-species-identifiers (field Species Fullname))
-                             #:separator ""
-                             #:proc string-capitalize-first))))
+    (set gnt:has_sequence (field Genbank Sequence))
+    (set gnt:has_species
+         (string->identifier "" (remap-species-identifiers (field Species Fullname))))))
 
 
 
@@ -63,11 +50,11 @@
       ("rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>")
       ("skos:" "<http://www.w3.org/2004/02/skos/core#>")
       ("xkos:" "<http://rdf-vocabulary.ddialliance.org/xkos#>")
-      ("gn:" "<http://genenetwork.org/id/>")
-      ("gnc:" "<http://genenetwork.org/category/>")
-      ("gnt:" "<http://genenetwork.org/term/>")
+      ("gn:" "<http://rdf.genenetwork.org/v1/id/>")
+      ("gnc:" "<http://rdf.genenetwork.org/v1/category/>")
+      ("gnt:" "<http://rdf.genenetwork.org/v1/term/>")
       ("dct:" "<http://purl.org/dc/terms/>")
-      ("foaf:" "<http://xmlns.com/foaf/0.1/>")
+      ("foaf:" "<http://xmlns.com/foaf/0.1/#term_>")
       ("pubmed:" "<http://rdf.ncbi.nlm.nih.gov/pubmed/>")
       ("ncbiTaxon:" "<https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=>")
       ("generif:" "<http://www.ncbi.nlm.nih.gov/gene?cmd=Retrieve&dopt=Graphics&list_uids=>")