aboutsummaryrefslogtreecommitdiff
path: root/dump.scm
AgeCommit message (Collapse)Author
2023-04-05Update GeneRIF prefixMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Add species data to generif entriesMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Dump genewiki symbolMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Annotate gn:geneWikiEntry as a class and add a commentMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Dump species, symbols and indicate generif type when a geneid = 0Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Separate NCBI and GN wikientries in dumpMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Add dublin-core and uniprot prefixesMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Avoid prefixing 'pubmed: to an empty stringMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Delete generif file dumpMunyoki Kilyungi
* dump.scm (decode-html-entities, import-generif): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Refactor dump-generif-basic/dump-generif to dump-gn-genewiki-entriesMunyoki Kilyungi
* dump.scm (dump-generif, dump-generif-basic): Refactor to ... (dump-gn-genewiki-entries): ... this. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Redefine how genewiki is dumpedMunyoki Kilyungi
* dump.scm (dump-generif, dump-generif-basic): Replace with ... (dump-gn-genewiki-entries): ... this. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Split substring int a list of substrings delimited by substringMunyoki Kilyungi
* dump.scm (string-split-substring): New function. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Add new special form for representing blank nodesMunyoki Kilyungi
* dump.scm (blank-node): New macro. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Allow running raw queries in field formMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Make dumping metadata about a given table optional defaulting to #fMunyoki Kilyungi
* dump.scm (define-dump): Add optional table-metadata? flag thats #f by default. If this flag is #t, dump metadata about the SQL table itself. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Add "xsd:" and "owl:" prefixesMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Annotate fields with a custom scheme such as "^^xsd:datetime"Munyoki Kilyungi
* dump.scm (annotate-field): New function. * dump/triples.scm (triple): Print a string as they appear with DISPLAY should they contain "\"" thus enabling a triple that looks like: gn:species_mus_musculus gn:name "Mouse"^^xsd:string Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Dump GeneRIF wikidataMunyoki Kilyungi
* dump.scm (dump-generif-basic): Annotate createTime field with xsd. * dump.scm (dump-generif): New dump. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Add pubmed, taxon and generif prefixesMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-05Add ability to have operations such as GROUP_CONCAT in SELECT clauseMunyoki Kilyungi
This change enables having: "... GROUP_CONCAT(GeneRIF_BASIC.PubMedId) AS alias ..." as part of the query. * dump.scm (field->key, field->assoc-ref): Add new syntax-rule. * dump/sql.scm (select-query): Ditto. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-03-08Dump GeneWiki metadataMunyoki Kilyungi
* dump.scm (dump-generif): New data dump. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-03-06Dump relevant metadata about phenotypesMunyoki Kilyungi
* dump.scm (dump-publishfreeze, dump-published-phenotypes): New dumps. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-03-06Delete phenotype and publish_xref metadataMunyoki Kilyungi
* dump.scm (phenotype-id->id, dump-phenotype): Delete (dump-publish-xref): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-03-06Add mapping method and species info to inbredsets.Munyoki Kilyungi
* dump.scm (dump-inbred-set): Add mapping method and species as extra metadata for inbredsets. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-02-15Remove dump-case-attributesMunyoki Kilyungi
This information is already stored in LMDB. * dump.scm (dump-case-attributes): Delete. (main)(<dump-case-attributes>): Ditto. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2022-12-06Use InfoPageName as a dataset's name.Munyoki Kilyungi
* dump.scm (dump-info-files): Set a dataset's name to InfoPageName.
2022-11-04Add comment with URI to GeneRIF data.Arun Isaac
* dump.scm: Add comment with URI to GeneRIF data.
2022-11-04Unite importing GeneRIF with dumping SQL data.Arun Isaac
* README.md: Document generif-data-file parameter in connection settings. * dump.scm: Import (srfi srfi-171), (ice-9 regex) and (zlib). (decode-html-entities, import-generif): New functions. (main): Call import-generif. * import-generif.scm: Delete file.
2022-10-30Move triple utilities to new module.Arun Isaac
* dump.scm (string->identifier, string-blank?, triple, prefix): Move to ... * dump/triples.scm: ... new file. * dump.scm: Import (dump triples).
2022-10-30Move string-blank? to (dump utils).Arun Isaac
* dump.scm (string-blank?): Move to ... * dump/utils.scm (string-blank?): ... here.
2022-10-30Special case Yohan Bossé's last name.Arun Isaac
* dump.scm (dump-investigators): Special case Yohan Bossé's last name.
2022-10-30Do not deduplicate the AvgMethod table.Arun Isaac
The AvgMethod table no longer has duplicate "N/A" records. * dump.scm (dump-avg-method): Do not deduplicate the AvgMethod table.
2022-08-20Add gn:traitId and gn:publicationId.Munyoki Kilyungi
In GeneNetwork, a phenonytpe is currently identified by it's ID (primary key of the table from MariaDB). The only way to relate it to a publication is through a publication ID. This is important because there are some publications with a NULL value for "pubmed ID" and as such without the publication ID, some data is lost as there's no way to point to publication with a NULL "pubmed ID." * dump.scm (dump-publish-xref): Define gn:traitId and gn:publicationId. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2022-06-24Delete vertical tab character in publication abstracts.Arun Isaac
* dump.scm (dump-publication): Delete vertical tab character in abstracts.
2022-06-23Dump groups.BonfaceKilz
* dump.scm (dump-groups): New dump. (main): Call dump-groups. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2022-06-23Dump case-attributes.BonfaceKilz
* dump.scm (dump-case-attributes): New dump. (main): Call dump-case-attributes. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2022-06-23Remove "." if it occurs at the end of a turtle identifier.BonfaceKilz
A "." at the end of a turtle identifier---for example "gn:caseAttribute_ethn."---generates an error when trying to validate the generated RDF. * dump.scm (string->identifier): Remove trailing "." if it occurs in the identifier. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2022-05-05Prefix SQL connection parameters with sql-.Arun Isaac
This differentiates it from virtuoso and SPARQL connection parameters. * dump.scm (call-with-genenetwork-database, dump-data-table): Prefix SQL connection parameters with sql-. * README.md (Using): Update documentation of SQL connection parameters.
2022-05-04Special case investigator ID for "Yohan Bossé".Arun Isaac
* dump.scm (investigator-attributes->id): Add special case for investigator "Yohan Bossé".
2022-03-10Ignore 0th command-line argument.Arun Isaac
* dump.scm (%connection-settings): Use 1th command-line argument. (%dump-directory): Use 2th command-line argument.
2022-03-10Accept connection parameters and dump directory as arguments.Arun Isaac
* dump.scm: Import (rnrs programs). (%connection-settings): New variable. (call-with-database): Use %connection-settings. (%database-name): Delete variable. (%dump-directory): Set from command-line arguments. (dump-data-table): Use %connection-settings instead of %database-name. * README.org (Using): Add command-line arguments to usage instructions.
2022-01-04Eval macro helper functions at macro expansion time.Arun Isaac
If these macro helper functions are not evaluated at macro expansion time, the dependent macros will fail to compile. * dump.scm (string->identifier, field->key, field->assoc-ref, collect-fields, find-clause, remove-namespace, column-id, dump-id): Eval at macro expansion time.
2021-12-24Do not add to load path in script.Arun Isaac
* dump.scm: Do not add to load path.
2021-12-24Document define-dump.Arun Isaac
* dump.scm (define-dump): Add docstring.
2021-12-24Introduce syntax-let abstraction.Arun Isaac
* dump.scm (syntax-let): New macro. (define-dump): Use syntax-let. * .dir-locals.el (scheme-mode): Indent syntax-let correctly.
2021-12-23Automatically create domain triples for predicates.Arun Isaac
* dump.scm (define-dump): Automatically create domain triples for predicates.
2021-12-23Dump metadata about the dump itself.Arun Isaac
* dump.scm (remove-namespace, dump-id): New functions. (define-dump): Dump metadata about the dump itself.
2021-12-23Disambiguate user and User tables in RDF identifier.Arun Isaac
* dump.scm (dump-schema, column-id): Disambiguate user and User tables in RDF identifier.
2021-12-23Abstract column id generation to separate function.Arun Isaac
* dump.scm (column-id): New function. (dump-schema): Use column-id.
2021-12-23Do not register dumped tables and columns to %dumped.Arun Isaac
* dump.scm (%dumped): Delete variable. (define-dump): Do not register dumped tables and columns to %dumped. (dumped-table?): Delete function.