diff options
author | Pjotr Prins | 2024-05-08 09:59:49 +0200 |
---|---|---|
committer | Pjotr Prins | 2024-05-08 09:59:49 +0200 |
commit | bac78b1607851096cdf48c46bbd1e5dd9c31fe96 (patch) | |
tree | d67cff0a0dedce1b492c2b69a41344e79cf55c8f /scripts/precompute/list-traits-to-compute.scm | |
parent | 08fa74f000c55d42f6e39d9125015ff07cf44d38 (diff) | |
download | gn-guile-bac78b1607851096cdf48c46bbd1e5dd9c31fe96.tar.gz |
Use match to select for BXD traits
Diffstat (limited to 'scripts/precompute/list-traits-to-compute.scm')
-rwxr-xr-x | scripts/precompute/list-traits-to-compute.scm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/precompute/list-traits-to-compute.scm b/scripts/precompute/list-traits-to-compute.scm index c87b005..1fadb4a 100755 --- a/scripts/precompute/list-traits-to-compute.scm +++ b/scripts/precompute/list-traits-to-compute.scm @@ -70,6 +70,21 @@ When that is the case we might as well write the phenotype file because we have (srfi srfi-1) ) +(define (is-bxd? trait-values) + (display "HEY") + (display trait-values) + (newline) + (match trait-values + [(trait . rest) (begin + (display "PARSE") + (display trait) + (match trait + [(strain . value) (if (= strain 5) + #f + (is-bxd? rest))]) + (newline))] + [() #f])) + (call-with-db (lambda (db) (begin @@ -103,7 +118,9 @@ When that is the case we might as well write the phenotype file because we have (set! nrecs (assoc-set! nrecs data-id lst)))) id-traits) (for-each (lambda (r) - (write r) (newline)) nrecs) + (if (is-bxd? (cdr r)) + (display r) + )) nrecs) ; (display nrecs) ))) (run-list-traits-to-compute db 0 5) ;; start precompute |