diff options
author | Munyoki Kilyungi | 2023-04-05 13:14:42 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-04-05 16:17:11 +0300 |
commit | 9ff701aa5d9e85fc498300a92b621b9b10550c25 (patch) | |
tree | 70b502f5379dc716e2f34837154fa39e45653ac7 | |
parent | a213a1689d88e72a1f57c36aac1550fe7b0a3977 (diff) | |
download | gn-transform-databases-9ff701aa5d9e85fc498300a92b621b9b10550c25.tar.gz |
Add species data to generif entries
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-x | dump.scm | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -860,14 +860,20 @@ is a <table> object." (set gn:species (field Species Name)))) (define-dump dump-genewiki-symbols - (tables (GeneRIF_BASIC) - "GeneRIF_BASIC GROUP BY GeneId ORDER BY BINARY symbol") + (tables (GeneRIF_BASIC + (left-join Species "USING (SpeciesId)")) + "GROUP BY GeneId ORDER BY BINARY symbol") (schema-triples (gn:symbol rdfs:domain gn:geneWikiEntry) + (gn:wikiEntryOfSpecies rdfs:range gn:species) (gn:taxid rdfs:domain gn:geneWikiEntry)) (triples (ontology 'generif: (field GeneRIF_BASIC GeneId)) (multiset gn:symbol (string-split (field ("GROUP_CONCAT(DISTINCT symbol)" symbol)) #\,)) + (multiset gn:wikiEntryOfSpecies + (string-split + (field ("GROUP_CONCAT(DISTINCT Species.SpeciesName)" species)) + #\,)) (multiset gn:taxId (map (cut ontology 'taxon: <>) (string-split (field ("GROUP_CONCAT(DISTINCT TaxID)" taxId)) #\,))))) @@ -896,9 +902,9 @@ is a <table> object." (set rdf:type (if (eq? (field GeneRIF_BASIC GeneId) 0) 'gn:geneWikiEntry "")) - (set gn:species (if (eq? (field GeneRIF_BASIC GeneId) 0) - (field Species SpeciesName) - "")) + (set gn:wikiEntryOfSpecies (if (eq? (field GeneRIF_BASIC GeneId) 0) + (field Species SpeciesName) + "")) ;; This only dumps symbols not present in the GeneRIF_BASIC table (set gn:symbol (let ([geneid (field GeneRIF_BASIC GeneId)]) (if (eq? geneid 0) |