Skip to content

Commit

Permalink
add expression/primary error message
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjorquera committed Apr 10, 2023
1 parent cc1f061 commit 3311fd5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
6 changes: 5 additions & 1 deletion qaqcfuncs/getSegMaps.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@
%
% find segmentations that have the same number of cells
%
idx = find(num_expr(i1) == num_seg);
idx = find(num_expr(i1) == num_seg);
if isempty(idx)
err_msg = 'expression error';
error(err_msg);
end
%
% if more than one segmentation type has the same number of cells
% compare positions to determine current segmenation map
Expand Down
15 changes: 11 additions & 4 deletions qaqcfuncs/imageloop.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,17 @@
err_str = ['CreateQAQC ', log_name, ' finished'];
mywritetolog(wd, uc, logstring, err_str, 2, 'QA_QC');
e{i2} = 0;
catch
e{i2} = 1;
err_str = ['ERROR: CreateQAQC ', log_name, ' failed'];
mywritetolog(wd, uc, logstring, err_str, 2, 'QA_QC');
catch E
switch E.message
case 'expression error'
e{i2} = 1;
err_str = ['ERROR: expression segmentation does not match primary segmentation'];
mywritetolog(wd, uc, logstring, err_str, 2, 'QA_QC');
otherwise
e{i2} = 1;
err_str = ['ERROR: CreateQAQC ', log_name, ' failed'];
mywritetolog(wd, uc, logstring, err_str, 2, 'QA_QC');
end
end
%
end
Expand Down
4 changes: 2 additions & 2 deletions shared/err_handl_qaqc.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
'does not exist or is corrupt'];
e_code = 1;
case 13
err_str = 'ERROR: check binary segmentation maps contain all 4 tissue+cell layers';
err_str = ['ERROR: check binary segmentation maps contain all 4 tissue+cell layers'];
e_code = 1;
case 14
err_str = ['WARNING: Could not export all QA QC images, check inForm tables'];
e_code = 0;
case 15
err_str = 'WARNING: check inForm output files';
err_str = ['WARNING: check inForm output files'];
e_code = 0;
end
%
Expand Down

0 comments on commit 3311fd5

Please sign in to comment.