diff options
author | Munyoki Kilyungi | 2023-07-17 23:03:21 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-07-30 12:29:56 +0300 |
commit | 47a4af4abad4f872db2832adb61f0bc60ac0ee5a (patch) | |
tree | 5608b82bf7228d53734dcfe6f74410ef81fc1a37 /examples/dump-publication.scm | |
parent | 3494fa35f332e0da6e4d2c76eac0a286fa4f5646 (diff) | |
download | gn-transform-databases-47a4af4abad4f872db2832adb61f0bc60ac0ee5a.tar.gz |
Dump publication metadata with documentation
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/dump-publication.scm')
-rwxr-xr-x | examples/dump-publication.scm | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm index 784d815..ff46d3d 100755 --- a/examples/dump-publication.scm +++ b/examples/dump-publication.scm @@ -13,11 +13,8 @@ (define %connection-settings - (call-with-input-file (list-ref (command-line) 1) - read)) - -(define %dump-directory - (list-ref (command-line) 2)) + (call-with-input-file (list-ref (command-line) 1) + read)) @@ -65,32 +62,18 @@ -(call-with-target-database - %connection-settings - (lambda (db) - (with-output-to-file (string-append %dump-directory "dump-publication.ttl") - (lambda () - (prefix "chebi:" "<http://purl.obolibrary.org/obo/CHEBI_>") - (prefix "dct:" "<http://purl.org/dc/terms/>") - (prefix "foaf:" "<http://xmlns.com/foaf/0.1/>") - (prefix "generif:" "<http://www.ncbi.nlm.nih.gov/gene?cmd=Retrieve&dopt=Graphics&list_uids=>") - (prefix "gn:" "<http://genenetwork.org/>") - (prefix "hgnc:" "<http://bio2rdf.org/hgnc:>") - (prefix "homologene:" "<https://bio2rdf.org/homologene:>") - (prefix "kegg:" "<http://bio2rdf.org/ns/kegg#>") - (prefix "molecularTrait:" "<http://genenetwork.org/molecular-trait/>") - (prefix "nuccore:" "<https://www.ncbi.nlm.nih.gov/nuccore/>") - (prefix "omim:" "<https://www.omim.org/entry/>") - (prefix "owl:" "<http://www.w3.org/2002/07/owl#>") - (prefix "phenotype:" "<http://genenetwork.org/phenotype/>") - (prefix "pubchem:" "<https://pubchem.ncbi.nlm.nih.gov/>") - (prefix "pubmed:" "<http://rdf.ncbi.nlm.nih.gov/pubmed/>") - (prefix "rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>") - (prefix "rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>") - (prefix "uniprot:" "<http://purl.uniprot.org/uniprot/>") - (prefix "up:" "<http://purl.uniprot.org/core/>") - (prefix "xsd:" "<http://www.w3.org/2001/XMLSchema#>") - (prefix "publication:" "<http://genenetwork.org/publication/>") - (newline) - (dump-publication db)) - #:encoding "utf8"))) +(dump-with-documentation + (name "Publications Metadata") + (connection %connection-settings) + (table-metadata? #f) + (prefixes + (("rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>") + ("rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>") + ("gn:" "<http://genenetwork.org/terms/>") + ("publication:" "<http://genenetwork.org/publication/>") + ("pubmed:" "<http://rdf.ncbi.nlm.nih.gov/pubmed/>"))) + (inputs + (dump-publication)) + (outputs + (#:documentation "./docs/dump-publication.md" + #:rdf "./verified-data/dump-publication.md"))) |