41
41
(defun good-study-table (tbl)
43
Recognizes a well-formed study table.~/
43
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
44
;;; see projects/taspi/taspi-xdoc.lisp.
47
; Recognizes a well-formed study table.~/
46
50
(declare (xargs :guard t))
47
51
(and (good-study-table-struct tbl)
48
52
(no-dups-gen (get-ids tbl))))
50
54
(defun good-analysis-table (tbl)
52
Recognizes a well-formed analysis table.~/
56
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
57
;;; see projects/taspi/taspi-xdoc.lisp.
60
; Recognizes a well-formed analysis table.~/
55
63
(declare (xargs :guard t))
56
64
(and (good-analysis-table-struct tbl)
57
65
(no-dups-gen (get-ids tbl))))
59
67
(defun good-tree-table (tbl)
61
Recognizes a well-formed tree table.~/
69
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
70
;;; see projects/taspi/taspi-xdoc.lisp.
73
; Recognizes a well-formed tree table.~/
64
76
(declare (xargs :guard t))
65
77
(and (good-tree-table-struct tbl)
66
78
(no-dups-gen (get-ids tbl))))
68
80
(defun get-study-ids (tbl)
70
Returns study ids present in an analysis table.~/
82
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
83
;;; see projects/taspi/taspi-xdoc.lisp.
86
; Returns study ids present in an analysis table.~/
73
89
(declare (xargs :guard (good-analysis-table-struct tbl)))
75
91
(cons (get-study-id (car tbl))
79
95
(defun get-analysis-ids (tbl)
81
Returns analysis ids present in a tree table.~/
97
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
98
;;; see projects/taspi/taspi-xdoc.lisp.
100
; ":Doc-Section TASPI
101
; Returns analysis ids present in a tree table.~/
84
104
(declare (xargs :guard (good-tree-table-struct tbl)))
86
106
(cons (get-analysis-id (car tbl))
116
136
;; get an entry matching primary key
117
137
(defun get-entry-by-id (id tbl)
119
Returns entry in table indicated by given id.~/
122
(1) id - a primary id
123
(2) tbl - a good study, analysis or tree table
139
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
140
;;; see projects/taspi/taspi-xdoc.lisp.
142
; ":Doc-Section TASPI
143
; Returns entry in table indicated by given id.~/
146
; (1) id - a primary id
147
; (2) tbl - a good study, analysis or tree table
126
150
(declare (xargs :guard (or (good-study-table-struct tbl)
127
151
(good-analysis-table-struct tbl)
128
152
(good-tree-table-struct tbl))))
199
223
(check-for-good-tree-tl analysis-tbl tree-tbl)))
201
225
(defun good-tree-db (study-tbl analysis-tbl tree-tbl)
203
Recognizes a well formed and consistent set of tables.~/
206
(1) study-tbl - a potential study table
207
(2) analysis-tbl - a potential analysis table
208
(3) tree-tbl - a potential tree table
210
Details: Checks that primary ids are unique, ids indexing into other tables
211
reference existing entries, maximum likelihood scores have an
212
associated model, and that any tree in the tree table has taxa
213
names present in the taxa list in the associated analysis table. "
227
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
228
;;; see projects/taspi/taspi-xdoc.lisp.
230
; ":Doc-Section TASPI
231
; Recognizes a well formed and consistent set of tables.~/
234
; (1) study-tbl - a potential study table
235
; (2) analysis-tbl - a potential analysis table
236
; (3) tree-tbl - a potential tree table
238
; Details: Checks that primary ids are unique, ids indexing into other tables
239
; reference existing entries, maximum likelihood scores have an
240
; associated model, and that any tree in the tree table has taxa
241
; names present in the taxa list in the associated analysis table. "
214
242
(declare (xargs :guard t))
215
243
(and (good-study-table study-tbl)
216
244
(good-analysis-table analysis-tbl)