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.scm31
1 files changed, 9 insertions, 22 deletions
diff --git a/examples/generif.scm b/examples/generif.scm
index c4b70ae..a4a2e4b 100755
--- a/examples/generif.scm
+++ b/examples/generif.scm
@@ -22,17 +22,6 @@
            (left-join GeneCategory "ON GeneRIFXRef.GeneCategoryId = GeneCategory.Id"))
           "WHERE GeneRIF.display > 0 AND GeneRIF.comment IS NOT NULL
 GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
-  (schema-triples
-   (gnc:gene_wiki_entry a rdfs:Class)
-   (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:gn_wiki_entry rdfs:comment "Represents GeneRIF Entries entered from GeneNetwork")
-   (gnt:gene_symbol rdfs:domain gnc:gn_wiki_entry))
   (triples
       (string->identifier
        "wiki" (format #f "~a_~a"
@@ -47,7 +36,7 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
                               '(("'" . "\\'"))))))
     (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))))
+    (set gnt:has_species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
     (set dct:created
          (string->symbol
           (format #f "~s^^xsd:datetime "
@@ -61,11 +50,12 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
                            (format #f "pubmed:~a" (string-trim-both pmid))))))
                    (string-split (field GeneRIF PubMed_ID PMID)
                                  #\space)))
-    (set foaf:mbox
-         (match (sanitize-rdf-string (field GeneRIF email))
-           ((? string-blank? mbox) "")
-           (mbox (string->symbol
-                  (format #f "<~a>" mbox)))))
+    ;; Hide e-mail for now.
+    ;; (set foaf:mbox
+    ;;      (match (sanitize-rdf-string (field GeneRIF email))
+    ;;        ((? string-blank? mbox) "")
+    ;;        (mbox (string->symbol
+    ;;               (format #f "<~a>" mbox)))))
     (set dct:identifier (annotate-field (format #f "~s" (field GeneRIF Id))
                                         '^^xsd:integer))
     (set foaf:homepage
@@ -86,9 +76,6 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
 (define-transformer ncbi-genewiki-entries
   (tables (GeneRIF_BASIC
            (left-join Species "USING (SpeciesId)")))
-  (schema-triples
-   (gnc:ncbi_wiki_entry rdfs:subClassOf gnc:gene_wiki_entry)
-   (gnc:ncbi_wiki_entry rdfs:comment "Represents GeneRIF Entries obtained from NCBI"))
   (triples
       (string->identifier
        "rif" (format #f "~a_~a_~a_~a"
@@ -119,7 +106,7 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
             (string-append
              (format #f "gnc:ncbi_wiki_entry ;\n")
              (format #f "\trdfs:label ~a ;\n" comment)
-             (format #f "\tgnt:belongs_to_species ~a ;\n" species)
+             (format #f "\tgnt:has_species ~a ;\n" species)
              (format #f "\tgnt:symbol ~s ;\n" symbol)
              (format #f "\tgnt:has_gene_id generif:~a ;\n" gene-id)
              (match taxon-id
@@ -157,7 +144,7 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
       ("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/>")
       ("taxon:" "<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=>")