aboutsummaryrefslogtreecommitdiff
path: root/gn/data/genotype.scm
blob: c7cb63cbd2119f0fb0e26fae3f51755fa80435b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(define-module (gn data genotype)
  #:use-module (json)
  #:use-module (ice-9 match)
  #:use-module (ice-9 format)
  #:use-module (ice-9 iconv)
  #:use-module (ice-9 receive)
  #:use-module (ice-9 string-fun)
  ;; #:use-module (gn db sparql)
  #:use-module (dbi dbi)
  #:use-module (gn db mysql)
  #:use-module (gn data group)
  #:use-module (gn util convert)

  #:export (
            geno-inds-bxd
            ))

(define (geno-inds-bxd fn)
  (let [(js (call-with-input-file fn
              (lambda (port)
                (json->scm port))))]
    (vector->list (assoc-ref (car (vector->list (assoc-ref js "genofile"))) "sample_list"))
))