diff options
Diffstat (limited to 'scripts/precompute/list-traits-to-compute.scm')
-rwxr-xr-x | scripts/precompute/list-traits-to-compute.scm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/precompute/list-traits-to-compute.scm b/scripts/precompute/list-traits-to-compute.scm index ea3a013..75e121a 100755 --- a/scripts/precompute/list-traits-to-compute.scm +++ b/scripts/precompute/list-traits-to-compute.scm @@ -19,6 +19,10 @@ test connection with mysql client: mysql -uwebqtlout -pwebqtlout -A -h 127.0.0.1 -P 3306 db_webqtl -e "show tables;" +you can ignore the IPv6 message: + + bind [::1]:3306: Cannot assign requested address + to create a clean slate, for now, update Locus_old with update ProbeSetXRef set Locus_old=NULL; @@ -69,6 +73,7 @@ When that is the case we might as well write the phenotype file because we have ; (rnrs base) (ice-9 getopt-long) (ice-9 match) + (ice-9 textual-ports) (json) (srfi srfi-1) ) @@ -77,12 +82,13 @@ When that is the case we might as well write the phenotype file because we have (define (write-json id recs) (display id) (newline) - (write (scm->json-string (map (lambda (r) - (match (pk r) - [(strain-id . value) (cons (bxd-name strain-id) value)] - )) - (reverse recs)))) - (newline) + (call-with-output-file (string-append (number->string id) ".json") + (lambda (port) + (put-string port (scm->json-string (map (lambda (r) + (match r + [(strain-id . value) (cons (bxd-name strain-id) value)] + )) + (reverse recs)))))) ) (define (write-phenotypes first-id num batch-size) |