Skip to content
Snippets Groups Projects
updateSampleQC.m 922 B
Newer Older
function updateSampleQC( hTsgGUI, ind )          
%
% Update the QC code for WS and EXT samples
%
% Input
% hTsgGui ........... Handle of the main GUI project
% ind ............... Indices of the QC modified in tsg.SSPS_SPL
%
% Ouput
% Date are updated throught the setappdata MAtlab function
%

% Get the tsgstructure from the application
% -----------------------------------------
tsg = getappdata( hTsgGUI, 'tsg_data');

% Update WS QC
% ------------
indWS = find( tsg.SSPS_SPL_TYPE(ind) == 1 );
if ~isempty(indWS)
  tsg.SSPS_WS_QC(ind(indWS)) = tsg.SSPS_SPL_QC(ind(indWS));
end

% Update EXT QC
% -------------
indEXT = find( tsg.SSPS_SPL_TYPE(ind) == 2 );
if ~isempty(indEXT)
  tsg.SSPS_EXT_QC(ind(indEXT)) = tsg.SSPS_SPL_QC(ind(indEXT));
end


% update the tsg structure in the application
% -------------------------------------------
setappdata( hTsgGUI, 'tsg_data', tsg );

end