%% Add 22 all enzymes defined in toolbox/examplefiles/db/createEnzDb.m here.
%%Example 9.8 test enzymes added in createEnzDb.m
clear;
% % The following steps retrieve the enzyme MGAT2&3 from a local enzyme database. Thesetwo enzymes add GlcNAc to different mannose residues in the substrate.
enzdbmatfilename= 'glyenzDB.mat';
enzdb = enzdbmatLoad(enzdbmatfilename);
b3galt6=enzdb('b3galt6');       % new defined enzyme b3galt6
c1galt1=enzdb('c1galt1');       % new defined enzyme c1galt1
galnacta=enzdb('galnacta'); % new define enzyme galnacta
galtb=enzdb('galtb');       % new define enzyme galtb
FucTH1=enzdb('FucTH1');     % new define enzyme FucTH1
FucTH2=enzdb('FucTH2');     % new define enzyme FucTH2
FucTLe=enzdb('FucTLe');     % new define enzyme FucTLe
b3galt=enzdb('b3galt');     % new definee enzyme b3galt
IGNT=enzdb('IGNT');         % new defined enzyme IGNT
mgat5=enzdb('mgat5');
mgat4=enzdb('mgat4');
mgat3=enzdb('mgat3');
mgat2=enzdb('mgat2');
mgat1=enzdb('mgat1');
manii=enzdb('manii');
mani=enzdb('mani');
fucT8=enzdb('fucT8');
gnte=enzdb('gnte');
b4galt=enzdb('b4galt');
st3galI=enzdb('st3galI');
st3galIV=enzdb('st3galIV');
st3galVI = enzdb(‘st3galVI’);
fucT7=enzdb('fucT7');    %% total:  22 enzymes (2 FucTH)
% All enzymes are placed in a CellArrayList object called enzArray
enzArray = CellArrayList;
enzArray.add(b3galt6);
enzArray.add(c1galt1);
enzArray.add(galnacta);
enzArray.add(galtb);
enzArray.add(FucTH1);
enzArray.add(FucTH2);
enzArray.add(FucTLe);
enzArray.add(b3galt);
enzArray.add(IGNT);
enzArray.add(mgat5);
enzArray.add(mgat4);
enzArray.add(mgat3);
enzArray.add(mgat2);
enzArray.add(mgat1);
enzArray.add(manii);
enzArray.add(fucT8);
enzArray.add(gnte);
enzArray.add(b4galt);
enzArray.add(st3galI);
enzArray.add(st3galIV);
enzArray.add(st3galVI);
enzArray.add(fucT7);
% Starting substrate is the m3gn glycan (GlcNAcMan3GlcNAc2). This is read from .xml file
% and placed in another CellArrayList object
m9species= GlycanSpecies(glycanMLread('M9.glycoct_xml')) ;
m8species=GlycanSpecies(glycanMLread('M8.glycoct_xml'));
m3gnspecies=GlycanSpecies(glycanMLread('m3gn.glycoct_xml'));
substrateArray = CellArrayList;
substrateArray.add(m9species);
substrateArray.add(m8species);
%substrateArray.add(m3gnspecies);
% These steps run the inferGlyForwPath function and display results
fprintf(1,'Initial substrate structure is shown as below:');
glycanViewer(m9species.glycanStruct);
glycanViewer(m8species.glycanStruct);
[isPath,nglycanpath] = inferGlyForwPath(substrateArray, enzArray);
fprintf(1,'Network inferred from M9 and M8 substrate catalyzed by enzymes is shown asbelow:\n');
glycanPathViewer(nglycanpath)