diff --git a/arFramework3/Advanced/arCompileAllSetups.log b/arFramework3/Advanced/arCompileAllSetups.log deleted file mode 100644 index 35aa977c..00000000 --- a/arFramework3/Advanced/arCompileAllSetups.log +++ /dev/null @@ -1,4 +0,0 @@ -The following setup files were found and will be subsequently used for compiling: - - - diff --git a/arFramework3/Advanced/arCompileAllSetups.m b/arFramework3/Advanced/arCompileAllSetups.m index 0403cf5b..9b323165 100644 --- a/arFramework3/Advanced/arCompileAllSetups.m +++ b/arFramework3/Advanced/arCompileAllSetups.m @@ -87,7 +87,8 @@ if ~testmode eval(sprintf('arSave(''arCompileAllSetups_%s'');',mode)); end - case 'core' % only the most improtant setup commands + case 'core' % only the most important setup commands + did_compile = false; fid = fopen([name,ext], 'r'); while (~feof(fid)) % [str, fid] = arTextScan(fid, '%s', 'Delimiter', '', 'CommentStyle', '%'); @@ -96,7 +97,6 @@ if ~isempty(str) && ischar(str) str = strtrim(str); - did_compile = false; if ~isempty(str) && ischar(str) if ~isempty(regexp(str,'^arInit')) fprintf(fidlog,'%s\n',str); diff --git a/arFramework3/Advanced/arCopyBenchmarkModels.m b/arFramework3/Advanced/arCopyBenchmarkModels.m index a4f07411..87223ca4 100644 --- a/arFramework3/Advanced/arCopyBenchmarkModels.m +++ b/arFramework3/Advanced/arCopyBenchmarkModels.m @@ -13,18 +13,29 @@ % % 'fast10' % the 10 models with least computation times +% +% 'new' +% Three models that have been added to benchmark collection after +% publication of Hass et al, 2018 +% +% 'all' or '23' +% The 20 original benchmark models plus the three new models % % The (starting characters of) model names can also be % specified, e.g.: % arCopyBenchmarkModels('Becker') % arCopyBenchmarkModels('Swa') +% +% subset can also be a cell array of keywords and modelnames +% e.g.: {'fast10', 'new', 'Bachmann'}. % -% target_path Default: pwd +% target_path Default: current working directory (pwd) % % Examples % arCopyBenchmarkModels % 20 default benchmark models % arCopyBenchmarkModels('Bachmann') % only the Bachmann model % arCopyBenchmarkModels('Ra') % only the Raia model (abbreviation Ra only fits for Raia) +% arCopyBenchmarkModels({'fast10', "Chen"}) % 10 fastest models plus Chen_MSB2009 % % % Reference: @@ -36,17 +47,26 @@ % New Concepts for Evaluating the Performance of Computational Methods. % IFAC-PapersOnLine (2016) 49(26): 63-70. -function arCopyBenchmarkModels(subset,target_path) +function arCopyBenchmarkModels(subset, target_path) + +if ~exist('target_path','var') || isempty(target_path) + target_path = pwd; +end + if ~exist('subset','var') || isempty(subset) + % set default subset = '20'; + +elseif iscell(subset) + % recursive call + cellfun(@(x) arCopyBenchmarkModels(x, target_path), subset); + return + elseif isnumeric(subset) + % convert to string subset = num2str(subset); end -if ~exist('target_path','var') || isempty(target_path) - target_path = pwd; -end - models20 = { 'Bachmann_MSB2011',... 'Becker_Science2010',... @@ -70,6 +90,14 @@ function arCopyBenchmarkModels(subset,target_path) 'Zheng_PNAS2012'}; +% models from benchmarking collection not yet included in Hass et al, 2019 +new_models = { + 'Borghans_BiophysChem_1997', ... + 'Elowitz_Nature2000', ... + 'Sneyd_PNAS2002'}; +all_models = sort([models20, new_models]); + + switch lower(subset) case {'20',''} % default models = models20; @@ -112,52 +140,71 @@ function arCopyBenchmarkModels(subset,target_path) 'Swameye_PNAS2003',... 'Weber_BMC2015',... 'Zheng_PNAS2012'}; + case 'new' + models = new_models; + case {'all', '23'} + models = all_models; otherwise - ind = strmatch(lower(subset),lower(models20)); - if ~isempty(ind) - models = models20(ind); - else + % find models that start with the string subset + ind = startsWith(all_models, subset, IgnoreCase=true); + models = all_models(ind); + if isempty(models) error('Subset unknown'); end end -DoCopy(models, target_path, subset); +DoCopy(models, target_path); -function DoCopy(models, target_path, subset) +function DoCopy(models, target_path) -source_path = [fileparts(which('arInit')),filesep,'Examples']; +source_path = fullfile(fileparts(which('arInit')), 'Examples'); for i=1:length(models) + fprintf('Copying %s ...\n',models{i}); - copyfile([source_path,filesep,models{i}],[target_path,filesep,models{i}]); - - switch lower(subset) % model-specific operatios which has to be done: - case {'20','','lhsok'} - if strcmp(models{i},'Merkle_JAK2STAT5_PCB2016')==1 % just keep SetupFinal.m - delete([target_path,filesep,models{i},filesep,'SetupCFUE.m']); - delete([target_path,filesep,models{i},filesep,'SetupComprehensive.m']); - delete([target_path,filesep,models{i},filesep,'SetupH838.m']); - delete([target_path,filesep,models{i},filesep,'SetupSens.m']); - end - if strcmp(models{i},'Lucarelli_TGFb_2017')==1 % just keep reduced model with genes - rmdir([target_path,filesep,models{i},filesep,'TGFb_ComplexModel_ModelSelection_L1'],'s'); - rmdir([target_path,filesep,models{i},filesep,'TGFb_ComplexModel_withGenes'],'s'); - movefile([target_path,filesep,models{i},filesep,'TGFb_ComplexModel_WithGenes_Reduced',filesep,'*'],... - [target_path,filesep,models{i},filesep,'.']); - rmdir([target_path,filesep,models{i},filesep,'TGFb_ComplexModel_WithGenes_Reduced'],'s'); - end - if strcmp(models{i},'Sobotta_Frontiers2017')==1 % just keep Setup_Core.m - delete([target_path,filesep,models{i},filesep,'Setup_IL6_ExpDesign.m']); - delete([target_path,filesep,models{i},filesep,'Setup_IL6_Full.m']); - end - if strcmp(models{i},'Swameye_PNAS2003')==1 % just keep Setup.m - delete([target_path,filesep,models{i},filesep,'Setup2003.m']); - end + copyfile(fullfile(source_path, models{i}), ... + fullfile(target_path, models{i})); + + % model-specific operations which have to be done: + switch models{i} + case 'Becker_Science2010' + % use only original model, not Setup_Regularization.m + delete(fullfile(target_path, models{i}, 'Setup_Regularization.m')); + + case 'Boehm_JProteomeRes2014' + % only keep Setup.m + delete(fullfile(target_path, models{i}, 'Setup_FullModel_Boehm2014.m')); + + case 'Merkle_JAK2STAT5_PCB2016' + % only keep SetupFinal.m + delete(fullfile(target_path, models{i}, 'SetupCFUE.m')); + delete(fullfile(target_path, models{i}, 'SetupComprehensive.m')); + delete(fullfile(target_path, models{i}, 'SetupH838.m')); + delete(fullfile(target_path, models{i}, 'SetupSens.m')); + + case 'Lucarelli_TGFb_2017' + % just keep reduced model with genes + rmdir(fullfile(target_path, models{i}, 'TGFb_ComplexModel_ModelSelection_L1'),'s'); + rmdir(fullfile(target_path, models{i}, 'TGFb_ComplexModel_withGenes'),'s'); + movefile(fullfile(target_path, models{i}, 'TGFb_ComplexModel_WithGenes_Reduced', '*'), ... + fullfile(target_path, models{i})); + rmdir(fullfile(target_path, models{i}, 'TGFb_ComplexModel_WithGenes_Reduced'),'s'); + + case 'Sobotta_Frontiers2017' + % just keep Setup_Core.m + delete(fullfile(target_path, models{i}, 'Setup_IL6_ExpDesign.m')); + delete(fullfile(target_path, models{i}, 'Setup_IL6_Full.m')); + + case 'Swameye_PNAS2003' + % just keep Setup.m + delete(fullfile(target_path, models{i}, 'Setup2003.m')); end + + end