aboutsummaryrefslogtreecommitdiff
path: root/gn/data/strains.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn/data/strains.scm')
-rw-r--r--gn/data/strains.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gn/data/strains.scm b/gn/data/strains.scm
index 7854cfe..06255e3 100644
--- a/gn/data/strains.scm
+++ b/gn/data/strains.scm
@@ -14,6 +14,7 @@
#:export (
strain-id-names
+ bxd-name
is-a-bxd?
has-bxd?
bxd-strain-id-names
@@ -38,7 +39,7 @@ used-for-mapping? will say whether the strains/individuals are used for mapping.
(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
+ "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. Always True, FIXME"
(filter (lambda (l) l)
@@ -53,6 +54,10 @@ used-for-mapping? will say whether the strains/individuals are used for mapping.
(define memo-bxd-strain-id-names
(memoize bxd-strain-id-names))
+(define (bxd-name strain-id)
+ "Return the name matching strain ID"
+ (assoc-ref (memo-bxd-strain-id-names) strain-id))
+
(define (is-a-bxd? strain-id)
"Is a strain a member of the BXD? For speed we memoize tuples from the DB. Note that we check the DB list, as
well as the name. This won't work for the parents. We do it this way because the GN table is wrong."