aboutsummaryrefslogtreecommitdiff
path: root/gn/data/population.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn/data/population.scm')
-rw-r--r--gn/data/population.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/gn/data/population.scm b/gn/data/population.scm
new file mode 100644
index 0000000..46ef04c
--- /dev/null
+++ b/gn/data/population.scm
@@ -0,0 +1,28 @@
+(define-module (gn data population)
+ #:use-module (json)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 format)
+ #:use-module (ice-9 iconv)
+ #:use-module (ice-9 receive)
+ #:use-module (ice-9 string-fun)
+ ;; #:use-module (gn db sparql)
+ #:use-module (dbi dbi)
+ #:use-module (gn data group)
+ #:use-module (gn db mysql)
+ #:use-module (gn util convert)
+ #:use-module (web gn-uri)
+
+ #:export (
+ population-info
+ ))
+
+(define* (population-info id)
+ "
+Return population (InbredSet) info by GN ID
+"
+ (call-with-db
+ (lambda (db)
+ (dbi-query db (string-append
+ "SELECT InbredSetId,InbredSetName,Name,SpeciesId,FullName WHERE"
+ (int-to-string id) " LIMIT 1"))
+ (get-row db))))