aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-09-09 15:13:59 +0530
committerArun Isaac2021-09-09 15:15:12 +0530
commitcd8d049342d88bd0eb4c0958816170204c9350c2 (patch)
tree44b868ee1af6959c4f4a59168981f9f4ef4ff257
parentb6cb5c4d2c64781122223d4ee100a0d6f3dd03b9 (diff)
downloadgn-transform-databases-cd8d049342d88bd0eb4c0958816170204c9350c2.tar.gz
Abstract out prefix entries.
* dump.scm (prefix): New function. Use prefix.
-rwxr-xr-xdump.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/dump.scm b/dump.scm
index 596a188..7730f82 100755
--- a/dump.scm
+++ b/dump.scm
@@ -302,13 +302,17 @@ INNER JOIN InbredSet USING (InbredSetId)"))
data-field table-name))
(close-port port)))
+(define (prefix prefix iri)
+ (format #t "@prefix ~a ~a .~%" prefix iri))
+
(call-with-genenetwork-database
(lambda (db)
(with-output-to-file (string-append %dump-directory "/dump.ttl")
(lambda ()
- (format #t "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .~%")
- (format #t "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .~%")
- (format #t "@prefix gn: <https://genenetwork.org/> .~%~%")
+ (prefix "rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>")
+ (prefix "rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>")
+ (prefix "gn:" "<https://genenetwork.org/>")
+ (newline)
(dump-species db)
(dump-strain db)
(dump-mapping-method db)