aboutsummaryrefslogtreecommitdiff
path: root/gn/data/hits.scm
blob: f0a24f35318102895b1d94ad7c40b6148d2948ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(define-module (gn data hits)
  #:use-module (json)
  #:use-module (ice-9 match)
  #:use-module (ice-9 format)
  #:use-module (ice-9 iconv)
  #:use-module (ice-9 receive)
  #:use-module (ice-9 string-fun)
  ;; #:use-module (gn db sparql)
  #:use-module (dbi dbi)
  #:use-module (gn db mysql)
  #:use-module (gn data group)
  #:use-module (gn util convert)
  #:use-module (web gn-uri)

  #:export (
            get-next-hit-for-precompute
            ))

(define (get-next-hit-for-precompute 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))