aboutsummaryrefslogtreecommitdiff
path: root/scripts/precompute/run-gemma.scm
blob: b14927aaa24be6bb9cd4a7383a2db94125717443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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")
)))