aboutsummaryrefslogtreecommitdiff
path: root/gn/runner
diff options
context:
space:
mode:
Diffstat (limited to 'gn/runner')
-rw-r--r--gn/runner/gemma.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/gn/runner/gemma.scm b/gn/runner/gemma.scm
index d86abd7..89b6482 100644
--- a/gn/runner/gemma.scm
+++ b/gn/runner/gemma.scm
@@ -1,6 +1,7 @@
(define-module (gn runner gemma)
#:use-module (json)
#:use-module (gn data genotype)
+ #:use-module (gn util convert)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
#:use-module (ice-9 iconv)
@@ -12,13 +13,16 @@
run-gemma
))
-(define (run-gemma population data-id name trait-name traits)
+(define (run-gemma population data-id probeset-id probesetfreeze-id name trait-name traits)
"Run gemma-wrapper to compute GRM and GWA. On failure the run will stop(!)"
(define bxd-inds (geno-inds-bxd "BXD.json"))
+ (define ids (string-append (int-to-string data-id) ","
+ (int-to-string probeset-id) ","
+ (int-to-string probesetfreeze-id)))
(assert (= 235 (length bxd-inds)))
(if name
(display (string-append "WE HAVE OUR " population " DATASET " name " and trait " trait-name " for precompute!\n")))
- (display data-id)
+ (display ids)
(display traits)
(newline)
;; ---- write phenotype file
@@ -51,7 +55,7 @@
(let [(err (system (string-append "env GEMMA_COMMAND=gemma /gemma-wrapper/bin/gemma-wrapper --population \"" population "\" --name \"" name "\" --trait \"" trait-name "\" --verbose --loco --json --parallel -- -gk -g BXD.8_geno.txt.gz -p " pheno-fn " -a BXD.8_snps.txt > " k-json-fn )))]
(if (not (= err 0))
(exit err)))
- (let [(err (system (string-append "env GEMMA_COMMAND=gemma /gemma-wrapper/bin/gemma-wrapper --population \"" population "\" --name \"" name "\" --trait \"" trait-name "\" --verbose --loco --json --parallel --input " k-json-fn " -- -g BXD.8_geno.txt.gz -p " pheno-fn " -a BXD.8_snps.txt -lmm 2 -maf 0.1 > " gwa-json-fn)))]
+ (let [(err (system (string-append "env GEMMA_COMMAND=gemma /gemma-wrapper/bin/gemma-wrapper --population \"" population "\" --name \"" name "\" --id \"" ids "\" --trait \"" trait-name "\" --verbose --loco --json --parallel --input " k-json-fn " -- -g BXD.8_geno.txt.gz -p " pheno-fn " -a BXD.8_snps.txt -lmm 2 -maf 0.1 > " gwa-json-fn)))]
(if (not (= err 0))
(exit err)))
(delete-file pheno-fn)