aboutsummaryrefslogtreecommitdiff
path: root/scripts/precompute
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/precompute')
-rwxr-xr-xscripts/precompute/precompute-hits.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/precompute/precompute-hits.scm b/scripts/precompute/precompute-hits.scm
index 8588061..2036adc 100755
--- a/scripts/precompute/precompute-hits.scm
+++ b/scripts/precompute/precompute-hits.scm
@@ -1,10 +1,10 @@
#! Run from base dir with
-.guix-shell -- guile -L . -s ./scripts/precompute/precompute-hits.scm
+. .guix-shell -- guile -L . -s ./scripts/precompute/precompute-hits.scm
and with some extra paths
-.guix-shell ruby --expose=/home/wrk/iwrk/opensource/code/genetics/gemma-wrapper/=/gemma-wrapper --expose=/home/wrk/iwrk/opensource/code/genetics/gemma/=/gemma -- guile -L . -s ./scripts/precompute/precompute-hits.scm
+. .guix-shell ruby --expose=/home/wrk/iwrk/opensource/code/genetics/gemma-wrapper/=/gemma-wrapper --expose=/home/wrk/iwrk/opensource/code/genetics/gemma/=/gemma -- env TMPDIR=tmp guile -L . -s ./scripts/precompute/precompute-hits.scm
You may want to forward a mysql port if there is no DB locally
@@ -25,7 +25,6 @@ ssh -L 3306:127.0.0.1:3306 -f -N tux02.genenetwork.org
)
-
;; potentially you want to test connection with mysql client:
;;
;; mysql -uwebqtlout -pwebqtlout -A -h 127.0.0.1 -P 3306 db_webqtl -e "show tables;"
@@ -59,8 +58,8 @@ ssh -L 3306:127.0.0.1:3306 -f -N tux02.genenetwork.org
;; ---- get first available dataset for precompute:
;; @@ order by dataid - recurse
- (define (get-trait-name db probeset-id)
- (dbi-query db (string-append "select Name,Symbol from ProbeSet where Id=" (int-to-string probeset-id) " limit 1"))
+ (define (get-trait db probeset-id)
+ (dbi-query db (string-append "select Id,Chr,Mb,Name,Symbol,description from ProbeSet where Id=" (int-to-string probeset-id) " limit 1"))
(get-row db)
)
@@ -70,7 +69,7 @@ ssh -L 3306:127.0.0.1:3306 -f -N tux02.genenetwork.org
(data-id-str (int-to-string data-id))
(probesetfreeze-id (assoc-ref hit "ProbeSetFreezeId"))
(probeset-id (assoc-ref hit "ProbeSetId"))
- (trait (get-trait-name db probeset-id))
+ (trait (get-trait db probeset-id))
(trait-name (assoc-ref trait "Name"))
(name (dataset-name db probesetfreeze-id))
]