aboutsummaryrefslogtreecommitdiff
path: root/gn3-guile/web/webserver.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn3-guile/web/webserver.scm')
-rwxr-xr-xgn3-guile/web/webserver.scm18
1 files changed, 14 insertions, 4 deletions
diff --git a/gn3-guile/web/webserver.scm b/gn3-guile/web/webserver.scm
index fb0ed38..648ea6a 100755
--- a/gn3-guile/web/webserver.scm
+++ b/gn3-guile/web/webserver.scm
@@ -247,6 +247,13 @@ SELECT ?species ?p ?o WHERE {
"unknown"
))
+(define (strip-lang s)
+ (list->string (match (string->list s)
+ [(#\"rest ... #\") rest]
+ [(#\"rest ... #\" #\@ #\e #\n) rest]
+ [rest rest]))
+ )
+
(define (get-expanded-species)
"Here we add information related to each species"
(map (lambda (rec)
@@ -258,11 +265,14 @@ SELECT ?species ?p ?o WHERE {
(match (pk (car row))
((taxonomy-name ncbi descr)
(cons `("wikidata" . ,wd-id)
- (cons `("ncbi" . ,ncbi)
- (cons `("taxonomy-name" . ,taxonomy-name)
+ (cons `("ncbi" . ,(strip-lang ncbi))
+ (cons `("ncbi-url" . ,(string-append "https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=" (strip-lang ncbi)))
+ (cons `("uniprot-url" . ,(string-append "https://www.uniprot.org/taxonomy/" (strip-lang ncbi)))
+
+ (cons `("taxonomy-name" . ,(strip-lang taxonomy-name))
; (cons `("shortname" . ,shortname)
- (cons `("description" . ,descr)
- rec)))))
+ (cons `("description" . ,(strip-lang descr))
+ rec)))))))
)
)))
) (get-species)