diff options
author | Pjotr Prins | 2024-01-06 18:23:27 +0100 |
---|---|---|
committer | Pjotr Prins | 2024-01-06 18:23:27 +0100 |
commit | 1c46296016ead8a5fa17ff291eeabbd0a0c63e4b (patch) | |
tree | 2ea04dab40e91eef942fc2d6abec5530f1112ed6 /gn/runner | |
parent | 902cf907e9b315f52b2ef3b4b791e492a87e6437 (diff) | |
download | gn-guile-1c46296016ead8a5fa17ff291eeabbd0a0c63e4b.tar.gz |
Tracking metadat for GN DB
Diffstat (limited to 'gn/runner')
-rw-r--r-- | gn/runner/gemma.scm | 10 |
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) |