Commit 1fb28723 authored by Sam Harrison's avatar Sam Harrison
Browse files

Wrap PROFUMO in try/catch block

Hasn't been failing, but makes consistent with MELODIC behaviour.
parent f38c195e
......@@ -383,30 +383,34 @@ for n = 1:params.nRepeats
%% Run PROFUMO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
system(sprintf( ...
'sh Methods/PROFUMO.sh %s %s %d %1.2f', ...
repeatDir, niftiDir, params.iN, params.TR));
[pfm_Pg, pfm_P, pfm_A, pfm_pcA] = loadPROFUMO(repeatDir, params);
scores.PROFUMO(n) = calculateDecompositionAccuracy( ...
P, pfm_P, A, pfm_A, pcA, pfm_pcA, params);
% Correlations compared to 'neural' process
%[~, ~, scores.PROFUMO.pcAn(n,:,:)] ...
% = calculateDecompositionAccuracy( ...
% P, pfm_P, A, pfm_A, pcAn, pfm_pcA, params);
% Dual-reg from PFM group maps
[pfmdr_P, pfmdr_A] = runDR(D, pfm_Pg, params);
pfmdr_pcA = calculateNetmats(pfmdr_A, params);
scores.PFM_DR(n) = calculateDecompositionAccuracy( ...
P, pfmdr_P, A, pfmdr_A, pcA, pfmdr_pcA, params);
% Correlations compared to 'neural' process
%[~, ~, scores.PFM_DR.pcAn(n,:,:)] ...
% = calculateDecompositionAccuracy( ...
% P, pfmdr_P, A, pfmdr_A, pcAn, pfmdr_pcA, params);
try
system(sprintf( ...
'sh Methods/PROFUMO.sh %s %s %d %1.2f', ...
repeatDir, niftiDir, params.iN, params.TR));
[pfm_Pg, pfm_P, pfm_A, pfm_pcA] = loadPROFUMO(repeatDir, params);
scores.PROFUMO(n) = calculateDecompositionAccuracy( ...
P, pfm_P, A, pfm_A, pcA, pfm_pcA, params);
% Correlations compared to 'neural' process
%[~, ~, scores.PROFUMO.pcAn(n,:,:)] ...
% = calculateDecompositionAccuracy( ...
% P, pfm_P, A, pfm_A, pcAn, pfm_pcA, params);
% Dual-reg from PFM group maps
[pfmdr_P, pfmdr_A] = runDR(D, pfm_Pg, params);
pfmdr_pcA = calculateNetmats(pfmdr_A, params);
scores.PFM_DR(n) = calculateDecompositionAccuracy( ...
P, pfmdr_P, A, pfmdr_A, pcA, pfmdr_pcA, params);
% Correlations compared to 'neural' process
%[~, ~, scores.PFM_DR.pcAn(n,:,:)] ...
% = calculateDecompositionAccuracy( ...
% P, pfmdr_P, A, pfmdr_A, pcAn, pfmdr_pcA, params);
catch
warning('PROFUMO run failed.');
end
%% Save scores %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment