aboutsummaryrefslogtreecommitdiff
path: root/gn/data/hits.scm
diff options
context:
space:
mode:
authorPjotr Prins2024-05-05 14:06:55 +0200
committerPjotr Prins2024-05-05 14:06:55 +0200
commit91ed2e9f0f1c5bd96b4378db0cdfe88fdbb4d01a (patch)
treebc441753af1122b88c53c7d4bb99749750b4aa47 /gn/data/hits.scm
parenta1511cae7937ea60abdaf56e759f1066c2e83b13 (diff)
downloadgn-guile-91ed2e9f0f1c5bd96b4378db0cdfe88fdbb4d01a.tar.gz
Trait IDs fetch in batch
Diffstat (limited to 'gn/data/hits.scm')
-rw-r--r--gn/data/hits.scm8
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'.