diff options
| author | Munyoki Kilyungi | 2026-01-06 18:16:09 +0300 |
|---|---|---|
| committer | Munyoki Kilyungi | 2026-01-06 18:16:09 +0300 |
| commit | 6d2ff305e578274265cbf52e1cb6a2a578cfc965 (patch) | |
| tree | d3e52b91446c439d570dd2c0bf8f80add9ae535a | |
| parent | 18e04fc984b083bff1004200bbda8cb1cd72ae69 (diff) | |
| download | gn-guile-6d2ff305e578274265cbf52e1cb6a2a578cfc965.tar.gz | |
Delete dead comments.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| -rwxr-xr-x[-rw-r--r--] | gn/db/sparql.scm | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/gn/db/sparql.scm b/gn/db/sparql.scm index bd7a306..c38b961 100644..100755 --- a/gn/db/sparql.scm +++ b/gn/db/sparql.scm @@ -108,46 +108,7 @@ Note this procedure works for GN, but does not yet work for wikidata" (define (tsv->scm text) "Split a TSV string into a list of fields. Returns list of names header) and rows" (let ([lst (map (lambda (f) (string-split f #\tab) ) (delete "" (string-split text #\newline)))]) - (values (car lst) (cdr lst)) - )) - -#! -(define-values (names res) (sparql-species-meta)) -(define table (get-rows names res)) -(define recs '()) -(define h (compile-species recs table)) -(assoc "http://genenetwork.org/species_drosophila_melanogaster" h) -(assoc-ref h "http://genenetwork.org/id/Drosophila_melanogaster") -(define d (car h)) -(assoc-ref (list d) "http://genenetwork.org/species_drosophila_melanogaster") - -(scm->json #(1 (("2" . 3)))) -;; [1,{"2":3}] -(scm->json #("http://genenetwork.org/species_drosophila_melanogaster" (("http://genenetwork.org/menuName" . "Drosophila") ("http://genenetwork.org/binomialName" . "Drosophila melanogaster") ))) -;; ["http://genenetwork.org/species_drosophila_melanogaster",{"http://genenetwork.org/menuName":"Drosophila","http://genenetwork.org/binomialName":"Drosophila melanogaster"}] -l -;; (("http://genenetwork.org/menuName" "Drosophila") ("http://genenetwork.org/name" "Drosophila") ("http://genenetwork.org/binomialName" "Drosophila melanogaster")) -(scm->json (map (lambda (i) (cons (car i) (car (cdr i)))) l)) -;; {"http://genenetwork.org/menuName":"Drosophila","http://genenetwork.org/name":"Drosophila","http://genenetwork.org/binomialName":"Drosophila melanogaster"} - - -curl -G https://query.wikidata.org/sparql -H "Accept: application/json; charset=utf-8" --data-urlencode query="SELECT DISTINCT * where { - wd:Q158695 wdt:P225 ?o . -} limit 5" -{ - "head" : { - "vars" : [ "o" ] - }, - "results" : { - "bindings" : [ { - "o" : { - "type" : "literal", - "value" : "Arabidopsis thaliana" - } - } ] - } -} -!# + (values (car lst) (cdr lst)))) (define (sparql-wd-species-info species) "Returns wikidata entry for species, e.g.: |
