From 3bb162de45b85a36a2a869df58c2f921153bab74 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 11 Sep 2023 14:00:36 +0300 Subject: Update generif metadata dump. Signed-off-by: Munyoki Kilyungi --- examples/generif.scm | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'examples') diff --git a/examples/generif.scm b/examples/generif.scm index 83f8632..b8f81a1 100755 --- a/examples/generif.scm +++ b/examples/generif.scm @@ -152,34 +152,38 @@ (string->identifier "symbol" (regexp-substitute/global #f "[^A-Za-z0-9:]" - (field GeneRIF_BASIC symbol) + (field GeneRIF_BASIC symbol GeneRIFSymbol) 'pre "_" 'post) #:proc (lambda (x) x)) (set rdfs:comment - (let* ([ncbi-comment (field GeneRIF_BASIC comment)] - [species - (string->identifier - "" - (remap-species-identifiers (field Species Fullname)) - #:separator "" - #:proc string-capitalize-first)] - [taxonomic-id (field GeneRIF_BASIC TaxID)] - [create-time (field GeneRIF_BASIC createtime EntryCreateTime)] - [pmid (field GeneRIF_BASIC PubMed_ID PMID)]) + (let ([ncbi-comment (sanitize-rdf-string (field GeneRIF_BASIC comment))] + [species-name + (string->identifier + "" + (remap-species-identifiers (field Species Fullname SpeciesFullName)) + #:separator "" + #:proc string-capitalize-first)] + [taxonomic-id (field GeneRIF_BASIC TaxID TaxonomicId)] + [create-time (field GeneRIF_BASIC createtime EntryCreateTime)] + [pmid (field GeneRIF_BASIC PubMed_ID PMID)] + [gene-id (field GeneRIF_BASIC GeneId)] + [version-id (field GeneRIF_BASIC VersionId)]) (string->symbol (string-append "[ " (format #f "rdf:type gnc:NCBIWikiEntry ; ") + (format #f "rdfs:comment ~s^^xsd:string ; " + ncbi-comment) (format #f "xkos:classifiedUnder ~a ; " - species) + species-name) (if (eq? #f taxonomic-id) "" (format #f "skos:notation taxon:~a ; " - (field GeneRIF_BASIC TaxID))) + taxonomic-id)) (format #f "gnt:hasGeneId generif:~a ; " - (field GeneRIF_BASIC GeneId)) + gene-id) (format #f "gnt:hasVersionId '~a'^^xsd:integer ; " - (field GeneRIF_BASIC VersionId)) + version-id) (if (and (string? pmid) (not (string-null? pmid))) (format #f "~{dct:references pubmed:~a ; ~}" -- cgit v1.2.3