EASY refactor: First attempt

This commit is contained in:
2024-07-27 02:58:49 -04:00
parent 5269962927
commit bce30095aa
11 changed files with 340 additions and 301 deletions

View File

@@ -26,7 +26,7 @@ if ~exist(masterPlateFile, 'file') || isempty(masterPlateFile)
sortedFiles=mpFiles(sortedIndices);
masterPlateFile=sortedFiles{1};
disp('Using newest MasterPlate file: ', masterPlateFile, ', skipping directory selection');
catch Me
catch ME
% This can be silent, not really an error
end
@@ -157,7 +157,7 @@ try
MP(numb).specifics= ' ';
end
excLnNum=excLnNum+385;
msg=strcat('NumberOfMP = ',num2str(numb), 'lastLineNo. = ',num2str(excLnNum))
msg=strcat('NumberOfMP = ',num2str(numb), 'lastLineNo. = ',num2str(excLnNum));
end
end
catch ME
@@ -173,7 +173,7 @@ numOfMedias=0;
% Grabbing the bare filename from the MasterPlate file to see if we can automatically
% find a matching DrugMedia file
[mpFile, mpPath]=fullfile(masterPlateFile)
[mpFile, mpPath]=fullfile(masterPlateFile);
mpFileParts=strsplit(mpFile, '_');
mpBareFileName=strjoin(parts(2:end-1), '_');
@@ -261,7 +261,7 @@ if isequal(Linked,1) % Drugs and Media are linked 1 to 1; else they are combinat
DM.mod2(numb) = {raw(excLnNum,7)};
DM.conc2(numb) = {raw(excLnNum,8)};
excLnNum=excLnNum+1;
msg=strcat('NumberOf1:1DrugMediaPlates = ',num2str(numb), ' lastLineNo. = ',num2str(excLnNum))
msg=strcat('NumberOf1:1DrugMediaPlates = ',num2str(numb), ' lastLineNo. = ',num2str(excLnNum));
end
else
clear DM
@@ -283,7 +283,7 @@ if isequal(Linked,1) % Drugs and Media are linked 1 to 1; else they are combinat
DM.conc2(numb) = {DMtbl(excLnNum,8)};
DM.conc2(numb)= table2cell(DM.conc2{numb});
excLnNum=excLnNum+1;
msg=strcat('NumberOf1:1DrugMediaPlates = ',num2str(numb), ' lastLineNo. = ',num2str(excLnNum))
msg=strcat('NumberOf1:1DrugMediaPlates = ',num2str(numb), ' lastLineNo. = ',num2str(excLnNum));
end
end
end
@@ -321,7 +321,7 @@ if isequal(Linked,0) % 0 indicates Drugs and Media are combinatorial
excLnNum=excLnNum+1;
end
end
msg=strcat('NumberOfDrugs = ',num2str(drgCnt), ' NumberOfMedias = ',num2str(medCnt) )
msg=strcat('NumberOfDrugs = ',num2str(drgCnt), ' NumberOfMedias = ',num2str(medCnt) );
end
save(mpdmFile, 'fields','MP','DM','Linked');