aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-12-15 21:31:43 +0300
committerMunyoki Kilyungi2023-12-15 21:32:19 +0300
commit56d09222742cbff7767ff5ff9e794b81101ef7a7 (patch)
treeebd4aae64c79ed250566dc16e7ef97a03d9121e3 /examples
parent8ef04f4a3a1696fa976945f4977aee749a8cfdbc (diff)
downloadgn-transform-databases-56d09222742cbff7767ff5ff9e794b81101ef7a7.tar.gz
Refactor Uniprot and GeneId handling in ProbeSet RDF transform.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/probeset.scm23
1 files changed, 9 insertions, 14 deletions
diff --git a/examples/probeset.scm b/examples/probeset.scm
index 7775aa6..7a304ab 100755
--- a/examples/probeset.scm
+++ b/examples/probeset.scm
@@ -3,6 +3,7 @@
(use-modules (srfi srfi-1)
(srfi srfi-26)
+ (ice-9 format)
(ice-9 getopt-long)
(ice-9 match)
(ice-9 regex)
@@ -23,9 +24,9 @@
(gnc:homologeneLink rdfs:Class gnc:ResourceLink)
(gnc:homologeneLink rdfs:label "HomoloGene")
(gnc:homologeneLink rdfs:comments "Find similar genes in other species")
- (gnc:uniprotLink rdfs:Class gnc:ResourceLink)
- (gnc:uniprotLink rdfs:label "UniProt")
- (gnc:uniprotLink rdfs:comments "UniProt")
+ (gnc:uniprot a owl:ObjectProperty)
+ (gnc:uniprot rdfs:label "UniProt")
+ (gnc:uniprot rdfs:comments "UniProt resource")
(gnt:hasChip a owl:ObjectProperty)
(gnt:hasChip rdfs:domain gnc:Probeset)
(gnt:hasTargetId a owl:ObjectProperty)
@@ -114,6 +115,9 @@
((string=? "-" strand-probe)
" on the minus strand")
(else "")))))))
+ (set dct:references
+ (ontology 'gene:
+ (string-trim-both (field ProbeSet GeneId))))
;; OMIM Link
(set dct:references
(let ((omim (field ProbeSet OMIM)))
@@ -136,17 +140,8 @@
homologene
"a gnc:homologeneLink"))
"")))
- ;; UniProt Link
- (set dct:references
- (let ((uniprot (field ProbeSet UniProtID)))
- (if (not (string-blank? uniprot))
- (string->symbol
- (format #f
- "<~0@*~a~1@*~a> .~%<~0@*~a~1@*~a> ~2@*~a"
- "https://www.uniprot.org/uniprot/"
- uniprot
- "a gnc:uniprotLink"))
- "")))
+ (set gnt:uniprot
+ (ontology 'uniprot: (field ProbeSet UniProtID)))
(set gnt:strandProbe
(field ProbeSet Strand_Probe))
(set gnt:hasSpecificity