aboutsummaryrefslogtreecommitdiff
path: root/gn
diff options
context:
space:
mode:
Diffstat (limited to 'gn')
-rw-r--r--gn/data/dataset.scm23
-rw-r--r--gn/data/hits.scm2
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))