diff options
author | Pjotr Prins | 2023-11-24 09:07:55 +0100 |
---|---|---|
committer | Pjotr Prins | 2023-11-24 09:07:55 +0100 |
commit | fb22ae84c143a27ddc4699327e8aff6c93a0bf6c (patch) | |
tree | 419c28241bc102e39907a3d9c5897eb428cb418e /gn/data | |
parent | e4cb959730ed5d89c8f5e96de2ddbd405fcf2cc9 (diff) | |
download | gn-guile-fb22ae84c143a27ddc4699327e8aff6c93a0bf6c.tar.gz |
Fetch genotype inds from json file
Diffstat (limited to 'gn/data')
-rw-r--r-- | gn/data/genotype.scm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gn/data/genotype.scm b/gn/data/genotype.scm new file mode 100644 index 0000000..c7cb63c --- /dev/null +++ b/gn/data/genotype.scm @@ -0,0 +1,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")) +)) |