-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.dbml
1387 lines (1231 loc) · 29.9 KB
/
schema.dbml
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
// https://dbdiagram.io/d/600896e480d742080a373304
Enum amino_acid_enum {
A [note: 'A/Ala, Alanine']
C [note: 'C/Cys, Cysteine']
D [note: 'D/Asp, Aspartic acid']
E [note: 'E/Glu, Glutamic acid']
F [note: 'F/Phe, Phenylalanine']
G [note: 'G/Gly, Glutamine']
H [note: 'H/His, Histidine']
I [note: 'I/Ile, Isoleucine']
K [note: 'K/Lys, Lysine']
L [note: 'L/Leu, Leucine']
M [note: 'M/Met, Methionine']
N [note: 'N/Asn, Asparagine']
P [note: 'P/Pro, Proline']
Q [note: 'Q/Gln, Glutamine']
R [note: 'R/Arg, Arginine']
S [note: 'S/Ser, Serine']
T [note: 'T/Thr, Threonine']
V [note: 'V/Val, Valine']
W [note: 'W/Trp, Tryptophan']
Y [note: 'Y/Tyr, Tyrosine']
X [note: 'Out-frame deletion']
stop [note: 'Stop codon']
del [note: 'Deletion']
ins [note: 'Insertion']
}
Enum numeric_cmp_enum {
"=" [note: 'Equal']
">" [note: 'More than']
"<" [note: 'Less than']
"~" [note: 'About']
}
Table articles as R {
ref_name varchar [
pk,
note: 'Manually assigned name (RefID, RefName) for this reference, usually formed by the surname of first author, two digits year and an optional serial letter for distinguishing studies published in the same year'
]
doi varchar [
unique,
note: 'Digital Object Identifier (DOI) of a reference'
]
url varchar [
unique,
note: 'Web address of a reference; can be specified when DOI is not available'
]
first_author varchar [
not null,
note: 'First author name. Should formed by the surname, a comma and the initial of given names (no dots)'
]
year int [
not null,
note: 'Year of when this reference was published'
]
date_added date [not null]
date_updated date
}
Table treatments as Rx {
ref_name varchar [ref: > R.ref_name]
rx_name varchar [note: 'Name of the treatment']
indexes {
(ref_name, rx_name) [pk]
}
}
// TODO: add rx_vaccines to allow many-to-many relationship
// between rxvp and vaccines tables
Enum vaccine_type_enum {
"mRNA"
"Viral vector"
"Protein subunit"
"Inactivated virus"
"Mixed"
"DNA"
}
Table vaccines as V {
vaccine_name varchar [pk]
vaccine_type vaccine_type_enum
developer varchar
developer_country varchar
priority int [
note: "Display priority; lower number first"
]
}
Table vaccine_efficacy as VE {
ref_name varchar [ref: > R.ref_name]
vaccine_name varchar [ref: > V.vaccine_name]
var_name varchar [ref: > VAR.var_name]
design varchar
efficacy varchar
// lower_bound numeric(2,0)
// upper_bound numeric(2,0)
}
Table rx_antibodies as RxMAb {
ref_name varchar
rx_name varchar
ab_name varchar [ref: > MAb.ab_name]
indexes {
(ref_name, rx_name, ab_name) [pk]
rx_name
ab_name
}
}
Ref: RxMAb.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Table rx_compounds as RxDrug {
ref_name varchar
rx_name varchar
drug_name varchar [ref: > Drug.drug_name]
indexes {
(ref_name, rx_name, drug_name) [pk]
rx_name
drug_name
}
}
Ref: RxDrug.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Enum severity_enum {
"Asymptomatic"
"Mild"
"Moderate"
"Severe"
"Hospitalized"
"Non-Hospitalized"
}
Enum subject_species_enum {
"Human"
"Mouse"
"Rat"
"Macaque"
"Hamster"
"HyperIG" // Hyperimmune immunoglobulin TODO: this should be another type of Rx
}
Enum immune_status_enum {
"HIV" // The subject is affected by acquired immunodeficiency by infecting with HIV
"Primary" // The subject is affected by primary immunodeficiency
"Medical" // This subject is iatrogenic immunocompromised, i.e. received medical that could suppress their immuno system
"Unknown" // The immune status is not indicated by the study
"None" // the subject is not immunosuppressed
}
Table subjects as Sbj {
ref_name varchar [ref: > R.ref_name]
subject_name varchar
subject_species subject_species_enum
birth_year numeric(4)
num_subjects int [
note: "Indicates if this record is for an individual subject (=1) or a group of subjects (>1)."
]
indexes {
(ref_name, subject_name) [pk]
}
}
Table subject_infections as SbjInf {
ref_name varchar
subject_name varchar
infection_date_cmp numeric_cmp_enum [
default: "=",
note: '"=", ">", or "<"'
]
infection_date date
infected_var_name varchar [
not null,
ref: > VAR.var_name,
note: "Infected variant name"
]
location varchar [
note: "Location of where this person was infected"
]
immune_status immune_status_enum
severity severity_enum
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
indexes {
(ref_name, subject_name, infection_date) [pk]
infection_date
infected_var_name
}
}
ref: SbjInf.(ref_name, subject_name) > Sbj.(ref_name, subject_name)
Enum isolate_source_enum {
NP [note: 'Nasopharyngeal']
ETA [note: 'Endotracheal aspirate']
BAL [note: 'Bronchoalveolar lavage']
OP [note: 'Oropharyngeal']
LT [note: 'Lung Tissue']
AN [note: 'Anterior Nasal']
CNTS [note: 'combined nose and throat swab']
Respiratory
Plasma
Saliva
Stool
Sputum
Throat
Urine
Unknown
Pending
}
Table subject_isolates as SbjIso {
ref_name varchar
subject_name varchar
collection_date_cmp numeric_cmp_enum [
default: "=",
note: '"=", ">", or "<"'
]
collection_date date
iso_name varchar [
not null,
ref: > isolates.iso_name,
note: "Collected isolate name"
]
iso_source isolate_source_enum
iso_culture boolean
location varchar [
note: "Location of where this isolate was collected"
]
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
indexes {
(ref_name, subject_name, collection_date, iso_source, iso_culture) [pk]
collection_date
iso_name
}
}
ref: SbjIso.(ref_name, subject_name) > Sbj.(ref_name, subject_name)
Table subject_vaccines as SbjVacc {
ref_name varchar
subject_name varchar
vaccination_date_cmp numeric_cmp_enum [
default: "=",
note: '"=", ">", or "<"'
]
vaccination_date date
vaccine_name varchar [
ref: > vaccines.vaccine_name,
note: "Vaccine name"
]
dosage int [not null]
location varchar [
note: "Location of where this person was vaccinated"
]
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
indexes {
(ref_name, subject_name, vaccination_date, vaccine_name) [pk]
(ref_name, subject_name, dosage) [unique]
vaccination_date
vaccine_name
}
}
ref: SbjVacc.(ref_name, subject_name) > Sbj.(ref_name, subject_name)
Enum treatment_dosage_unit_enum {
"mg/kg"
"ml"
"mg"
"unit"
}
Table subject_treatments as PtRx {
ref_name varchar
subject_name varchar [
note: 'Subject who received the treatment (not the CP donor if rx_name is a CP)'
]
rx_name varchar [not null]
start_date_cmp numeric_cmp_enum [
default: "=",
note: '"=", ">", or "<"'
]
start_date date
end_date_cmp numeric_cmp_enum [
default: "=",
note: '"=", ">", or "<"'
]
end_date date
dosage numeric(8,0) [
note: 'dosage per day'
]
dosage_unit treatment_dosage_unit_enum
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
indexes {
(ref_name, subject_name, rx_name, start_date, end_date) [pk]
}
}
ref: PtRx.(ref_name, rx_name) > Rx.(ref_name, rx_name)
ref: PtRx.(ref_name, subject_name) > Sbj.(ref_name, subject_name)
Table subject_plasma as SbjP {
ref_name varchar
subject_name varchar [
note: 'Subject who is the CP/VP donor (not the subject received CP treatment)'
]
rx_name varchar
collection_date_cmp numeric_cmp_enum [
default: "=",
note: '"=", ">", or "<"'
]
collection_date date [not null]
location varchar [
note: "Location of where this plasma was collected"
]
// TODO: deprecate cumulative_group
cumulative_group varchar [note: "Cumulative group for cumulating results"]
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
indexes {
(ref_name, rx_name) [pk]
(ref_name, subject_name)
collection_date
rx_name
}
}
ref: SbjP.(ref_name, subject_name) > Sbj.(ref_name, subject_name)
Ref: SbjP.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Table antibodies as MAb {
ab_name varchar [
pk,
note: 'Name of the antibody'
]
abbreviation_name varchar
availability varchar
mature_month numeric(4,1)
institute varchar
origin varchar
priority int [
note: "Display priority; lower number first"
]
visibility bool [
note: "Should this antibody be displayed or not"
]
// todo_more_mab_definition varchar
date_added date [not null]
}
Table antibody_articles as MabR {
ref_name varchar [ref: > R.ref_name]
chiro_rx_name varchar
ab_name varchar [ref: > MAb.ab_name]
indexes {
(ref_name, chiro_rx_name, ab_name) [pk]
}
}
Table antibody_synonyms as MAbSyn {
ab_name varchar [ref: > MAb.ab_name]
synonym varchar [pk]
indexes {
ab_name
}
}
Enum ab_type_enum {
"mAb"
"nanobody"
}
Table antibody_invitro as MabVitro {
ab_name varchar [ref: > MAb.ab_name]
ab_type ab_type_enum
ab_source varchar
ic50 varchar
}
Table antibody_seq as MabSeq {
ab_name varchar [ref: > MAb.ab_name]
ighv_gene varchar
shm numeric(3)
cdrh3_length numeric(3)
iglv_gene varchar
}
Enum antibody_class {
"RBM Class I"
"RBM Class II"
"RBM Class III"
"RBM"
"RBD Core Cluster I"
"RBD Core Cluster II"
"RBD Core"
"NTD"
"S1"
"S2"
"S"
}
Table antibody_targets as MAbT {
ab_name varchar [ref: > MAb.ab_name]
pdb_id varchar
target varchar
class antibody_class
source varchar
indexes {
(ab_name, pdb_id, target, class, source)
}
}
Table antibody_epitopes as MAbEpi {
ab_name varchar [ref: > MAb.ab_name]
position int [
note: 'Epitope position'
]
indexes {
(ab_name, position) [pk]
}
}
Table compounds as Drug {
drug_name varchar [
pk,
note: "Name of the compound"
]
abbreviation_name varchar
}
Table compound_synonyms as DrugSyn {
drug_name varchar [ref: > Drug.drug_name]
synonym varchar [pk]
indexes {
drug_name
}
}
Table compound_binding_pockets as Pocket {
ref_name varchar [ref: > R.ref_name]
drug_name varchar [ref: > Drug.drug_name]
gene varchar [
ref: > G.gene,
note: 'Gene name'
]
position int [
note: 'Position of compound binding pocket'
]
indexes {
(ref_name, drug_name, gene, position) [pk]
}
}
Table variants as VAR {
var_name varchar [pk]
as_wildtype bool [
note: 'Should variant be treated as a wild type virus'
]
consensus_availability bool [
note: 'If consensus mutations of this variant exist in variant_consensus table'
]
}
Enum variant_status_enum {
VOC [note: 'Variant of Concern']
VOI [note: 'Variant of Interest']
VBM [note: 'Variant Being Monitored']
VUI [note: 'Variant under Investigation']
}
Table variant_status as VStatus {
var_name varchar [
ref: > VAR.var_name,
note: 'Variant name'
]
ref_name varchar [
ref: > R.ref_name,
note: 'Reference name'
]
status variant_status_enum
indexes {
(var_name, ref_name, status) [pk]
}
}
Table variant_consensus as VCons {
var_name varchar [
ref: > VAR.var_name,
note: 'Variant name'
]
gene varchar [
ref: > G.gene,
note: 'Mutation gene'
]
position int [
note: 'Position of this mutation'
]
amino_acid amino_acid_enum [
note: 'Amino acid of this mutation'
]
indexes {
(var_name, gene, position, amino_acid) [pk]
}
}
Table variant_synonyms as VARSYN {
var_name varchar [ref: > VAR.var_name]
synonym varchar
priority int [not null, note: 'Synonym priority']
indexes {
(var_name, synonym) [pk]
(var_name, synonym, priority) [unique]
}
}
Table isolates as I {
iso_name varchar [
pk,
note: 'Isolate name'
]
var_name varchar [
ref: > VAR.var_name,
note: 'Variant name of this isolate'
]
site_directed boolean [
not null,
note: 'Is this isolate created by site-directed mutagenesis?'
]
gisaid_id int [
note: 'GISAID isolate accession ID without the common initial "EPI_ISL_"'
]
genbank_accn varchar [
note: 'Genbank accession number'
]
sra_accn varchar [
note: 'SRA accession number'
]
expandable boolean [
not null,
note: 'Expand spike mutations or not'
]
indexes {
var_name
gisaid_id
genbank_accn
}
}
Table genes as G {
gene varchar [
pk,
note: 'Canonical gene name (compatible with Sierra-SARS2)'
]
display_name varchar [
unique,
note: 'Display gene name'
]
gene_order integer
indexes {
gene_order
}
}
Table gene_synonyms as GS {
gene varchar [
ref: > G.gene,
note: 'Gene name'
]
synonym varchar [
unique,
note: 'Gene synonym'
]
indexes {
(gene, synonym) [pk]
}
}
Table isolate_mutations as M {
iso_name varchar [
ref: > I.iso_name,
note: 'Isolate name'
]
gene varchar [
ref: > G.gene,
note: 'Mutation gene'
]
position int [
note: 'Position of this mutation'
]
amino_acid amino_acid_enum [
note: 'Amino acid of this mutation'
]
count int [
note: 'When cumulative/NGS data entered, the number of samples/reads carried this mutation'
]
total int [
note: 'When cumulative/NGS data entered, the number of samples/reads coverage at this position'
]
indexes {
(iso_name, gene, position, amino_acid) [pk]
}
}
Enum resistance_level_enum {
"susceptible"
"partial-resistance"
"resistant"
}
Enum ineffective_enum {
"control"
"experimental"
"both"
}
Enum potency_type_enum {
"NT50" // NTxx are mainly for Plasma
"NT80"
"NT90"
"NT100"
"IC50" // ICxx are mainly for MAbs
"IC80"
"IC90"
"IC100"
"EC50" // ECxx are mainly for chemical drugs
"EC90"
"RC50" // RCxx are relative concentration
"NC20"
"NC" [note: "Neutralization capacity"]
"Ki" [note: "Enzyme inhibition constant"]
"Kcat/Km" [note: "Michaelis-Menten kinetics, for enzymatic activity"]
}
Enum potency_unit_enum {
"ng/ml"
"µM"
"pM"
"nM"
"percent"
"IU/ml"
"s⁻¹µM⁻¹"
"s⁻¹M⁻¹"
"min⁻¹µM⁻¹"
"min⁻¹M⁻¹"
}
Enum virus_type_enum {
"live-virus"
"pseudovirus"
"chimeric-virus"
"surrogate"
"binding"
"VLP"
"enzyme" // for enzyme inhibition
"reporter-cell"
"protein expression"
}
Table assays as A {
assay_name varchar [pk]
virus_type virus_type_enum
indexes {
virus_type
}
}
Table rx_fold as RxF {
ref_name varchar
rx_name varchar
control_iso_name varchar [ref: > I.iso_name]
iso_name varchar [ref: > I.iso_name]
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
assay_name varchar [ref: > A.assay_name]
potency_type potency_type_enum [
note: 'Potency type (e.g. IC50, IC90)'
]
fold_cmp numeric_cmp_enum [
default: "=",
note: '"=", ">", or "<"'
]
fold numeric(10,1) [
note: 'Fold change comparing to wild type'
]
resistance_level resistance_level_enum [
note: 'Qualitative result when quantitative result (fold change) is not available'
]
ineffective ineffective_enum [
note: 'Rx has no effect on control sequence or experimental sequence'
]
cumulative_count int [
default: 1,
note: 'Cumulative count of matching results (when multiple)'
]
date_added date [not null]
indexes {
(rx_name, control_iso_name, iso_name, ref_name, assay_name, potency_type) [pk]
}
}
Ref: RxF.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Table rx_potency as RxPo {
ref_name varchar
rx_name varchar
iso_name varchar [ref: > I.iso_name]
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
assay_name varchar [ref: > A.assay_name]
potency_type potency_type_enum [
note: 'Potency type (e.g. IC50, IC90)'
]
potency numeric(10,3) [
note: 'Potency against this isolate, can be IC50, Titer, etc.'
]
cumulative_count int [
default: 1,
note: 'Cumulative count of matching results (when multiple)'
]
potency_upper_limit numeric(10,3)
potency_lower_limit numeric(10,3)
potency_unit potency_unit_enum [
note: 'Unit used by the potency value. Can be ng/ml, µM or pM'
]
date_added date [not null]
indexes {
(ref_name, rx_name, iso_name, assay_name, potency_type) [pk]
iso_name
assay_name
}
}
Ref: RxPo.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Table ref_isolate_pairs as RxIsoPair {
ref_name varchar
control_iso_name varchar [ref: > I.iso_name]
iso_name varchar [ref: > I.iso_name]
indexes {
(ref_name, control_iso_name, iso_name) [pk]
control_iso_name
iso_name
}
}
Table ref_unpaired_isolates as RxIsoUnpair {
ref_name varchar
iso_name varchar [ref: > I.iso_name]
indexes {
(ref_name, iso_name) [pk]
}
}
Table invitro_selection_results as Vitro {
ref_name varchar
rx_name varchar
backbone varchar [ref: > I.iso_name]
gene varchar [
note: 'Mutation gene'
]
position int [
note: 'Position of this mutation'
]
amino_acid amino_acid_enum [
note: 'Amino acid of this mutation'
]
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
date_added date [not null]
indexes {
(ref_name, rx_name, backbone, gene, position, amino_acid) [pk]
}
}
Table ref_invivo as InVivo {
ref_name varchar
subject_name varchar
collection_date date
section varchar [
note: 'The cited section in the reference; e.g. Figure 1, table 1 or page 1, para 4'
]
note varchar
date_added date [not null]
indexes {
(ref_name, subject_name, collection_date) [pk]
}
}
Ref: Susc.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Ref: InVivo.(ref_name, subject_name) > Sbj.(ref_name, subject_name)
Ref: Vitro.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Table ref_amino_acid as RefAA {
gene varchar [
ref: > G.gene,
note: 'Mutation gene'
]
position int [
note: 'Position'
]
amino_acid amino_acid_enum [
note: 'Amino acid'
]
codon char(3) [
note: 'Codon'
]
indexes {
(gene, position, amino_acid) [pk]
}
}
Table mutation_distance {
source_codon char(3) [note: 'Source codon']
dest_amino_acid amino_acid_enum [note: 'Mutated amino acid']
min_bp_changes smallint [note: 'Minimal basepair changes for this mutation to occur']
max_bp_changes smallint [note: 'Maximum basepair changes for this mutation to occur']
indexes {
(source_codon, dest_amino_acid) [pk]
}
}
Table blosum62 {
source_amino_acid amino_acid_enum [note: 'Source amino acid']
dest_amino_acid amino_acid_enum [note: 'Mutated amino acid']
score smallint [note: 'BLOSUM62 score']
indexes {
(source_amino_acid, dest_amino_acid) [pk]
}
}
Table amino_acid_prevalence as AAPcnt {
ref_name varchar [ref: > R.ref_name]
gene varchar [ref: > G.gene]
position int
amino_acid amino_acid_enum
count int
proportion numeric(8,7)
date_updated date
indexes {
(ref_name, gene, position, amino_acid) [pk]
(gene, position, amino_acid)
}
}
Table dms_ace2_binding as Binding {
// ref_name varchar [ref: > R.ref_name]
gene varchar [
ref: > G.gene,
note: 'Mutation gene'
]
position int [
note: 'Position of this mutation'
]
amino_acid amino_acid_enum [
note: 'Amino acid of this mutation'
]
ace2_binding numeric(10,2)
expression numeric(10,2)
ace2_contact boolean
// ace2_assay ace2_assay_type
// backbone varchar // RBD background
indexes {
// (ref_name, gene, position, amino_acid, backbone) [pk]
(gene, position, amino_acid) [pk]
}
}
Enum ace2_assay_type {
"monomeric"
"dimeric"
}
Table dms_escape_results as DMSEscape {
ref_name varchar
rx_name varchar
gene varchar [
note: 'Mutation gene'
]
position int [
note: 'Position of this mutation'
]
amino_acid amino_acid_enum [
note: 'Amino acid of this mutation'
]
escape_score numeric(10,3)
method dms_method_enum
// backbone varchar // RBD backbone
indexes {
// (ref_name, rx_name, gene, position, amino_acid, backbone) [pk]
(ref_name, rx_name, gene, position, amino_acid) [pk]
(gene, position, amino_acid)
}
}
Enum dms_method_enum {
"FACS" // fluorescence-activated cell sorting
"MACS" // magnetic-activated cell sorting
}
Ref: DMSEscape.(ref_name, rx_name) > Rx.(ref_name, rx_name)
Table ignore_mutations {
gene varchar [ref: > G.gene]
position integer
amino_acid amino_acid_enum
indexes {
(gene, position, amino_acid) [pk]
}
}
Table known_deletion_ranges {
gene varchar [ref: > G.gene]
position_start integer
position_end integer
indexes {
(gene, position_start, position_end) [pk]
}
}
Table last_update {
scope varchar [pk]
last_update timestamptz [not null]
}
// Derived tables begin
Enum rx_type_enum {
"antibody"
"compound"
"conv-plasma"
"vacc-plasma"
"enzyme-kinetics"
}
Enum iso_type_enum {
"indiv-mut"
"combo-muts"
}
Table isolate_pairs as IPair {
gene varchar [ref: > G.gene]