forked from intermine/im-tables-3
/
db.cljs
99 lines (91 loc) · 3.88 KB
/
db.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
(ns im-tables.db)
(def subclassquery
{:description "Returns MP terms whose names match the specified search terms.",
:tags ["im:aspect:Phenotype" "im:frontpage" "im:public"],
:where [{:path "MPTerm.obsolete",
:op "=",
:code "B",
:editable "false",
:switchable "false",
:switched "LOCKED",
:value "false"}
{:path "MPTerm.name",
:op "CONTAINS",
:code "A",
:editable "true",
:switchable "false",
:switched "LOCKED",
:value "hemoglobin"}],
:name "Lookup_MPhenotype",
:title "Lookup --> Mammalian phenotypes (MP terms)",
:constraintLogic "A and B",
:select ["MPTerm.name" "MPTerm.identifier" "MPTerm.description"],
:sortOrder [{:path "MPTerm.name", :direction "ASC"}],
:model {:name "genomic"}})
(def outer-join-query {:from "Gene"
:select ["symbol"
"secondaryIdentifier"
"primaryIdentifier"
"organism.name"
"publications.firstAuthor"
"dataSets.name"]
:joins ["Gene.publications"]
:size 10
:sortOrder [{:path "symbol"
:direction "ASC"}]
:where [{:path "secondaryIdentifier"
:op "="
:value "AC3.1*" ;AC3*
:code "A"}]})
(def list-query {:title "esyN demo list"
:from "Gene"
:select ["Gene.secondaryIdentifier" "Gene.symbol" "Gene.primaryIdentifier" "Gene.organism.name"]
:where [{:path "Gene", :op "IN", :value "esyN demo list"}]})
(def default-db
{;:service {:root "www.flymine.org/query"}
;:query {:from "Gene"
; :size 10
; :select ["secondaryIdentifier"
; "symbol"
; "primaryIdentifier"
; "organism.name"
; "homologues.homologue.symbol"]
; :where [{:path "Gene"
; :op "IN"
; :value "esyN demo list"}
; {:path "Gene.symbol"
; :op "="
; :value "*a*"
; :code "B"}]}
;:service {:model "TESTMODEL"}
:settings {:buffer 2
:cdn "http://cdn.intermine.org"
:pagination {:start 0
:limit 20}
:codegen {:lang "py"
:comments? true
:html? true
:highlight? true}
:data-out {:selected-format :tsv
:accepted-formats {:tsv :all
:csv :all
:fasta [:Gene :Protein]
:rdf :all
:ntriples :all}
:order-formats [:tsv :csv :fasta :rdf :ntriples]
:export-data-package false
:compression nil}
:links {:vocab {:mine "flymine"}
:on-click nil
:url (fn [vocab] (str "#/reportpage/"
(:mine vocab) "/"
(:class vocab) "/"
(:objectId vocab)))}
;; Whether the dashboard buttons should be hidden on
;; initialisation and need to be expanded with a button.
:compact false}
:cache {:summaries {}
:summary {}
:selection {}
:filters {}
:tree-view {:selection #{}}}})