aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-11-30 16:07:44 +0300
committerMunyoki Kilyungi2023-11-30 16:07:44 +0300
commitabe23c624c6604026bb7140909e2ce0c919d3f52 (patch)
treef063391ed9c658368b6d790ed4ff6856e8aa6251 /examples
parenta850acb21152106a5c9351ee414c5f745998766e (diff)
downloadgn-transform-databases-abe23c624c6604026bb7140909e2ce0c919d3f52.tar.gz
Set a phenotype's gnt:locus to a genotype.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/phenotype.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/phenotype.scm b/examples/phenotype.scm
index 8263ca9..91cc624 100755
--- a/examples/phenotype.scm
+++ b/examples/phenotype.scm
@@ -82,7 +82,15 @@
#\,))
(set gnt:mean (annotate-field (field ("IFNULL(PublishXRef.mean, '')" mean))
'^^xsd:double))
- (set gnt:locus (field PublishXRef Locus))
+ (set gnt:locus
+ (string->identifier
+ ""
+ (regexp-substitute/global
+ #f "[^A-Za-z0-9:]"
+ (sanitize-rdf-string (field PublishXRef Locus))
+ 'pre "_" 'post)
+ #:separator ""
+ #:proc string-capitalize-first))
(set gnt:lodScore (annotate-field
(field ("IFNULL((PublishXRef.LRS/4.604), '')" lrs))
'^^xsd:double))