about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-06-06 14:48:12 +0300
committerBonfaceKilz2023-06-12 19:06:36 +0300
commit632b922a580bc08affbc7700a7f892868e3606ac (patch)
tree4cab7bbd98c3b4d3e9afb35e864f0e1134245906
parent9030321f1417b2ac2e3ba0517606f705503c8ca9 (diff)
downloadgn-transform-databases-632b922a580bc08affbc7700a7f892868e3606ac.tar.gz
Use "publication:" as an identifier for publications
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xexamples/dump-phenotype.scm1
-rwxr-xr-xexamples/dump-publication.scm9
2 files changed, 6 insertions, 4 deletions
diff --git a/examples/dump-phenotype.scm b/examples/dump-phenotype.scm
index a493fa2..51ecb64 100755
--- a/examples/dump-phenotype.scm
+++ b/examples/dump-phenotype.scm
@@ -133,6 +133,7 @@
        (prefix "up:" "<http://purl.uniprot.org/core/>")
        (prefix "xsd:" "<http://www.w3.org/2001/XMLSchema#>")
        (prefix "dataset:" "<http://genenetwork.org/dataset/>")
+       (prefix "publication:" "<http://genenetwork.org/publication/>")
        (newline)
        (dump-publishfreeze db)
        (dump-phenotypes db))
diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm
index e4c57ad..ef2a36d 100755
--- a/examples/dump-publication.scm
+++ b/examples/dump-publication.scm
@@ -39,11 +39,11 @@
                     pmid)))
             (publication-id (field Publication Id)))
         (if (string-null? pmid)
-            (string->identifier "publication"
-                                (number->string publication-id))
-            (ontology 'pubmed: pmid)))
+            (ontology 'publication:
+                      publication-id)
+            (ontology 'publication: pmid)))
     (set rdf:type 'gn:publication)
-    (set gn:pubMedId (field ("IFNULL(PubMed_ID, '')" pubmedId)))
+    (set gn:pubMedId (ontology 'pubmed: (field ("IFNULL(PubMed_ID, '')" pubmedId))))
     (set gn:title (field Publication Title))
     (set gn:journal (field Publication Journal))
     (set gn:volume (field Publication Volume))
@@ -85,6 +85,7 @@
        (prefix "uniprot:" "<http://purl.uniprot.org/uniprot/>")
        (prefix "up:" "<http://purl.uniprot.org/core/>")
        (prefix "xsd:" "<http://www.w3.org/2001/XMLSchema#>")
+       (prefix "publication:" "<http://genenetwork.org/publication/>")
        (newline)
        (dump-publication db))
      #:encoding "utf8")))