diff options
author | Pjotr Prins | 2023-11-18 11:33:24 +0100 |
---|---|---|
committer | Pjotr Prins | 2023-11-18 11:33:24 +0100 |
commit | 06f941636a99904671c89916e17f28de4b2cd07e (patch) | |
tree | f9e8e84312bf17a8369af9843cb62b4b285e6285 /scripts/precompute/precompute-hits.scm | |
parent | 71c8e03b77dc094567c3b522909d7aa6995585f4 (diff) | |
download | gn-guile-06f941636a99904671c89916e17f28de4b2cd07e.tar.gz |
Reorganize DB handler and fetch first dataset
Diffstat (limited to 'scripts/precompute/precompute-hits.scm')
-rwxr-xr-x | scripts/precompute/precompute-hits.scm | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/scripts/precompute/precompute-hits.scm b/scripts/precompute/precompute-hits.scm index acd7cdf..a6617d9 100755 --- a/scripts/precompute/precompute-hits.scm +++ b/scripts/precompute/precompute-hits.scm @@ -16,45 +16,30 @@ ;; mysql -uwebqtlout -pwebqtlout -A -h 127.0.0.1 -P 3306 db_webqtl -e "show tables;" ;; -#! -(db-query "SELECT * FROM ProbeSetXRef LIMIT 3") -(db-check) -(let [(row (db-get-row))] - (display row) - ) -!# - (call-with-db (lambda (db) (begin - (dbi-query db "SELECT * FROM ProbeSetXRef LIMIT 3") - (let [(row (get-row db))] - (display row) - ) - (newline) - (dbi-query db "SELECT * FROM ProbeSetXRef LIMIT 3") - (let [(row (get-row db))] - (display row) - ) - (newline) + ;(newline) ; (dbi-query db "SELECT StrainId,Strain.Name FROM Strain, StrainXRef WHERE StrainXRef.StrainId = Strain.Id AND StrainXRef.InbredSetId = 1 AND Used_for_mapping='Y' ORDER BY StrainId;") ; (let [(row (get-row db))] ; (display row) ; ) - (let [(result (get-rows-apply db (lambda (r) `(,(assoc-ref r "StrainId") . ,(assoc-ref r "Name"))) '()))] - (display (car result))) + ;(let [(result (get-rows-apply db (lambda (r) `(,(assoc-ref r "StrainId") . ,(assoc-ref r "Name"))) '()))] + ; (display (car result))) - (newline) + ;(newline) (define bxd-strains (bxd-strain-id-names #:map? #t)) - (newline) - (display bxd-strains) (display (assoc 64728 bxd-strains)) (newline) - (newline) - (dbi-query db "SELECT * FROM ProbeSetXRef LIMIT 3") - (let [(row (get-row db))] - (display row) - ) - (db-check2 db) + ;(newline) + ;(dbi-query db "SELECT * FROM ProbeSetXRef LIMIT 3") + ;(let [(row (get-row db))] + ; (display row) + ; ) + ;(db-check2 db) + ;(newline) + ;; get first dataset for precompute + (dbi-query db "select ProbeSetId, Locus, DataId from ProbeSetXRef where Locus_old is NULL LIMIT 1") + (display (get-row db)) (newline) ))) |