diff options
author | Arun Isaac | 2021-09-09 15:13:59 +0530 |
---|---|---|
committer | Arun Isaac | 2021-09-09 15:15:12 +0530 |
commit | cd8d049342d88bd0eb4c0958816170204c9350c2 (patch) | |
tree | 44b868ee1af6959c4f4a59168981f9f4ef4ff257 | |
parent | b6cb5c4d2c64781122223d4ee100a0d6f3dd03b9 (diff) | |
download | gn-transform-databases-cd8d049342d88bd0eb4c0958816170204c9350c2.tar.gz |
Abstract out prefix entries.
* dump.scm (prefix): New function.
Use prefix.
-rwxr-xr-x | dump.scm | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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) |