-
Notifications
You must be signed in to change notification settings - Fork 0
/
cnomain.m
65 lines (43 loc) · 2.16 KB
/
cnomain.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%% CNO Experiment - Iclamp analysis
% Description: This script creates one excel file for controls, washout,
% and the treatment group, with each file containing the burst and average singlet
% AP properties of that section from all the files selected for analysis.
%Figures 2, 4 and 6 show the results for sections control, treatment and
%washout respectively.
%sheet 1 = burst properties for the particular section (control, washout
%etc)
%sheet 2 = singlet AP properties for the particular section
% Created by: Sayaka (Saya) Minegishi
% Contact: [email protected]
% Date: 5/11/2024
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
% USER- FILL OUT THIS SECTION:
%DEFINE the sweeps corresponding to each condition type. e.g. [1:5] means
%the group (e.g. control group) stretches from sweeps 1 to 5 inclusive.
controlsweeps = [1:10]; %adjust these values as necessary!
expsweeps = [11:20];
washoutsweeps = [21:30];
%DEFINE the names of the control, treatmnet, and washout groups' output
%excel file names.
controlexcelfilename = "control_cno_may11summary.xlsx"; %control summary file name
treatmentexcelfilename = "treatment_cno_may11summary.xlsx"; %treatment summary file name
washoutexcelfilename = "washout_cno_may11summary.xlsx";%washout summary file name
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
addpath('analysis_scripts_iclamp/')
savepath
mkdir tempdata %make a new folder to store the data files selected
dirname = pwd; %current working directory
disp(['Now working on directory ' dirname])
tempDir = fullfile(dirname, 'tempdata', filesep); % Folder to load data
get_files_from_user(dirname); %allow user to select files, then move the files to tempdata folder
%analyze each section
%controls
[burstTControl, singTControl, filesthatworkedcountControl] = CNO_analyze_group(dirname, tempDir, controlsweeps, controlexcelfilename)
%treament group
[burstTTreatment, singTTreatment, filesthatworkedcountTreatment] = CNO_analyze_group(dirname, tempDir, expsweeps, treatmentexcelfilename)
%washout group
[burstTwash, singTwash, filesthatworkedcountwash] = CNO_analyze_group(dirname, tempDir,washoutsweeps, washoutexcelfilename)
%remove temp directory
rmdir(tempDir,'s')