aboutsummaryrefslogtreecommitdiff
path: root/scripts/precompute
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/precompute')
-rwxr-xr-xscripts/precompute/list-traits-to-compute.scm2
-rwxr-xr-xscripts/precompute/run-gemma.scm8
2 files changed, 6 insertions, 4 deletions
diff --git a/scripts/precompute/list-traits-to-compute.scm b/scripts/precompute/list-traits-to-compute.scm
index fbe89a6..9f900d1 100755
--- a/scripts/precompute/list-traits-to-compute.scm
+++ b/scripts/precompute/list-traits-to-compute.scm
@@ -149,7 +149,6 @@ The following is produced by gemma-wrapper as metadata
(lambda (db)
(begin
;; (let [(bxd-strains (memo-bxd-strain-id-names #:used-for-mapping? #t))]
- (display "writing-phenotypes...")
(define (run-list-traits-to-compute db num prev-id)
;; ---- Build a query to collect num traits
(let* [(count (if (< batch-size num)
@@ -164,6 +163,7 @@ The following is produced by gemma-wrapper as metadata
(data-ids-query (string-join data-str-ids " OR "))
(query (string-append "SELECT Id,StrainId,value FROM ProbeSetData WHERE " data-ids-query))
]
+ (format #t "writing-phenotypes from ~d to ~d batch ~d to ~d\n" first-id (+ first-id num) prev-id (+ prev-id count))
(display query)
(dbi-query db query)
;; ---- Walk each resulting trait and build a hash of data-id and list of trait values
diff --git a/scripts/precompute/run-gemma.scm b/scripts/precompute/run-gemma.scm
index 00cc68d..4952834 100755
--- a/scripts/precompute/run-gemma.scm
+++ b/scripts/precompute/run-gemma.scm
@@ -9,7 +9,7 @@ Run from base dir with
and with some extra paths (for gemma)
-~/opt/guix-pull/bin/guix shell -C -F xz python python-lmdb tar time parallel coreutils-minimal guile guile-dbi guile-json ruby --expose=/home/wrk/iwrk/opensource/code/genetics/gemma-wrapper/=/gemma-wrapper --expose=/home/wrk/iwrk/opensource/code/genetics/gemma/=/gemma -- env TMPDIR=tmp GEMMA_COMMAND=/gemma/bin/gemma-0.98.5-linux-static-debug guile -L . -e main -s ./scripts/precompute/run-gemma.scm test
+~/opt/guix-pull/bin/guix shell -C -F xz python python-lmdb tar time parallel coreutils-minimal guile guile-dbi guile-json ruby --expose=/home/wrk/iwrk/opensource/code/genetics/gemma-wrapper/=/gemma-wrapper --expose=/home/wrk/iwrk/opensource/code/genetics/gemma/=/gemma -- env TMPDIR=tmp GEMMA_COMMAND=/gemma/bin/gemma-0.98.5-linux-static-debug guile -L . -e main -s ./scripts/precompute/run-gemma.scm --id 21529
!#
@@ -30,6 +30,7 @@ and with some extra paths (for gemma)
;; (write args)
(let* [
(option-spec '( (version (single-char #\v) (value #f))
+ (id (value #t))
(help (single-char #\h) (value #f))))
(options (getopt-long args option-spec))
(show-version (option-ref options 'version #f))
@@ -41,11 +42,12 @@ and with some extra paths (for gemma)
(if help-wanted
(format #t "run-gemma
Usage: run-gemma [options...] filename(s)
+ --id Run on identifier
-v --version Display version
-h --help Display this help
")
- (let [(trait-id "115475")
- (trait-fn "115475.json")
+ (let* [(trait-id (option-ref options 'id "0"))
+ (trait-fn (string-append trait-id ".json"))
]
(call-with-input-file trait-fn