Skip to content

Commit

Permalink
fixing naming of report for 'contrast' mode
Browse files Browse the repository at this point in the history
  • Loading branch information
CPernet committed Oct 27, 2016
1 parent 570eb61 commit df18bb5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 12 additions & 5 deletions limo_batch.m
Expand Up @@ -104,7 +104,7 @@
batch_contrast.mat = getfield(FileName,cell2mat(fieldnames(FileName)));
end
else
disp('limo batch aborded')
disp('limo batch aborded'); return
end

% update paths
Expand All @@ -128,7 +128,7 @@
batch_contrast.LIMO_files = getfield(FileName,cell2mat(fieldnames(FileName)));
end
else
disp('limo batch aborded')
disp('limo batch aborded'); return
end

% get the constrasts
Expand All @@ -142,7 +142,7 @@
batch_contrast.mat = getfield(FileName,cell2mat(fieldnames(FileName)));
end
else
disp('limo batch aborded')
disp('limo batch aborded'); return
end
end
else
Expand Down Expand Up @@ -317,6 +317,9 @@
% ----------------------
%% Save pipeline
% useful to re-run, simply calling psom_run_pipeline
if ~exist('glm_name','var') && strcmp(option,'contrast only')
[~,glm_name]=fileparts(fileparts(pipeline(1).n_contrast.files_in));
end
save([current filesep 'limo_batch_report' filesep 'limo_pipeline_' glm_name '.mat'],'pipeline')

% allocate names
Expand Down Expand Up @@ -366,12 +369,16 @@
for c=1:size(batch_contrast.mat,1)
index = 1;
for subject = 1:N
name{index} = [fileparts(pipeline(subject).glm.files_out) filesep 'con_' num2str(c) '_' glm_name '.mat'];
if strcmp(option,'contrast only')
name{index} = [fileparts(pipeline(subject).n_contrast.files_in) filesep 'con_' num2str(c) '.mat'];
else
name{index} = [fileparts(pipeline(subject).glm.files_out) filesep 'con_' num2str(c) '.mat'];
end
index = index + 1;
end
name = name';
cell2csv(['con_files_' glm_name '.txt'], name(find(~remove_con),:));
end
end
end

% save the report from psom
Expand Down
2 changes: 0 additions & 2 deletions limo_results.m
Expand Up @@ -286,12 +286,10 @@ function Image_results_Callback(hObject, eventdata, handles)
end
LIMO = handles.LIMO.LIMO; LIMO.design.tfce = 1; save LIMO LIMO
handles.LIMO.LIMO.design.tfce = 1;

end

% do the figure
% -------------
handles.LIMO.LIMO = LIMO;
limo_display_results(1,FileName,PathName,handles.p,handles.MCC,handles.LIMO.LIMO);
end
guidata(hObject, handles);
Expand Down

0 comments on commit df18bb5

Please sign in to comment.