diff options
author | Pjotr Prins | 2023-07-30 04:13:02 -0500 |
---|---|---|
committer | Pjotr Prins | 2023-07-30 04:13:02 -0500 |
commit | 241cf2eef260a1c02434bae945645c9f3befaa7e (patch) | |
tree | baf33840a4dd7900e47b32f98030a1d67af9c905 /examples/dump-species-metadata.scm | |
parent | 26f7ccd7183f6c3eb753d43c365497426d2fec55 (diff) | |
download | gn-transform-databases-241cf2eef260a1c02434bae945645c9f3befaa7e.tar.gz |
Remap identifiers
Diffstat (limited to 'examples/dump-species-metadata.scm')
-rwxr-xr-x | examples/dump-species-metadata.scm | 12 |
1 files changed, 7 insertions, 5 deletions
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"))) |