-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscriptForIMATmodelConstruction.m
More file actions
35 lines (25 loc) · 1.04 KB
/
scriptForIMATmodelConstruction.m
File metadata and controls
35 lines (25 loc) · 1.04 KB
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
% Make sure you load CobraToolbox first
load('recon22.mat');
changeCobraSolver('glpk','all');
model = recon22;
RPMImediumSimulation;
% Import the gene expression data
gxData = readtable('DATASET SenescenceGEM_ControlSen_geneExpressionData.txt');
% Separate
controlData = gxData(:,[2,4]);
senescenceData = gxData(:,[2,5]);
% Rename
controlData.Properties.VariableNames{1} = 'gene';
controlData.Properties.VariableNames{2} = 'value';
senescenceData.Properties.VariableNames{1} = 'gene';
senescenceData.Properties.VariableNames{2} = 'value';
% Prepare iMAT input
[controlModel, controlOptions] = prepDataForIMAT(modelRPMI, controlData);
[senescenceModel, senescenceOptions] = prepDataForIMAT(modelRPMI, senescenceData);
% Execute iMAT
controlModelIMAT = createTissueSpecificModel(controlModel, controlOptions);
senescenceModelIMAT = createTissueSpecificModel(senescenceModel, senescenceOptions);
% SAVE THESE RESULTS FOR GOD'S SAKE
t = char(datetime(now,'ConvertFrom','datenum'));
t(regexp(t, '[: ]'))='-';
save(append('iMATresults-', t, '.mat'));