aboutsummaryrefslogtreecommitdiff
path: root/scripts/precompute/run-gemma.scm
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/precompute/run-gemma.scm')
-rwxr-xr-xscripts/precompute/run-gemma.scm21
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/precompute/run-gemma.scm b/scripts/precompute/run-gemma.scm
index b14927a..36edf8b 100755
--- a/scripts/precompute/run-gemma.scm
+++ b/scripts/precompute/run-gemma.scm
@@ -5,9 +5,9 @@ GEMMA on those.
Run from base dir with
-guix shell guile guile-dbi -- guile -L ../.. -s run-gemma.scm --help
+ ~/opt/guix-pull/bin/guix shell guile guile-dbi guile-json -- guile -L . -e main -s scripts/precompute/run-gemma.scm 115476.json
-and with some extra paths
+and with some extra paths (for gemma)
. .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/run-gemma.scm
@@ -33,10 +33,21 @@ and with some extra paths
(help (single-char #\h) (value #f))))
(options (getopt-long args option-spec))
(help-wanted (option-ref options 'help #f))]
+ (display "RUNNING")
(if help-wanted
(format #t "list-traits-to-compute writes JSON traits files from the GN DB
Usage: list-traits-to-compute [options...]
-h, --help Display this help
-")
- (display "gemma-run")
-)))
+"))
+ (let [(trait-name "115475")]
+ (call-with-input-file "115475.json"
+ (lambda (port)
+ (let* [(json (json->scm port))
+ (dataset (assoc-ref json "traits"))
+ (dataset-name (car (car dataset)))
+ (traits (assoc-ref dataset dataset-name))
+ ]
+ (display dataset)
+ (write-pheno-file "pheno.txt" traits)
+ ; (run-gemma "BXD" data-id probeset-id probesetfreeze-id name trait-name traits)))
+ ))))))