aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2024-06-18 05:16:42 -0500
committerPjotr Prins2024-06-18 05:16:42 -0500
commit41735d8fbf4fbd0d137224f25b20cda6556ad484 (patch)
tree5cc0f32cc1ff15c2fc15564bbca8118c7654493b
parent9578d0a00f4040415723607243fea1dbd8001641 (diff)
downloadgn-guile-41735d8fbf4fbd0d137224f25b20cda6556ad484.tar.gz
Started on run-gemma
-rwxr-xr-xscripts/precompute/precompute-hits.scm8
-rwxr-xr-xscripts/precompute/run-gemma.scm42
2 files changed, 49 insertions, 1 deletions
diff --git a/scripts/precompute/precompute-hits.scm b/scripts/precompute/precompute-hits.scm
index 8f27bbe..a18b33d 100755
--- a/scripts/precompute/precompute-hits.scm
+++ b/scripts/precompute/precompute-hits.scm
@@ -1,4 +1,10 @@
-#! Run from base dir with
+#! Precompute hits
+
+This is the obsolete script to compute GEMMA directly from the DB. We have split out
+this step into fetching traits and running gemma without DB. This allows scaling up
+on HPC etc.
+
+Run from base dir with
. .guix-shell -- guile -L . -s ./scripts/precompute/precompute-hits.scm
diff --git a/scripts/precompute/run-gemma.scm b/scripts/precompute/run-gemma.scm
new file mode 100755
index 0000000..b14927a
--- /dev/null
+++ b/scripts/precompute/run-gemma.scm
@@ -0,0 +1,42 @@
+#! Run GEMMA
+
+A simple script that takes the JSON input from list-traits-to-compute and runs
+GEMMA on those.
+
+Run from base dir with
+
+guix shell guile guile-dbi -- guile -L ../.. -s run-gemma.scm --help
+
+and with some extra paths
+
+. .guix-shell ruby --expose=/home/wrk/iwrk/opensource/code/genetics/gemma-wrapper/=/gemma-wrapper --expose=/home/wrk/iwrk/opensource/code/genetics/gemma/=/gemma -- env TMPDIR=tmp guile -L . -s ./scripts/precompute/run-gemma.scm
+
+!#
+
+(use-modules ; (gn data dataset)
+ ; (gn data hits)
+ ; (gn data strains)
+ ; (gn util convert)
+ (gn runner gemma)
+ (ice-9 getopt-long)
+ (ice-9 match)
+ (ice-9 textual-ports)
+ (json)
+ (rnrs bytevectors)
+ (srfi srfi-1)
+ )
+
+(define (main args)
+ ;; (write args)
+ (let* [
+ (option-spec '( (version (single-char #\v) (value #f))
+ (help (single-char #\h) (value #f))))
+ (options (getopt-long args option-spec))
+ (help-wanted (option-ref options 'help #f))]
+ (if help-wanted
+ (format #t "list-traits-to-compute writes JSON traits files from the GN DB
+Usage: list-traits-to-compute [options...]
+ -h, --help Display this help
+")
+ (display "gemma-run")
+)))