-
Notifications
You must be signed in to change notification settings - Fork 1
/
create_session3.m
49 lines (45 loc) · 1.44 KB
/
create_session3.m
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
dj.createSchema
% declare all tables
session3.Mouse
session3.Session
session3.SpikeDetectionParam
session3.Neuron
session3.Spikes
session3.ActivityStatitics
% insert the following data into the tables
mouse_data = [
struct('dob', "2018-03-01", 'mouse_id', 0, 'sex', 'M')
struct('dob', "2017-11-19", 'mouse_id', 1, 'sex', 'M')
struct('dob', "2017-11-20", 'mouse_id', 2, 'sex', 'unknown')
struct('dob', "2017-12-25", 'mouse_id', 5, 'sex', 'F')
struct('dob', "2018-01-01", 'mouse_id', 10, 'sex', 'F')
struct('dob', "2018-01-03", 'mouse_id', 11, 'sex', 'F')
struct('dob', "2018-05-12", 'mouse_id', 100, 'sex', 'F')
];
session_data = [
struct('experiment_setup', 0, ...
'experimenter', 'Shan Shen', ...
'mouse_id', 0, ...
'session_date', '2018-05-15'), ...
struct('experiment_setup', 0, ...
'experimenter', 'Shan Shen', ...
'mouse_id', 0, ...
'session_date', '2018-05-19'), ...
struct('experiment_setup', 1, ...
'experimenter', 'Dimitri Yatsenko', ...
'mouse_id', 5, ...
'session_date', '2018-01-05'), ...
struct('experiment_setup', 100, ...
'experimenter', 'Edgar Y. Walker', ...
'mouse_id', 100, ...
'session_date', '2018-05-25'), ...
struct('mouse_id', 100, ...
'session_date', '2018-06-01', ...
'experiment_setup', 1, ...
'experimenter', 'Jacob Reimer') ...
];
inserti(session3.Mouse, mouse_data)
inserti(session3.Session, session_data)
populate(session3.Neuron)
populate(session3.ActivityStatitics)
populate(session3.Spikes)