aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/precompute/list-traits-to-compute.scm28
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/precompute/list-traits-to-compute.scm b/scripts/precompute/list-traits-to-compute.scm
index a9e1340..199f457 100755
--- a/scripts/precompute/list-traits-to-compute.scm
+++ b/scripts/precompute/list-traits-to-compute.scm
@@ -78,6 +78,7 @@ When that is the case we might as well write the phenotype file because we have
(json)
(rnrs bytevectors)
(srfi srfi-1)
+ (srfi srfi-9)
(srfi srfi-19) ; time
)
@@ -146,9 +147,8 @@ The following is produced by gemma-wrapper as metadata
num))
(rest (- num count))
(hits (get-precompute-hits db prev-id count))
- (data-ids (map (lambda (hit)
- (let* [(data-id (assoc-ref hit "DataId"))]
- data-id))
+ (data-ids (map (lambda (h)
+ (hit-data-id h))
hits))
(data-str-ids (map (lambda (id) (string-append "Id=" (int-to-string id))) data-ids))
(data-ids-query (string-join data-str-ids " OR "))
@@ -171,20 +171,20 @@ The following is produced by gemma-wrapper as metadata
(set! nrecs (assoc-set! nrecs data-id lst))))
id-traits)
;; --- create the json output as a file
- (for-each (lambda (r hit)
- (let* [(probeset-id (assoc-ref hit "ProbeSetId"))
- (data-id (assoc-ref hit "DataId"))
- (data-id-str (int-to-string data-id))
- (probesetfreeze-id (assoc-ref hit "ProbeSetFreezeId"))
- (trait (get-trait db probeset-id))
- (trait-name (assoc-ref trait "Name"))
- (name (dataset-name db probesetfreeze-id))
- ]
+ (for-each (lambda (r h)
+ ;; (let* [;; (probeset-id (assoc-ref hit "ProbeSetId"))
+ ;; (data-id (assoc-ref hit "DataId"))
+ ;; (data-id-str (int-to-string data-id))
+ ;; (probesetfreeze-id (assoc-ref hit "ProbeSetFreezeId"))
+ ;; (trait (get-trait db probeset-id))
+ ;; (trait-name (assoc-ref trait "Name"))
+ ;; (name (dataset-name db probesetfreeze-id))
+ ;; ]
(match r
((id . recs) (if (has-bxd? recs)
- (write-json-ld id probeset-id recs)
+ (write-json-ld id (hit-probeset-id h) recs)
))
- ))) nrecs hits)
+ )) nrecs hits)
(if (> rest 0)
(run-list-traits-to-compute db rest (first (reverse data-ids)))) ;; start precompute
)))