diff options
author | Pjotr Prins | 2024-07-07 14:44:19 +0200 |
---|---|---|
committer | Pjotr Prins | 2024-07-07 14:44:19 +0200 |
commit | c82e6ce80fd26146f6187b9babbba561f3b65973 (patch) | |
tree | 3596db642cce8fba9f3c5b1ed58f3e48cab71e95 | |
parent | 65ee7ce5c99aeb802152027c43c9285aec3ab9ad (diff) | |
download | gn-guile-c82e6ce80fd26146f6187b9babbba561f3b65973.tar.gz |
precompute: URL is now correct (validated)
-rw-r--r-- | gn/data/hits.scm | 2 | ||||
-rwxr-xr-x | scripts/precompute/list-traits-to-compute.scm | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/gn/data/hits.scm b/gn/data/hits.scm index a7ba45a..85c4912 100644 --- a/gn/data/hits.scm +++ b/gn/data/hits.scm @@ -33,7 +33,7 @@ ) (define (get-precompute-hits db first-id num) - (dbi-query db (string-append "select Locus, DataId, ProbeSetId, ProbeSetFreezeId from ProbeSetXRef where DataId>" (int-to-string first-id) " AND Locus_old is NULL ORDER BY DataId LIMIT " (format #f "~d" num))) + (dbi-query db (string-append "select Locus, DataId, ProbeSetId, ProbeSetFreezeId from ProbeSetXRef where DataId>" (int-to-string first-id) " AND Locus_old is NULL ORDER BY DataId LIMIT " (int-to-string num))) (map (lambda (r) (make-hit (assoc-ref r "DataId") (assoc-ref r "ProbeSetId") (assoc-ref r "ProbeSetFreezeId"))) (get-rows db '()) diff --git a/scripts/precompute/list-traits-to-compute.scm b/scripts/precompute/list-traits-to-compute.scm index 9a548b7..61ce755 100755 --- a/scripts/precompute/list-traits-to-compute.scm +++ b/scripts/precompute/list-traits-to-compute.scm @@ -108,7 +108,7 @@ The following is produced by gemma-wrapper as metadata !# -(define (write-json-ld id name trait trait-name probeset-id recs) +(define (write-json-ld id name trait trait-name probesetfreeze-id probeset-id recs) ;; see also https://www.w3.org/2018/jsonld-cg-reports/json-ld/ (display id) (display ":") @@ -131,11 +131,13 @@ The following is produced by gemma-wrapper as metadata (time . ,(date->string (time-utc->date (current-time)))))) (data . ((,id . - ((probeset-id . ,probeset-id) + ((probesetfreeze-id . ,probesetfreeze-id) + (probeset-id . ,probeset-id) (name . ,name) (trait-name . ,trait-name) + (uri . ,uri) (traits . ,traits) - (uri . ,uri)))))))] + ))))))] (call-with-output-file (string-append (number->string id) ".json") (lambda (port) (put-string port (scm->json-string json-data)))) @@ -188,7 +190,7 @@ The following is produced by gemma-wrapper as metadata ] (match r ((id . recs) (if (has-bxd? recs) - (write-json-ld id name trait trait-name probeset-id recs) + (write-json-ld id name trait trait-name probesetfreeze-id probeset-id recs) )) ))) nrecs hits) (if (> rest 0) |