diff options
author | Pjotr Prins | 2023-07-30 10:31:34 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-07-30 10:31:34 +0200 |
commit | bf09c92f4b84a5037c02a72f6d8d05901dc1a234 (patch) | |
tree | 4351189bb50514d68efd0ffdeee167c803159db7 /examples | |
parent | 9f332ce32738292c082b1cf41995457259be7625 (diff) | |
download | gn-transform-databases-bf09c92f4b84a5037c02a72f6d8d05901dc1a234.tar.gz |
Remap identifiers
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/dump-species-metadata.scm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/examples/dump-species-metadata.scm b/examples/dump-species-metadata.scm index 41d5847..3a6a6af 100755 --- a/examples/dump-species-metadata.scm +++ b/examples/dump-species-metadata.scm @@ -18,6 +18,15 @@ +(define (remap-species-identifiers str) + "This procedure remaps identifiers to standard binominal. Obviously this should + be sorted in a different way!" + (match str + ["Fly (Drosophila melanogaster, dm6)" "Drosophila melanogaster"] + ["Oryzias latipes (Japanese medaka)" "Oryzias latipes"] + ["Monkey (Macaca nemestrina)" "Macaca nemestrina"] + [str str])) + (define-dump dump-species (tables (Species)) (schema-triples @@ -26,9 +35,9 @@ (gn-term:binomialName rdfs:range rdfs:Literal) (gn-term:family rdfs:range rdfs:Literal)) (triples - (string->identifier "" (field Species FullName) - #:separator "" - #:proc string-capitalize-first) + (string->identifier "" (remap-species-identifiers (field Species Fullname)) + #:separator "" + #:proc string-capitalize-first) (set rdf:type 'gn:species) (set gn-term:name (field Species SpeciesName)) (set gn-term:displayName (field Species MenuName)) |