diff options
author | Pjotr Prins | 2024-06-26 04:45:13 -0500 |
---|---|---|
committer | Pjotr Prins | 2024-06-26 04:45:13 -0500 |
commit | e4775ccc0c24351e1ee428cddb0f320022509137 (patch) | |
tree | 868406d4c55b988a46bbd97e4c7fda543dcd2bc0 /scripts/precompute/run-gemma.scm | |
parent | 41735d8fbf4fbd0d137224f25b20cda6556ad484 (diff) | |
download | gn-guile-e4775ccc0c24351e1ee428cddb0f320022509137.tar.gz |
Read pheno JSON file and write out pheno file for gemma
Diffstat (limited to 'scripts/precompute/run-gemma.scm')
-rwxr-xr-x | scripts/precompute/run-gemma.scm | 21 |
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))) + )))))) |