aboutsummaryrefslogtreecommitdiff
path: root/gn/runner
diff options
context:
space:
mode:
authorPjotr Prins2024-07-11 09:41:10 +0200
committerPjotr Prins2024-07-11 09:41:10 +0200
commit84a85da3d4934d43c3caf5cefb660e0d5aaec6f4 (patch)
tree8cae6e1f88268f7e1f2342c1b8a9b0f5af308e15 /gn/runner
parentf2e8c637307146a6796c56b0d654427f9c567aa8 (diff)
downloadgn-guile-84a85da3d4934d43c3caf5cefb660e0d5aaec6f4.tar.gz
precompute: runner completes
Diffstat (limited to 'gn/runner')
-rw-r--r--gn/runner/gemma.scm17
1 files changed, 10 insertions, 7 deletions
diff --git a/gn/runner/gemma.scm b/gn/runner/gemma.scm
index 69991dd..9207316 100644
--- a/gn/runner/gemma.scm
+++ b/gn/runner/gemma.scm
@@ -39,24 +39,27 @@
))
)
-(define (invoke-gemma-wrapper-loco name trait-name pheno-fn)
+(define (invoke-gemma-wrapper-loco name trait-name trait-fn pheno-fn)
"Create a tmpdir and invoke gemma-wrapper using parallel LOCO. Note that at this point we use a number of defaults for BXD"
(let* [(population "BXD")
(sys-tmpdir (getenv "TMPDIR"))
(tmpdir (mkdtemp (string-append sys-tmpdir "/run-gemma-XXXXXX")))
(k-json-fn (string-append tmpdir "/K.json"))
- (gwa-json-fn (string-append tmpdir "/GWA.json"))]
+ (gwa-json-fn (string-append tmpdir "/GWA.json"))
+ (trait-json-fn (string-append tmpdir "/" trait-fn))]
+ (copy-file trait-fn trait-json-fn)
;; --- First we compute K - control output goes to K.json
(let [(err (system (string-append "/gemma-wrapper/bin/gemma-wrapper --verbose --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 "/gemma-wrapper/bin/gemma-wrapper --population \"" population "\" --name \"" name "\" --id \"" trait-name "\" --trait \"" trait-name "\" --verbose --loco --json --input " k-json-fn " -- -g BXD.8_geno.txt.gz -p " pheno-fn " -a BXD.8_snps.txt -lmm 9 -maf 0.1 > " gwa-json-fn)))]
+ (let [(err (system (string-append "/gemma-wrapper/bin/gemma-wrapper --meta \"" trait-json-fn "\" --population \"" population "\" --name \"" name "\" --id \"" trait-name "\" --trait \"" trait-name "\" --verbose --loco --json --lmdb --input " k-json-fn " -- -g BXD.8_geno.txt.gz -p " pheno-fn " -a BXD.8_snps.txt -lmm 9 -maf 0.1 > " gwa-json-fn)))]
(if (not (= err 0))
(exit err)))
- ;; (delete-file pheno-fn)
- ;; (delete-file gwa-json-fn)
- ;; (delete-file k-json-fn)
- ;; (rmdir tmpdir)
+ (delete-file pheno-fn)
+ (delete-file gwa-json-fn)
+ (delete-file k-json-fn)
+ (delete-file trait-json-fn)
+ (rmdir tmpdir)
)
)