-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReadinELISA.m
40 lines (31 loc) · 1.9 KB
/
ReadinELISA.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
%% Import data from ELISA spreadsheet
% Auto-generated by MATLAB on 12-Dec-2023 22:56:52
%% Set source location
sourcefolder = ["/Users/marthanarinemrihavenith/Desktop/Manuscripts/Submitted/2023-10 Breathwork CO2/Source Excels/Breathwork_ELISA.xlsx"];
%% Setup the Import Options
opts = spreadsheetImportOptions("NumVariables", 15);
% Specify sheet and range
opts.Sheet = "Sheet1";
opts.DataRange = "A2:O61";
% Specify column names and types
opts.VariableNames = ["ID", "breathwork", "active_breather", "amylase_am", "amylase_pm", "amylase_change", "IL1b_am", "IL1b_pm", "IL1b_change", "amylase_am_ln", "amylase_pm_ln", "amylase_ln_change", "IL1b_am_ln", "IL1b_pm_ln", "IL1b_ln_change"];
opts.SelectedVariableNames = ["ID", "breathwork", "active_breather", "amylase_am", "amylase_pm", "amylase_change", "IL1b_am", "IL1b_pm", "IL1b_change", "amylase_am_ln", "amylase_pm_ln", "amylase_ln_change", "IL1b_am_ln", "IL1b_pm_ln", "IL1b_ln_change"];
opts.VariableTypes = ["string", "string", "string", "double", "double", "double", "double", "double", "double","double", "double", "double", "double", "double", "double"];
opts = setvaropts(opts, 1, "WhitespaceRule", "preserve");
opts = setvaropts(opts, [1, 2, 3], "EmptyFieldRule", "auto");
% Import the data
ELISAtable = readtable(sourcefolder, opts, "UseExcel", false);
amylasematrix(:,1) = ELISAtable.amylase_am_ln;
amylasematrix(:,2) = ELISAtable.amylase_pm_ln;
IL1bmatrix(:,1) = ELISAtable.IL1b_am_ln;
IL1bmatrix(:,2) = ELISAtable.IL1b_pm_ln;
Amylaseholcontemp = ELISAtable.breathwork;
Amylasebreathtemp = ELISAtable.active_breather;
breathMOLECULARvector = [];
breathMOLECULARvector(Amylasebreathtemp=='passive',1)=1;
breathMOLECULARvector(Amylasebreathtemp=='active',1)=2;
holconMOLECULARvector = [];
holconMOLECULARvector(Amylaseholcontemp=='Holo',1)=1;
holconMOLECULARvector(Amylaseholcontemp=='Connect',1)=2;
%% Clear temporary variables
clear opts Amylaseholcontemp Amylasebreathtemp