forked from webyrd/mediKanren
-
Notifications
You must be signed in to change notification settings - Fork 0
/
study-imatinib.rkt
15494 lines (14870 loc) · 549 KB
/
study-imatinib.rkt
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#lang racket
(require
"mk-db.rkt"
)
(displayln
"Finished loading mk-db.rkt.")
;; we want a direct link bewteen imatinib and GIST
;; like TREATS predicate
;; or something like that
;; and no direct link bwteen imatinib and Asthma
;; which is what we are "discovering"
;; I think that is the basic idea
;; we already "know" that imatinib treats CML and GIST
;; through direct links
;; and are trying to discover other diseases it might treat
;; but want to go through genes that are already known to be safe
;; that imatinib is already known to target
;; the example is interesting because the query isn't just linear
;; we want to find a tree, not a path
;; Julian's SPARQL query:
;;
;; select ?activation ?disease where {
;; :imatinib :inhibits ?gene .
;; ?gene :associatedWith ?activation .
;; ?activation :associatedWith ?disease
;; FILTER EXISTS {
;; ?gene :associatedWith ?activation2 .
;; ?activation2 :associatedWith ?disease2 .
;; :imatinib :treats ?disease2
;; }
;; FILTER NOT EXISTS {
;; :imatinib :treats ?disease
;; }
;; }
"ASSOCIATED_WITH"
"AFFECTS"
(define rem-dups
(lambda (ls)
(cond
[(null? ls) '()]
[(member (car ls) (cdr ls)) (rem-dups (cdr ls))]
[else (cons (car ls) (rem-dups (cdr ls)))])))
(define set-subtraction
(lambda (l1 l2)
(cond
[(null? l1) '()]
[(member (car l1) l2) (set-subtraction (cdr l1) l2)]
[else (cons (car l1) (set-subtraction (cdr l1) l2))])))
(define union
(lambda (l1 l2)
(cond
[(null? l1) l2]
[(member (car l1) l2) (union (cdr l1) l2)]
[else (cons (car l1) (union (cdr l1) l2))])))
(define union*
(lambda args
(union*-aux args)))
(define union*-aux
(lambda (ls)
(cond
[(null? ls) '()]
[(null? (cdr ls)) (car ls)]
[else (union (car ls) (union*-aux (cdr ls)))])))
(define membero
(lambda (x ls)
(fresh (y rest)
(== `(,y . ,rest) ls)
(conde
[(== x y)]
[(=/= x y) (membero x rest)]))))
(define not-membero
(lambda (x ls)
(conde
[(== '() ls)]
[(fresh (y rest)
(== `(,y . ,rest) ls)
(=/= x y)
(not-membero x rest))])))
(define path-to-diseaseo
(lambda (x path)
(fresh (cui name concept-type*)
(== `(,cui ,name ,concept-type*) x)
(conde
[(membero "dsyn" concept-type*)
(== `(,x) path)]
[(not-membero "dsyn" concept-type*)
(fresh (y p e e-rest path^)
(== `(,e . ,path^) path)
(== `(,x ,y ,p . ,e-rest) e)
(conde
[(== "AFFECTS" p)]
[(== "CAUSES" p)])
(edgeo e)
(path-to-diseaseo y path^))]))))
;; Greg says:
;; the structure of an edge is:
;; (subject object predicate subject-type object-type pred-info)
;; So instead of looking for "gngm" in the type list of a concept, you can instead use subject-type or object-type to constrain the edge itself.
;; so:
;; (== `(,s-imatinib/gene ,m-imatinib/gene ,p-imatinib/gene . ,e-rest-imatinib/gene) e-imatinib/gene)
;; becomes (with fresh st-imatinib/gene):
;; (== `(,s-imatinib/gene ,m-imatinib/gene ,p-imatinib/gene st-imatinib/gene "gngm". ,e-rest-imatinib/gene) e-imatinib/gene)
;; then you no longer have to use membero
;; Will says:
;; What Greg says above, but stronger! Using member can allow too many entry types--think of it as a "fuzzy" version of a query! You asked for a gene? Well, here are genes, and proteins, and ...
;;; one step at a time!
;; TODO all direct edges from all types of imatinib
;; TODO count the number of times each gene appears inhibited, across all versions of imatinib
;; TODO find all the subgraphs of the form 'some variant of imatinib INHIBITS some specific gene which CAUSES some specific disease or neoplasm which is directly TREATED by that version of imatinib'. Ideally, fully explore most specific entities before broadening to categories.
;; Ah! Now Will is enlightened! I *need* to use "gngm" as the object type in the query, rather than calling membero on the list of associated types.
;; This will keep me from accidentally picking up aapp|T116|Amino Acid, Peptide, or Protein, for example, when I want genes.
;; TODO try strategy of most-specific to least-specific, based on branching factor for the next "hop" during a query
;; TODO intersection of relatively specific "dsyn", "neop", and "patf" directly treated by the relatively specific imatinib synonyms with the relatively specific "dsyn", "neop", and "patf" directly caused by the relatively specific genes (or gene groups) inhibited by the relatively specific imatinib synonyms
;; TODO relatively specific "dsyn", "neop", and "patf" that are directly caused by relatively specific genes inhibited by relatively specific imatinib synonyms
;; TODO intersection of "dsyn", "neop", and "patf" directly treated by the imatinib synonyms with the "dsyn", "neop", and "patf" directly caused by the genes (or gene groups) inhibited by the imatinib synonyms
;; TODO "dsyn", "neop", and "patf" that are directly caused by the genes (or gene groups) inhibited by the imatinib synonyms
;; TODO: How many of the cell functions below for KIT/C-KIT are unique? And how many of those are specific enough to be meaningful/useful?
;; try taking the union* of all the non-silly entries
;; Can I use this to help weed out bogus answers?
;;
;; (1290829 "Non-human disorder" ("dsyn"))
;;
;; #(3047 "Animal Diseases" (#(41 1)))
;; #(5591 "Bird Diseases" (#(41 1)))
;; #(7350 "Cat Diseases" (#(41 1)))
;; #(7453 "Cattle Diseases" (#(41 1)))
;; #(12979 "Dog Diseases" (#(41 1)))
;; #(16154 "Fish Diseases" (#(41 1)))
;; #(18018 "Goat Diseases" (#(41 1)))
;; #(19940 "Horse Diseases" (#(41 1)))
;; #(26431 "Monkey Diseases" (#(41 1)))
;; #(32851 "Poultry Diseases" (#(41 1)))
;; #(35801 "Rodent Diseases" (#(41 1)))
;; #(36946 "Sheep Diseases" (#(41 1)))
;; #(39006 "Swine Diseases" (#(41 1)))
;;
;; Maybe allow this one?
;;
;; #(242634 "Primate Diseases" (#(41 1)))
;;
;; Hmmm. None of these seem useful.
;;
;; the results don't seem useful, with (1290829 "Non-human disorder"
;; ("dsyn")) as either the subject or object
(run* (q)
(fresh (e subj obj pred st ot rest)
(== e q)
(== '(1290829 "Non-human disorder" ("dsyn")) obj)
(== `(,subj ,obj ,pred ,st ,ot . ,rest) e)
(edgeo e)))
;; For the diseases affected by the celfs of interest, how many are MANIFESTATION_OF that celf?
;;
;; (Might also want to explore which are MANIFESTATION_OF any of the celfs of interest.)
> (sort
(map
(lambda (celf)
(let ((disorders
(run* (q)
(fresh (e1 e2 disorder celf-type disorder-type rest1 rest2)
(== disorder q)
(conde
[(== "dsyn" disorder-type)]
[(== "neop" disorder-type)]
[(== "patf" disorder-type)])
(== `(,celf ,disorder "AFFECTS" ,celf-type ,disorder-type . ,rest1) e1)
(== `(,disorder ,celf "MANIFESTATION_OF" ,disorder-type ,celf-type . ,rest2) e2)
(edgeo e2)
(edgeo e1)))))
(list (length disorders) celf)))
'((312862 "Lymphocyte chemotaxis" ("celf"))
(1159455 "syncytium formation" ("celf"))
(1372294 "Increased Endocytosis" ("celf"))
(598948 "axonal guidance" ("celf"))
(1159821 "apoptotic program" ("celf"))
(1318468 "cell-mediated immune response" ("celf"))
(1326501 "eosinophil chemotaxis" ("celf"))
(1155303 "ER-overload response" ("celf"))
(1156259 "cell ion homeostasis" ("celf"))
(1159709 "cholesterol transport" ("celf"))
(1276855 "Monocyte chemotaxis" ("celf"))
(1326474 "vesicle fusion" ("celf"))
(1516338 "Cell Death Induction" ("celf"))
(598949 "axonal sprouting" ("celf"))
(1156042 "endosome transport" ("celf"))
(1159824 "nuclear fragmentation" ("celf"))
(1326121 "astrocyte activation" ("celf"))
(25186 "Meiosis" ("celf"))
(1155874 "Cell Cycle Checkpoint" ("celf"))
(1155876 "DNA replication checkpoint" ("celf"))
(1156132 "vacuolar acidification" ("celf"))
(1159689 "potassium ion transport" ("celf"))
(1326080 "muscle cell differentiation" ("celf"))
(1155013 "T-cell differentiation" ("celf"))
(598838 "membrane assembly" ("celf"))
(7580 "Cell Aggregation" ("celf"))
(32174 "Platelet adhesion" ("celf"))
(282636 "Cell Respiration" ("celf"))
(301896 "Cell-Mediated Cytolysis" ("celf"))
(392710 "Megakaryocytic maturation" ("celf"))
(596991 "myelination" ("celf"))
(1156032 "Microtubule Polymerization" ("celf"))
(1159339 "Protein Secretion" ("celf"))
(1159884 "adipocyte differentiation" ("celf"))
(1159938 "eosinophil differentiation" ("celf"))
(1159966 "myoblast differentiation" ("celf"))
(1159978 "osteoclast differentiation" ("celf"))
(1160520 "oocyte maturation" ("celf"))
(1326236 "filopodium formation" ("celf"))
(1326504 "neuronal migration" ("celf"))
(1513082 "Megakaryocyte Proliferation" ("celf"))
(599702 "reuptake" ("celf"))
(312861 "Neutrophil chemotaxis" ("celf"))
(1155792 "Meiotic Recombination" ("celf"))
(1516349 "Cell Maturation" ("celf"))
(1372847 "Increased Cellular Migration" ("celf"))
(312860 "Neutrophil migration, function" ("celf"))
(37841 "Sperm Capacitation" ("celf"))
(1159958 "neutrophil differentiation" ("celf"))
(19595 "Histamine Release" ("celf"))
(31945 "Pinocytosis" ("celf"))
(230871 "Mitochondrion in division" ("celf"))
(525010 "Autocrine Communication" ("celf"))
(600430 "Calcium Waves" ("celf"))
(1155752 "positive regulation of mitosis" ("celf"))
(1155949 "lamellipodium biogenesis" ("celf"))
(1156031 "Microtubule Depolymerization" ("celf"))
(1260960 "Cytolysis" ("celf"))
(1325887 "focal adhesion formation" ("celf"))
(1326341 "Epithelial Cell Proliferation" ("celf"))
(1326356 "amino acid import" ("celf"))
(1522821 "acidification" ("celf"))
(1155046 "T-Cell Proliferation" ("celf"))
(1325893 "histamine secretion" ("celf"))
(7588 "Cell Degranulation" ("celf"))
(949469 "Receptor Down-Regulation" ("moft" "celf"))
(1159816 "anti-apoptosis" ("celf"))
(1159909 "keratinocyte differentiation" ("celf"))
(1514761 "Receptor Inhibition" ("celf"))
(79396 "G2 Phase" ("celf"))
(1155846
"negative regulation of cyclin dependent protein kinase activity"
("celf"))
(1256369 "insulin secretion" ("celf"))
(1326346 "urothelial cell proliferation" ("celf"))
(3261 "Antibody Formation" ("celf"))
(24262 "Lymphocyte Activation" ("celf"))
(206431 "Antigen Presentation" ("celf"))
(1155003 "B-Cell Activation" ("celf"))
(1155004 "B-cell differentiation" ("celf"))
(1155008 "B Cell Proliferation" ("celf"))
(1155229 "humoral immune response" ("celf"))
(1155980 "actin filament depolymerization" ("celf"))
(1327616 "Cell secretion" ("celf"))
(1511002 "B-Cell Development" ("celf"))
(3272 "Antibody -dependent cell cytotoxicity" ("celf"))
(7591 "Cell division phases" ("celf"))
(10813 "Cytokinesis" ("celf"))
(14139 "Endocytosis" ("celf"))
(26255 "Mitosis" ("celf"))
(31308 "Phagocytosis" ("celf"))
(32176 "Platelet aggregation" ("celf"))
(37848 "Sperm Motility" ("celf"))
(85416 "Respiratory Burst" ("celf"))
(178666 "glucose transport" ("celf"))
(302167 "Cap formation" ("celf"))
(599893 "Protein translocation" ("celf"))
(600485 "Acrosome Reaction" ("celf"))
(887839 "Nuclear Import" ("celf"))
(949629 "Bystander Effect" ("celf"))
(1155065 "T-Cell Activation" ("celf"))
(1155607 "autophagic vacuole formation" ("celf"))
(1155631 "Chromosome Condensation" ("celf"))
(1155734 "lamin depolymerization" ("celf"))
(1155750 "Mitotic/Spindle Checkpoint" ("celf"))
(1155871 "nuclear migration" ("celf"))
(1155872 "Cell Cycle Regulation" ("celf"))
(1155893 "unidimensional cell growth" ("celf"))
(1158774 "negative regulation of transcription by glucose" ("celf"))
(1159442 "sporulation" ("celf"))
(1159512 "maltose transport" ("celf"))
(1159521 "hexose transport" ("celf"))
(1160602 "cholesterol absorption" ("celf"))
(1326207 "Programmed Cell Death, Type II" ("celf"))
(1326220 "synergid cell death" ("celf"))
(1326347 "fibroblast proliferation" ("celf"))
(1326502 "macrophage chemotaxis" ("celf"))
(1511632 "Cytoskeletal Modeling" ("celf"))
(1515126 "T-Cell Development" ("celf"))
(1516340 "Cell Death Process" ("celf"))
(1516743 "Complement-Dependent Cytotoxicity" ("celf"))
(1517348 "G2 Phase Arrest" ("celf"))
(1519167 "S Phase Arrest" ("celf"))
(1523105 "nuclear envelope disassembly" ("celf"))
(1523795 "stress fiber formation" ("celf"))
(4462 "Axonal Transport" ("celf"))
(15283 "Exocytosis" ("celf"))
(25564 "Metaphase" ("celf"))
(1450355 "Prometaphase" ("celf"))
(8018 "Chemotaxis" ("celf"))
(1156237 "Stimulation of Cell Proliferation" ("celf"))
(25251 "Membrane Potentials" ("celf"))
(7590 "Cell division" ("celf"))
(7613 "Cell physiology" ("celf"))
(596286 "Cell Growth Regulation" ("celf"))
(598501 "Chromosome Pairing" ("celf"))
(599894 "targeting" ("celf"))
(1155711 "stem cell division" ("celf"))
(1155766 "centrosome cycle" ("celf"))
(1326205 "Induction of Apoptosis" ("celf"))
(1326225 "cell homeostasis" ("celf"))
(4391 "Autophagy" ("celf"))
(7577 "Cell Adhesion" ("celf"))
(7581 "Cell Aging" ("celf"))
(7582 "Cell Communication" ("celf"))
(7586 "Cell Cycle" ("celf"))
(7608 "cell motility" ("celf"))
(24426 "Macrophage Activation" ("celf"))
(37080 "Signal Pathways" ("celf" "moft"))
(41904 "Up-Regulation (Physiology)" ("moft" "celf"))
(544888 "Mitotic arrest" ("celf"))
(596233 "release of sequestered calcium ion into cytoplasm" ("celf"))
(598087 "cell dedifferentiation" ("celf"))
(600431 "Calcium Signaling" ("celf"))
(678903 "Neuronal Transmission" ("celf"))
(872097 "Anoikis" ("celf"))
(887840 "Nuclear Export" ("celf"))
(1154382 "Cell-Cell Adhesion" ("celf"))
(1154401 "cell invasion" ("celf"))
(1154413 "Intercellular Communication" ("celf"))
(1158770 "Transcriptional Regulation" ("celf"))
(1158951 "maintenance of protein localization" ("celf"))
(1159946 "macrophage differentiation" ("celf"))
(1159974 "osteoblast differentiation" ("celf"))
(1257985 "Cross-Priming" ("celf"))
(1326057 "epithelial cell differentiation" ("celf"))
(1326120 "cell activation" ("celf"))
(1330957 "Cytokinesis of the fertilized ovum" ("celf"))
(1372180 "Increased Cellular Death" ("celf"))
(1515136 "T-Cell Transformation" ("celf"))
(1515432 "Thymocyte Development" ("celf"))
(1515979 "Anchorage-Independent Growth" ("celf"))
(1516334 "Cell Cycle Progression" ("celf"))
(1518147 "M Phase Arrest" ("celf"))
(1523169 "smooth muscle cell differentiation" ("celf"))
(1523298 "epithelial to mesenchymal transition" ("celf"))
(1540661 "cell fate" ("celf"))
(7595 "Cell Growth" ("celf"))
(596290 "Cell Proliferation" ("celf"))
(1155781 "spindle assembly" ("celf"))
(1155873 "Cell Cycle Arrest" ("celf"))
(7587 "Cell Death" ("celf"))
(7620 "Cell Survival" ("celf"))
(13081 "Down-Regulation" ("celf"))
(37083 "Signal Transduction" ("celf"))
(40682 "cell transformation" ("celf"))
(86982 "Signal Transduction Pathways" ("moft" "celf"))
(162638 "Apoptosis" ("celf"))
(221117 "Anergy" ("celf"))
(1155074 "mast cell activation" ("celf"))
(1514758 "Receptor Activation" ("celf"))))
(lambda (l1 l2) (< (car l1) (car l2))))
=>
'((0 (312862 "Lymphocyte chemotaxis" ("celf")))
(0 (1159455 "syncytium formation" ("celf")))
(0 (1372294 "Increased Endocytosis" ("celf")))
(0 (598948 "axonal guidance" ("celf")))
(0 (1326501 "eosinophil chemotaxis" ("celf")))
(0 (1155303 "ER-overload response" ("celf")))
(0 (1156259 "cell ion homeostasis" ("celf")))
(0 (1276855 "Monocyte chemotaxis" ("celf")))
(0 (1326474 "vesicle fusion" ("celf")))
(0 (1516338 "Cell Death Induction" ("celf")))
(0 (598949 "axonal sprouting" ("celf")))
(0 (1156042 "endosome transport" ("celf")))
(0 (1159824 "nuclear fragmentation" ("celf")))
(0 (1326121 "astrocyte activation" ("celf")))
(0 (1155874 "Cell Cycle Checkpoint" ("celf")))
(0 (1155876 "DNA replication checkpoint" ("celf")))
(0 (1156132 "vacuolar acidification" ("celf")))
(0 (1326080 "muscle cell differentiation" ("celf")))
(0 (1155013 "T-cell differentiation" ("celf")))
(0 (598838 "membrane assembly" ("celf")))
(0 (7580 "Cell Aggregation" ("celf")))
(0 (392710 "Megakaryocytic maturation" ("celf")))
(0 (1156032 "Microtubule Polymerization" ("celf")))
(0 (1159339 "Protein Secretion" ("celf")))
(0 (1159938 "eosinophil differentiation" ("celf")))
(0 (1159966 "myoblast differentiation" ("celf")))
(0 (1326236 "filopodium formation" ("celf")))
(0 (1326504 "neuronal migration" ("celf")))
(0 (1513082 "Megakaryocyte Proliferation" ("celf")))
(0 (312861 "Neutrophil chemotaxis" ("celf")))
(0 (1155792 "Meiotic Recombination" ("celf")))
(0 (1372847 "Increased Cellular Migration" ("celf")))
(0 (312860 "Neutrophil migration, function" ("celf")))
(0 (37841 "Sperm Capacitation" ("celf")))
(0 (1159958 "neutrophil differentiation" ("celf")))
(0 (31945 "Pinocytosis" ("celf")))
(0 (600430 "Calcium Waves" ("celf")))
(0 (1155752 "positive regulation of mitosis" ("celf")))
(0 (1155949 "lamellipodium biogenesis" ("celf")))
(0 (1156031 "Microtubule Depolymerization" ("celf")))
(0 (1325887 "focal adhesion formation" ("celf")))
(0 (1326356 "amino acid import" ("celf")))
(0 (1155046 "T-Cell Proliferation" ("celf")))
(0 (1325893 "histamine secretion" ("celf")))
(0 (949469 "Receptor Down-Regulation" ("moft" "celf")))
(0 (1159909 "keratinocyte differentiation" ("celf")))
(0 (79396 "G2 Phase" ("celf")))
(0
(1155846
"negative regulation of cyclin dependent protein kinase activity"
("celf")))
(0 (1326346 "urothelial cell proliferation" ("celf")))
(0 (1155004 "B-cell differentiation" ("celf")))
(0 (1155008 "B Cell Proliferation" ("celf")))
(0 (1155229 "humoral immune response" ("celf")))
(0 (1155980 "actin filament depolymerization" ("celf")))
(0 (1327616 "Cell secretion" ("celf")))
(0 (7591 "Cell division phases" ("celf")))
(0 (85416 "Respiratory Burst" ("celf")))
(0 (302167 "Cap formation" ("celf")))
(0 (599893 "Protein translocation" ("celf")))
(0 (600485 "Acrosome Reaction" ("celf")))
(0 (887839 "Nuclear Import" ("celf")))
(0 (949629 "Bystander Effect" ("celf")))
(0 (1155607 "autophagic vacuole formation" ("celf")))
(0 (1155631 "Chromosome Condensation" ("celf")))
(0 (1155734 "lamin depolymerization" ("celf")))
(0 (1155750 "Mitotic/Spindle Checkpoint" ("celf")))
(0 (1155871 "nuclear migration" ("celf")))
(0 (1155893 "unidimensional cell growth" ("celf")))
(0 (1158774 "negative regulation of transcription by glucose" ("celf")))
(0 (1159442 "sporulation" ("celf")))
(0 (1159512 "maltose transport" ("celf")))
(0 (1159521 "hexose transport" ("celf")))
(0 (1160602 "cholesterol absorption" ("celf")))
(0 (1326207 "Programmed Cell Death, Type II" ("celf")))
(0 (1326220 "synergid cell death" ("celf")))
(0 (1326347 "fibroblast proliferation" ("celf")))
(0 (1511632 "Cytoskeletal Modeling" ("celf")))
(0 (1515126 "T-Cell Development" ("celf")))
(0 (1516340 "Cell Death Process" ("celf")))
(0 (1516743 "Complement-Dependent Cytotoxicity" ("celf")))
(0 (1517348 "G2 Phase Arrest" ("celf")))
(0 (1519167 "S Phase Arrest" ("celf")))
(0 (1523105 "nuclear envelope disassembly" ("celf")))
(0 (1523795 "stress fiber formation" ("celf")))
(0 (25564 "Metaphase" ("celf")))
(0 (1450355 "Prometaphase" ("celf")))
(0 (1156237 "Stimulation of Cell Proliferation" ("celf")))
(0 (1155766 "centrosome cycle" ("celf")))
(0 (1326205 "Induction of Apoptosis" ("celf")))
(0 (1326225 "cell homeostasis" ("celf")))
(0 (544888 "Mitotic arrest" ("celf")))
(0 (596233 "release of sequestered calcium ion into cytoplasm" ("celf")))
(0 (598087 "cell dedifferentiation" ("celf")))
(0 (872097 "Anoikis" ("celf")))
(0 (887840 "Nuclear Export" ("celf")))
(0 (1154382 "Cell-Cell Adhesion" ("celf")))
(0 (1158951 "maintenance of protein localization" ("celf")))
(0 (1159946 "macrophage differentiation" ("celf")))
(0 (1257985 "Cross-Priming" ("celf")))
(0 (1372180 "Increased Cellular Death" ("celf")))
(0 (1515136 "T-Cell Transformation" ("celf")))
(0 (1515432 "Thymocyte Development" ("celf")))
(0 (1518147 "M Phase Arrest" ("celf")))
(0 (1155781 "spindle assembly" ("celf")))
(1 (1159821 "apoptotic program" ("celf")))
(1 (1318468 "cell-mediated immune response" ("celf")))
(1 (25186 "Meiosis" ("celf")))
(1 (1159689 "potassium ion transport" ("celf")))
(1 (301896 "Cell-Mediated Cytolysis" ("celf")))
(1 (596991 "myelination" ("celf")))
(1 (1160520 "oocyte maturation" ("celf")))
(1 (599702 "reuptake" ("celf")))
(1 (19595 "Histamine Release" ("celf")))
(1 (7588 "Cell Degranulation" ("celf")))
(1 (1514761 "Receptor Inhibition" ("celf")))
(1 (1511002 "B-Cell Development" ("celf")))
(1 (1326502 "macrophage chemotaxis" ("celf")))
(1 (1155711 "stem cell division" ("celf")))
(1 (1159974 "osteoblast differentiation" ("celf")))
(1 (1326057 "epithelial cell differentiation" ("celf")))
(1 (1515979 "Anchorage-Independent Growth" ("celf")))
(1 (1540661 "cell fate" ("celf")))
(1 (40682 "cell transformation" ("celf")))
(1 (221117 "Anergy" ("celf")))
(2 (32174 "Platelet adhesion" ("celf")))
(2 (282636 "Cell Respiration" ("celf")))
(2 (1159978 "osteoclast differentiation" ("celf")))
(2 (1516349 "Cell Maturation" ("celf")))
(2 (525010 "Autocrine Communication" ("celf")))
(2 (1326341 "Epithelial Cell Proliferation" ("celf")))
(2 (24262 "Lymphocyte Activation" ("celf")))
(2 (3272 "Antibody -dependent cell cytotoxicity" ("celf")))
(2 (10813 "Cytokinesis" ("celf")))
(2 (596286 "Cell Growth Regulation" ("celf")))
(2 (1154401 "cell invasion" ("celf")))
(2 (1154413 "Intercellular Communication" ("celf")))
(2 (1523169 "smooth muscle cell differentiation" ("celf")))
(3 (1159709 "cholesterol transport" ("celf")))
(3 (1522821 "acidification" ("celf")))
(3 (3261 "Antibody Formation" ("celf")))
(3 (1155003 "B-Cell Activation" ("celf")))
(3 (26255 "Mitosis" ("celf")))
(3 (37848 "Sperm Motility" ("celf")))
(3 (600431 "Calcium Signaling" ("celf")))
(3 (1516334 "Cell Cycle Progression" ("celf")))
(3 (1155074 "mast cell activation" ("celf")))
(4 (1159884 "adipocyte differentiation" ("celf")))
(4 (230871 "Mitochondrion in division" ("celf")))
(4 (206431 "Antigen Presentation" ("celf")))
(4 (4462 "Axonal Transport" ("celf")))
(4 (8018 "Chemotaxis" ("celf")))
(4 (25251 "Membrane Potentials" ("celf")))
(4 (1330957 "Cytokinesis of the fertilized ovum" ("celf")))
(4 (1523298 "epithelial to mesenchymal transition" ("celf")))
(4 (1155873 "Cell Cycle Arrest" ("celf")))
(5 (14139 "Endocytosis" ("celf")))
(5 (31308 "Phagocytosis" ("celf")))
(5 (32176 "Platelet aggregation" ("celf")))
(5 (178666 "glucose transport" ("celf")))
(5 (678903 "Neuronal Transmission" ("celf")))
(5 (7595 "Cell Growth" ("celf")))
(6 (1155872 "Cell Cycle Regulation" ("celf")))
(6 (24426 "Macrophage Activation" ("celf")))
(7 (7590 "Cell division" ("celf")))
(7 (1326120 "cell activation" ("celf")))
(8 (1260960 "Cytolysis" ("celf")))
(8 (1155065 "T-Cell Activation" ("celf")))
(8 (7613 "Cell physiology" ("celf")))
(8 (7581 "Cell Aging" ("celf")))
(8 (1514758 "Receptor Activation" ("celf")))
(9 (7582 "Cell Communication" ("celf")))
(9 (7608 "cell motility" ("celf")))
(9 (1158770 "Transcriptional Regulation" ("celf")))
(10 (7577 "Cell Adhesion" ("celf")))
(11 (1256369 "insulin secretion" ("celf")))
(11 (41904 "Up-Regulation (Physiology)" ("moft" "celf")))
(11 (7620 "Cell Survival" ("celf")))
(13 (7586 "Cell Cycle" ("celf")))
(15 (1159816 "anti-apoptosis" ("celf")))
(16 (598501 "Chromosome Pairing" ("celf")))
(16 (37080 "Signal Pathways" ("celf" "moft")))
(17 (599894 "targeting" ("celf")))
(18 (13081 "Down-Regulation" ("celf")))
(19 (86982 "Signal Transduction Pathways" ("moft" "celf")))
(24 (15283 "Exocytosis" ("celf")))
(29 (596290 "Cell Proliferation" ("celf")))
(32 (4391 "Autophagy" ("celf")))
(77 (7587 "Cell Death" ("celf")))
(88 (37083 "Signal Transduction" ("celf")))
(168 (162638 "Apoptosis" ("celf"))))
;; just test out for the celf (1155074 "mast cell activation" ("celf")):
;;
;; which disorders are affected by the celf, and are manifestations of the celf?
> (map
(lambda (celf)
(let ((disorders
(run* (q)
(fresh (e1 e2 disorder celf-type disorder-type rest1 rest2)
(== (list e1 e2) q)
(conde
[(== "dsyn" disorder-type)]
[(== "neop" disorder-type)]
[(== "patf" disorder-type)])
(== `(,celf ,disorder "AFFECTS" ,celf-type ,disorder-type . ,rest1) e1)
(== `(,disorder ,celf "MANIFESTATION_OF" ,disorder-type ,celf-type . ,rest2) e2)
(edgeo e2)
(edgeo e1)))))
disorders))
'((1155074 "mast cell activation" ("celf"))))
'(((((1155074 "mast cell activation" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(18209484 10352758))
((4096 "Asthma" ("dsyn"))
(1155074 "mast cell activation" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(2741114)))
(((1155074 "mast cell activation" ("celf"))
(12634 "Disease" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24486828
23394523
22300345
19909359
19508371
19290788
18485675
17336609
15589479
12574324
12217398
10213671
8376778
7964480
7964480))
((12634 "Disease" ("dsyn"))
(1155074 "mast cell activation" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(12217411)))
(((1155074 "mast cell activation" ("celf"))
(242184 "Hypoxia" ("patf"))
"AFFECTS"
"celf"
"patf"
(22188111))
((242184 "Hypoxia" ("patf"))
(1155074 "mast cell activation" ("celf"))
"MANIFESTATION_OF"
"patf"
"celf"
(16572929)))))
;; interesting! A direct causal link between KIT/C-KIT and asthma
;; seems unknown. So we are not just trying to connect a drug and
;; disease, but also KIT and the disease.
(map
(lambda (gene)
(let ((disorders
(run* (q)
(fresh (e0 celf disorder pred disorder-type rest0)
(== e0 q)
(fuzzy-concepto "asthma" disorder)
(== `(,gene ,disorder ,pred "gngm" ,disorder-type . ,rest0) e0)
(edgeo e0)))))
(let ((disorders (rem-dups disorders)))
disorders)))
'((1416655 "KIT gene" ("bacs" "imft" "gngm" "aapp"))
(920288 "C-KIT Gene" ("gngm" "aapp"))
(72470 "Proto-Oncogene Protein c-kit" ("aapp" "gngm" "rcpt" "imft"))))
=>
'(()
(((920288 "C-KIT Gene" ("gngm" "aapp"))
(155877 "Extrinsic asthma NOS" ("dsyn"))
"ASSOCIATED_WITH"
"gngm"
"dsyn"
(25337192 22505052)))
())
;; Look at the indirect connections between the 47 genes of interest and asthma.
;;
;; Query takes 2 minutes.
;;
;; The only *specfic* gene that uses mast cell activation as its celf is KIT (not C-KIT).
;; There are various other genes that use signal transduction.
;; And 'Antibodies' and 'Proteins' both use mast cell activation.
;; While the genes aren't specific, the celf used is.
(map
(lambda (gene)
(let ((disorders
(run* (q)
(fresh (e1 e2 e3 celf disorder disorder-type rest1 rest2 rest3)
(== (list e1 e2 e3) q)
(fuzzy-concepto "asthma" disorder)
(conde
[(== "dsyn" disorder-type)]
[(== "neop" disorder-type)]
[(== "patf" disorder-type)])
(== `(,gene ,celf "CAUSES" "gngm" "celf" . ,rest1) e1)
(== `(,celf ,disorder "AFFECTS" "celf" ,disorder-type . ,rest2) e2)
(== `(,disorder ,celf "MANIFESTATION_OF" ,disorder-type "celf" . ,rest3) e3)
(edgeo e1)
(edgeo e3)
(edgeo e2)))))
(let ((disorders (rem-dups disorders)))
disorders)))
'((1428985 "PDGFD gene" ("aapp" "gngm"))
(919477 "LCK gene" ("aapp" "enzy" "gngm"))
(1136340 "Semaphorins" ("bacs" "gngm" "aapp"))
(1366876 "MAPK14 gene" ("gngm" "aapp" "enzy"))
(1364818 "APP gene" ("enzy" "gngm" "bacs" "aapp" "imft"))
(1333568 "FLT3 gene" ("gngm" "phsu" "bacs" "aapp"))
(79050 "c-abl Proto-Oncogenes" ("aapp" "gngm"))
(79413 "Genes, abl" ("gngm" "aapp"))
(812253 "CRKL gene" ("bacs" "aapp" "gngm"))
(915156 "Ephrin Receptor EphA8" ("gngm" "enzy" "aapp"))
(2716 "Amyloid" ("bacs" "aapp" "gngm"))
(3241 "Antibodies" ("gngm" "aapp" "imft"))
(33640 "PROTEIN KINASE" ("gngm" "enzy" "aapp"))
(33681 "Protein Tyrosine Kinase" ("enzy" "gngm" "aapp"))
(164786 "Proto-Oncogene Proteins c-akt" ("gngm" "aapp" "enzy"))
(33684 "Proteins" ("bacs" "gngm" "aapp"))
(246681 "platelet-derived growth factor BB" ("gngm" "phsu" "aapp"))
(290068
"Platelet-Derived Growth Factor beta Receptor"
("aapp" "gngm" "rcpt" "enzy"))
(812228 "AKT1 gene" ("aapp" "phsu" "enzy" "gngm" "bacs"))
(812375 "ELK3 gene" ("enzy" "gngm" "bacs" "aapp"))
(1335239 "PPBP gene" ("bacs" "aapp" "gngm"))
(1419240 "RAD51 gene" ("enzy" "gngm" "aapp"))
(1421416 "UVRAG gene" ("gngm" "phsu" "aapp"))
(1422009 "TP63 gene" ("rcpt" "phsu" "imft" "aapp" "gngm"))
(1424677 "CKAP4 gene" ("gngm" "aapp" "bacs" "phsu"))
(1425835 "KCNH8 gene" ("gngm" "aapp" "bacs"))
(1439347 "BTG1 gene" ("gngm" "aapp"))
(4891 "Fusion Proteins, bcr-abl" ("aapp" "gngm" "bacs"))
(1439337 "tyrosine kinase ABL1" ("aapp" "gngm" "enzy"))
(80092
"Macrophage Colony-Stimulating Factor Receptor"
("enzy" "aapp" "imft" "gngm"))
(879468 "CSF1R gene" ("aapp" "imft" "rcpt" "gngm" "enzy"))
(32200 "Platelet-Derived Growth Factor" ("gngm" "aapp" "bacs"))
(72470 "Proto-Oncogene Protein c-kit" ("aapp" "gngm" "rcpt" "imft"))
(206364 "Receptor Protein-Tyrosine Kinases" ("enzy" "rcpt" "gngm" "aapp"))
(290067
"Platelet-Derived Growth Factor alpha Receptor"
("rcpt" "aapp" "gngm" "enzy"))
(174680 "Cyclin D1" ("gngm" "bacs" "aapp"))
(812385 "BCR gene" ("gngm" "bacs" "enzy" "aapp"))
(1335202 "PDGFRB gene" ("bacs" "gngm" "rcpt" "enzy" "aapp"))
(597357 "receptor" ("aapp" "gngm" "rcpt"))
(31727 "Phosphotransferases" ("aapp" "gngm" "enzy"))
(1412097 "ABL1 gene" ("imft" "enzy" "gngm" "aapp" "bacs" "phsu"))
(71253 "Platelet-Derived Growth Factor Receptor" ("aapp" "gngm" "enzy"))
(1826328 "MTTP gene" ("aapp" "lipd" "gngm" "imft" "phsu" "bacs"))
(79427 "Tumor Suppressor Genes" ("gngm" "aapp"))
(105770 "beta catenin" ("aapp" "gngm" "bacs"))
(920288 "C-KIT Gene" ("gngm" "aapp"))
(1416655 "KIT gene" ("bacs" "imft" "gngm" "aapp"))))
=>
;; cpu time: 127629 real time: 128505 gc time: 1446
'(()
((((919477 "LCK gene" ("aapp" "enzy" "gngm"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(24564241 1281217))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910))))
()
((((1366876 "MAPK14 gene" ("gngm" "aapp" "enzy"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(26467500))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910))))
((((1364818 "APP gene" ("enzy" "gngm" "bacs" "aapp" "imft"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(24188406
24188406
22841885
22841885
21978835
21978835
20597478
20597478
18256384
12176746
12176746))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910))))
((((1333568 "FLT3 gene" ("gngm" "phsu" "bacs" "aapp"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(23340802 23340802))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910))))
()
()
()
((((915156 "Ephrin Receptor EphA8" ("gngm" "enzy" "aapp"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(16789903 11409908 7835966))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910))))
((((2716 "Amyloid" ("bacs" "aapp" "gngm"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(26758977 25633229))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910))))
((((3241 "Antibodies" ("gngm" "aapp" "imft"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(22262845
19170657
19048108
17503113
15163542
14620151
14580993
12949238
12482196
12482196
12324469
9450748))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910)))
(((3241 "Antibodies" ("gngm" "aapp" "imft"))
(1155074 "mast cell activation" ("celf"))
"CAUSES"
"gngm"
"celf"
(25539676 16461989))
((1155074 "mast cell activation" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(18209484 10352758))
((4096 "Asthma" ("dsyn"))
(1155074 "mast cell activation" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(2741114))))
((((33640 "PROTEIN KINASE" ("gngm" "enzy" "aapp"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(22357971 19290922 18492778 16790031 16790031 16415076))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"
"celf"
(11197605 10087910))))
((((33681 "Protein Tyrosine Kinase" ("enzy" "gngm" "aapp"))
(37083 "Signal Transduction" ("celf"))
"CAUSES"
"gngm"
"celf"
(17426060 12035499 7882988))
((37083 "Signal Transduction" ("celf"))
(4096 "Asthma" ("dsyn"))
"AFFECTS"
"celf"
"dsyn"
(24447081 22447942 19530997 19075672 18699801))
((4096 "Asthma" ("dsyn"))
(37083 "Signal Transduction" ("celf"))
"MANIFESTATION_OF"
"dsyn"