aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/dump-publication.scm43
-rwxr-xr-xexamples/dump-species-metadata.scm18
-rwxr-xr-xexamples/dump-tissue.scm4
3 files changed, 33 insertions, 32 deletions
diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm
index ff46d3d..6f349d6 100755
--- a/examples/dump-publication.scm
+++ b/examples/dump-publication.scm
@@ -21,15 +21,15 @@
(define-dump dump-publication
(tables (Publication))
(schema-triples
- (gn:pubMedId rdfs:range rdfs:Literal)
- (gn:title rdfs:range rdfs:Literal)
- (gn:journal rdfs:range rdfs:Literal)
- (gn:volume rdfs:range rdfs:Literal)
- (gn:pages rdfs:range rdfs:Literal)
- (gn:month rdfs:range rdfs:Literal)
- (gn:year rdfs:range rdfs:Literal)
- (gn:author rdfs:range rdfs:Literal)
- (gn:abstract rdfs:range rdfs:Literal))
+ (gn-term:pubMedId rdfs:range rdfs:Literal)
+ (gn-term:title rdfs:range rdfs:Literal)
+ (gn-term:journal rdfs:range rdfs:Literal)
+ (gn-term:volume rdfs:range rdfs:Literal)
+ (gn-term:pages rdfs:range rdfs:Literal)
+ (gn-term:month rdfs:range rdfs:Literal)
+ (gn-term:year rdfs:range rdfs:Literal)
+ (gn-term:author rdfs:range rdfs:Literal)
+ (gn-term:abstract rdfs:range rdfs:Literal))
(triples
(let ((pmid (field
("IF(Publication.PubMed_ID IS NULL, '', CONVERT(Publication.PubMed_Id, INT))"
@@ -40,18 +40,19 @@
(number->string publication-id))
(ontology 'publication: pmid)))
(set rdf:type 'gn:publication)
- (set gn:pubMedId (ontology 'pubmed: (field ("IFNULL(PubMed_ID, '')" pubmedId))))
- (set gn:title (delete-substrings (field Publication Title)
- "Unknown"))
- (set gn:journal (delete-substrings (field Publication Journal)
- "Unknown"))
- (set gn:volume (delete-substrings (field Publication Volume)
- "Unknown"))
- (set gn:pages (delete-substrings (field Publication Pages)
- "Unknown"))
- (set gn:month (delete-substrings (field Publication Month)
- "Unknown"))
- (set gn:year (field Publication Year))
+ (set gn-term:pubMedId
+ (ontology 'pubmed: (field ("IFNULL(PubMed_ID, '')" pubmedId))))
+ (set gn-term:title (delete-substrings (field Publication Title)
+ "Unknown"))
+ (set gn-term:journal (delete-substrings (field Publication Journal)
+ "Unknown"))
+ (set gn-term:volume (delete-substrings (field Publication Volume)
+ "Unknown"))
+ (set gn-term:pages (delete-substrings (field Publication Pages)
+ "Unknown"))
+ (set gn-term:month (delete-substrings (field Publication Month)
+ "Unknown"))
+ (set gn-term:year (field Publication Year))
(multiset gn:author
;; The authors field is a comma
;; separated list. Split it.
diff --git a/examples/dump-species-metadata.scm b/examples/dump-species-metadata.scm
index 48fd425..41d5847 100755
--- a/examples/dump-species-metadata.scm
+++ b/examples/dump-species-metadata.scm
@@ -29,7 +29,7 @@
(string->identifier "" (field Species FullName)
#:separator ""
#:proc string-capitalize-first)
- (set rdf:type 'gn-id:species)
+ (set rdf:type 'gn:species)
(set gn-term:name (field Species SpeciesName))
(set gn-term:displayName (field Species MenuName))
(set gn-term:binomialName (field Species FullName))
@@ -53,7 +53,7 @@
'pre "_" 'post)
#:separator ""
#:proc string-capitalize-first)
- (set rdf:type 'gn-id:strain)
+ (set rdf:type 'gn:strain)
(set gn-term:strainOfSpecies
(string->identifier "" (field Species FullName)
#:separator ""
@@ -68,7 +68,7 @@
(tables (MappingMethod))
(triples
(string->identifier "mappingMethod" (field MappingMethod Name))
- (set rdf:type 'gn-id:mappingMethod)))
+ (set rdf:type 'gn:mappingMethod)))
(define-dump dump-inbred-set
(tables (InbredSet
@@ -89,7 +89,7 @@
"" (field InbredSet Name)
#:separator ""
#:proc string-capitalize-first)
- (set rdf:type 'gn-id:inbredSet)
+ (set rdf:type 'gn:inbredSet)
(set gn-term:binomialName (field InbredSet FullName))
(set gn-term:geneticType (field InbredSet GeneticType))
(set gn-term:inbredFamily (field InbredSet Family))
@@ -97,7 +97,7 @@
(set gn-term:inbredSetCode (field InbredSet InbredSetCode))
(set gn-term:inbredSetOfSpecies
(string->identifier "" (field Species FullName BinomialName)
- #:ontology "gn-id:"
+ #:ontology "gn:"
#:separator ""
#:proc string-capitalize-first))
(set gn-term:genotype
@@ -112,7 +112,7 @@
(schema-triples
(gn-term:normalization rdfs:range rdfs:Literal))
(triples (string->identifier "avgmethod" (field AvgMethod Name))
- (set rdf:type 'gn-id:avgMethod)
+ (set rdf:type 'gn:avgMethod)
(set gn-term:normalization (field AvgMethod Normalization))))
@@ -122,9 +122,9 @@
(connection %connection-settings)
(table-metadata? #f)
(prefixes
- '(("gn-id:" "<http://genenetwork.org/terms/>")
- ("gn-term:" "<http://genenetwork.org/terms/>")
- ("rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>")
+ '(("gn:" "<http://genenetwork.org/id/>")
+ ("gn-term:" "<http://genenetwork.org/term/>")
+ ("rdf:" "<https://www.w3.org/1999/02/22-rdf-syntax-ns#>")
("rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>")
("taxon:" "<http://purl.uniprot.org/taxonomy/>")))
(inputs
diff --git a/examples/dump-tissue.scm b/examples/dump-tissue.scm
index 376129c..ff6792e 100755
--- a/examples/dump-tissue.scm
+++ b/examples/dump-tissue.scm
@@ -27,7 +27,7 @@
;; Hopefully the Short_Name field is distinct and can be used as an
;; identifier.
(triples (string->identifier "tissue" (field Tissue Short_Name))
- (set rdf:type 'gn-id:tissue)
+ (set rdf:type 'gn:tissue)
(set gn-term:name (field Tissue Name))))
@@ -37,7 +37,7 @@
(connection %connection-settings)
(table-metadata? #f)
(prefixes
- '(("gn-id:" "<http://genenetwork.org/terms/>")
+ '(("gn:" "<http://genenetwork.org/id/>")
("gn-term:" "<http://genenetwork.org/terms/>")
("rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>")
("rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>")))