aboutsummaryrefslogtreecommitdiff
path: root/gn/data/hits.scm
diff options
context:
space:
mode:
authorPjotr Prins2023-11-21 11:26:07 +0100
committerPjotr Prins2023-11-21 11:26:07 +0100
commite4cb959730ed5d89c8f5e96de2ddbd405fcf2cc9 (patch)
treee8475ebb93605cd81edd6b3d12fc4a80ca24093e /gn/data/hits.scm
parentf65cada4f70d7449f38f1fef5164d7c52283a0e9 (diff)
downloadgn-guile-e4cb959730ed5d89c8f5e96de2ddbd405fcf2cc9.tar.gz
Adding GEMMA
Diffstat (limited to 'gn/data/hits.scm')
-rw-r--r--gn/data/hits.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/gn/data/hits.scm b/gn/data/hits.scm
index f0a24f3..5108bd0 100644
--- a/gn/data/hits.scm
+++ b/gn/data/hits.scm
@@ -13,9 +13,18 @@
#:use-module (web gn-uri)
#:export (
- get-next-hit-for-precompute
+ get-precompute-hit
+ set-precompute-hit-status!
))
-(define (get-next-hit-for-precompute db prev-id)
+(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))
+
+(define (set-precompute-hit-status! db data-id-str status-str)
+ "Set status of precompute record - typically 'RUN' or 'NON-BXD'.
+This is a temporary measure to get precompute going.
+Note we are counting on automated MariaDB transactions to not compete."
+ (dbi-query db (string-append "UPDATE ProbeSetXRef SET Locus_old=\"" status-str "\" WHERE DataId=" data-id-str " AND Locus_old is NULL"))
+ (ensure db)
+ )