diff options
-rw-r--r-- | gn/runner/gemma.scm | 10 | ||||
-rwxr-xr-x | scripts/precompute/precompute-hits.scm | 4 |
2 files changed, 9 insertions, 5 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) diff --git a/scripts/precompute/precompute-hits.scm b/scripts/precompute/precompute-hits.scm index f33e7e9..8f27bbe 100755 --- a/scripts/precompute/precompute-hits.scm +++ b/scripts/precompute/precompute-hits.scm @@ -99,12 +99,12 @@ ssh -L 3306:127.0.0.1:3306 -f -N tux02.genenetwork.org ((id . value) (cons (assoc-ref bxd-strains id) value) ))) id_traits)) - (display traits) + ;; (display traits) ;; (if (= 0 (length non-bxd)) (if (eq? non-bxd '()) (begin (set-precompute-hit-status! db data-id-str "GEMMA-START") - (run-gemma "BXD" data-id name trait-name traits) + (run-gemma "BXD" data-id probeset-id probesetfreeze-id name trait-name traits) (set-precompute-hit-status! db data-id-str "GEMMA-DONE")) ;; disable precompute if non-bxd, for now, so it won't try again (set-precompute-hit-status! db data-id-str "NON-BXD")) |