From 77d7bacbc270613137c55e99923c95961dc95349 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sat, 29 Jun 2024 04:31:46 -0500 Subject: for-each can take multiple lists, nice! --- scripts/precompute/list-traits-to-compute.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/precompute/list-traits-to-compute.scm b/scripts/precompute/list-traits-to-compute.scm index 5c3dfa3..3e2acb3 100755 --- a/scripts/precompute/list-traits-to-compute.scm +++ b/scripts/precompute/list-traits-to-compute.scm @@ -167,7 +167,15 @@ The following is produced by gemma-wrapper as metadata id-traits) ;; --- create the json output as a file (for-each (lambda (r hit) - (let [(probeset-id (assoc-ref hit "ProbeSetId"))] + (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")) + (probeset-id (assoc-ref hit "ProbeSetId")) + (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) -- cgit v1.2.3