0001 function GetData4MultiRxns
0002
0003
0004
0005
0006
0007
0008
0009
0010 RawRns = urlread('http://rest.kegg.jp/list/rn');
0011 Rns = regexp(RawRns, 'R\d{5}', 'match');
0012 Pth1 = which ('Bigg2Kegg.m');
0013 tind = find(Pth1=='\',1,'last');
0014 Pth = Pth1(1:tind-1);
0015 Pth = fullfile(Pth,'OfflineRxnData');
0016 fprintf('\nDownloading rxn data (of %d): ',numel(Rns))
0017 for ct = 1:numel(Rns)
0018 if ct>1
0019 for j=0:log10(ct-1)
0020 fprintf('\b');
0021 end
0022 end
0023 fprintf('%d', ct);
0024 RnDat = urlread(['http://rest.kegg.jp/get/',Rns{ct}]);
0025 save([Pth,'\',Rns{ct},'.mat'],'RnDat')
0026
0027
0028
0029
0030
0031 end
0032 DateCrt = date;
0033 save([Pth,'\','VersionDate.mat'],'DateCrt')
0034 fprintf('\n')
0035 disp('All reaction data has been downloaded and saved successfully!')