From bf09c92f4b84a5037c02a72f6d8d05901dc1a234 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 30 Jul 2023 10:31:34 +0200 Subject: Remap identifiers --- examples/dump-species-metadata.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'examples/dump-species-metadata.scm') 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)) -- cgit v1.2.3