Skip to content

Commit

Permalink
better function name
Browse files Browse the repository at this point in the history
  • Loading branch information
sarabsethi committed Aug 12, 2016
1 parent 5dffe3a commit c3d2c60
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions SS_SetupRunInfo.m → SS_SetupRunOptions.m
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
function SS_SetupRunInfo( ks , kToUse , op_km_repeats , ts_km_repeats , ...
inMatFileName , outTxtFileName , corr_dist_threshold)

if nargin < 1
ks = [5,7,10,20:20:100,200,500,1000];
end
if nargin < 2
kToUse = 40;
end
if nargin < 3
op_km_repeats = 50;
end
if nargin < 4
ts_km_repeats = 500;
end
if nargin < 5
inMatFileName = 'HCTSA_new_data';
end
if nargin < 6
outTxtFileName = 'cluster_info.txt';
end
if nargin < 7
corr_dist_threshold = 0.2;
end

kIdx = find(ks == kToUse);
if isempty(kIdx)
fprintf('Could not find K = %i in ks - setting kToUse to %i',...
kToUse , ks(length(ks)));
kIdx = length(ks);
end

save('run_options.mat','ks','kIdx','op_km_repeats','ts_km_repeats',...
'inMatFileName','outTxtFileName','corr_dist_threshold');

end

function SS_SetupRunInfo( ks , kToUse , op_km_repeats , ts_km_repeats , ...
inMatFileName , outTxtFileName , corr_dist_threshold)

if ~exist('ks','var')
ks = [5,7,10,20:20:100,200,500,1000];
end
if ~exist('kToUse','var')
kToUse = 40;
end
if ~exist('op_km_repeats','var')
op_km_repeats = 50;
end
if ~exist('ts_km_repeats','var')
ts_km_repeats = 500;
end
if ~exist('inMatFileName','var')
inMatFileName = 'HCTSA_new_data';
end
if ~exist('outTxtFileName','var')
outTxtFileName = 'cluster_info.txt';
end
if ~exist('corr_dist_threshold','var')
corr_dist_threshold = 0.2;
end

kIdx = find(ks == kToUse);
if isempty(kIdx)
fprintf('Could not find K = %i in ks - setting kToUse to %i',...
kToUse , ks(length(ks)));
kIdx = length(ks);
end

save('run_options.mat','ks','kIdx','op_km_repeats','ts_km_repeats',...
'inMatFileName','outTxtFileName','corr_dist_threshold');

end

0 comments on commit c3d2c60

Please sign in to comment.