From 145c06b8e6abf8e9571660def1502822269a5f57 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 22 Jun 2022 13:10:47 +0300 Subject: Dump groups. * dump.scm (dump-groups): New dump. (main): Call dump-groups. Signed-off-by: Arun Isaac --- dump.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dump.scm b/dump.scm index c81ee99..40c8003 100755 --- a/dump.scm +++ b/dump.scm @@ -775,6 +775,27 @@ is a object." (set gn:inbredSet (field InbredSet Name InbredSetName)) (set gn:description (field CaseAttribute Description)) (set gn:caseAttributeId (field CaseAttribute Id)))) + +(define-dump dump-groups + (tables (InbredSet + (left-join Species "USING (SpeciesId)")) + (string-join + '("WHERE Species.Name IN " + "(SELECT Name FROM Species ORDER BY OrderId) " + "GROUP BY InbredSet.Name " + "ORDER BY " + "IFNULL(InbredSet.FamilyOrder, InbredSet.FullName) " + "ASC, IFNULL(InbredSet.Family, InbredSet.FullName) " + "ASC, InbredSet.FullName ASC, InbredSet.MenuOrderId ASC"))) + (schema-triples + (gn:name rdfs:range rdfs:Literal) + (gn:binomialName rdfs:range rdfs:Literal) + (gn:species rdfs:range gn:species)) + (triples (string->identifier "inbredSet" (field InbredSet Name)) + (set gn:name (field InbredSet Name)) + (set gn:binomialName (field InbredSet fullName)) + (set gn:species (field Species Name)))) + ;; Main function @@ -804,3 +825,4 @@ is a
object." (dump-info-files db) (dump-schema db) (dump-case-attributes db) + (dump-groups db))))) -- cgit v1.2.3