From 63c1af8d4e855979bec53e716dd046df44c956bc Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 27 Jan 2026 16:42:43 +0300 Subject: Rename tissue.scm -> molecular-traits.scm. Signed-off-by: Munyoki Kilyungi --- examples/molecular-traits.scm | 63 +++++++++++++++++++++++++++++++++++++++++++ examples/tissue.scm | 56 -------------------------------------- 2 files changed, 63 insertions(+), 56 deletions(-) create mode 100755 examples/molecular-traits.scm delete mode 100755 examples/tissue.scm (limited to 'examples') diff --git a/examples/molecular-traits.scm b/examples/molecular-traits.scm new file mode 100755 index 0000000..737c0b0 --- /dev/null +++ b/examples/molecular-traits.scm @@ -0,0 +1,63 @@ +#! /usr/bin/env guile +!# + +(use-modules (srfi srfi-1) + (srfi srfi-26) + (ice-9 getopt-long) + (ice-9 match) + (ice-9 regex) + (transform strings) + (transform sql) + (transform triples) + (transform special-forms)) + + +(define-transformer tissue + ;; The Name and TissueName fields seem to be identical. BIRN_lex_ID + ;; and BIRN_lex_Name are mostly NULL. + (tables (Tissue)) + (schema-triples + (gnc:tissue a owl:Class) + (gnc:tissue rdfs:subClassOf obo:UBERON_0000479) ; Anatomical Entity + (gnc:tissue rdfs:label "Tissue (GN)") + (gnt:has_tissue rdf:type owl:ObjectProperty) + (gnt:has_tissue rdfs:domain gnc:molecular_traits) + (gnt:has_tissue rdfs:range gnc:tissue) + (gnt:has_tissue rdfs:label "has tissue")) + (triples (string->identifier "tissue" (field Tissue Short_Name) + #:separator "_") + (set rdf:type 'gnc:tissue) + (set rdfs:label (field Tissue Name)))) + + + +(let* ((option-spec + '((settings (single-char #\s) (value #t)) + (output (single-char #\o) (value #t)) + (documentation (single-char #\d) (value #t)))) + (options (getopt-long (command-line) option-spec)) + (settings (option-ref options 'settings #f)) + (output (option-ref options 'output #f)) + (documentation (option-ref options 'documentation #f)) + (%connection-settings + (call-with-input-file settings + read))) + (with-documentation + (name "Tissue Metadata") + (connection %connection-settings) + (table-metadata? #f) + (prefixes + '(("gn:" "") + ("obo:" "") + ("owl:" "") + ("gnt:" "") + ("skos:" "") + ("gnc:" "") + ("rdf:" "") + ("rdfs:" ""))) + (inputs + (list tissue)) + (outputs + `(#:documentation ,documentation + #:rdf ,output)))) +;; http://purl.obolibrary.org/obo/UBERON_0000479 diff --git a/examples/tissue.scm b/examples/tissue.scm deleted file mode 100755 index 82cc226..0000000 --- a/examples/tissue.scm +++ /dev/null @@ -1,56 +0,0 @@ -#! /usr/bin/env guile -!# - -(use-modules (srfi srfi-1) - (srfi srfi-26) - (ice-9 getopt-long) - (ice-9 match) - (ice-9 regex) - (transform strings) - (transform sql) - (transform triples) - (transform special-forms)) - - -(define-transformer tissue - ;; The Name and TissueName fields seem to be identical. BIRN_lex_ID - ;; and BIRN_lex_Name are mostly NULL. - (tables (Tissue)) - (schema-triples - (gnc:tissue a skos:Concept)) - ;; Hopefully the Short_Name field is distinct and can be used as an - ;; identifier. - (triples (string->identifier "tissue" (field Tissue Short_Name) - #:separator "_") - (set rdf:type 'gnc:tissue) - (set rdfs:label (field Tissue Name)))) - - - -(let* ((option-spec - '((settings (single-char #\s) (value #t)) - (output (single-char #\o) (value #t)) - (documentation (single-char #\d) (value #t)))) - (options (getopt-long (command-line) option-spec)) - (settings (option-ref options 'settings #f)) - (output (option-ref options 'output #f)) - (documentation (option-ref options 'documentation #f)) - (%connection-settings - (call-with-input-file settings - read))) - (with-documentation - (name "Tissue Metadata") - (connection %connection-settings) - (table-metadata? #f) - (prefixes - '(("gn:" "") - ("gnt:" "") - ("skos:" "") - ("gnc:" "") - ("rdf:" "") - ("rdfs:" ""))) - (inputs - (list tissue)) - (outputs - `(#:documentation ,documentation - #:rdf ,output)))) -- cgit 1.4.1