-
Notifications
You must be signed in to change notification settings - Fork 1
/
MPT_db_initialization.sql
153 lines (145 loc) · 3.96 KB
/
MPT_db_initialization.sql
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
CREATE TABLE "Biological Sample Info" (
"Sample_ID" Integer,
"Sample_type" Varchar,
"brain_region" Varchar,
"age_in_days" Integer,
"gel_density" Varchar,
PRIMARY KEY ("Sample_ID")
);
CREATE TABLE "ImageJ Parameters" (
"unique_tif_id" Varchar UNIQUE,
"Field" Varchar,
"formulation_id" Varchar,
"detector" Varchar,
"tracker" Varchar,
"video_quality" Varchar,
"track_duration" Integer,
"blob_diameter" Integer,
"linking_max_distance" Integer,
"gap_closing_max_distnce" Integer,
"gap_closing_max_fram_gap" Integer,
PRIMARY KEY ("unique_tif_id"),
CONSTRAINT "FK_ImageJ Parameters.track_duration"
FOREIGN KEY ("track_duration")
REFERENCES "Biological Sample Info"("Sample_ID"),
CONSTRAINT "tif_id_unique" UNIQUE (unique_tif_id)
);
CREATE INDEX "Key" ON "ImageJ Parameters" ("Field");
CREATE TABLE "MPT Raw Data" (
"timestep_id" Integer,
"particle_id" Integer UNIQUE,
"file_name" Varchar UNIQUE,
"Frame" Integer,
"Track_ID" Integer,
"X" Varchar,
"Y" Varchar,
"MSDs" Varchar,
"Gauss" Varchar,
"Quality" Varchar,
"SN_ratio" Varchar,
"Mean_Intensity" Varchar,
PRIMARY KEY ("timestep_id"),
CONSTRAINT "FK_MPT Raw Data.file_name"
FOREIGN KEY ("file_name")
REFERENCES "ImageJ Parameters"("unique_tif_id")
);
CREATE TABLE "MPT Statistical Features" (
"particle_id" Integer UNIQUE,
"file_name" Varchar UNIQUE,
"Track_ID" Integer,
"alpha" Varchar,
"D_fit" Varchar,
"kurtosis" Varchar,
"asymmetry1" Varchar,
"asymmetry2" Varchar,
"asymmetry3" Varchar,
"AR" Varchar,
"elongation" Varchar,
"boundedness" Varchar,
"fractal_dim" Varchar,
"trappedness" Varchar,
"efficiency" Varchar,
"straightness" Varchar,
"MSD_ratio" Varchar,
"Frames" Varchar,
"X" Varchar,
"Y" Varchar,
"Quality" Varchar,
"Mean_Intensity" Varchar,
"SN_ratio" Varchar,
"Deff1" Varchar,
"Deff2" Varchar,
"Mean Alpha" Varchar,
"Std alpha" Varchar,
"Mean D_fit" Varchar,
"Std D_fit" Varchar,
"Mean kurtosis" Varchar,
"Mean asymmetry1" Varchar,
"Std asymmetry1" Varchar,
"Mean asymmetry2" Varchar,
"Std asymmetry2" Varchar,
"Mean asymmetry3" Varchar,
"Std asymmetry3" Varchar,
"Mean AR" Varchar,
"Std AR" Varchar,
"Mean elongation" Varchar,
"Std elongation" Varchar,
"Mean boundedness" Varchar,
"Std boundedness" Varchar,
"Mean fractal_dim" Varchar,
"Std fractal_dim" Varchar,
"Mean trappedness" Varchar,
"Mean efficiency" Varchar,
"Std efficiency" Varchar,
"Mean straightness" Varchar,
"Std straightness" Varchar,
"Mean MSD_ratio" Varchar,
"Std MSD_ratio" Varchar,
"Mean frames" Varchar,
"Std frames" Varchar,
"Mean X" Varchar,
"Std X" Varchar,
"Mean Y" Varchar,
"Std Y" Varchar,
"Mean Quality" Varchar,
"Std Quality" Varchar,
"Mean Mean_Intensity" Varchar,
"Std Mean_Intensity" Varchar,
"Mean SN_Ratio" Varchar,
"Std SN_Ratio" Varchar,
"Mean Deff1" Varchar,
"Std Deff1" Varchar,
"Mean Deff2" Varchar,
"Std Deff2" Varchar,
PRIMARY KEY ("particle_id"),
CONSTRAINT "FK_MPT Statistical Features.file_name"
FOREIGN KEY ("file_name")
REFERENCES "ImageJ Parameters"("unique_tif_id"),
CONSTRAINT "FK_MPT Statistical Features.particle_id"
FOREIGN KEY ("particle_id")
REFERENCES "MPT Raw Data"("particle_id"),
CONSTRAINT "particle_id_and_file_name_unique" UNIQUE("particle_id", "file_name")
);
CREATE TABLE "Nanoparticles" (
"formulation_id" Varchar,
"solid_fraction" Varchar,
PRIMARY KEY ("formulation_id")
);
CREATE TABLE "MPT videos" (
"video_id" Varchar,
"formulation_id" Varchar,
"sample_id" Varchar,
PRIMARY KEY ("video_id"),
CONSTRAINT "FK_MPT videos.formulation_id"
FOREIGN KEY ("formulation_id")
REFERENCES "Nanoparticles"("formulation_id")
);
CREATE TABLE "Confocal Parameters" (
"file_name" Varchar,
"formulation_id" Varchar,
"sample_id" Integer,
PRIMARY KEY ("file_name"),
CONSTRAINT "FK_Confocal Parameters.sample_id"
FOREIGN KEY ("sample_id")
REFERENCES "Biological Sample Info"("Sample_ID")
);