From 2a8ae48a36cc88105c9a4c056132c9a47e2f120a Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 27 Aug 2023 11:24:08 +0200 Subject: Shortnames --- gn/data/species.scm | 5 +++++ gn/db/sparql.scm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gn') diff --git a/gn/data/species.scm b/gn/data/species.scm index a712bae..100cccf 100644 --- a/gn/data/species.scm +++ b/gn/data/species.scm @@ -11,9 +11,11 @@ #:export ( gnid-species + get-species get-species-meta get-species-data get-species-shortnames + get-species-binominal-names get-expanded-species get-expanded-taxon-meta get-expanded-taxon-data @@ -95,6 +97,9 @@ (define (get-species-shortnames recs) (map (lambda r (assoc-ref (car r) "shortName")) recs)) +(define (get-species-binominal-names recs) + (map (lambda r (url-parse-id (car (car r)))) recs)) + (define (get-species-meta2 recs) "Return a list of short names and expand them to URIs" (map (lambda r diff --git a/gn/db/sparql.scm b/gn/db/sparql.scm index 7e512ff..c413b9a 100644 --- a/gn/db/sparql.scm +++ b/gn/db/sparql.scm @@ -100,7 +100,7 @@ PREFIX rdf: (define recs '()) (define h (compile-species recs table)) (assoc "http://genenetwork.org/species_drosophila_melanogaster" h) -(assoc-ref h "http://genenetwork.org/species_drosophila_melanogaster") ;; note switch! +(assoc-ref h "http://genenetwork.org/id/Drosophila_melanogaster") (define d (car h)) (assoc-ref (list d) "http://genenetwork.org/species_drosophila_melanogaster") -- cgit v1.2.3