about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/classification.scm2
-rwxr-xr-xexamples/generif.scm25
-rwxr-xr-xexamples/genotype.scm2
-rwxr-xr-xexamples/ontology.scm54
-rwxr-xr-xexamples/phenotype.scm10
5 files changed, 66 insertions, 27 deletions
diff --git a/examples/classification.scm b/examples/classification.scm
index 130bec8..d44fe5d 100755
--- a/examples/classification.scm
+++ b/examples/classification.scm
@@ -82,7 +82,7 @@
     (set rdfs:label (field InbredSet FullName))
     (set skos:prefLabel (field InbredSet Name InbredSetName))
     (set gnt:genetic_type (field InbredSet GeneticType))
-    (set dct:description (annotate-field (sanitize-rdf-string (field InbredSet description))
+    (set dct:description (annotate-field (sanitize-rdf-string (field InbredSet Description))
                                          '^^rdf:HTML))
     (set gnt:uses_mapping_method
          (string->identifier "mapping_method" (field MappingMethod Name) #:separator "_"))
diff --git a/examples/generif.scm b/examples/generif.scm
index 3b794fa..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"
@@ -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"
diff --git a/examples/genotype.scm b/examples/genotype.scm
index 4a91b63..f2ba75f 100755
--- a/examples/genotype.scm
+++ b/examples/genotype.scm
@@ -24,7 +24,7 @@
     (set skos:prefLabel (field Geno Name))
     (set skos:altLabel (field Geno Marker_Name))
     (set gnt:chr (field Geno Chr))
-    (set gnt:mb (annotate-field (field Geno Mb) '^^xsd:doubleg))
+    (set gnt:mb (annotate-field (field Geno Mb) '^^xsd:double))
     (set gnt:sequence (field Geno Sequence))
     (set gnt:source (field Geno Source))
     (set rdfs:comment (field Geno Comments))))
diff --git a/examples/ontology.scm b/examples/ontology.scm
index 724a75a..f2b54cc 100755
--- a/examples/ontology.scm
+++ b/examples/ontology.scm
@@ -269,4 +269,56 @@
       (triple 'gnt:source 'rdfs:label "Source")
       (triple 'gnt:source 'rdfs:domain 'gnc:marker)
       (triple 'gnt:source 'rdfs:range 'rdfs:Literal)
-      (triple 'gnt:source 'rdfs:subPropertyOf 'sdmx-measure:obsValue))))
+      (triple 'gnt:source 'rdfs:subPropertyOf 'sdmx-measure:obsValue)
+
+      ;; Probesets
+      (triple 'gnc:probeset 'a 'owl:Class)
+      (triple 'gnc:probeset 'a 'skos:Concept)
+      (triple 'gnc:probeset 'rdfs:label "A probeset")
+      (triple 'gnt:has_target_id 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_target_id 'rdfs:label "The target id for this probeset")
+      (triple 'gnt:has_target_id 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:symbol 'a 'owl:ObjectProperty)
+      (triple 'gnt:symbol 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:targets_region 'a 'owl:ObjectProperty)
+      (triple 'gnt:targets_region 'rdfs:label "The target region")
+      (triple 'gnt:targets_region 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:mb_mm8 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_specificity 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_specificity 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_blat_score 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_blat_score 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_blat_mb_start 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_blat_mb_start 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_blat_mb_end 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_blat_mb_end 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_blat_seq 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_blat_seq 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_target_seq 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_target_seq 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_homologene_id 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_homologene_id 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_uniprot_id 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_uniprot_id 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_pub_chem_id 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_pub_chem_id 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_kegg_id 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_kegg_id 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_omim_id 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_omim_id 'rdfs:domain 'gnc:probeset)
+      (triple 'gnt:has_chebi_id 'a 'owl:ObjectProperty)
+      (triple 'gnt:has_chebi_id 'rdfs:domain 'gnc:probeset)
+
+      ;; RIF
+      (triple 'gnc:gene_wiki_entry 'a 'rdfs:Class)
+      (triple 'gnc:gn_wiki_entry 'rdfs:subClassOf 'gnc:gene_wiki_entry)
+      (triple 'gnt:initial 'a 'owl:ObjectProperty)
+      (triple 'gnt:initial 'rdfs:domain 'gnc:gene_wiki_entry)
+      (triple 'gnt:initial 'skos:definition "Optional user or project code or your initials")
+      (triple 'gnt:reason 'a 'owl:ObjectProperty)
+      (triple 'gnt:reason 'rdfs:domain 'gnc:gene_wiki_entry)
+      (triple 'gnt:reason 'skos:definition "The reason why this resource was modified")
+      (triple 'gnc:gn_wiki_entry 'rdfs:comment "Represents GeneRIF Entries entered from GeneNetwork")
+      (triple 'gnt:gene_symbol 'rdfs:domain 'gnc:gn_wiki_entry)
+      (triple 'gnc:ncbi_wiki_entry 'rdfs:subClassOf 'gnc:gene_wiki_entry)
+      (triple 'gnc:ncbi_wiki_entry 'rdfs:comment "Represents GeneRIF Entries obtained from NCBI"))))
diff --git a/examples/phenotype.scm b/examples/phenotype.scm
index 834ff5a..c2564b6 100755
--- a/examples/phenotype.scm
+++ b/examples/phenotype.scm
@@ -84,13 +84,13 @@
     (set rdf:type 'gnc:phenotype_trait)
     (set gnt:has_strain (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_"))
     (set owl:equivalentClass
-         (field ("CONCAT(IFNULL(InbredSet.InbredSetCode, PublishXRef.InbredSetId), '_', PublishXRef.Id)"
-                 Phenotype)))
+         (field ("CONCAT(PublishFreeze.Name, '_', PublishXRef.Id)"
+                 PublishFreeze)))
     (set dcat:distribution
          (string->symbol
-          (format #f "gnd:~a"
+          (format #f "gnd:~a.json"
                   (field ("CONCAT(PublishFreeze.Name, '_', PublishXRef.Id)"
-                          Phenotype)))) )
+                          PublishFreeze)))) )
     (set dct:references
          (let ((pmid (field
                       ("IF(Publication.PubMed_ID IS NULL, '', CONVERT(Publication.PubMed_Id, INT))"
@@ -144,7 +144,7 @@
       ("gn:" "<http://rdf.genenetwork.org/v1/id/>")
       ("owl:" "<http://www.w3.org/2002/07/owl#>")
       ("gnc:" "<http://rdf.genenetwork.org/v1/category/>")
-      ("gnd:" "<https://cd.genenetwork.org/lmdb/v1/data/traits/>")
+      ("gnd:" "<https://cd.genenetwork.org/api3/lmdb/v1/data/traits/>")
       ("gnt:" "<http://rdf.genenetwork.org/v1/term/>")
       ("sdmx-measure:" "<http://purl.org/linked-data/sdmx/2009/measure#>")
       ("skos:" "<http://www.w3.org/2004/02/skos/core#>")