diff options
author | Munyoki Kilyungi | 2023-07-19 14:28:15 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2023-07-21 14:36:41 +0300 |
commit | ddb909bbe6ee37eb19e5c161a6ceb8eabe88561c (patch) | |
tree | f48d05de98a5c58a998ab571daf44c6cb7834193 | |
parent | 1d38755284196e62b2b16eda9cfaecd20e0c9a42 (diff) | |
download | gn-transform-databases-ddb909bbe6ee37eb19e5c161a6ceb8eabe88561c.tar.gz |
Rename 'gn-id' prefix to 'gn'
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r-- | dump/triples.scm | 2 | ||||
-rwxr-xr-x | examples/dump-publication.scm | 43 | ||||
-rwxr-xr-x | examples/dump-species-metadata.scm | 18 | ||||
-rwxr-xr-x | examples/dump-tissue.scm | 4 |
4 files changed, 34 insertions, 33 deletions
diff --git a/dump/triples.scm b/dump/triples.scm index c168f3e..2b43d68 100644 --- a/dump/triples.scm +++ b/dump/triples.scm @@ -23,7 +23,7 @@ (define* (string->identifier prefix str #:optional #:key - (ontology "gn-id:") + (ontology "gn:") (separator "_") (proc string-downcase)) "Convert STR to a turtle identifier after replacing illegal 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#>"))) |