This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcypher.txt
264 lines (158 loc) · 18.9 KB
/
cypher.txt
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
match p=(n:`S_RANCHO-DISEASE-DRUG_2018-12-18_13-30`:Drug)-[*1..3]-(m:`S_GARD`) return p skip 150 limit 50
match p=(n)-[e*1..3]-(m:`GARD_v1`) where any(x in e where x.value='has_phenotype') return p limit 50
match(n:`S_RANCHO-DISEASE-DRUG_2018-12-18_13-30`:Drug)-[*1..3]-(m:`S_GARD`) with n,m match (m)-[e*1..2]-(d) where any(x in e where x.value='has_phenotype') return n.N_Name,m.N_Name,[x in e|x.gene],d.N_Name,labels(m) limit 100
match p=(n:`S_GARD`)-[e*0..2]-(m:`GHR_v1`) return p skip 100 limit 50
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match(n)-[:N_Name|:I_CODE*1..2]-(a:`S_HPO`) return count(distinct n) as `Orphanet`,count(distinct a) as `HPO`
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true and not (n)-[:N_Name|:I_CODE]-() return count(distinct n)
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true with distinct labels(n) as t, count(n) as cnt unwind t as Label return Label,sum(cnt) as Count order by Count desc
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_DOID`) where not exists(a.status) return count(distinct n) as `Orphanet`,count(distinct a) as `DO`
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_OMIM`:T047) return count(distinct n) as `Orphanet`,count(distinct a) as `OMIM`
match(n:`S_MONDO`)-[]-(m:DATA) where not exists(n.status) and exists(m.label) return count(n)
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MONDO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `Orphanet`,count(distinct a) as `MONDO`
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MONDO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `GARD`,count(distinct a) as `MONDO`
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MEDLINEPLUS`) return count(distinct n) as `GARD`,count(distinct a) as `MEDLINE`
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MESH`:T047) return count(distinct n) as `GARD`,count(distinct a) as `MESH`
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_OMIM`:T047) return count(distinct n) as `GARD`,count(distinct a) as `OMIM`
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_DOID`) where not exists(a.status) return count(distinct n) as `GARD`,count(distinct a) as `DO`
match(n:`S_MESH`:T047) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MEDLINEPLUS`:T047) return count(distinct n) as `MESH`,count(distinct a) as `MEDLINE`
match(n:`S_MESH`:T047) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MONDO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `MESH`,count(distinct a) as `MONDO`
match(n:`S_OMIM`:T047) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MONDO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `OMIM`,count(distinct a) as `MONDO`
match(n:`S_MONDO`)-[]-(m:DATA) where exists(m.label) and not exists(n.status) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_HPO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `MONDO`,count(distinct a) as `HPO`
match(n:`S_OMIM`:T047) where none(x in labels(n) where x='T028') return count(n)
MATCH (n:`Designated`)-[e*1..2]-(m:`human_phenotype`)-[]-(d:DATA) unwind e as g with distinct g.gene as g,count(n) as cnt unwind g as Gene return Gene,sum(cnt) as Count order by Count desc
match(n)-[]-(d:DATA) where d.id='MONDO:0019035' with n,d match(n)-[:R_subClassOf*1..9]->(m)-[]-(a:DATA) return n,d,m,a
match(n)-[]-(d:DATA) where d.id='MONDO:0011308' with n,d match p=(n)-[e:R_subClassOf*1..9]->(m:S_MONDO)<--(a:DATA) where not m:TRANSIENT and all(x in e where x.source=n.source or n.source in x.source) return n,d,m,a
match(n)--(d:DATA) where d.id='MONDO:0019035' with n,d match p=(n:S_MONDO)-[e:R_subClassOf*1..6]->(m:S_MONDO)--(:DATA) where all(x in e where x.value =~ 'http://purl.obolibrary.org/obo/MONDO.*') return p
match(n:`S_MONDO`)-[]-(m:DATA) where exists(m.label) and not exists(n.status) and not (n)<-[:R_subClassOf]-() return count(n)
# all leaf nodes descendants of rare disease
match(n)-[]-(d:DATA) where exists(d.label) and not exists(n.status) and not (n)<-[:R_subClassOf]-() with n match(n)-[:R_subClassOf*1..9]->(m) where 'MONDO:0021200' in m.I_CODE return count(distinct n)
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `ORDO`, count(distinct a) as `NORD`
match p=(n:`S_MEDGEN`:T047)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `MEDGEN`, count(distinct a) as `NORD`
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) return count(distinct n) as `ORDO`, count(distinct a) as `MEDGEN`
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `ORDO`, count(distinct a) as `NCI`
match(n:`S_GHR`)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `GHR`, count(distinct a) as `NCI`
match(n:`S_GHR`)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:`T047`) return count(distinct n) as `GHR`, count(distinct a) as `MEDGEN`
match(n:`S_GHR`)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `GHR`, count(distinct a) as `NORD`
match(n:`S_DOID`)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) where not exists(n.status) return count(distinct n) as `DOID`, count(distinct a) as `NORD`
match(n:`S_DOID`)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) where not exists(n.status) return count(distinct n) as `DOID`, count(distinct a) as `MEDGEN`
match(n:`S_DOID`)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) where not exists(n.status) return count(distinct n) as `DOID`, count(distinct a) as `NCI`
match(n:`S_MESH`:T047) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MEDLINEPLUS`:T047) return count(distinct n) as `MESH`,count(distinct a) as `MEDLINE`
match(n:`S_MESH`:T047) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MONDO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `MESH`,count(distinct a) as `MONDO`
match(n:`S_OMIM`:T047) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MONDO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `OMIM`,count(distinct a) as `MONDO`
match(n:`S_MONDO`)-[]-(m:DATA) where exists(m.label) and not exists(n.status) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_HPO`)-[]-(b:DATA) where exists(b.label) and not exists(a.status) return count(distinct n) as `MONDO`,count(distinct a) as `HPO`
match(n:`S_OMIM`:T047) where none(x in labels(n) where x='T028') return count(n)
MATCH (n:`Designated`)-[e*1..2]-(m:`human_phenotype`)-[]-(d:DATA) unwind e as g with distinct g.gene as g,count(n) as cnt unwind g as Gene return Gene,sum(cnt) as Count order by Count desc
match(n)-[]-(d:DATA) where d.id='MONDO:0019035' with n,d match(n)-[:R_subClassOf*1..9]->(m)-[]-(a:DATA) return n,d,m,a
match(n:`S_MONDO`)-[]-(m:DATA) where exists(m.label) and not exists(n.status) and not (n)<-[:R_subClassOf]-() return count(n)
# all leaf nodes descendants of rare disease
match(n)-[]-(d:DATA) where exists(d.label) and not exists(n.status) and not (n)<-[:R_subClassOf]-() with n match(n)-[:R_subClassOf*1..9]->(m) where 'MONDO:0021200' in m.I_CODE return count(distinct n)
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `ORDO`, count(distinct a) as `NORD`
match p=(n:`S_MEDGEN`:T047)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `MEDGEN`, count(distinct a) as `NORD`
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) return count(distinct n) as `ORDO`, count(distinct a) as `MEDGEN`
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `ORDO`, count(distinct a) as `NCI`
match(n:`S_GHR`)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `GHR`, count(distinct a) as `NCI`
match(n:`S_GHR`)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:`T047`) return count(distinct n) as `GHR`, count(distinct a) as `MEDGEN`
match(n:`S_GHR`)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `GHR`, count(distinct a) as `NORD`
match(n:`S_DOID`)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) where not exists(n.status) return count(distinct n) as `DOID`, count(distinct a) as `NORD`
match(n:`S_DOID`)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) where not exists(n.status) return count(distinct n) as `DOID`, count(distinct a) as `MEDGEN`
match(n:`S_DOID`)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) where not exists(n.status) return count(distinct n) as `DOID`, count(distinct a) as `NCI`
match(n:`S_OMIM`:T047)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) where not exists(n.status) return count(distinct n) as `OMIM`, count(distinct a) as `MEDGEN`
match(n:`S_OMIM`:T047)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) where not exists(n.status) return count(distinct n) as `OMIM`, count(distinct a) as `NORD`
match(n:`S_MESH`:T047)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `MESH`, count(distinct a) as `NORD`
match(n:`S_MESH`:T047)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) return count(distinct n) as `MESH`, count(distinct a) as `MEDGEN`
match(n:`S_MESH`:T047)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `MESH`, count(distinct a) as `NCI`
match(n:`S_MEDLINEPLUS`)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `MEDLINE`, count(distinct a) as `NCI`
match(n:`S_MEDLINEPLUS`)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) return count(distinct n) as `MEDLINE`, count(distinct a) as `MEDGEN`
match(n:`S_MEDLINEPLUS`)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `MEDLINE`, count(distinct a) as `NORD`
match(n:`S_MONDO`)-[]-(d:DATA) where not exists(n.status) and exists(d.label) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `MONDO`, count(distinct a) as `NORD`
match(n:`S_MONDO`)-[]-(d:DATA) where not exists(n.status) and exists(d.label) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) return count(distinct n) as `MONDO`, count(distinct a) as `MEDGEN`
match(n:`S_MONDO`)-[]-(d:DATA) where not exists(n.status) and exists(d.label) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `MONDO`, count(distinct a) as `NCI`
match(n:`S_HPO`)-[:N_Name|:I_CODE*1]-(a:`S_THESAURUS`:`Disease or Syndrome`) return count(distinct n) as `HPO`, count(distinct a) as `NCI`
match(n:`S_HPO`)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) return count(distinct n) as `HPO`, count(distinct a) as `MEDGEN`
match(n:`S_HPO`)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `HPO`, count(distinct a) as `NORD`
match(n:`S_THESAURUS`:`Disease or Syndrome`)-[:N_Name|:I_CODE*1]-(a:`S_NORD`) return count(distinct n) as `NCI`, count(distinct a) as `NORD`
match(n:`S_THESAURUS`:`Disease or Syndrome`)-[:N_Name|:I_CODE*1]-(a:`S_MEDGEN`:T047) return count(distinct n) as `NCI`, count(distinct a) as `MEDGEN`
match p=(n:`S_RANCHO-DISEASE-DRUG_2018-12-18_13-30`)-[:I_CODE|:N_Name*1..2]-(m:`S_GARD`) with distinct labels(m) as t,count(distinct n) as cnt unwind t as Label return Label,sum(cnt) as Count order by Count desc
match p=(n:`S_RANCHO-DISEASE-DRUG_2018-12-18_13-30`)-[:I_CODE|:N_Name*1..2]-(m:`S_GARD`) return p limit 200
match p=(n:`S_GARD`)-[:I_GENE]-(m:`S_GARD`) where id(n) <> id(m) return count(distinct p)
match (n:`S_RANCHO-DISEASE-DRUG_2018-12-18_13-30`)-[]-(d:DATA) with n,d match p=(n)-[:I_CODE|:N_Name*1..2]-(m:`S_GARD`) return p,d limit 200
match (n:`S_FDAORPHANGARD_20190216`)-[]-(d:DATA) with n,d match p=(n)-[:I_CODE|:N_Name*1..2]-(m:`S_GARD`) return p,d limit 200
match(n:`S_GARD`)-[]-(m:DATA) where m.is_rare=true with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`)-[]-(b:DATA) return count(distinct n) as `GARD`,count(distinct a) as `ICD10`
match(n:`S_ORDO`)-[]-(m:DATA) where not exists(m.symbol) and not exists(m.reason_for_obsolescence) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`) return count(distinct n) as `ORDO`, count(distinct a) as `ICD10`
match(n:`S_GHR`)-[]-(m:DATA) with n match p=(n)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`) return count(distinct n) as `GHR`, count(distinct a) as `ICD10`
match(n:`S_DOID`)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`) where not exists(n.status) return count(distinct n) as `DOID`, count(distinct a) as `ICD10`
match(n:`S_OMIM`:T047)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`) where not exists(n.status) return count(distinct n) as `OMIM`, count(distinct a) as `ICD10`
match(n:`S_MEDLINEPLUS`)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`) return count(distinct n) as `MEDLINE`, count(distinct a) as `ICD10`
match(n:`S_MONDO`)-[]-(m:DATA) where exists(m.label) and not exists(n.status) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`) return count(distinct n) as `MONDO`,count(distinct a) as `ICD10`
match(n:`S_HPO`)-[]-(m:DATA) where exists(m.label) and not exists(n.status) with n match(n)-[:N_Name|:I_CODE*1]-(a:`S_ICD10CM`) return count(distinct n) as `HPO`,count(distinct a) as `ICD10`
match p=(n:`S_OMIM`)-[:R_rel{name:'has_inheritance_type'}]-(m:`S_OMIM`) where ('T033' in labels(m) or 'T045' in labels(m)) and any(x in m.I_CODE where x =~ 'MTHU.*') return distinct id(m),m.N_Name,m.I_CODE order by m.N_Name
## hpo mode of inheritance hierarchy
match p=(n:`S_HP`)-[:R_subClassOf*1..100]->(m:`S_HP`) where 'HP:0000005' in m.I_CODE return p
## mode of inheritance for gard diseases
match (n:`S_HP`)-[e:R_rel{value:'inheritance_type_of'}]-(m:`S_GARD`) with n,m,e match p=(n)-[]-(d:DATA), q=(m)-[]-(f:DATA) return e.MedGen_source as source,d.label as `mode of inheritance`,d.id as `HPO`,f.id as `GARD`,f.name as `GARD disease` limit 1000
match (n:S_ORDO_ORPHANET)-[]-(d:DATA) where n._N_Name contains 'CYSTIC FIBROSIS' with n,d match p=(n)-[:R_subClassOf{property:'http://www.orpha.net/ORDO/Orphanet_C016'}]-()-[]-(:`S_HP`) return p,d
match (n:`S_OMIM`)-[:R_rel{name:'has_inheritance_type'}]-(m:`S_OMIM`)-[:N_Name|:I_CODE]-(z:`S_HP`) where ('T033' in labels(m) or 'T045' in labels(m)) and any(x in m.I_CODE where x =~ 'MTHU.*') and n._N_Name contains 'CYSTIC FIBROSIS' with n,m,z match p=(n)-[]-(:DATA), q=(m)-[]-(:DATA) return p,q,z
match (n:S_MEDGEN)--(d:DATA) with n,d match p=(n)--(v:S_CLINVAR)--(z:S_OGG)--(x:DATA) with count(distinct v) as variantCount, d.id as CUI,d.NAME as Disease,x.label as Gene where Gene="PCSK9" return distinct(CUI),Disease,Gene,variantCount order by variantCount desc, CUI limit 20
match (n:`S_GARD`)-[]-(d:DATA) where n._N_Name contains toUpper('charge syndrome') with n,d match p=(n)-[e:N_Name|:I_CODE]-(o:S_OMIM:T047)-[:R_rel{name:'has_inheritance_type'}]-(m:S_OMIM)--(z:DATA), q=(o)--(x:DATA) return d.gard_id as GARD_ID,d.name as GARD,e.value as MATCHED,x.notation as OMIM,z.label as Inheritance
match (n:S_MONDO) with n.N_Name as syn, count(n) as cnt unwind syn as synonym return count(synonym)
match (n:S_GARD) with n.N_Name as syn, count(n) as cnt unwind syn as synonym return synonym,sum(cnt) as Count order by Count desc
match p=(n:ENTITY)--(:DATA) where n._N_Name contains toUpper('Lucey-Driscoll syndrome') return p
# monogenic diseases as leaf nodes.. remove
match(n:S_MONDO)--(d:DATA) where d.id='MONDO:0000275'
with n,d match (n)<-[e:R_subClassOf*1..10]-(m:S_MONDO)--(z:DATA)
where all(x in e where n.source=x.source or n.source in x.source)
#and not (m)<-[:R_subClassOf]-()
with m,z match(m)-[e:R_exactMatch|:R_equivalentClass]-(o:S_ORDO_ORPHANET)--(g:DATA)
where not exists(g.reason_for_obsolescence) with z,o,g optional
match(o)<-[:R_subClassOf]-(:S_ORDO_ORPHANET)--(d:DATA)
where exists(d.symbol) with z,g,collect(distinct d.symbol) as genes
where size(genes) < 2
return z.id,z.label,g.notation,g.label,genes limit 100
match (n:S_ORDO_ORPHANET)--(d:DATA) where d.notation='ORPHA:100021'
with n,d match p=(n)-[:R_subClassOf]->(:S_ORDO_ORPHANET)-[:R_rel{name:'intersectionOf'}]->(:S_ORDO_ORPHANET)--(z:DATA)
with collect(distinct z.label) as props return props
match (n:S_GARD)-[e:I_CODE|:N_Name]-(m:S_ORDO_ORPHANET)--(d:DATA)
where not exists(d.reason_for_obsolescence) with count(e) as s, n,m,d
where s > 3 match(m)<-[e:R_subClassOf]-(:S_ORDO_ORPHANET)--(z:DATA)
where exists(z.symbol) and e.property in
['http://www.orpha.net/ORDO/Orphanet_317343',
'http://www.orpha.net/ORDO/Orphanet_317344',
'http://www.orpha.net/ORDO/Orphanet_410295',
'http://www.orpha.net/ORDO/Orphanet_410296']
with n,d,z match(n)--(g:DATA)
with g.id as `GARD_ID`,g.name as `GARD_Disease`,
d.notation as `Orphanet_ID`,d.label as `Orphanet_Disease`,
collect(z.symbol) as `Genes` where size(Genes) < 2
return GARD_ID,GARD_Disease,Orphanet_ID,Orphanet_Disease,Genes order by GARD_ID
match (n:S_GARD)-[e:I_CODE|:N_Name]-(m:S_ORDO_ORPHANET)--(d:DATA)
where not exists(d.reason_for_obsolescence) with count(e) as s, n,m,d
where s > 2 match(m)<-[e:R_subClassOf]-(:S_ORDO_ORPHANET)--(z:DATA)
where exists(z.symbol) and e.property in
['http://www.orpha.net/ORDO/Orphanet_317343',
'http://www.orpha.net/ORDO/Orphanet_317344',
'http://www.orpha.net/ORDO/Orphanet_410295',
'http://www.orpha.net/ORDO/Orphanet_410296']
with n,m,d,z match(n)--(g:DATA)
with n,m,d,z,g optional match(m)-[:R_exactMatch|:R_equivalentClass]-(x:S_MONDO)-[e:R_subClassOf*1..5]->(:S_MONDO)--(:DATA{id:'MONDO:0000275'})
where all(y in e where x.source=y.source or x.source in y.source)
with g.id as `GARD_ID`,g.name as `GARD_Disease`,
d.notation as `Orphanet_ID`,d.label as `Orphanet_Disease`,
collect(z.symbol) as genes,x is not null as `MONDO_monogenic`
where size(genes) < 2
return GARD_ID,GARD_Disease,Orphanet_ID,Orphanet_Disease,
MONDO_monogenic, genes[0] as Gene limit 100
match p=(a:DATA)-->(n:S_MONDO)-[:R_exactMatch|:R_equivalentClass]-(m)<-[:PAYLOAD]-()
where not (n)-[:R_exactMatch|:R_equivalentClass]-(:S_GARD)
and not n:TRANSIENT
and not m:S_MONDO
and not exists(a.deprecated)
and not (n)<-[:R_subClassOf]-(:S_MONDO)
return count(distinct n)
match p=(a:DATA)-->(n:S_MONDO)-[:R_exactMatch|:R_equivalentClass]-(m)<-[:PAYLOAD]-()
where not (n)-[:R_exactMatch|:R_equivalentClass]-(:S_GARD)
and not n:TRANSIENT
and not m:S_MONDO
and not exists(a.deprecated)
and not (n)<-[:R_subClassOf]-(:S_MONDO)
with distinct labels(m) as t, count(distinct n) as cnt unwind t as Label
return Label, sum(cnt) as Count order by Label