Format DgenResults.m
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
%% CALLED BY EASYconsole.m %%
|
%% CALLED BY EASYconsole.m %%
|
||||||
%to 'Fotos' from 'PTmaps'
|
% Updated 240724 Bryan C Roessler to improve file operations and portability
|
||||||
%Console globals*******
|
%Console globals*******
|
||||||
global ExpPath
|
global ExpPath
|
||||||
global resDir
|
global resDir
|
||||||
@@ -8,7 +8,6 @@ global ImParMat
|
|||||||
|
|
||||||
ln=1;
|
ln=1;
|
||||||
|
|
||||||
|
|
||||||
%******Version compatability fixes*******assoc'd with diff and solve v11a='7.12.0.635 (R2011a)';
|
%******Version compatability fixes*******assoc'd with diff and solve v11a='7.12.0.635 (R2011a)';
|
||||||
if verLessThan('matlab','8.3') %original work 23_0227 updated 23_0525 (8.4 changed to 8.3)
|
if verLessThan('matlab','8.3') %original work 23_0227 updated 23_0525 (8.4 changed to 8.3)
|
||||||
fd4=diff(sym('K / (1 + exp(-r* (t - l )))'),4);
|
fd4=diff(sym('K / (1 + exp(-r* (t - l )))'),4);
|
||||||
@@ -25,7 +24,6 @@ end
|
|||||||
%MPnum=ImParMat(1);
|
%MPnum=ImParMat(1);
|
||||||
%opt=questdlg('Print Results Only (RES), DB Only (DB), or Both','Results Printout Options','Res','DB','Both','Both');
|
%opt=questdlg('Print Results Only (RES), DB Only (DB), or Both','Results Printout Options','Res','DB','Both','Both');
|
||||||
opt='Res';
|
opt='Res';
|
||||||
|
|
||||||
if ~exist('ImParMat','var') || isempty(ImParMat)
|
if ~exist('ImParMat','var') || isempty(ImParMat)
|
||||||
load ImParameters
|
load ImParameters
|
||||||
end
|
end
|
||||||
@@ -50,29 +48,19 @@ else
|
|||||||
end
|
end
|
||||||
if ispc %Linux accommodation
|
if ispc %Linux accommodation
|
||||||
expNm=localExpPath(max(strfind(localExpPath,'\'))+1:end);
|
expNm=localExpPath(max(strfind(localExpPath,'\'))+1:end);
|
||||||
else
|
|
||||||
if isunix,expNm=localExpPath(max(strfind(localExpPath,'/'))+1:end);end
|
|
||||||
if ismac,expNm=localExpPath(max(strfind(localExpPath,'/'))+1:end);end
|
|
||||||
end
|
|
||||||
if ispc
|
|
||||||
drivePos=min(strfind(localExpPath,'\'));
|
drivePos=min(strfind(localExpPath,'\'));
|
||||||
else
|
elseif ((isunix) || (ismac))
|
||||||
|
expNm=localExpPath(max(strfind(localExpPath,'/'))+1:end)
|
||||||
drivePos=min(strfind(localExpPath,'/'));
|
drivePos=min(strfind(localExpPath,'/'));
|
||||||
end
|
end
|
||||||
drive= localExpPath(1:(drivePos-1));
|
|
||||||
|
|
||||||
|
drive=localExpPath(1:(drivePos-1));
|
||||||
DBupload=fullfile(drive,'EZdbFiles','DBupLOADfiles');
|
DBupload=fullfile(drive,'EZdbFiles','DBupLOADfiles');
|
||||||
%DBupload=['G:\EZdbFiles\DBupLOADfiles']
|
|
||||||
%resultsFilename= strcat(resDir,'\PrintResults\!!Results_Output.txt') %'\PrintResults\zDevelCFitOutIndxSelectedRawDatTimesDrugMedia.txt'
|
|
||||||
%DBfilename= strcat(resDir,'\PrintResults\!!Dbase_Output.txt') % Print !Dbase file in PrintResults dir
|
|
||||||
%resultsFilename= strcat(resDir,'\PrintResults\!!Results_',expNm,'.txt')
|
|
||||||
%DBfilename= strcat(resDir,'\PrintResults\!!Dbase_',expNm,'.txt')
|
|
||||||
|
|
||||||
%Added to allow backward compatability************************************
|
%Added to allow backward compatability************************************
|
||||||
%Test for CFoutStd as indication of 2018version with r_refined fit code;If
|
%Test for CFoutStd as indication of 2018version with r_refined fit code;If
|
||||||
%earlier version with only a standard composite fite, Print results to
|
%earlier version with only a standard composite fite, Print results to
|
||||||
%!!ResultsStd_...txt only
|
%!!ResultsStd_...txt only
|
||||||
%***********************
|
|
||||||
try
|
try
|
||||||
scan(1).plate(1).CFoutStd(1,1);
|
scan(1).plate(1).CFoutStd(1,1);
|
||||||
resultsFilename=fullfile(resDir,'PrintResults', strcat('!!ResultsELr_',expNm,'.txt'));
|
resultsFilename=fullfile(resDir,'PrintResults', strcat('!!ResultsELr_',expNm,'.txt'));
|
||||||
@@ -81,7 +69,6 @@ catch
|
|||||||
resultsFilename=fullfile(resDir,'PrintResults', strcat('!!ResultsStd_',expNm,'.txt'));
|
resultsFilename=fullfile(resDir,'PrintResults', strcat('!!ResultsStd_',expNm,'.txt'));
|
||||||
DBfilename=fullfile(resDir,'PrintResults', strcat('!!DbaseStd_',expNm,'.txt'));
|
DBfilename=fullfile(resDir,'PrintResults', strcat('!!DbaseStd_',expNm,'.txt'));
|
||||||
end
|
end
|
||||||
%**************************************************************************
|
|
||||||
|
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both'),fid=fopen(resultsFilename,'w');end
|
if isequal(opt,'Res')||isequal(opt,'Both'),fid=fopen(resultsFilename,'w');end
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both'),fid2=fopen(DBfilename,'w');end %121012 Combo
|
if isequal(opt,'DB')||isequal(opt,'Both'),fid2=fopen(DBfilename,'w');end %121012 Combo
|
||||||
@@ -97,12 +84,13 @@ mpCnt=0;
|
|||||||
totPlCnt=0;
|
totPlCnt=0;
|
||||||
drgCnt=0;
|
drgCnt=0;
|
||||||
medCnt=0;
|
medCnt=0;
|
||||||
%load(fullfile(resDir,'PTmats','Nbdg')) %Convolute scan array data into plates
|
|
||||||
try
|
try
|
||||||
load(fullfile(resDir,'Fotos','Nbdg')) %Convolute scan array data into plates
|
load(fullfile(resDir,'Fotos','Nbdg')) %Convolute scan array data into plates
|
||||||
catch
|
catch
|
||||||
load(fullfile(resDir,'PTmats','Nbdg')) %Convolute scan array data into plates
|
load(fullfile(resDir,'PTmats','Nbdg')) %Convolute scan array data into plates
|
||||||
end
|
end
|
||||||
|
|
||||||
for s=1:size(scan,2)
|
for s=1:size(scan,2)
|
||||||
%Convolute scan array data into plates DconB for DBcombo
|
%Convolute scan array data into plates DconB for DBcombo
|
||||||
clear Diag
|
clear Diag
|
||||||
@@ -111,19 +99,25 @@ for s=1:size(scan,2)
|
|||||||
catch
|
catch
|
||||||
sbdg{s};
|
sbdg{s};
|
||||||
end
|
end
|
||||||
%*****************************************************
|
|
||||||
for p=1:size((scan(s).plate),2)
|
for p=1:size((scan(s).plate),2)
|
||||||
totPlCnt=totPlCnt+1;
|
totPlCnt=totPlCnt+1;
|
||||||
|
if destPerMP>1 && rem(totPlCnt,destPerMP)==1
|
||||||
if destPerMP>1 &&rem(totPlCnt,destPerMP)==1, mpCnt=mpCnt+1; end
|
mpCnt=mpCnt+1
|
||||||
if destPerMP==1,mpCnt=mpCnt+1; end
|
end
|
||||||
|
if destPerMP==1
|
||||||
|
mpCnt=mpCnt+1
|
||||||
|
end
|
||||||
pertCnt=rem(totPlCnt,destPerMP);
|
pertCnt=rem(totPlCnt,destPerMP);
|
||||||
if pertCnt==0, pertCnt= destPerMP;end
|
if pertCnt==0
|
||||||
|
pertCnt=destPerMP
|
||||||
|
end
|
||||||
pert=strcat('Perturb_',num2str(pertCnt));
|
pert=strcat('Perturb_',num2str(pertCnt));
|
||||||
s
|
s % TODO seems wrong
|
||||||
p
|
p % TODO seems wrong
|
||||||
clear outCmat
|
clear outCmat
|
||||||
outCmat=scan(s).plate(p).CFout;
|
outCmat=scan(s).plate(p).CFout;
|
||||||
|
|
||||||
%Print Time Point HEADER for each plate for newly added intensity data
|
%Print Time Point HEADER for each plate for newly added intensity data
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
fprintf(fid, '\n');
|
fprintf(fid, '\n');
|
||||||
@@ -146,17 +140,13 @@ for s=1:size(scan,2)
|
|||||||
fprintf(fid, '\ttc11Cut\ttc12Cut\ttc21Cut\ttc22Cut'); %'\tEarly1\tEarly2\tLate1\tLate2'); 17_0629 MinBaseIntens update for MedianBase label
|
fprintf(fid, '\ttc11Cut\ttc12Cut\ttc21Cut\ttc22Cut'); %'\tEarly1\tEarly2\tLate1\tLate2'); 17_0629 MinBaseIntens update for MedianBase label
|
||||||
end
|
end
|
||||||
fprintf(fid, '\tTotFitPts\tPostThreshFitPts\t1stBackgrd\tLstBackgrd\t1stMeanTotBackgrd\tLstMeanTotBackgrd');
|
fprintf(fid, '\tTotFitPts\tPostThreshFitPts\t1stBackgrd\tLstBackgrd\t1stMeanTotBackgrd\tLstMeanTotBackgrd');
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
clear outTseries
|
clear outTseries
|
||||||
outTseries=[];
|
outTseries=[];
|
||||||
outTseries=scan(s).plate(p).tSeries;
|
outTseries=scan(s).plate(p).tSeries;
|
||||||
TseriesSize=size(outTseries,1);
|
TseriesSize=size(outTseries,1);
|
||||||
|
|
||||||
%***************************************************************
|
|
||||||
%clear outCmat
|
|
||||||
%outCmat=scan(s).plate(p).CFout;
|
|
||||||
clear outIntens
|
clear outIntens
|
||||||
outIntens=[];
|
outIntens=[];
|
||||||
RawIntens=[];
|
RawIntens=[];
|
||||||
@@ -166,22 +156,19 @@ for s=1:size(scan,2)
|
|||||||
clear Ag; %Ag is Growth Area
|
clear Ag; %Ag is Growth Area
|
||||||
Ag=scan(s).plate(p).Ag;
|
Ag=scan(s).plate(p).Ag;
|
||||||
AgSize=size(Ag);
|
AgSize=size(Ag);
|
||||||
%***************************************
|
|
||||||
dataLength=min(TseriesSize,RawIntensSize);
|
dataLength=min(TseriesSize,RawIntensSize);
|
||||||
%for j=1:length(outTseries)%(size(outTseries,2)
|
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
for j=1:dataLength
|
for j=1:dataLength
|
||||||
fprintf(fid, '\t%.5f', outTseries(j));
|
fprintf(fid, '\t%.5f', outTseries(j));
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
%numBlkColTm=(maxNumIntens - size(outTseries,1));
|
|
||||||
numBlkCol=(maxNumIntens - dataLength); %size(outTseries,1));
|
numBlkCol=(maxNumIntens - dataLength); %size(outTseries,1));
|
||||||
%for nn=1:numBlkColTm %extend to col beyond longest rawDataSet
|
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
||||||
fprintf(fid, '\t');
|
fprintf(fid, '\t');
|
||||||
end
|
end
|
||||||
|
|
||||||
fprintf(fid,'\tOrfRep');
|
fprintf(fid,'\tOrfRep');
|
||||||
fprintf(fid,'\tSpecifics');
|
fprintf(fid,'\tSpecifics');
|
||||||
fprintf(fid,'\tStrainBkGrd');
|
fprintf(fid,'\tStrainBkGrd');
|
||||||
@@ -189,11 +176,10 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
ln=ln+1;
|
ln=ln+1;
|
||||||
fprintf(fid,'%d\t',ln);
|
fprintf(fid,'%d\t',ln);
|
||||||
end
|
end
|
||||||
%*****************************************Begin Data Section
|
|
||||||
|
|
||||||
|
% Data
|
||||||
n=0;
|
n=0;
|
||||||
for r=1:16
|
for r=1:16
|
||||||
|
|
||||||
for c=1:24
|
for c=1:24
|
||||||
n=n+1;
|
n=n+1;
|
||||||
clear selcode;
|
clear selcode;
|
||||||
@@ -201,7 +187,7 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
rSq=outCmat(n,6);
|
rSq=outCmat(n,6);
|
||||||
lval=outCmat(n,5);
|
lval=outCmat(n,5);
|
||||||
if Kval>160, selcode='K_Hi'; else selcode=' ';end
|
if Kval>160, selcode='K_Hi'; else selcode=' ';end
|
||||||
if Kval<40, selcode=strcat(selcode,' K_Lo'); end %12_1030
|
if Kval<40, selcode=strcat(selcode,' K_Lo');end
|
||||||
if rSq<.97 && rSq>0, selcode=strcat(selcode,' rSqLo');end
|
if rSq<.97 && rSq>0, selcode=strcat(selcode,' rSqLo');end
|
||||||
if lval>(0.85*(max(outTseries))), selcode=strcat(selcode,' late');end
|
if lval>(0.85*(max(outTseries))), selcode=strcat(selcode,' late');end
|
||||||
if isnan(outCmat(n,7))||isnan(outCmat(n,8))||isnan(outCmat(n,9))...
|
if isnan(outCmat(n,7))||isnan(outCmat(n,8))||isnan(outCmat(n,9))...
|
||||||
@@ -209,11 +195,10 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
||isnan(outCmat(n,12)), selcode=strcat(selcode,' NaN');
|
||isnan(outCmat(n,12)), selcode=strcat(selcode,' NaN');
|
||||||
end
|
end
|
||||||
|
|
||||||
%*************RiseTime Calculation*****************************************
|
% RiseTime Calculation
|
||||||
K=(outCmat(n,3));
|
K=(outCmat(n,3));
|
||||||
R=(outCmat(n,4));
|
R=(outCmat(n,4));
|
||||||
L=(outCmat(n,5));
|
L=(outCmat(n,5));
|
||||||
|
|
||||||
if R>0 && L>0 && K>0
|
if R>0 && L>0 && K>0
|
||||||
rr=R; ll=L;
|
rr=R; ll=L;
|
||||||
tc1=eval(sols(2));
|
tc1=eval(sols(2));
|
||||||
@@ -223,9 +208,8 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
else
|
else
|
||||||
riseTm=0;
|
riseTm=0;
|
||||||
end
|
end
|
||||||
%*************************************************************************
|
|
||||||
|
|
||||||
if Ag(n)< .30*(scan(s).Awindow),selcode=strcat(selcode,' smArea'); end %12_1030
|
if Ag(n)< .30*(scan(s).Awindow),selcode=strcat(selcode,' smArea'); end
|
||||||
if outCmat(n,3)==0,selcode=strcat('0 ',selcode);end
|
if outCmat(n,3)==0,selcode=strcat('0 ',selcode);end
|
||||||
|
|
||||||
orf=cell2mat(MP(mpCnt).orf{1}(n));
|
orf=cell2mat(MP(mpCnt).orf{1}(n));
|
||||||
@@ -263,18 +247,18 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
fprintf(fid, '\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f',...
|
fprintf(fid, '\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f',...
|
||||||
outCmat(n,17),outCmat(n,18),outCmat(n,19),...
|
outCmat(n,17),outCmat(n,18),outCmat(n,19),...
|
||||||
outCmat(n,20),outCmat(n,21));
|
outCmat(n,20),outCmat(n,21));
|
||||||
%failPt= [s n r c]
|
|
||||||
|
|
||||||
% Added for data cut times used in 'r'optomized method 06/14/2018
|
% Added for data cut times used in 'r'optomized method 06/14/2018
|
||||||
if size(outCmat,2)==27
|
if (size(outCmat,2) == 27)
|
||||||
fprintf(fid, '\t%.5f\t%.5f\t%.5f\t%.5f',...
|
fprintf(fid, '\t%.5f\t%.5f\t%.5f\t%.5f',...
|
||||||
outCmat(n,24),outCmat(n,25),outCmat(n,26),outCmat(n,27));
|
outCmat(n,24),outCmat(n,25),outCmat(n,26),outCmat(n,27));
|
||||||
end
|
end
|
||||||
|
|
||||||
fprintf(fid, '\t%d\t%d\t%d\t%d\t%d\t%d',...
|
fprintf(fid, '\t%d\t%d\t%d\t%d\t%d\t%d',...
|
||||||
outCmat(n,22),outCmat(n,23),Diag(c,r,1,p),Diag(c,r,2,p),Diag(c,r,3,p),Diag(c,r,4,p)); %,Diag(r,c,3,p),Diag(r,c,4,p));
|
outCmat(n,22),outCmat(n,23),Diag(c,r,1,p),Diag(c,r,2,p),Diag(c,r,3,p),Diag(c,r,4,p)); %,Diag(r,c,3,p),Diag(r,c,4,p));
|
||||||
end %Results print
|
end
|
||||||
%DBfile*******************************************
|
|
||||||
%riseTm calc*****
|
% DBfile
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
dbRsq=0;dbKup=0; dbKlo=0; dbrup=0; dbrlo=0; dbLlo=0; dbLup=0;
|
dbRsq=0;dbKup=0; dbKlo=0; dbrup=0; dbrlo=0; dbLlo=0; dbLup=0;
|
||||||
if isnumeric(outCmat(n,6)), dbRsq=outCmat(n,6);end
|
if isnumeric(outCmat(n,6)), dbRsq=outCmat(n,6);end
|
||||||
@@ -286,17 +270,13 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
if isnumeric(outCmat(n,12)), dbLup=outCmat(n,12);end
|
if isnumeric(outCmat(n,12)), dbLup=outCmat(n,12);end
|
||||||
end
|
end
|
||||||
|
|
||||||
%****************
|
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
fprintf(fid2,'%s\t %d\t %d\t %d\t %d\t %d\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t',expNm,s,p,r,c,n,selcode,drug,conc,media,mod1,conc1,mod2,conc2,orf,gene);
|
fprintf(fid2,'%s\t %d\t %d\t %d\t %d\t %d\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t',expNm,s,p,r,c,n,selcode,drug,conc,media,mod1,conc1,mod2,conc2,orf,gene);
|
||||||
fprintf(fid2, '%.5f\t %.5f\t %.5f\t %.5f\t %.5f\t %.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f',...
|
fprintf(fid2, '%.5f\t %.5f\t %.5f\t %.5f\t %.5f\t %.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f',...
|
||||||
outCmat(n,1),riseTm,outCmat(n,3),outCmat(n,4),...
|
outCmat(n,1),riseTm,outCmat(n,3),outCmat(n,4),...
|
||||||
outCmat(n,5),dbRsq,dbKup,dbKlo,...
|
outCmat(n,5),dbRsq,dbKup,dbKlo,dbrup,dbrlo,dbLlo,dbLup); %\t%.5f\t%.5f\t%.5f\t%.5f
|
||||||
dbrup,dbrlo,dbLlo,dbLup); %\t%.5f\t%.5f\t%.5f\t%.5f
|
|
||||||
%... outCmat(n,13),outCmat(n,14),outCmat(n,15),outCmat(n,16));
|
|
||||||
|
|
||||||
end
|
end
|
||||||
%*****DB analysis data end************************************************
|
|
||||||
% Add Intensities series to end of curve fit data
|
% Add Intensities series to end of curve fit data
|
||||||
outIntens=[];
|
outIntens=[];
|
||||||
outIntens=zeros(384,dataLength);
|
outIntens=zeros(384,dataLength);
|
||||||
@@ -321,18 +301,14 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
else
|
else
|
||||||
tmBlob=strcat(tmBlob,num2str(outTseries(j)));
|
tmBlob=strcat(tmBlob,num2str(outTseries(j)));
|
||||||
end
|
end
|
||||||
end %if DB
|
end
|
||||||
end %j
|
end
|
||||||
%***************************
|
|
||||||
|
|
||||||
|
% Results
|
||||||
% Results fprint***********
|
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
||||||
fprintf(fid, '\t');
|
fprintf(fid, '\t');
|
||||||
end
|
end
|
||||||
%-----------------------------------------------
|
|
||||||
% UPDATE 14_0626 to writein ' ' if personnel fail to in their
|
|
||||||
% Masterplate sheet
|
% Masterplate sheet
|
||||||
if ~isnan(orfRep)
|
if ~isnan(orfRep)
|
||||||
fprintf(fid, '\t%s', orfRep); %print OrfRep
|
fprintf(fid, '\t%s', orfRep); %print OrfRep
|
||||||
@@ -349,19 +325,14 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
else
|
else
|
||||||
fprintf(fid, '\t%s', ' ');
|
fprintf(fid, '\t%s', ' ');
|
||||||
end
|
end
|
||||||
%-----------------------------------------------
|
|
||||||
%****************************
|
|
||||||
fprintf(fid, '\n');
|
fprintf(fid, '\n');
|
||||||
ln=ln+1;
|
ln=ln+1;
|
||||||
fprintf(fid,'%d\t',ln);
|
fprintf(fid,'%d\t',ln);
|
||||||
end
|
end
|
||||||
%****************************
|
|
||||||
%DB Raw Intensities and Timepoints
|
%DB Raw Intensities and Timepoints
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
fprintf(fid2, '\t%s\t%s',intensBlob,tmBlob );
|
fprintf(fid2, '\t%s\t%s',intensBlob,tmBlob );
|
||||||
|
|
||||||
%-------------------------------
|
|
||||||
% UPDATE 14_0626 to writein ' ' if personnel fail to in their
|
|
||||||
% Masterplate sheet
|
% Masterplate sheet
|
||||||
if ~isnan(orfRep)
|
if ~isnan(orfRep)
|
||||||
fprintf(fid2, '\t%s',orfRep );
|
fprintf(fid2, '\t%s',orfRep );
|
||||||
@@ -378,11 +349,9 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
else
|
else
|
||||||
fprintf(fid2, '\t%s', ' ');
|
fprintf(fid2, '\t%s', ' ');
|
||||||
end
|
end
|
||||||
%---------------------------------
|
|
||||||
fprintf(fid2, '\n');
|
fprintf(fid2, '\n');
|
||||||
end %DB print
|
end
|
||||||
end %if ~isempty(outCmat)
|
end %if ~isempty(outCmat)
|
||||||
|
|
||||||
end %c
|
end %c
|
||||||
end %r
|
end %r
|
||||||
end %p
|
end %p
|
||||||
@@ -391,9 +360,9 @@ end %s
|
|||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
fclose(fid);
|
fclose(fid);
|
||||||
end
|
end
|
||||||
|
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
fclose(fid2);
|
fclose(fid2);
|
||||||
|
|
||||||
try
|
try
|
||||||
copyfile(DBfilename,DBupload)
|
copyfile(DBfilename,DBupload)
|
||||||
catch ME
|
catch ME
|
||||||
@@ -401,11 +370,9 @@ catch ME
|
|||||||
rep=strcat('Failed copyfile to ',DBupload,' -', rep);
|
rep=strcat('Failed copyfile to ',DBupload,' -', rep);
|
||||||
errordlg(rep)
|
errordlg(rep)
|
||||||
end
|
end
|
||||||
end %if DB
|
end
|
||||||
% ln; TODO removed by BCR, this doesn't seem necessary
|
% ln; TODO removed by BCR, this doesn't seem necessary
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%***********************************************************************
|
%***********************************************************************
|
||||||
%BEGIN PRINT RESULTS ROUTINE FOR STANDARD METHOD
|
%BEGIN PRINT RESULTS ROUTINE FOR STANDARD METHOD
|
||||||
%***********************************************************************
|
%***********************************************************************
|
||||||
@@ -438,16 +405,15 @@ for s=1:size(scan,2)
|
|||||||
catch
|
catch
|
||||||
sbdg{s};
|
sbdg{s};
|
||||||
end
|
end
|
||||||
%*****************************************************
|
|
||||||
for p=1:size((scan(s).plate),2)
|
for p=1:size((scan(s).plate),2)
|
||||||
totPlCnt=totPlCnt+1;
|
totPlCnt=totPlCnt+1;
|
||||||
|
|
||||||
if destPerMP>1 &&rem(totPlCnt,destPerMP)==1, mpCnt=mpCnt+1; end
|
if destPerMP>1 &&rem(totPlCnt,destPerMP)==1, mpCnt=mpCnt+1; end
|
||||||
if destPerMP==1,mpCnt=mpCnt+1; end
|
if destPerMP==1,mpCnt=mpCnt+1; end
|
||||||
pertCnt= rem(totPlCnt,destPerMP);
|
pertCnt= rem(totPlCnt,destPerMP);
|
||||||
if pertCnt==0, pertCnt= destPerMP;end
|
if pertCnt==0, pertCnt= destPerMP;end
|
||||||
pert= strcat('Perturb_',num2str(pertCnt));
|
pert= strcat('Perturb_',num2str(pertCnt));
|
||||||
s
|
s % BCR seems wrong
|
||||||
|
|
||||||
%Print Time Point HEADER for each plate for newly added intensity data
|
%Print Time Point HEADER for each plate for newly added intensity data
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
@@ -471,8 +437,6 @@ for s=1:size(scan,2)
|
|||||||
outTseries=[];
|
outTseries=[];
|
||||||
outTseries=scan(s).plate(p).tSeries;
|
outTseries=scan(s).plate(p).tSeries;
|
||||||
TseriesSize= size(outTseries,1);
|
TseriesSize= size(outTseries,1);
|
||||||
|
|
||||||
%***************************************************************
|
|
||||||
clear outCmat
|
clear outCmat
|
||||||
outCmat=scan(s).plate(p).CFoutStd;
|
outCmat=scan(s).plate(p).CFoutStd;
|
||||||
clear outIntens
|
clear outIntens
|
||||||
@@ -483,7 +447,7 @@ for s=1:size(scan,2)
|
|||||||
clear Ag; %Ag is Growth Area
|
clear Ag; %Ag is Growth Area
|
||||||
Ag=scan(s).plate(p).Ag;
|
Ag=scan(s).plate(p).Ag;
|
||||||
AgSize= size(Ag);
|
AgSize= size(Ag);
|
||||||
%***************************************
|
|
||||||
dataLength= min(TseriesSize,RawIntensSize);
|
dataLength= min(TseriesSize,RawIntensSize);
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
for j=1:dataLength
|
for j=1:dataLength
|
||||||
@@ -497,7 +461,6 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
||||||
fprintf(fid, '\t');
|
fprintf(fid, '\t');
|
||||||
end
|
end
|
||||||
|
|
||||||
fprintf(fid,'\tOrfRep');
|
fprintf(fid,'\tOrfRep');
|
||||||
fprintf(fid,'\tSpecifics');
|
fprintf(fid,'\tSpecifics');
|
||||||
fprintf(fid,'\tStrainBkGrd');
|
fprintf(fid,'\tStrainBkGrd');
|
||||||
@@ -505,11 +468,10 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
ln=ln+1;
|
ln=ln+1;
|
||||||
fprintf(fid,'%d\t',ln);
|
fprintf(fid,'%d\t',ln);
|
||||||
end
|
end
|
||||||
%*****************************************Begin Data Section
|
|
||||||
|
|
||||||
|
% Data
|
||||||
n=0;
|
n=0;
|
||||||
for r=1:16
|
for r=1:16
|
||||||
|
|
||||||
for c=1:24
|
for c=1:24
|
||||||
n=n+1;
|
n=n+1;
|
||||||
clear selcode;
|
clear selcode;
|
||||||
@@ -525,7 +487,7 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
||isnan(outCmat(n,12)), selcode=strcat(selcode,' NaN');
|
||isnan(outCmat(n,12)), selcode=strcat(selcode,' NaN');
|
||||||
end
|
end
|
||||||
|
|
||||||
%*************RiseTime Calculation*****************************************
|
% RiseTime Calculation
|
||||||
K=(outCmat(n,3));
|
K=(outCmat(n,3));
|
||||||
R=(outCmat(n,4));
|
R=(outCmat(n,4));
|
||||||
L=(outCmat(n,5));
|
L=(outCmat(n,5));
|
||||||
@@ -539,11 +501,8 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
riseTm=0;
|
riseTm=0;
|
||||||
end
|
end
|
||||||
|
|
||||||
%*************************************************************************
|
if Ag(n)< .30*(scan(s).Awindow),selcode=strcat(selcode,' smArea'); end
|
||||||
|
|
||||||
if Ag(n)< .30*(scan(s).Awindow),selcode=strcat(selcode,' smArea'); end %12_1030
|
|
||||||
if outCmat(n,3)==0,selcode=strcat('0 ',selcode); end
|
if outCmat(n,3)==0,selcode=strcat('0 ',selcode); end
|
||||||
|
|
||||||
orf=cell2mat(MP(mpCnt).orf{1}(n));
|
orf=cell2mat(MP(mpCnt).orf{1}(n));
|
||||||
gene=cell2mat(MP(mpCnt).genename{1}(n));
|
gene=cell2mat(MP(mpCnt).genename{1}(n));
|
||||||
orfRep=cell2mat(MP(mpCnt).orfRep{1}(n));
|
orfRep=cell2mat(MP(mpCnt).orfRep{1}(n));
|
||||||
@@ -582,9 +541,10 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
|
|
||||||
fprintf(fid, '\t%d\t%d\t%d\t%d',...
|
fprintf(fid, '\t%d\t%d\t%d\t%d',...
|
||||||
Diag(c,r,1,p),Diag(c,r,2,p),Diag(c,r,3,p),Diag(c,r,4,p)); %,Diag(r,c,3,p),Diag(r,c,4,p));
|
Diag(c,r,1,p),Diag(c,r,2,p),Diag(c,r,3,p),Diag(c,r,4,p)); %,Diag(r,c,3,p),Diag(r,c,4,p));
|
||||||
end %Results print
|
end
|
||||||
%DBfile*******************************************
|
|
||||||
%riseTm calc*****
|
% DBFile
|
||||||
|
% RiseTime calculation
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
dbRsq= 0;dbKup= 0; dbKlo= 0; dbrup= 0; dbrlo= 0; dbLlo= 0; dbLup= 0;
|
dbRsq= 0;dbKup= 0; dbKlo= 0; dbrup= 0; dbrlo= 0; dbLlo= 0; dbLup= 0;
|
||||||
if isnumeric(outCmat(n,6)), dbRsq= outCmat(n,6);end
|
if isnumeric(outCmat(n,6)), dbRsq= outCmat(n,6);end
|
||||||
@@ -596,17 +556,15 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
if isnumeric(outCmat(n,12)), dbLup= outCmat(n,12);end
|
if isnumeric(outCmat(n,12)), dbLup= outCmat(n,12);end
|
||||||
end
|
end
|
||||||
|
|
||||||
%****************
|
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
fprintf(fid2,'%s\t %d\t %d\t %d\t %d\t %d\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t',expNm,s,p,r,c,n,selcode,drug,conc,media,mod1,conc1,mod2,conc2,orf,gene);
|
fprintf(fid2,'%s\t %d\t %d\t %d\t %d\t %d\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t',expNm,s,p,r,c,n,selcode,drug,conc,media,mod1,conc1,mod2,conc2,orf,gene);
|
||||||
fprintf(fid2, '%.5f\t %.5f\t %.5f\t %.5f\t %.5f\t %.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f',...
|
fprintf(fid2, '%.5f\t %.5f\t %.5f\t %.5f\t %.5f\t %.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f\t%.5f',...
|
||||||
outCmat(n,1),riseTm,outCmat(n,3),outCmat(n,4),...
|
outCmat(n,1),riseTm,outCmat(n,3),outCmat(n,4),...
|
||||||
outCmat(n,5),dbRsq,dbKup,dbKlo,...
|
outCmat(n,5),dbRsq,dbKup,dbKlo,...
|
||||||
dbrup,dbrlo,dbLlo,dbLup); %\t%.5f\t%.5f\t%.5f\t%.5f
|
dbrup,dbrlo,dbLlo,dbLup);
|
||||||
%... outCmat(n,13),outCmat(n,14),outCmat(n,15),outCmat(n,16));
|
|
||||||
|
|
||||||
end
|
end
|
||||||
%*****DB analysis data end************************************************
|
|
||||||
|
% DB Analysis
|
||||||
% Add Intensities series to end of curve fit data
|
% Add Intensities series to end of curve fit data
|
||||||
outIntens=[];
|
outIntens=[];
|
||||||
outIntens=zeros(384,dataLength);
|
outIntens=zeros(384,dataLength);
|
||||||
@@ -631,19 +589,15 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
else
|
else
|
||||||
tmBlob= strcat(tmBlob,num2str(outTseries(j)));
|
tmBlob= strcat(tmBlob,num2str(outTseries(j)));
|
||||||
end
|
end
|
||||||
end %if DB
|
end
|
||||||
end %j
|
end
|
||||||
%***************************
|
|
||||||
|
|
||||||
|
% Results fprint
|
||||||
% Results fprint***********
|
|
||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
for nn=1:numBlkCol %extend to col beyond longest rawDataSet
|
||||||
fprintf(fid, '\t');
|
fprintf(fid, '\t');
|
||||||
end
|
end
|
||||||
|
|
||||||
%-----------------------------------------------
|
|
||||||
% UPDATE 14_0626 to writein ' ' if personnel fail to in their
|
|
||||||
% Masterplate sheet
|
% Masterplate sheet
|
||||||
if ~isnan(orfRep)
|
if ~isnan(orfRep)
|
||||||
fprintf(fid, '\t%s', orfRep); %print OrfRep
|
fprintf(fid, '\t%s', orfRep); %print OrfRep
|
||||||
@@ -660,19 +614,17 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
else
|
else
|
||||||
fprintf(fid, '\t%s', ' ');
|
fprintf(fid, '\t%s', ' ');
|
||||||
end
|
end
|
||||||
%-----------------------------------------------
|
|
||||||
%****************************
|
|
||||||
fprintf(fid, '\n');
|
fprintf(fid, '\n');
|
||||||
ln=ln+1;
|
ln=ln+1;
|
||||||
fprintf(fid,'%d\t',ln);
|
fprintf(fid,'%d\t',ln);
|
||||||
end
|
end
|
||||||
%****************************
|
|
||||||
%DB Raw Intensities and Timepoints
|
|
||||||
|
% Raw Intensities and Timepoints
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
fprintf(fid2, '\t%s\t%s',intensBlob,tmBlob );
|
fprintf(fid2, '\t%s\t%s',intensBlob,tmBlob );
|
||||||
|
|
||||||
%-------------------------------
|
|
||||||
% UPDATE 14_0626 to writein ' ' if personnel fail to in their
|
|
||||||
% Masterplate sheet
|
% Masterplate sheet
|
||||||
if ~isnan(orfRep)
|
if ~isnan(orfRep)
|
||||||
fprintf(fid2, '\t%s',orfRep );
|
fprintf(fid2, '\t%s',orfRep );
|
||||||
@@ -689,12 +641,9 @@ dataLength= min(TseriesSize,RawIntensSize);
|
|||||||
else
|
else
|
||||||
fprintf(fid2, '\t%s', ' ');
|
fprintf(fid2, '\t%s', ' ');
|
||||||
end
|
end
|
||||||
%---------------------------------
|
|
||||||
fprintf(fid2, '\n');
|
fprintf(fid2, '\n');
|
||||||
end %DB print
|
end %DB print
|
||||||
end %if ~isempty(outCmat)
|
end %if ~isempty(outCmat)
|
||||||
|
|
||||||
|
|
||||||
end %c
|
end %c
|
||||||
end %r
|
end %r
|
||||||
end %p
|
end %p
|
||||||
@@ -703,9 +652,9 @@ end %s
|
|||||||
if isequal(opt,'Res')||isequal(opt,'Both')
|
if isequal(opt,'Res')||isequal(opt,'Both')
|
||||||
fclose(fid);
|
fclose(fid);
|
||||||
end
|
end
|
||||||
|
|
||||||
if isequal(opt,'DB')||isequal(opt,'Both')
|
if isequal(opt,'DB')||isequal(opt,'Both')
|
||||||
fclose(fid2);
|
fclose(fid2);
|
||||||
|
|
||||||
try
|
try
|
||||||
copyfile(DBfilename,DBupload)
|
copyfile(DBfilename,DBupload)
|
||||||
catch ME
|
catch ME
|
||||||
@@ -713,13 +662,11 @@ catch ME
|
|||||||
rep=strcat('Failed copyfile to ',DBupload,' -', rep);
|
rep=strcat('Failed copyfile to ',DBupload,' -', rep);
|
||||||
errordlg(rep)
|
errordlg(rep)
|
||||||
end
|
end
|
||||||
end %if DB
|
end
|
||||||
ln;
|
|
||||||
|
|
||||||
catch
|
|
||||||
errorNstdResults='Catch at line720 for printing ResultsStd'
|
|
||||||
end %try scan(1).plate(1).CFoutStd(1,1) to test for 2018 r_refined version
|
|
||||||
|
|
||||||
|
|
||||||
scriptComplete= "line724 "
|
|
||||||
msgbox(['Printing Script complete. Check !!Results sheets in ../PrintResults folder.'])
|
msgbox(['Printing Script complete. Check !!Results sheets in ../PrintResults folder.'])
|
||||||
|
|
||||||
|
catch ME
|
||||||
|
errorNstdResults='Catch at line720 for printing ResultsStd'
|
||||||
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
%% PART OF GUI FUNCTIONALITY %%
|
%% PART OF GUI FUNCTIONALITY %%
|
||||||
function output_txt = datatipp(~,event_obj)
|
|
||||||
% Display the position of the data cursor
|
% Display the position of the data cursor
|
||||||
|
function output_txt = datatipp(~,event_obj)
|
||||||
% obj Currently not used (empty)
|
% obj Currently not used (empty)
|
||||||
% event_obj Handle to event object
|
% event_obj Handle to event object
|
||||||
% output_txt Data cursor text string (string or cell array of strings).
|
% output_txt Data cursor text string (string or cell array of strings).
|
||||||
|
|
||||||
pos=get(event_obj,'Position');
|
pos=get(event_obj,'Position');
|
||||||
output_txt = {['X: ',num2str(pos(1),4)],...
|
output_txt={['X: ',num2str(pos(1),4)],['Y: ',num2str(pos(2),4)]};
|
||||||
['Y: ',num2str(pos(2),4)]};
|
|
||||||
|
|
||||||
% If there is a Z-coordinate in the position, display it as well
|
% If there is a Z-coordinate in the position, display it as well
|
||||||
if length(pos) > 2
|
if length(pos) > 2
|
||||||
output_txt{end+1}=['Z: ',num2str(pos(3),4)];
|
output_txt{end+1}=['Z: ',num2str(pos(3),4)];
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user