diff options
author | Munyoki Kilyungi | 2023-12-13 16:31:35 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2023-12-14 00:55:53 +0300 |
commit | 1082c5bfb802995be5e6626f7281555013d824b8 (patch) | |
tree | f0298d5fde0ad3947ba9eb480b8237df0f843180 /examples | |
parent | 533c8d85809beee493f9e2d99870575fbece3c08 (diff) | |
download | gn-transform-databases-1082c5bfb802995be5e6626f7281555013d824b8.tar.gz |
Refactor symbol identifier in strains.scm.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/strains.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/strains.scm b/examples/strains.scm index c22a8fc..4e62b49 100755 --- a/examples/strains.scm +++ b/examples/strains.scm @@ -86,7 +86,11 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used. (set rdfs:label (sanitize-rdf-string (field Strain Name))) (set skos:altLabel (sanitize-rdf-string (field ("IF ((Strain.Name2 != Strain.Name), Strain.Name2, '')" Name2)))) (set gnt:alias (sanitize-rdf-string (field ("IF ((Strain.Alias != Strain.Name), Strain.Alias, '')" Alias)))) - (set gnt:symbol (field ("IF ((Strain.Symbol != Strain.Name), Strain.Symbol, '')" Symbol))))) + (set gnt:symbol + (string->identifier + "gene" (regexp-substitute/global #f "[^A-Za-z0-9:]" + (field Strain Symbol) + 'pre "_" 'post))))) (define-transformer mapping-method (tables (MappingMethod)) |