diff options
author | Pjotr Prins | 2023-07-28 14:01:53 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-07-28 14:01:53 +0200 |
commit | e6a6e950ea9d066dd499e332cc12404a23d96d08 (patch) | |
tree | f62f736e09eec562fc456fe44596d01750be643c | |
parent | 8cd227c551f772e142002171e0c928db637ecb08 (diff) | |
download | genenetwork3-e6a6e950ea9d066dd499e332cc12404a23d96d08.tar.gz |
Expanding data
-rwxr-xr-x | gn3-guile/web/webserver.scm | 18 |
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) |