diff options
Diffstat (limited to 'gn/data')
-rw-r--r-- | gn/data/hits.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gn/data/hits.scm b/gn/data/hits.scm index 94b4749..f7ce49e 100644 --- a/gn/data/hits.scm +++ b/gn/data/hits.scm @@ -13,14 +13,18 @@ #:use-module (web gn-uri) #:export ( + get-precompute-hits get-precompute-hit set-precompute-hit-status! update-precompute! )) +(define (get-precompute-hits db prev-id num) + (dbi-query db (string-append "select Locus, DataId, ProbeSetId, ProbeSetFreezeId from ProbeSetXRef where DataId>" (int-to-string prev-id) " AND Locus_old is NULL ORDER BY DataId LIMIT " (format #f "~d" num))) + (get-rows db '())) + (define (get-precompute-hit db prev-id) - (dbi-query db (string-append "select Locus, DataId, ProbeSetId, ProbeSetFreezeId from ProbeSetXRef where DataId>" (int-to-string prev-id) " AND Locus_old is NULL ORDER BY DataId LIMIT 1")) - (get-row db)) + (car (get-precompute-hits db prev-id 1))) (define (set-precompute-hit-status! db data-id-str status-str) "Set status of precompute record - typically from NULL to 'GEMMA-START' or 'NON-BXD'. |