aboutsummaryrefslogtreecommitdiff
path: root/scripts/precompute/run-gemma.scm
diff options
context:
space:
mode:
authorPjotr Prins2024-08-03 14:00:09 +0200
committerPjotr Prins2024-08-03 14:00:09 +0200
commit591dd752274dd4530040b272fb0c0513a2ce203d (patch)
treee8c377209fe246d26699aba426203acf1a912f30 /scripts/precompute/run-gemma.scm
parent51048dfd4cc16352b9d5e615ad24e1510141f141 (diff)
downloadgn-guile-591dd752274dd4530040b272fb0c0513a2ce203d.tar.gz
precompute: pass in trait id for gemma
Diffstat (limited to 'scripts/precompute/run-gemma.scm')
-rwxr-xr-xscripts/precompute/run-gemma.scm8
1 files changed, 5 insertions, 3 deletions
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