about summary refs log tree commit diff
path: root/gn/runner/gemma.scm
diff options
context:
space:
mode:
authorPjotr Prins2023-12-02 16:45:55 -0600
committerPjotr Prins2023-12-02 16:45:55 -0600
commit8fb091769b6b01d476b45943bac54a26a8923573 (patch)
tree94569831fcfccb3680dfe47cff41efb01c53278b /gn/runner/gemma.scm
parent186da1d636f88421d1bbca0033e2d99a3b15e6cd (diff)
downloadgn-guile-8fb091769b6b01d476b45943bac54a26a8923573.tar.gz
Run gemma
Diffstat (limited to 'gn/runner/gemma.scm')
-rw-r--r--gn/runner/gemma.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/gn/runner/gemma.scm b/gn/runner/gemma.scm
index 67dae54..ff70f57 100644
--- a/gn/runner/gemma.scm
+++ b/gn/runner/gemma.scm
@@ -23,14 +23,22 @@
   ;; ---- write phenotype file
   (call-with-output-file "pheno.txt"
     (lambda (port)
-      (write 12 port)
-      (newline port)
-      (write "HELLO" port)
-      ))
+      (for-each (lambda (ind)
+                  (begin
+                    (let* [(value (assoc-ref traits ind))
+                          (outvalue (if value
+                                        value
+                                        "NA"))]
+                      (display outvalue)
+                      (newline)
+                      (display outvalue port)
+                      (newline port))))
+                bxd-inds)))
+
   ;; set up with ./.guix-shell -- guile -L . -s ./scripts/precompute/precompute-hits.scm
 
   ;; ---- to start GEMMA precompute inside container
-  ;; env LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib/ guile -L . -s ./scripts/precompute/precompute-hits.scm
+  ;; env TMPDIR=. LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib/ guile -L . -s ./scripts/precompute/precompute-hits.scm
   ;; --- First we compute K
-  (system (string-append "env GEMMA_COMMAND=/gemma/bin/gemma /gemma-wrapper/bin/gemma-wrapper --debug -- -gk -g BXD.8_geno.txt.gz -p pheno.txt -a BXD.8_snps.txt"  ))
+  (system (string-append "env GEMMA_COMMAND=gemma /gemma-wrapper/bin/gemma-wrapper --verbose --loco --json --debug --parallel -- -gk -g BXD.8_geno.txt.gz -p pheno.txt -a BXD.8_snps.txt"  ))
   )