diff options
| author | Munyoki Kilyungi | 2025-12-23 12:06:06 +0300 |
|---|---|---|
| committer | Munyoki Kilyungi | 2026-01-13 12:02:49 +0300 |
| commit | 1ca7e679b834ccaf53a3243d0e1c2f3f9e8d56d8 (patch) | |
| tree | 514c544706986f3edd0b3f53a89113e334a0b9a3 /examples/genbank.scm | |
| parent | c42933e8f474d8d14eac387d5a94da6f52210629 (diff) | |
| download | gn-transform-databases-1ca7e679b834ccaf53a3243d0e1c2f3f9e8d56d8.tar.gz | |
Snake case gn/gnt/gnc identifiers.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/genbank.scm')
| -rwxr-xr-x | examples/genbank.scm | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/examples/genbank.scm b/examples/genbank.scm index c83643c..7aae5ba 100755 --- a/examples/genbank.scm +++ b/examples/genbank.scm @@ -14,30 +14,20 @@ -(define (remap-species-identifiers str) - "This procedure remaps identifiers to standard binominal. Obviously this should - be sorted by correcting the database!" - (match str - ["Fly (Drosophila melanogaster dm6)" "Drosophila melanogaster"] - ["Oryzias latipes (Japanese medaka)" "Oryzias latipes"] - ["Macaca mulatta" "Macaca nemestrina"] - ["Bat (Glossophaga soricina)" "Glossophaga soricina"] - [str str])) - (define-transformer genbank (tables (Genbank (left-join Species "USING (SpeciesId)"))) (schema-triples (gnc:nucleotide a skos:Concept) - (gnt:hasSequence rdfs:domain gnc:nucleotide)) + (gnt:has_sequence rdfs:domain gnc:nucleotide)) (triples (ontology 'genbank: (field Genbank Id)) - (set gnt:hasSequence (field Genbank Sequence)) - (set gnt:belongsToSpecies + (set gnt:has_sequence (field Genbank Sequence)) + (set gnt:belongs_to_species (string->identifier "" (remap-species-identifiers (field Species Fullname)) - #:separator "" - #:proc string-capitalize-first)))) + #:separator "_" + #:proc string-downcase)))) |
