aboutsummaryrefslogtreecommitdiff
path: root/gn/data/species.scm
diff options
context:
space:
mode:
authorPjotr Prins2023-08-21 12:21:01 +0200
committerPjotr Prins2023-08-21 12:21:01 +0200
commitd06d732625fdc48677ea32b129da905ebd527c38 (patch)
treec744372e426a2c1ed2042192e8292cb3a0536e31 /gn/data/species.scm
parentb151e98e3933d7e21f20554cc892f0bef0740cba (diff)
downloadgn-guile-d06d732625fdc48677ea32b129da905ebd527c38.tar.gz
Getting group info
Diffstat (limited to 'gn/data/species.scm')
-rw-r--r--gn/data/species.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/gn/data/species.scm b/gn/data/species.scm
index 72ab7cf..ca3bb05 100644
--- a/gn/data/species.scm
+++ b/gn/data/species.scm
@@ -6,9 +6,11 @@
#:use-module (ice-9 receive)
#:use-module (ice-9 string-fun)
#:use-module (gn db sparql)
+ #:use-module (gn data group)
#:use-module (web gn-uri)
#:export (
+ gnid-species
get-species-meta
get-species-data
get-species-shortnames
@@ -17,10 +19,10 @@
get-expanded-taxon-data
))
-(define (gn-species short-name)
- "Find the GN identifier from shortname"
+(define (gnid-species short-name)
+ "Find the GN identifier from shortname, e.g. Mus_musculus"
(let ([rec (get-expanded-taxon-data short-name)])
- rec
+ (url-parse-id (assoc-ref rec "gnid"))
))
(define (get-species)
@@ -128,5 +130,5 @@
("meta" . ,(mk-meta id))
("data" . ,(mk-data id))
("up" . ,(mk-meta "species"))
- ("links" . "test") ; ,(get-group-links (gn-species id)))
+ ("links" . ,(list->vector (get-group-links (gnid-species id))))
))