Name: imcljs
Owner: InterMine
Description: null
Created: 2016-11-08 17:43:43.0
Updated: 2017-11-02 15:07:54.0
Pushed: 2018-01-09 10:54:52.0
Homepage: null
Size: 110
Language: Clojure
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Clojure/ClojureScript library for interacting with Intermine's web services.
Add the necessary dependency to your project:
imcljs returns channels so you'll also want to include core.async
sage
imcljs funtions expect a map as their first parameter containing a mandtory `:root` key and two semi-optional keys, `:token` and `:model`.
(def flymine {:root “www.flymine.org/query”
:token nil ; Optional parameter for authentication
:model "genomic" ; Required by some functions, such as executing a query
})
ecommend fetching the `model` once and storing it in the above map for re-use across your application.
xamples
Fetching assets
; Fetch model (you'll need this for later.) (go (log (
; Fetch templates (go (log (
; Fetch lists (go (log (
; Fetch summary fields (go (log (
Fetching query results
result-fetching functions require that the `:model` key be present in their first parameter.
(ns my-app.core (:require-macros [cljs.core.async.macros :refer [go]]) (:require [imcljs.fetch :as fetch]
[cljs.core.async :refer [<!]]))
(def my-query {:from “Gene”
:select ["Gene.secondaryIdentifier Gene.symbol"]
:where [{:path "Gene.symbol"
:op "="
:value "a*"}]})
; Rows (go (log (
; Records (go (log (
; Row Count (go (log (