diff options
author | Munyoki Kilyungi | 2023-11-21 16:03:26 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2023-11-21 16:04:01 +0300 |
commit | 1514f919130a06b3b943847745aca86fb90a2bcd (patch) | |
tree | 4b3cfe59ce91af89011429068f25dc4d49c3eb59 | |
parent | f7befaaaef51e3c166ece5e646f22ade85e4778e (diff) | |
download | gn-transform-databases-1514f919130a06b3b943847745aca86fb90a2bcd.tar.gz |
Add extra gnt:location term when transforming ProbeSet metadata.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-x | examples/probeset.scm | 30 |
1 files changed, 30 insertions, 0 deletions
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 |