From 56d09222742cbff7767ff5ff9e794b81101ef7a7 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Fri, 15 Dec 2023 21:31:43 +0300 Subject: Refactor Uniprot and GeneId handling in ProbeSet RDF transform. Signed-off-by: Munyoki Kilyungi --- examples/probeset.scm | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'examples') 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 -- cgit v1.2.3