diff options
author | Pjotr Prins | 2024-05-05 13:35:33 +0200 |
---|---|---|
committer | Pjotr Prins | 2024-05-05 13:35:33 +0200 |
commit | a1511cae7937ea60abdaf56e759f1066c2e83b13 (patch) | |
tree | d589baa53aaa4ce769da123197cb1a959f210fa7 /gn/data | |
parent | e192578a501d09f2405db41a6ca541eb57db3368 (diff) | |
download | gn-guile-a1511cae7937ea60abdaf56e759f1066c2e83b13.tar.gz |
List data-ids (trait ids) for a batch
Diffstat (limited to 'gn/data')
-rw-r--r-- | gn/data/strains.scm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gn/data/strains.scm b/gn/data/strains.scm index 39fe71e..f1348ac 100644 --- a/gn/data/strains.scm +++ b/gn/data/strains.scm @@ -17,21 +17,23 @@ bxd-strain-id-names )) -(define* (strain-id-names inbred-set #:key (map? #f)) +(define* (strain-id-names inbred-set #:key (used-for-mapping? #f)) "Return assoc list of tuples of strain id+names: ((4 . BXD1) (5 . BXD2) (6 . BXD5) (7 . BXD6)... -map? will say whether the strains/individuals are used for mapping. +used-for-mapping? will say whether the strains/individuals are used for mapping. " (call-with-db (lambda (db) (dbi-query db (string-append "SELECT StrainId,Strain.Name FROM Strain, StrainXRef WHERE StrainXRef.StrainId = Strain.Id AND StrainXRef.InbredSetId = " (int-to-string inbred-set) - (if map? + (if used-for-mapping? " AND Used_for_mapping='Y'" "") " ORDER BY StrainId;")) (get-rows-apply db (lambda (r) `(,(assoc-ref r "StrainId") . ,(assoc-ref r "Name"))) '())))) -(define* (bxd-strain-id-names #:key (map? #f)) - "Return assoc list of tuples of strain id + names. Same as strain-id-names, but just for the BXD" +(define* (bxd-strain-id-names #:key (used-for-mapping? #f)) + "Return assoc list of tuples of strain id + names. Same as strain-id-names, but just for the BXD + +used-for-mapping? will say whether the strains/individuals are used for mapping." (strain-id-names 1)) |