From 241cf2eef260a1c02434bae945645c9f3befaa7e Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 30 Jul 2023 04:13:02 -0500 Subject: Remap identifiers --- examples/dump-species-metadata.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/dump-species-metadata.scm b/examples/dump-species-metadata.scm index 3a6a6af..5c3d431 100755 --- a/examples/dump-species-metadata.scm +++ b/examples/dump-species-metadata.scm @@ -20,11 +20,12 @@ (define (remap-species-identifiers str) "This procedure remaps identifiers to standard binominal. Obviously this should - be sorted in a different way!" + be sorted by correcting the database!" (match str - ["Fly (Drosophila melanogaster, dm6)" "Drosophila melanogaster"] + ["Fly (Drosophila melanogaster dm6)" "Drosophila melanogaster"] ["Oryzias latipes (Japanese medaka)" "Oryzias latipes"] ["Monkey (Macaca nemestrina)" "Macaca nemestrina"] + ["Bat (Glossophaga soricina)" "Glossophaga soricina"] [str str])) (define-dump dump-species @@ -41,7 +42,7 @@ (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)) + (set gn-term:binomialName (remap-species-identifiers (field Species FullName))) (set gn-term:family (field Species Family)) (set gn-term:organism (ontology 'taxon: (field Species TaxonomyId))))) @@ -64,7 +65,7 @@ #:proc string-capitalize-first) (set rdf:type 'gn:strain) (set gn-term:strainOfSpecies - (string->identifier "" (field Species FullName) + (string->identifier "" (remap-species-identifiers (field Species FullName)) #:separator "" #:proc string-capitalize-first)) ;; Name, and maybe a second name @@ -140,7 +141,8 @@ (list dump-species dump-strain dump-mapping-method - dump-avg-method)) + dump-avg-method + )) (outputs '(#:documentation "./docs/dump-species-metadata.md" #:rdf "./verified-data/dump-species-metadata.ttl"))) -- cgit v1.2.3