From 1514f919130a06b3b943847745aca86fb90a2bcd Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 21 Nov 2023 16:03:26 +0300 Subject: Add extra gnt:location term when transforming ProbeSet metadata. Signed-off-by: Munyoki Kilyungi --- examples/probeset.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/examples/probeset.scm b/examples/probeset.scm index 9e41781..e01fe84 100755 --- a/examples/probeset.scm +++ b/examples/probeset.scm @@ -20,6 +20,8 @@ (gnt:hasTargetId a owl:ObjectProperty) (gnt:hasTargetId rdfs:domain gnc:Probeset) (gnt:symbol rdfs:domain gnc:Probeset) + (gnt:location rdfs:domain gnc:ProbeSet) + (gnt:location a owl:ObjectProperty) (gnt:strandPosition rdfs:domain gnc:ProbeSet) (gnt:strandPosition a owl:ObjectProperty) (gnt:targetsRegion a owl:ObjectProperty) @@ -81,6 +83,34 @@ Probe_set_target_region)))) (set gnt:chr (field ProbeSet Chr)) (set gnt:mb (annotate-field (field ("IFNULL(ProbeSet.Mb, '')" Mb)) '^^xsd:double)) + (set gnt:location + (let* ((mb (field ProbeSet Mb)) + (chr (field ProbeSet Chr)) + (strand-probe (field ProbeSet Strand_Probe)) + (location (list chr mb))) + (match location + (("Un" mb) + (format #f "Not available")) + ((chr "") + (format #f "Chr ~a @ Unknown position ~a~:[~;~a~]" + chr mb + (and (string? strand-probe) (or (string=? "+" strand-probe) + (string=? "-" strand-probe))) + (cond ((string=? "+" strand-probe) + " on the plus strand") + ((string=? "-" strand-probe) + " on the minus strand") + (else "")))) + (_ + (format #f "Chr ~a @ ~a~:[~;~a~]" + chr mb + (and (string? strand-probe) (or (string=? "+" strand-probe) + (string=? "-" strand-probe))) + (cond ((string=? "+" strand-probe) + " on the plus strand") + ((string=? "-" strand-probe) + " on the minus strand") + (else ""))))))) (set gnt:strandProbe (field ProbeSet Strand_Probe)) (set gnt:hasSpecificity -- cgit v1.2.3