Skip to content

Commit

Permalink
Update add_conc.m
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng-yu-zhang committed Mar 6, 2024
1 parent 3b7ae52 commit 9bbc2ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions add_conc/code/add_conc.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
% load model and YMDB data
modelWithConc = importModel('../../model/yeast-GEM.xml');
data = readtable('../data/allConcData.xlsx');
data = table2cell(data);
Expand All @@ -7,7 +8,6 @@

met.name = modelWithConc.metNames;
met.kegg = {};

for i = 1:length(met.name)
idx = find(strcmp('kegg.compound',modelWithConc.metMiriams{i, 1}.name));
if idx
Expand All @@ -16,12 +16,12 @@
clear idx
end

% add conc into model
metWithConc = {};
for j = 2:870
keggId = data{2, j};
idx = find(strcmp(keggId, met.kegg));
if idx
%fprintf(keggId)
metWithConc{end+1} = keggId;
for id= 1:length(idx)
metConc.allConc{idx(id), 1} = data{3, j};
Expand Down

0 comments on commit 9bbc2ae

Please sign in to comment.