From 66c26676c938e6ba35440bcb2e851fb025549ed0 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 20 Aug 2023 13:09:03 +0200 Subject: Add gnid to species - still a bug --- gn/data/species.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gn/data') diff --git a/gn/data/species.scm b/gn/data/species.scm index 98ea1b1..e06931e 100644 --- a/gn/data/species.scm +++ b/gn/data/species.scm @@ -16,6 +16,12 @@ get-expanded-taxon-data )) +(define (gn-species short-name) + "Find the GN identifier from shortname" + (let ([rec (get-expanded-taxon-data short-name)]) + rec + )) + (define (get-species) (receive (names res) (memo-sparql-species-meta) (let* ([table (get-rows names res)] @@ -62,13 +68,6 @@ ) -(define (get-expanded-species) - "Here we add information related to each species" - (map (lambda (rec) - (expand-species rec) - ) (get-species) -)) - (define (get-expanded-taxon-data short-name) "Here we add information related to one taxonomy species" (call/cc (lambda (return) @@ -121,4 +120,5 @@ ("meta" . ,(mk-meta id)) ("data" . ,(mk-data id)) ("up" . ,(mk-meta "species")) + ("links" . ,(get-group-links (gn-species id))) )) -- cgit v1.2.3