diff options
author | Pjotr Prins | 2023-11-19 17:14:15 +0100 |
---|---|---|
committer | Pjotr Prins | 2023-11-19 17:14:15 +0100 |
commit | f65cada4f70d7449f38f1fef5164d7c52283a0e9 (patch) | |
tree | 2323a63a44737b5f02cdb7a3044dabc9dc1cc564 /gn | |
parent | cd868747703585661efac3b85a423b6dae9b71c2 (diff) | |
download | gn-guile-f65cada4f70d7449f38f1fef5164d7c52283a0e9.tar.gz |
Iterating through hits
Diffstat (limited to 'gn')
-rw-r--r-- | gn/data/dataset.scm | 23 | ||||
-rw-r--r-- | gn/data/hits.scm | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/gn/data/dataset.scm b/gn/data/dataset.scm new file mode 100644 index 0000000..5e81d1e --- /dev/null +++ b/gn/data/dataset.scm @@ -0,0 +1,23 @@ +(define-module (gn data dataset) + #: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 ( + dataset-name + )) + +(define (dataset-name db probesetfreeze-id) + (dbi-query db + (string-append + "select Name2 from ProbeSetFreeze where Id=" (int-to-string probesetfreeze-id) " limit 1;")) + (assoc-ref (get-row db) "Name2")) diff --git a/gn/data/hits.scm b/gn/data/hits.scm index a66eee5..f0a24f3 100644 --- a/gn/data/hits.scm +++ b/gn/data/hits.scm @@ -17,5 +17,5 @@ )) (define (get-next-hit-for-precompute db prev-id) - (dbi-query db (string-append "select Locus, DataId, ProbeSetId from ProbeSetXRef where DataId>" (int-to-string prev-id) " AND Locus_old is NULL ORDER BY DataId LIMIT 1")) + (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)) |