aboutsummaryrefslogtreecommitdiff
path: root/scripts/precompute/list-traits-to-compute.scm
diff options
context:
space:
mode:
authorPjotr Prins2024-06-29 04:31:46 -0500
committerPjotr Prins2024-06-29 04:31:46 -0500
commit77d7bacbc270613137c55e99923c95961dc95349 (patch)
treeb9d313a81b3ed478b9e85aba7c1a0ef342d6ae6c /scripts/precompute/list-traits-to-compute.scm
parent564fed3c6295b596fe9288fc674f70c1fa3a2a95 (diff)
downloadgn-guile-77d7bacbc270613137c55e99923c95961dc95349.tar.gz
for-each can take multiple lists, nice!
Diffstat (limited to 'scripts/precompute/list-traits-to-compute.scm')
-rwxr-xr-xscripts/precompute/list-traits-to-compute.scm10
1 files changed, 9 insertions, 1 deletions
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)