Complete EZview reformatting

This commit is contained in:
2024-07-31 00:36:40 -04:00
parent 79e3676ed3
commit 019fb07f79
36 changed files with 7526 additions and 8544 deletions

View File

@@ -40,7 +40,6 @@ function varargout = EASYconsole(varargin)
fprintf('This script name: %s\n', easyFileName); fprintf('This script name: %s\n', easyFileName);
% Set scansDir (project scans directory) intelligently % Set scansDir (project scans directory) intelligently
if exist('PROJECT_SCANS_DIR', 'var') && ~isempty(getenv('PROJECT_SCANS_DIR')) if exist('PROJECT_SCANS_DIR', 'var') && ~isempty(getenv('PROJECT_SCANS_DIR'))
scansDir=fullfile(getenv('PROJECT_SCANS_DIR')); scansDir=fullfile(getenv('PROJECT_SCANS_DIR'));
if exist(scansDir, 'dir') if exist(scansDir, 'dir')

View File

@@ -6,7 +6,6 @@ RFconfig= Exp(zoneSel).Dexp(DexpN).RFconfig;
RFsel=Exp(zoneSel).htmapRFanswer; RFsel=Exp(zoneSel).htmapRFanswer;
j=pertSel; m=MPsel; j=pertSel; m=MPsel;
if RFconfig==1 if RFconfig==1
try try
RF1mdIndx(nn)=Exp(zoneSel).Dexp(nn).RFmd1indx(pertSel); RF1mdIndx(nn)=Exp(zoneSel).Dexp(nn).RFmd1indx(pertSel);
RF1mdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmd1pltN; %This is the MP number for RF1 RF1mdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmd1pltN; %This is the MP number for RF1
@@ -20,7 +19,6 @@ if RFconfig==1
try Rn(nn)=Exp(expN).Dexp(nn).RFmean(pertSel); catch, Rn(nn)=0; end try Rn(nn)=Exp(expN).Dexp(nn).RFmean(pertSel); catch, Rn(nn)=0; end
try Rs(nn)=Exp(expN).Dexp(nn).RFstd(pertSel); catch, Rs(nn)=0; end try Rs(nn)=Exp(expN).Dexp(nn).RFstd(pertSel); catch, Rs(nn)=0; end
end end
if RFconfig==2 if RFconfig==2
ctrlRF=RFsel{1}; ctrlRF=RFsel{1};
j=pertSel; m=MPsel; j=pertSel; m=MPsel;
@@ -42,8 +40,8 @@ if RFconfig==2
if Exp(expN).Dexp(nn).meanP(j,m)~=0 if Exp(expN).Dexp(nn).meanP(j,m)~=0
Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m); Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m);
Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m); Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m);
elseif Exp(expN).Dexp(nn).meanP(j,m)==0||isempty(Exp(expN).Dexp(nn).meanP(j,m)) &&... elseif Exp(expN).Dexp(nn).meanP(j,m)==0||isempty(Exp(expN).Dexp(nn).meanP(j,m)) ...
strcmpi(ctrlRF,'G') && strcmpi(ctrlRF,'G')
Rn(nn)=Exp(expN).Dexp(nn).RFmeanG(pertSel); Rn(nn)=Exp(expN).Dexp(nn).RFmeanG(pertSel);
Rs(nn)=Exp(expN).Dexp(nn).RFstdG(pertSel); Rs(nn)=Exp(expN).Dexp(nn).RFstdG(pertSel);
end end
@@ -61,16 +59,14 @@ if RFconfig==2
if Exp(expN).Dexp(nn).meanP(j,m)~=0 if Exp(expN).Dexp(nn).meanP(j,m)~=0
Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m); Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m);
Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m); Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m);
elseif Exp(expN).Dexp(nn).meanP(j,m)==0||isempty(Exp(expN).Dexp(nn).meanP(j,m)) &&... elseif Exp(expN).Dexp(nn).meanP(j,m)==0||isempty(Exp(expN).Dexp(nn).meanP(j,m)) ...
strcmpi(ctrlRF,'G') && strcmpi(ctrlRF,'G')
Rn(nn)=Exp(expN).Dexp(nn).RFmeanG(j); Rn(nn)=Exp(expN).Dexp(nn).RFmeanG(j);
Rs(nn)=Exp(expN).Dexp(nn).RFstdG(j); Rs(nn)=Exp(expN).Dexp(nn).RFstdG(j);
end end
end end
end end
if RFconfig==3 if RFconfig==3
j=pertSel; m=MPsel; j=pertSel; m=MPsel;
ctrlRF=RFsel{1}; ctrlRF=RFsel{1};
@@ -97,7 +93,7 @@ if RFconfig==3
case {'L','l'} case {'L','l'}
Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m); Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m);
Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m); Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m);
if Exp(expN).Dexp(nn).meanP(j,m)~=0, if Exp(expN).Dexp(nn).meanP(j,m)~=0
Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m); Rn(nn)=Exp(expN).Dexp(nn).meanP(j,m);
Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m); Rs(nn)=Exp(expN).Dexp(nn).stdP(j,m);
elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'G') elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'G')

View File

@@ -14,17 +14,15 @@ prntHt=0;
break break
end end
end end
%*************************************************
if expN==1,DexpN=(get(handles.DN1,'value')); end if expN==1,DexpN=(get(handles.DN1,'value')); end
if expN==2,DexpN=(get(handles.DN2,'value')); end if expN==2,DexpN=(get(handles.DN2,'value')); end
if expN==3,DexpN=(get(handles.DN3,'value')); end if expN==3,DexpN=(get(handles.DN3,'value')); end
Exp(expN).DexpN=DexpN; Exp(expN).DexpN=DexpN;
if strcmp(Exp(expN).DexpType,'single'), if strcmp(Exp(expN).DexpType,'single')
DexpN=1; DexpN=1;
elseif ~strcmp(Exp(expN).DexpType,'single') elseif ~strcmp(Exp(expN).DexpType,'single')
if expN==1 if expN==1
set(handles.MPsldr1,'min',1,'max',MPnum) set(handles.MPsldr1,'min',1,'max',MPnum)
DMnum=length(Exp(expN).Dexp(DexpN).DM.drug); DMnum=length(Exp(expN).Dexp(DexpN).DM.drug);
set(handles.DMsldr1,'min',1,'max',DMnum) set(handles.DMsldr1,'min',1,'max',DMnum)
@@ -32,7 +30,6 @@ elseif ~strcmp(Exp(expN).DexpType,'single')
set(handles.Tptsldr1,'min',1,'max',tPtsSize) set(handles.Tptsldr1,'min',1,'max',tPtsSize)
end end
if expN==2 if expN==2
set(handles.MPsldr2,'min',1,'max',MPnum) set(handles.MPsldr2,'min',1,'max',MPnum)
DMnum=length(Exp(expN).Dexp(DexpN).DM.drug); DMnum=length(Exp(expN).Dexp(DexpN).DM.drug);
set(handles.DMsldr2,'min',1,'max',DMnum) set(handles.DMsldr2,'min',1,'max',DMnum)
@@ -40,7 +37,6 @@ elseif ~strcmp(Exp(expN).DexpType,'single')
set(handles.Tptsldr2,'min',1,'max',tPtsSize) set(handles.Tptsldr2,'min',1,'max',tPtsSize)
end end
if expN==3 if expN==3
set(handles.MPsldr3,'min',1,'max',MPnum) set(handles.MPsldr3,'min',1,'max',MPnum)
DMnum=length(Exp(expN).Dexp(DexpN).DM.drug); DMnum=length(Exp(expN).Dexp(DexpN).DM.drug);
set(handles.DMsldr3,'min',1,'max',DMnum) set(handles.DMsldr3,'min',1,'max',DMnum)
@@ -59,13 +55,9 @@ ghandles=handles;
if expN==1,pertSel=floor(get(handles.DMsldr1,'value')); end if expN==1,pertSel=floor(get(handles.DMsldr1,'value')); end
if expN==2,pertSel=floor(get(handles.DMsldr2,'value')); end if expN==2,pertSel=floor(get(handles.DMsldr2,'value')); end
if expN==3,pertSel=floor(get(handles.DMsldr3,'value')); end if expN==3,pertSel=floor(get(handles.DMsldr3,'value')); end
if expN==1,tPtSel=floor(get(handles.Tptsldr1,'value')); end if expN==1,tPtSel=floor(get(handles.Tptsldr1,'value')); end
if expN==2,tPtSel=floor(get(handles.Tptsldr2,'value')); end if expN==2,tPtSel=floor(get(handles.Tptsldr2,'value')); end
if expN==3,tPtSel=floor(get(handles.Tptsldr3,'value')); end if expN==3,tPtSel=floor(get(handles.Tptsldr3,'value')); end
plateNum=(MPsel-1)*destPerMP + pertSel; plateNum=(MPsel-1)*destPerMP + pertSel;
tPtsSize=[]; tPtsSize=[];
tPtsSize=length(Exp(expN).Dexp(DexpN).scan(plateNum).plate(1).tSeries(:)) tPtsSize=length(Exp(expN).Dexp(DexpN).scan(plateNum).plate(1).tSeries(:))
@@ -76,9 +68,11 @@ for ii= 1:tPtsSize
n=n+1 n=n+1
end end
end end
if tPtSel> tPtsSize if tPtSel> tPtsSize
tPtSel=tPtsSize tPtSel=tPtsSize
end end
if exist(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat((num2str(tPtSel)),'.bmp'))) ==0; %the .bmp file exists if exist(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat((num2str(tPtSel)),'.bmp'))) ==0; %the .bmp file exists
tPtSel=bmpLst(find(bmpLst>tPtSel,1,'first')) tPtSel=bmpLst(find(bmpLst>tPtSel,1,'first'))
end end
@@ -123,8 +117,6 @@ end
end end
end end
%---------------------------------------------------------
Exp(expN).Dexp(DexpN).MPsel=MPsel; Exp(expN).Dexp(DexpN).MPsel=MPsel;
Exp(expN).Dexp(DexpN).destPerMP=destPerMP; Exp(expN).Dexp(DexpN).destPerMP=destPerMP;
Exp(expN).Dexp(DexpN).pertSel=pertSel; Exp(expN).Dexp(DexpN).pertSel=pertSel;
@@ -133,7 +125,6 @@ end
%try %try
I=imread(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat(num2str(tPtSel),'.bmp'))); I=imread(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat(num2str(tPtSel),'.bmp')));
%set(ghandles.Iaxes1,'CurrentAxes') %set(ghandles.Iaxes1,'CurrentAxes')
if expN==1, expAxes=ghandles.Iaxes1;end if expN==1, expAxes=ghandles.Iaxes1;end
if expN==2, expAxes=ghandles.Iaxes2;end if expN==2, expAxes=ghandles.Iaxes2;end
@@ -143,9 +134,10 @@ end
imshow(I) imshow(I)
set(expAxes,'xtick',[],'ytick',[]) set(expAxes,'xtick',[],'ytick',[])
DMstr=char(strcat('Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ', ...
DMstr= char(strcat('Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},... Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},' ', ...
' ',Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel})) Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ', ...
Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}))
if expN==1,set(handles.DM1,'string',DMstr); end if expN==1,set(handles.DM1,'string',DMstr); end
if expN==2,set(handles.DM2,'string',DMstr); end if expN==2,set(handles.DM2,'string',DMstr); end
@@ -156,13 +148,13 @@ end
if expN==2,set(handles.tptTm2,'string',tPtStr); end if expN==2,set(handles.tptTm2,'string',tPtStr); end
if expN==3,set(handles.tptTm3,'string',tPtStr); end if expN==3,set(handles.tptTm3,'string',tPtStr); end
xp=char(Exp(expN).Dexp(DexpN).resDir); xp=char(Exp(expN).Dexp(DexpN).resDir);
if ispc if ispc
slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'\'); slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'\');
else else
slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'/'); slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'/');
end end
startPos=slashPos(length(slashPos)-2) +1; startPos=slashPos(length(slashPos)-2) +1;
endPos=(slashPos(length(slashPos)) -1); endPos=(slashPos(length(slashPos)) -1);
expStrg=xp(startPos:end); expStrg=xp(startPos:end);
@@ -171,21 +163,15 @@ end
if expN==2,set(handles.expName2,'string',expStrg); end if expN==2,set(handles.expName2,'string',expStrg); end
if expN==3,set(handles.expName3,'string',expStrg); end if expN==3,set(handles.expName3,'string',expStrg); end
%********************
try try
htMapTogPBfg=0; htMapTogPBfg=0;
EZhtMap % EZhtMap
catch catch
end end
%********************
%********************************************************************
% zonePB handle control from left graph spot side to communicate to right side 23_0818 % zonePB handle control from left graph spot side to communicate to right side 23_0818
% This section was based on the zoneRad Section for Radiobuttons which were % This section was based on the zoneRad Section for Radiobuttons which were
% unusable with the new form of Radio Buttons in AppDesigner. % unusable with the new form of Radio Buttons in AppDesigner.
%********************
if expN==1 if expN==1
zonesel=1; zonesel=1;
zonePB=1; zonePB=1;
@@ -195,8 +181,6 @@ if expN==1
set(handles.zonePB1,'BackgroundColor',[1.0 0.6 0.6]) set(handles.zonePB1,'BackgroundColor',[1.0 0.6 0.6])
set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0]) set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0])
set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0]) set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0])
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
if orfLstSel==1 if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(1).Dexp(DexpN).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(1).Dexp(DexpN).srtOrfLst)
@@ -214,7 +198,6 @@ if expN==2
set(handles.zonePB2,'BackgroundColor',[1.0 0.6 0.6]) set(handles.zonePB2,'BackgroundColor',[1.0 0.6 0.6])
set(handles.zonePB1,'BackgroundColor',[1.0 1.0 1.0]) set(handles.zonePB1,'BackgroundColor',[1.0 1.0 1.0])
set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0]) set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0])
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
if orfLstSel==1 if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(2).Dexp(DexpN).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(2).Dexp(DexpN).srtOrfLst)
@@ -232,7 +215,6 @@ if expN==3
set(handles.zonePB3,'BackgroundColor',[1.0 0.6 0.6]); set(handles.zonePB3,'BackgroundColor',[1.0 0.6 0.6]);
set(handles.zonePB1,'BackgroundColor',[1.0 1.0 1.0]); set(handles.zonePB1,'BackgroundColor',[1.0 1.0 1.0]);
set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0]); set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0]);
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
if orfLstSel==1 if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(3).Dexp(DexpN).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(3).Dexp(DexpN).srtOrfLst)

View File

@@ -56,8 +56,7 @@ if AddCplot==1,
end end
end end
end end
%for n= 1:length(RFcmpTraces +1)
%end
maxLstd=max(std(mlstL), maxRFcmpLStd); maxLstd=max(std(mlstL), maxRFcmpLStd);
maxKstd=max(std(mlstK), maxRFcmpKStd); maxKstd=max(std(mlstK), maxRFcmpKStd);
maxrstd=max(std(mlstR), maxRFcmprStd); maxrstd=max(std(mlstR), maxRFcmprStd);
@@ -65,10 +64,7 @@ if AddCplot==1,
Exp(expN).cRmean(cTraceN)=mean(mlstR); Exp(expN).cKstd(cTraceN)=maxKstd; %std(mlstR); Exp(expN).cRmean(cTraceN)=mean(mlstR); Exp(expN).cKstd(cTraceN)=maxKstd; %std(mlstR);
Exp(expN).cKmean(cTraceN)=mean(mlstK); Exp(expN).cRstd(cTraceN)=maxrstd; %std(mlstK); Exp(expN).cKmean(cTraceN)=mean(mlstK); Exp(expN).cRstd(cTraceN)=maxrstd; %std(mlstK);
% Mean calculation plot
%******MEAN calculation Plot********************
%try
l=Exp(expN).cLmean(cTraceN); l=Exp(expN).cLmean(cTraceN);
r=Exp(expN).cRmean(cTraceN); r=Exp(expN).cRmean(cTraceN);
K=Exp(expN).cKmean(cTraceN); K=Exp(expN).cKmean(cTraceN);
@@ -80,17 +76,16 @@ if AddCplot==1,
g=K ./ (1 + exp(-r.* (t - l ))); g=K ./ (1 + exp(-r.* (t - l )));
gSlow=Kl ./ (1 + exp(-rl.* (t - lslow ))); gSlow=Kl ./ (1 + exp(-rl.* (t - lslow )));
gFast=Ku ./ (1 + exp(-ru.* (t - lfast ))); gFast=Ku ./ (1 + exp(-ru.* (t - lfast )));
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end if K==0||r==0||l==0
g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;
end
Exp(expN).hCmean(cTraceN)=plot(OLaxes,t,g);hold on; %PLOT the composit mean of traces Exp(expN).hCmean(cTraceN)=plot(OLaxes,t,g);hold on; % plot the composit mean of traces
Exp(expN).hBound1(cTraceN)=plot(OLaxes,t,gSlow,'y'); Exp(expN).hBound1(cTraceN)=plot(OLaxes,t,gSlow,'y');
Exp(expN).hBound2(cTraceN)=plot(OLaxes,t,gFast,'y'); Exp(expN).hBound2(cTraceN)=plot(OLaxes,t,gFast,'y');
%c1=c1-((cTraceN-1)*0.2); c2=c2+((cTraceN-1)*0.2); c3=c3+((cTraceN-1)*0.2); %c1=c1-((cTraceN-1)*0.2); c2=c2+((cTraceN-1)*0.2); c3=c3+((cTraceN-1)*0.2);
set(Exp(expN).hCmean(cTraceN),'color',colour) %[c1 c2 c3]) %Set latest trace red set(Exp(expN).hCmean(cTraceN),'color',colour) %[c1 c2 c3]) %Set latest trace red
set(Exp(expN).hCmean(cTraceN),'linewidth',3) set(Exp(expN).hCmean(cTraceN),'linewidth',3)
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Lstr=num2str(Exp(expN).cLmean(cTraceN)); Lsstr=num2str(Exp(expN).cLstd(cTraceN)); Lstr=num2str(Exp(expN).cLmean(cTraceN)); Lsstr=num2str(Exp(expN).cLstd(cTraceN));
Rstr=num2str(Exp(expN).cRmean(cTraceN)); Rsstr=num2str(Exp(expN).cRstd(cTraceN)); Rstr=num2str(Exp(expN).cRmean(cTraceN)); Rsstr=num2str(Exp(expN).cRstd(cTraceN));
Kstr=num2str(Exp(expN).cKmean(cTraceN)); Ksstr=num2str(Exp(expN).cKstd(cTraceN)); Kstr=num2str(Exp(expN).cKmean(cTraceN)); Ksstr=num2str(Exp(expN).cKstd(cTraceN));
@@ -99,9 +94,11 @@ try
cPlotLB=strcat('Composite', num2str(cTraceN),'->','L=',Lstr(1:4),';','Ls=',Lsstr(1:4),';',... cPlotLB=strcat('Composite', num2str(cTraceN),'->','L=',Lstr(1:4),';','Ls=',Lsstr(1:4),';',...
'r=',Rstr(1:4),';','rs=',Rsstr(2:6),';','K=',Kstr(1:4),';','Ks=',Ksstr(1:4)) 'r=',Rstr(1:4),';','rs=',Rsstr(2:6),';','K=',Kstr(1:4),';','Ks=',Ksstr(1:4))
catch catch
try cPlotLB= strcat('Composite', num2str(cTraceN),'->','L=',Lstr(1:4),';','r=',Rstr(1:4),';','K=',Kstr(1:4),'-SingleSource'); catch, end try
cPlotLB=strcat('Composite', num2str(cTraceN),'->','L=',Lstr(1:4),';','r=',Rstr(1:4),';','K=',Kstr(1:4),'-SingleSource');
catch
end
end end
%}
Exp(expN).cName(cTraceN)={cPlotLB}; Exp(expN).cName(cTraceN)={cPlotLB};
if expN==1, set(ghandles.OLay1,'string', cPlotLB); end if expN==1, set(ghandles.OLay1,'string', cPlotLB); end
@@ -111,19 +108,15 @@ if expN==3, set(ghandles.OLay3,'string', cPlotLB); end
% Hide source traces leaving only the Composite traces and STD traces % Hide source traces leaving only the Composite traces and STD traces
for i=1:length(Exp(expN).hOL) for i=1:length(Exp(expN).hOL)
set(Exp(expN).hOL(i),'Visible','off') set(Exp(expN).hOL(i),'Visible','off')
try set(Exp(expN).hOLb(i),'Visible','off'); catch, msg= 'No raw data RFcmp'; end try set(Exp(expN).hOLb(i),'Visible','off')
catch
msg='No raw data RFcmp'
end
end end
% Increment the CompositeTrace count and update the correlated reference OLAY cTraceIndx % Increment the CompositeTrace count and update the correlated reference OLAY cTraceIndx
Exp(expN).cTraceN=(Exp(expN).cTraceN) + 1 ; Exp(expN).cTraceN=(Exp(expN).cTraceN) + 1 ;
Exp(expN).cTraceIndx(Exp(expN).cTraceN)=length(Exp(expN).hOL(:))+1; Exp(expN).cTraceIndx(Exp(expN).cTraceN)=length(Exp(expN).hOL(:))+1;
%cPlotLB=strcat('Composite', num2str(cTraceN),'L=',num2str(Exp(expN).cLmean(cTraceN)),'Ls=',num2str(Exp(expN).cLstd(cTraceN))) %,'-',(Exp(expN).hOLname(cTraceIndx))) %cPlotLB=strcat('Composite', num2str(cTraceN),'L=',num2str(Exp(expN).cLmean(cTraceN)),'Ls=',num2str(Exp(expN).cLstd(cTraceN))) %,'-',(Exp(expN).hOLname(cTraceIndx)))
%Exp(expN).cName(cTraceN)={cPlotLB}; %Exp(expN).cName(cTraceN)={cPlotLB};

View File

@@ -23,11 +23,9 @@ if EZdatatip==1 %adaptation for image spot selection
if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end
if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end
if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end
if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end
if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end
if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end
elseif EZdatatip==2 % adaption for Overlay plot selection elseif EZdatatip==2 % adaption for Overlay plot selection
% destPerMP=Exp(expN).Dexp(DexpN).destPerMP; % destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
MPlateN=ceil(OLplateNum/destPerMP); MPlateN=ceil(OLplateNum/destPerMP);
@@ -40,7 +38,6 @@ elseif EZdatatip==2 %adaption for Overlay plot selection
if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222 if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222
if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222 if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222
if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222 if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222
elseif EZdatatip==0 elseif EZdatatip==0
if lstBoxCmpFlg~=1 if lstBoxCmpFlg~=1
DexpN=Exp(expN).DexpN; DexpN=Exp(expN).DexpN;
@@ -55,8 +52,6 @@ elseif EZdatatip==0
Lbl=cell2mat(selGnOrf); Lbl=cell2mat(selGnOrf);
if ~isempty(strfind(Lbl,'RF')) && ~isempty(strfind(Lbl,'md')) if ~isempty(strfind(Lbl,'RF')) && ~isempty(strfind(Lbl,'md'))
strLoc=strfind(Lbl,'md'); strLoc=strfind(Lbl,'md');
MPloc=strfind(Lbl,':'); MPloc=strfind(Lbl,':');
dMP=str2double(Lbl((MPloc(1)+1):(MPloc(2)-1))); dMP=str2double(Lbl((MPloc(1)+1):(MPloc(2)-1)));
if strcmp(Lbl(strLoc:strLoc+3),'-mdG('); if strcmp(Lbl(strLoc:strLoc+3),'-mdG(');
@@ -74,7 +69,6 @@ elseif EZdatatip==0
end % if EZdatatip==1 %adaptation for image spot selection end % if EZdatatip==1 %adaptation for image spot selection
if EZdatatip==2 % Response to Overlay click if EZdatatip==2 % Response to Overlay click
%++++++++++++++++++++LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL+++++++++++++++++++++++
% seltraceN comes from EZvDatatip; % seltraceN comes from EZvDatatip;
% Exp(OLay).seltraceN iscaptured from EZvDatatip % Exp(OLay).seltraceN iscaptured from EZvDatatip
% if an OLay trace is selected % if an OLay trace is selected
@@ -96,8 +90,7 @@ if EZdatatip==2 %Response to Overlay click
catch, end catch, end
if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
%++++++++++++++++++++++KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK++++++++++++++++++++++ for J=1:(tracN)
for J=1:(tracN),
try try
set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off'); set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
catch, end catch, end
@@ -111,7 +104,7 @@ if EZdatatip==2 %Response to Overlay click
try try
set(Exp(zoneSel).hK(seltraceN),'visible','on'); set(Exp(zoneSel).hKb(seltraceN),'visible','on'); set(Exp(zoneSel).hK(seltraceN),'visible','on'); set(Exp(zoneSel).hKb(seltraceN),'visible','on');
catch, end catch, end
%+++++++++++++++++++++rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr+++++++++++++++++++++++++++++
for J=1:(tracN), for J=1:(tracN),
try try
set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off'); set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
@@ -126,11 +119,9 @@ if EZdatatip==2 %Response to Overlay click
try try
set(Exp(zoneSel).hr(seltraceN),'visible','on'); set(Exp(zoneSel).hrb(seltraceN),'visible','on'); set(Exp(zoneSel).hr(seltraceN),'visible','on'); set(Exp(zoneSel).hrb(seltraceN),'visible','on');
catch, end catch, end
else
else %if EZdatatip==1 or if EZdatatip==0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ % Plot RFmd1 and RFmd2 indexes
%*************Plot RFmd1 and RFmd2 indexes*********************
if EZdatatip==0 if EZdatatip==0
end end
%if ~exist(RFmdFlg) %if ~exist(RFmdFlg)
RF1mdIndx=Exp(zoneSel).Dexp(DexpN).RFmd1indx; RF1mdIndx=Exp(zoneSel).Dexp(DexpN).RFmd1indx;
@@ -149,7 +140,7 @@ if lstBoxCmpFlg~= 1
Exp(zoneSel).seltraceN=tracN; Exp(zoneSel).seltraceN=tracN;
seltraceN=tracN; seltraceN=tracN;
end end
%**************Plot L K r for all pertibation(destination) Plates*************** % Plot L K r for all pertibation(destination) Plates
if lstBoxCmpFlg~=1 % If selection is a "normal" item with a location in the label if lstBoxCmpFlg~=1 % If selection is a "normal" item with a location in the label
try RF1mdNums=(RF1mdPltN-1)*destPerMP + (1:destPerMP); catch, end %RF1mdPltN % try RF1mdNums=(RF1mdPltN-1)*destPerMP + (1:destPerMP); catch, end %RF1mdPltN %
try RF2mdNums=(RF2mdPltN-1)*destPerMP + (1:destPerMP); catch, end %RF2mdPltN % try RF2mdNums=(RF2mdPltN-1)*destPerMP + (1:destPerMP); catch, end %RF2mdPltN %
@@ -163,7 +154,6 @@ if lstBoxCmpFlg~= 1 % If selection is a "normal" item with a location in the lab
if lvals(I)==0, lvals(I)=140; end if lvals(I)==0, lvals(I)=140; end
kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3); kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3);
rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4); rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
@@ -172,7 +162,6 @@ if lstBoxCmpFlg~= 1 % If selection is a "normal" item with a location in the lab
if lvals(I)==0, lvals(I)=140; end if lvals(I)==0, lvals(I)=140; end
kvals(I)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(I).med; kvals(I)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(I).med;
rvals(I)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(I).med; rvals(I)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(I).med;
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
@@ -181,7 +170,6 @@ if lstBoxCmpFlg~= 1 % If selection is a "normal" item with a location in the lab
if lvals(I)==0, lvals(I)=140; end if lvals(I)==0, lvals(I)=140; end
kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3); %No P med.Kvals /dms currently avail. kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3); %No P med.Kvals /dms currently avail.
rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4); %No P med.rvals /dms currently avail. rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4); %No P med.rvals /dms currently avail.
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
@@ -190,20 +178,16 @@ if lstBoxCmpFlg~= 1 % If selection is a "normal" item with a location in the lab
if lvals(I)==0, lvals(I)=140; end if lvals(I)==0, lvals(I)=140; end
kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3); %No P med.Kvals /dms currently avail. kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3); %No P med.Kvals /dms currently avail.
rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4); %No P med.rvals /dms currently avail. rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4); %No P med.rvals /dms currently avail.
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I); Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
end end
elseif CompositeTrendFlg==1 && EZdatatip==0 %Gene-Specifics Composite from listBox elseif CompositeTrendFlg==1 && EZdatatip==0 %Gene-Specifics Composite from listBox
lvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals)); lvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals));
if lvals(I)==0, lvals(I)=140; end if lvals(I)==0, lvals(I)=140; end
kvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals)); kvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals));
rvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals)); rvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals));
end %if CompositeTrendFlg==0 || EZdatatip==1 end
try try
if ~isempty(RF1mdIndx) if ~isempty(RF1mdIndx)
lvalsRF1md(I)=scan(1,RF1mdNums(I)).plate(1).CFout(RF1mdIndx(I),5); lvalsRF1md(I)=scan(1,RF1mdNums(I)).plate(1).CFout(RF1mdIndx(I),5);
@@ -218,7 +202,6 @@ if lstBoxCmpFlg~= 1 % If selection is a "normal" item with a location in the lab
end end
catch catch
end end
try try
lvalsRF2md(I)=scan(1,RF2mdNums(I)).plate(1).CFout(RF2mdIndx(I),5); lvalsRF2md(I)=scan(1,RF2mdNums(I)).plate(1).CFout(RF2mdIndx(I),5);
if lvalsRF2md(I)==0, lvalsRF2md(I)=140; end if lvalsRF2md(I)==0, lvalsRF2md(I)=140; end
@@ -226,8 +209,6 @@ if lstBoxCmpFlg~= 1 % If selection is a "normal" item with a location in the lab
rvalsRF2md(I)=scan(1,RF2mdNums(I)).plate(1).CFout(RF2mdIndx(I),4); rvalsRF2md(I)=scan(1,RF2mdNums(I)).plate(1).CFout(RF2mdIndx(I),4);
catch catch
end end
% Added for INTERACTION Calculating Utility 2016_0219 % Added for INTERACTION Calculating Utility 2016_0219
try try
if CompositeTrendFlg==0 || EZdatatip==1 if CompositeTrendFlg==0 || EZdatatip==1
@@ -247,14 +228,10 @@ if lstBoxCmpFlg~= 1 % If selection is a "normal" item with a location in the lab
else else
deltaXR(I)=Xhn(I)-(Rn(I)-Rs(I)); deltaXR(I)=Xhn(I)-(Rn(I)-Rs(I));
end end
catch catch
msg='No Refs! ->No Interaction Calculations!' msg='No Refs! ->No Interaction Calculations!'
end end
end
end %for I=1:length(plNums)
elseif lstBoxCmpFlg==1 %Determine values of RF1cmp or RFcmpG or RFcmpP composites elseif lstBoxCmpFlg==1 %Determine values of RF1cmp or RFcmpG or RFcmpP composites
for dm=1:destPerMP for dm=1:destPerMP
if RFcmpGFlg==0 %RF1cmp or RF2cmp clicked if RFcmpGFlg==0 %RF1cmp or RF2cmp clicked
@@ -268,13 +245,11 @@ elseif lstBoxCmpFlg==1 %Determine values of RF1cmp or RFcmpG or RFcmpP composit
kvals(dm)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; %Ks=num2str(K); kvals(dm)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; %Ks=num2str(K);
rvals(dm)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; %rs=num2str(r); rvals(dm)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; %rs=num2str(r);
end end
% Added for INTERACTION Calculating Utility 2016_0219 % Added for INTERACTION Calculating Utility 2016_0219
try try
Xn(dm)=lvals(dm); Xn(dm)=lvals(dm);
Xln(dm)=lvals(dm)- Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std ; Xln(dm)=lvals(dm)- Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std ;
Xhn(dm)=lvals(dm)+ Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; Xhn(dm)=lvals(dm)+ Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
if Xn(dm)==0, deltaXR(dm)=140; end if Xn(dm)==0, deltaXR(dm)=140; end
if isnan(Xhn(dm))||isnan(Xln(dm))|| Xhn(dm)==0||Xln(dm)==0||isnan(Rs(dm)) if isnan(Xhn(dm))||isnan(Xln(dm))|| Xhn(dm)==0||Xln(dm)==0||isnan(Rs(dm))
deltaXR(dm)=140; deltaXR(dm)=140;
@@ -283,21 +258,16 @@ elseif lstBoxCmpFlg==1 %Determine values of RF1cmp or RFcmpG or RFcmpP composit
else else
deltaXR(dm)=Xhn(dm)-(Rn(dm)-Rs(dm)); deltaXR(dm)=Xhn(dm)-(Rn(dm)-Rs(dm));
end end
catch catch
msg='No Refs! ->No Interaction Calculations!' msg='No Refs! ->No Interaction Calculations!'
end end
end % for dm=1:destPerMP end % for dm=1:destPerMP
Exp(expN).Trace(traceN).UsrGLB=selGnOrf; %Added 18_0118 for tickLabelStr issue in EZfigTrendOL.m assoc'd with RFcmpG(-) Exp(expN).Trace(traceN).UsrGLB=selGnOrf; %Added 18_0118 for tickLabelStr issue in EZfigTrendOL.m assoc'd with RFcmpG(-)
end
end %if lstBoxCmpFlg==1 % INTERACTION Plotting Utility 2016_021
%***********INTERACTION Plotting Utility 2016_0219*********************************************
try try
if Rn(1)==0, % If Ref mean is zero if Rn(1)==0 % if Ref mean is zero
intL=0; proGrIntL=0; intLadj=0; proGrIntLadj=0; intL=0; proGrIntL=0; intLadj=0; proGrIntLadj=0;
intNormL=6.66;intNormLadj=6.66; proGrIntNormL=6.66;proGrIntNormLadj=6.66; intNormL=6.66;intNormLadj=6.66; proGrIntNormL=6.66;proGrIntNormLadj=6.66;
else else
@@ -305,9 +275,7 @@ else
intL=(Xn-Rn); intL=(Xn-Rn);
intL(Xn==0)=140; intL(Xn==0)=140;
intLadj=(deltaXR); intLadj=(deltaXR);
Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL=intL; Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL=intL;
%{ %{
intNormL=(intL) ./ Rn(1) intNormL=(intL) ./ Rn(1)
intNormLadj=((deltaXR)./ Rn(1)) intNormLadj=((deltaXR)./ Rn(1))
@@ -326,25 +294,21 @@ catch
FailMessage='Problem with Reference Rn value; Unable to produce Interaction values! Ln119 EZdestComp' FailMessage='Problem with Reference Rn value; Unable to produce Interaction values! Ln119 EZdestComp'
end end
hidem(ghandles.Daxes1) hidem(ghandles.Daxes1)
if zoneSel==1,showm(ghandles.Dlaxes1);showm(ghandles.Dkaxes1);showm(ghandles.Draxes1);end if zoneSel==1,showm(ghandles.Dlaxes1);showm(ghandles.Dkaxes1);showm(ghandles.Draxes1);end
if zoneSel==2,showm(ghandles.Dlaxes2);showm(ghandles.Dkaxes2);showm(ghandles.Draxes2);end if zoneSel==2,showm(ghandles.Dlaxes2);showm(ghandles.Dkaxes2);showm(ghandles.Draxes2);end
if zoneSel==3,showm(ghandles.Dlaxes3);showm(ghandles.Dkaxes3);showm(ghandles.Draxes3);end if zoneSel==3,showm(ghandles.Dlaxes3);showm(ghandles.Dkaxes3);showm(ghandles.Draxes3);end
set(Dlaxes,'NextPlot','add'); set(Dkaxes,'NextPlot','add'); set(Draxes,'NextPlot','add') set(Dlaxes,'NextPlot','add'); set(Dkaxes,'NextPlot','add'); set(Draxes,'NextPlot','add')
if zoneSel==1,showm(ghandles.DNLaxes1); end if zoneSel==1,showm(ghandles.DNLaxes1); end
if zoneSel==2,showm(ghandles.DNLaxes2); end if zoneSel==2,showm(ghandles.DNLaxes2); end
if zoneSel==3,showm(ghandles.DNLaxes3); end if zoneSel==3,showm(ghandles.DNLaxes3); end
set(DNLaxes,'NextPlot','add'); set(DNLaxes,'NextPlot','add');
%+++++++++++++++++LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL+++++++++++++++++++++++++++++++++
% Make visible the current L plot and store it for retrieval by OLay code % Make visible the current L plot and store it for retrieval by OLay code
if verLessThan('matlab','8.4') if verLessThan('matlab','8.4')
else % accomodate new matlab changes after 2014a fix 23_0807 else % accomodate new matlab changes after 2014a fix 23_0807
tempFig2=figure; tempFig2=figure;
end end
try %Some experiments do not have ref. plates try % some experiments do not have ref. plates
Exp(zoneSel).hLRF1(tracN)=plot(Dlaxes,lvalsRF1md,1:destPerMP,'b'); hold on Exp(zoneSel).hLRF1(tracN)=plot(Dlaxes,lvalsRF1md,1:destPerMP,'b'); hold on
catch catch
end end
@@ -352,7 +316,6 @@ end
Exp(zoneSel).hLRF2(tracN)=plot(Dlaxes,lvalsRF2md,1:destPerMP,'c'); hold on Exp(zoneSel).hLRF2(tracN)=plot(Dlaxes,lvalsRF2md,1:destPerMP,'c'); hold on
catch catch
end end
try try
Exp(zoneSel).hL(tracN)=plot(Dlaxes,lvals,1:destPerMP); Exp(zoneSel).hLb(tracN)=plot(Dlaxes,lvals,1:destPerMP,'rs'); Exp(zoneSel).hL(tracN)=plot(Dlaxes,lvals,1:destPerMP); Exp(zoneSel).hLb(tracN)=plot(Dlaxes,lvals,1:destPerMP,'rs');
catch catch
@@ -360,7 +323,6 @@ end
if zoneSel==1,set(ghandles.Dlaxes1,'xlim',[0,140]); end if zoneSel==1,set(ghandles.Dlaxes1,'xlim',[0,140]); end
if zoneSel==2,set(ghandles.Dlaxes2,'xlim',[0,140]); end if zoneSel==2,set(ghandles.Dlaxes2,'xlim',[0,140]); end
if zoneSel==3,set(ghandles.Dlaxes3,'xlim',[0,140]); end if zoneSel==3,set(ghandles.Dlaxes3,'xlim',[0,140]); end
%*************************************************
% Make visible Plot for Interaction Data, Store and Hide unless a N (InteractionPBsel) set that plot on Top of the RawData Plots. % Make visible Plot for Interaction Data, Store and Hide unless a N (InteractionPBsel) set that plot on Top of the RawData Plots.
% Plot new intL % Plot new intL
try try
@@ -368,56 +330,45 @@ end
% Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:destPerMP,'y'); % Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:destPerMP,'y');
Exp(zoneSel).hintL(tracN)=plot(DNLaxes,intL,1:destPerMP); Exp(zoneSel).hintLb(tracN)=plot(DNLaxes,intL,1:destPerMP,'rs'); Exp(zoneSel).hintL(tracN)=plot(DNLaxes,intL,1:destPerMP); Exp(zoneSel).hintLb(tracN)=plot(DNLaxes,intL,1:destPerMP,'rs');
Exp(zoneSel).hintLadj(tracN)=plot(DNLaxes,intLadj,1:destPerMP,'g'); Exp(zoneSel).hintLadjb(tracN)=plot(DNLaxes,intLadj,1:destPerMP,'gs'); Exp(zoneSel).hintLadj(tracN)=plot(DNLaxes,intLadj,1:destPerMP,'g'); Exp(zoneSel).hintLadjb(tracN)=plot(DNLaxes,intLadj,1:destPerMP,'gs');
catch, catch
end end
if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
if zoneSel==2,set(ghandles.DNLaxes2,'xlim',[-75,75]); end if zoneSel==2,set(ghandles.DNLaxes2,'xlim',[-75,75]); end
if zoneSel==3,set(ghandles.DNLaxes3,'xlim',[-75,75]); end if zoneSel==3,set(ghandles.DNLaxes3,'xlim',[-75,75]); end
% intNormL % intNormL
% intNormLadj % intNormLadj
%********************************************
% ProGrIntLadj Plot % ProGrIntLadj Plot
% ProGrintLadj Plot % ProGrintLadj Plot
% ProGrintNormL % ProGrintNormL
% proGrintNormLadj % proGrintNormLadj
%+++++++++++++++++KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK+++++++++++++++++++++++++++++++++++++++++++++++++++++++
% Hide all K plots % Hide all K plots
for J=1:(tracN-1), for J=1:(tracN-1),
try try
set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off'); set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
catch, end catch
end
try try
set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off'); set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off');
catch, end catch
end end
end
% Make visible the current L plot and store it for retrieval by OLay code % Make visible the current L plot and store it for retrieval by OLay code
try %Some experiments do not have ref. plates try % some experiments do not have ref. plates
Exp(zoneSel).hKRF1(tracN)=plot(Dkaxes,kvalsRF1md,1:destPerMP,'b'); Exp(zoneSel).hKRF1(tracN)=plot(Dkaxes,kvalsRF1md,1:destPerMP,'b');
Exp(zoneSel).hKRF2(tracN)=plot(Dkaxes,kvalsRF2md,1:destPerMP,'c'); Exp(zoneSel).hKRF2(tracN)=plot(Dkaxes,kvalsRF2md,1:destPerMP,'c');
catch, end catch
end
try try
Exp(zoneSel).hK(tracN)=plot(Dkaxes,kvals,1:destPerMP,'b'); Exp(zoneSel).hKb(tracN)=plot(Dkaxes,kvals,1:destPerMP,'rs'); Exp(zoneSel).hK(tracN)=plot(Dkaxes,kvals,1:destPerMP,'b'); Exp(zoneSel).hKb(tracN)=plot(Dkaxes,kvals,1:destPerMP,'rs');
catch, end catch
end
set(Dkaxes,'xlim',[0,200]) % max(kvals+20) set(Dkaxes,'xlim',[0,200]) % max(kvals+20)
set(Dkaxes,'ycolor',[.9,.9,1]) set(Dkaxes,'ycolor',[.9,.9,1])
%++++++++++++++++++rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr+++++++++++++++++++++++++++++++++++++++++++++++
%Hide all r plots
% Hide all r plots
for J=1:(tracN-1), for J=1:(tracN-1),
try try
set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off'); set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
@@ -426,6 +377,7 @@ end
set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off'); set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off');
catch, end catch, end
end end
% Make visible the current r plot and store it for retrieval by OLay code % Make visible the current r plot and store it for retrieval by OLay code
try %Some experiments do not have ref. plates try %Some experiments do not have ref. plates
Exp(zoneSel).hrRF1(tracN)=plot(Draxes,rvalsRF1md,1:destPerMP,'b'); Exp(zoneSel).hrRF1(tracN)=plot(Draxes,rvalsRF1md,1:destPerMP,'b');
@@ -436,24 +388,14 @@ end
catch, end catch, end
set(Draxes,'xlim',[0,1]) set(Draxes,'xlim',[0,1])
set(Draxes,'ycolor',[.9,.9,1]) set(Draxes,'ycolor',[.9,.9,1])
end
end %if EZdatatip==2 Response to Overlay click
if zoneSel==1, set(ghandles.geneOrfLKr1,'string', grfgenestr);end if zoneSel==1, set(ghandles.geneOrfLKr1,'string', grfgenestr);end
if zoneSel==2, set(ghandles.geneOrfLKr2,'string', grfgenestr);end if zoneSel==2, set(ghandles.geneOrfLKr2,'string', grfgenestr);end
if zoneSel==3, set(ghandles.geneOrfLKr3,'string', grfgenestr);end if zoneSel==3, set(ghandles.geneOrfLKr3,'string', grfgenestr);end
% Display Selection PlotFilter
%********************************************************************************************************************* if Exp(4).interacPBsel==0
%*********************************************************************************************************************
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%___________________________________Display Selection PlotFilter ____________________
if Exp(4).interacPBsel==0 %00000000000000000000000000000
% replace ghandles.DNLaxes1 (Dlaxes2)etc. with a single % replace ghandles.DNLaxes1 (Dlaxes2)etc. with a single
% Exp(zoneSel).DNLaxes,.... % Exp(zoneSel).DNLaxes,....
set(ghandles.Dlaxes1,'Visible','on') set(ghandles.Dlaxes1,'Visible','on')
@@ -470,7 +412,6 @@ end %if EZdatatip==2 Response to Overlay click
try try
set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off'); set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off');
catch, end catch, end
try try
set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off'); set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off');
catch, end catch, end
@@ -488,10 +429,7 @@ end %if EZdatatip==2 Response to Overlay click
for i=1:Exp(zoneSel).expLoadCnt, for i=1:Exp(zoneSel).expLoadCnt,
try set(Exp(zoneSel).hzeroCLn(i),'visible','off'); catch ME, end try set(Exp(zoneSel).hzeroCLn(i),'visible','off'); catch ME, end
end end
elseif Exp(4).interacPBsel==1
elseif Exp(4).interacPBsel==1 %111111111111111111111111111
set(ghandles.DNLaxes1,'Visible','on') set(ghandles.DNLaxes1,'Visible','on')
set(ghandles.DNLaxes2,'Visible','on') set(ghandles.DNLaxes2,'Visible','on')
set(ghandles.DNLaxes3,'Visible','on') set(ghandles.DNLaxes3,'Visible','on')
@@ -512,45 +450,16 @@ end %if EZdatatip==2 Response to Overlay click
for i=1:Exp(zoneSel).expLoadCnt, for i=1:Exp(zoneSel).expLoadCnt,
try set(Exp(zoneSel).hzeroCLn(i),'visible','on'); catch ME, end try set(Exp(zoneSel).hzeroCLn(i),'visible','on'); catch ME, end
end end
elseif Exp(4).interacPBsel==2 %2222222222222222222222222222 TEMPorily Same as interacPBsel==1 elseif Exp(4).interacPBsel==2
% set(ghandles.DNLaxes1,'Visible','on') end
%set(ghandles.Dlaxes1,'Visible','off')
end %if Exp(4).interacPBsel==0
if verLessThan('matlab','8.4') if verLessThan('matlab','8.4')
else % accomodate new matlab changes after 2014a fix update 23_0807 else % accomodate new matlab changes after 2014a fix update 23_0807
close(tempFig2) close(tempFig2)
end end
%------------------------------------------------------------------------------------------------------------
%===================================================================================================================== % Deprecated functions
%end %if isempty(msg)
%BONEYARD BONEYARD BONEYARD BONEYARD BONEYARD BONEYARD BONEYARD BONEYARD BONEYARD
%*********************************************************************************
%{ %{
for J=1:(tracN), for J=1:(tracN),

View File

@@ -7,7 +7,7 @@ ln=1;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
fprintf(fid,'%s\ExpName:::','Reference Diagnostic Values'); fprintf(fid,'%s\ExpName:::','Reference Diagnostic Values');
%will need to reverse the equals pulling data from the Exp source as needed % Will need to reverse the equals pulling data from the Exp source as needed
% to populate the printout diagnostice sheet. % to populate the printout diagnostice sheet.
for d=1:DMnum for d=1:DMnum
fprintf(fid,'RF Name\Median\Mean\STD\Max\Min'); fprintf(fid,'RF Name\Median\Mean\STD\Max\Min');
@@ -36,10 +36,7 @@ for d=1:DMnum
RFmeanG=Exp(expN).minG(d,dMPs(mm)); RFmeanG=Exp(expN).minG(d,dMPs(mm));
maxG= Exp(expN).maxG(d,dMPs(mm)); maxG= Exp(expN).maxG(d,dMPs(mm));
minG= Exp(expN).minG(d,dMPs(mm)); minG= Exp(expN).minG(d,dMPs(mm));
end
end %for d=1:DMnum
for mm=1:length(dMPs) for mm=1:length(dMPs)
for d=1:DMnum for d=1:DMnum
@@ -51,10 +48,8 @@ for mm=1:length(dMPs)
mean1Disp= Exp(expN).meanP(d,dMPs(mm)); mean1Disp= Exp(expN).meanP(d,dMPs(mm));
minDisp= Exp(expN).minP(d,dMPs(mm)); minDisp= Exp(expN).minP(d,dMPs(mm));
maxDisp= Exp(expN).maxP(d,dMPs(mm)); maxDisp= Exp(expN).maxP(d,dMPs(mm));
end
end %for d=1:DMnum end
end %for mm=1:length(dMPs)
%{ %{
RFcombValList= cat(1,medValList1{d+1},medValList2{d+1}); RFcombValList= cat(1,medValList1{d+1},medValList2{d+1});
@@ -65,11 +60,4 @@ end %for mm=1:length(dMPs)
%} %}
fclose(fid) fclose(fid)

View File

@@ -105,7 +105,7 @@ Exp(expN).Dexp(1).srtGnLst={('CheckMP/MPDMfile')};
Exp(expN).Dexp(1).srtOrfLst={('CheckMP/MPDMfile')}; Exp(expN).Dexp(1).srtOrfLst={('CheckMP/MPDMfile')};
set(handles.listboxGnOrf,'value',1) %Fix accomodation for bug in App Designer .. .wlapp converter 230906 set(handles.listboxGnOrf,'value',1) %Fix accomodation for bug in App Designer .. .wlapp converter 230906
set(handles.listboxGnOrf,'string',cellstr([{'Failed To Load'}; {' '}])); set(handles.listboxGnOrf,'string',cellstr([{'Failed To Load'}; {' '}]));
%try
ExpOutmat=fullfile(scansDir,openExpfile); ExpOutmat=fullfile(scansDir,openExpfile);
load(ExpOutmat); load(ExpOutmat);
cd(scansDir) cd(scansDir)
@@ -113,7 +113,7 @@ set(handles.listboxGnOrf,'string',cellstr([{'Failed To Load'}; {' '}]));
resDir=pwd; resDir=pwd;
Exp(expN).Dexp(1).resDir=resDir; Exp(expN).Dexp(1).resDir=resDir;
cd ..; cd ..;
try %This try-catch is to go up one more dir if the images aren't found (from /OtherResults) try % this try-catch is to go up one more dir if the images aren't found (from /OtherResults)
test4imageDir=imread(fullfile(pwd,'1','1.bmp')); test4imageDir=imread(fullfile(pwd,'1','1.bmp'));
ExpPath=pwd; ExpPath=pwd;
Exp(expN).Dexp(1).ExpFoldr=ExpPath; Exp(expN).Dexp(1).ExpFoldr=ExpPath;
@@ -128,7 +128,8 @@ set(handles.listboxGnOrf,'string',cellstr([{'Failed To Load'}; {' '}]));
end end
end end
cd(w) cd(w)
%Experiment LOADs
% Experiment Loads
% load (fullfile(ExpFoldr,'MasterPlateFiles','MPDMmat.mat')) % load (fullfile(ExpFoldr,'MasterPlateFiles','MPDMmat.mat'))
load(fullfile(Exp(expN).Dexp(1).ExpFoldr,'MasterPlateFiles','MPDMmat.mat')) load(fullfile(Exp(expN).Dexp(1).ExpFoldr,'MasterPlateFiles','MPDMmat.mat'))
load(fullfile(resDir,'Fotos','Coordinates')) load(fullfile(resDir,'Fotos','Coordinates'))
@@ -157,8 +158,6 @@ Exp(expN).Dexp(1).ImParMat=Exp(expN).Dexp(1).temp.ImParMat;
Exp(expN).DexpLength=1; Exp(expN).DexpLength=1;
Exp(expN).Dexp((Exp(expN).DexpLength+1):end)=[]; Exp(expN).Dexp((Exp(expN).DexpLength+1):end)=[];
% Load new ExpJob % Load new ExpJob
if expN==1, if expN==1,
% Exp(1).traceN=0; % Exp(1).traceN=0;
@@ -226,7 +225,6 @@ DMnum= length(Exp(expN).Dexp(1).DM.drug);
set(handles.DMsldr3,'min',1,'max',DMnum) set(handles.DMsldr3,'min',1,'max',DMnum)
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
set(handles.Tptsldr3,'min',1,'max',tPtsSize) set(handles.Tptsldr3,'min',1,'max',tPtsSize)
set(handles.MPsldr3,'value',1) set(handles.MPsldr3,'value',1)
set(handles.DMsldr3,'value',1) set(handles.DMsldr3,'value',1)
set(handles.Tptsldr3,'value',1) set(handles.Tptsldr3,'value',1)
@@ -241,15 +239,18 @@ set(handles.DN3,'value',1)
set(handles.DN3,'string',1) set(handles.DN3,'string',1)
end end
if expN==1,set(handles.GeneOrfLoc1,'string',{''}); if expN==1,
set(handles.GeneOrfLoc1,'string',{''});
set(handles.graphStrLoc1,'string',{''}); set(handles.graphStrLoc1,'string',{''});
cla(handles.Paxes1) cla(handles.Paxes1);
end end
if expN==2,set(handles.GeneOrfLoc2,'string',{''}); if expN==2
set(handles.GeneOrfLoc2,'string',{''});
set(handles.graphStrLoc2,'string',{''}); set(handles.graphStrLoc2,'string',{''});
cla(handles.Paxes2) cla(handles.Paxes2)
end end
if expN==3,set(handles.GeneOrfLoc3,'string',{''}); if expN==3
set(handles.GeneOrfLoc3,'string',{''});
set(handles.graphStrLoc3,'string',{''}) set(handles.graphStrLoc3,'string',{''})
cla(handles.Paxes3) cla(handles.Paxes3)
end end
@@ -258,7 +259,6 @@ Exp(expN).Dexp(1).srtOrfLst={('CheckMP/MPDMfile')};
set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtGnLst)
set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtOrfLst)
EZVimDisplay EZVimDisplay
% Capture Exp Name % Capture Exp Name
@@ -279,26 +279,25 @@ catch
catchissue='Ln198' catchissue='Ln198'
end % nested try-catch-end end % nested try-catch-end
% Compile GeneList and OrfList % Compile GeneList and OrfList
% Sort and add the medians of Ref Plates if RF1,RF2 exist % Sort and add the medians of Ref Plates if RF1,RF2 exist
% Added 17-1023 For User Addition of Gene Composites to ListBox % Added 17-1023 For User Addition of Gene Composites to ListBox
Expaa{expN,1}= []; Expbb{expN,1}= []; Expaa{expN,1}=[];
Expbb{expN,1}=[];
lstindx=0; lstindx=0;
lstindxOrf=0; lstindxOrf=0;
spN=0; spN=0;
rfcnt=0; rfcnt=0;
dRF1indx=0; dRF1indx=0;
RF1mp=[]; RF2mp=[]; RF1mp=[];
RF2mp=[];
for mp=1:MPnum % length(Exp(expN).Dexp(1).MP) for mp=1:MPnum % length(Exp(expN).Dexp(1).MP)
for ind384=1:384 for ind384=1:384
spN=spN+1; spN=spN+1;
try % Temp find data error try % Temp find data error
r=ceil(ind384/24); r=ceil(ind384/24);
if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end
% Insert test for numeric in genename and orf if isnumeric % Insert test for numeric in genename and orf if isnumeric
% Correct common EXCEL problem of converting OCT1 into a date numeric % Correct common EXCEL problem of converting OCT1 into a date numeric
if cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))==38991, if cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))==38991,
@@ -306,7 +305,7 @@ for mp=1:MPnum %length(Exp(expN).Dexp(1).MP)
elseif isnumeric(cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))) elseif isnumeric(cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)={' '}; Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)={' '};
end end
%****Check for full(384spot) Reference Plates (RF1 or/and RF2)************** % Check for full(384spot) Reference Plates (RF1 or/and RF2)
RF1fullPlate=0; RF1fullPlate=0;
try RF1fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end try RF1fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end
RF2fullPlate=0; RF2fullPlate=0;
@@ -321,7 +320,6 @@ for mp=1:MPnum %length(Exp(expN).Dexp(1).MP)
&& (~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF1'))... %||~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1'))... %&& mp==1)... && (~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF1'))... %||~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1'))... %&& mp==1)...
&& (~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF2'))... %||~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))... %&& mp==length(Exp(expN).Dexp(1).MP))... && (~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF2'))... %||~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))... %&& mp==length(Exp(expN).Dexp(1).MP))...
&& iscellstr((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384))) && iscellstr((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)))
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),':',' '); Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),':',' ');
bb(lstindxOrf,1)=(Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)); bb(lstindxOrf,1)=(Exp(expN).Dexp(1).MP(mp).orf{1}(ind384));
@@ -329,7 +327,6 @@ for mp=1:MPnum %length(Exp(expN).Dexp(1).MP)
bb(lstindxOrf,3)={mp}; bb(lstindxOrf,3)={mp};
bb(lstindxOrf,4)={r}; bb(lstindxOrf,4)={r};
bb(lstindxOrf,5)={c}; bb(lstindxOrf,5)={c};
mutorfs(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract mutorfs(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract
%Exp(expN).Dexp(1).mutSpotIndx(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract %Exp(expN).Dexp(1).mutSpotIndx(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract
end end
@@ -343,7 +340,6 @@ for mp=1:MPnum %length(Exp(expN).Dexp(1).MP)
&& (~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1'))... %&& ~RF1fullPlate)... && (~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1'))... %&& ~RF1fullPlate)...
&& (~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))... %&& ~RF2fullPlate)... && (~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))... %&& ~RF2fullPlate)...
&& iscellstr((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))) && iscellstr((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)))
lstindx=lstindx+1; lstindx=lstindx+1;
Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),':',' ');
aa(lstindx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)); aa(lstindx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384));
@@ -351,30 +347,24 @@ for mp=1:MPnum %length(Exp(expN).Dexp(1).MP)
aa(lstindx,3)={mp}; aa(lstindx,3)={mp};
aa(lstindx,4)={r}; aa(lstindx,4)={r};
aa(lstindx,5)={c}; aa(lstindx,5)={c};
mutgenes(lstindx)=spN; mutgenes(lstindx)=spN;
elseif (RF1fullPlate==1 ... % sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384 || ...
|| (((length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384))))==1 && mp==1 ) ... %(isequal((Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)), (Exp(expN).Dexp(1).MP(mp).genename{1}(384:-1:1)))&& mp==1 )) && ...
elseif (RF1fullPlate==1 ||... %sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384 || ... && ~exist('RF1scanN','var')))
(((length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)))) ==1 && mp==1 ) && ... %(isequal((Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)), (Exp(expN).Dexp(1).MP(mp).genename{1}(384:-1:1)))&& mp==1 )) && ...
~exist('RF1scanN','var')))
rfcnt=rfcnt+1; rfcnt=rfcnt+1;
RFs(spN:spN+383)=spN:spN+383; RFs(spN:spN+383)=spN:spN+383;
RF1mp=mp RF1mp=mp
RF1scanN=(mp*DMnum)-(DMnum-1) RF1scanN=(mp*DMnum)-(DMnum-1)
elseif (RF2fullPlate==1||... % sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))==384 ||... elseif (RF2fullPlate==1||... % sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))==384 ||...
(((length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)))) ==1 && mp== MPnum ) && ... (((length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384))))==1 && mp==MPnum ) ...
~exist('RF2scanN','var'))) && ~exist('RF2scanN','var')))
rfcnt=rfcnt+1; rfcnt=rfcnt+1;
RFs(spN:spN+383)=spN:spN+383; RFs(spN:spN+383)=spN:spN+383;
RF2mp=mp RF2mp=mp
RF2scanN=(mp*DMnum)-(DMnum-1) RF2scanN=(mp*DMnum)-(DMnum-1)
% Dispersed Reference capture and find Medians % Dispersed Reference capture and find Medians
elseif strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1') && ... elseif strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1') ...
(RF1fullPlate~=1) && (RF1fullPlate~=1)
dRF1indx=dRF1indx+1; dRF1indx=dRF1indx+1;
Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),':',' ');
drf(dRF1indx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)); drf(dRF1indx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384));
@@ -383,20 +373,17 @@ for mp=1:MPnum %length(Exp(expN).Dexp(1).MP)
drf(dRF1indx,4)={r}; drfr(dRF1indx,mp)=r; drf(dRF1indx,4)={r}; drfr(dRF1indx,mp)=r;
drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c; drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c;
drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384; drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384;
end
end %if isempty(regexpi(char((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))),'blank'))...
%*******************************************************************************
catch catch
error='EZexpSel lineAfter 236 EZexpSel.m' error='EZexpSel lineAfter 236 EZexpSel.m'
mp mp
ind384 ind384
msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384)) msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end end
end
end %end associated with for ind384=1:384
mp mp
end %end associated with for mp=1:length(Exp(expN).Dexp(1).MP) end
%*****************************************************
% Cover case if mutorfs RFs are labeled RF1 or RF2 % Cover case if mutorfs RFs are labeled RF1 or RF2
try try
Exp(expN).Dexp(1).mutSpotIndx.wRFs=union(RFs, mutorfs); Exp(expN).Dexp(1).mutSpotIndx.wRFs=union(RFs, mutorfs);
@@ -411,11 +398,6 @@ end %end associated with for mp=1:length(Exp(expN).Dexp(1).MP)
msg='No RFs Found in Exp! woRFs' msg='No RFs Found in Exp! woRFs'
end end
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Exp(expN).Dexp(1).RFmd1indx=[]; Exp(expN).Dexp(1).RFmd1indx=[];
Exp(expN).Dexp(1).RFmd1LB={[]}; Exp(expN).Dexp(1).RFmd1LB={[]};
Exp(expN).Dexp(1).RFmd1pltN={}; Exp(expN).Dexp(1).RFmd1pltN={};
@@ -424,7 +406,6 @@ Exp(expN).Dexp(1).mean1= [];
Exp(expN).Dexp(1).std1=[]; Exp(expN).Dexp(1).std1=[];
Exp(expN).Dexp(1).min1=[]; Exp(expN).Dexp(1).min1=[];
Exp(expN).Dexp(1).max1=[]; Exp(expN).Dexp(1).max1=[];
Exp(expN).Dexp(1).RFcmpK=[]; %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpK=[]; %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpr=[]; %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpr=[]; %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpL=[]; %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpL=[]; %For Ref Composite 17_1009
@@ -489,14 +470,14 @@ if exist('RF1scanN','var')
nonZeroIndx=[]; nonZeroIndx=[];
medValList=[]; medValList=[];
rf1scN=RF1scanN+d; rf1scN=RF1scanN+d;
try % if RF1scanN doesn't exist this addition to list will be skipped try % if RF1scanN doesn't exist this addition to list will be skipped
nonZeroIndx=find(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5)); nonZeroIndx=find(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5));
if isempty(nonZeroIndx)
if isempty(nonZeroIndx), nonZeroCnt=0; medianIndx= nonZeroIndx; nonZeroCnt=0
else nonZeroCnt=length(nonZeroIndx); medianIndx=nonZeroIndx;
else
nonZeroCnt=length(nonZeroIndx);
end end
%
if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)==0, medianIndx=nonZeroIndx(1:nonZeroCnt-1); end if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)==0, medianIndx=nonZeroIndx(1:nonZeroCnt-1); end
if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)~=0, medianIndx=nonZeroIndx; end if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)~=0, medianIndx=nonZeroIndx; end
clear medValLst clear medValLst
@@ -509,10 +490,8 @@ if ~isempty(nonZeroIndx) && length(medianIndx) > (.15*384) %To calc. a median, m
max1=max(medValLst); max1=max(medValLst);
std1=std(medValLst); std1=std(medValLst);
mean1=mean(medValLst); mean1=mean(medValLst);
kValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,3); %For Ref Composite 17_1009 kValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,3); %For Ref Composite 17_1009
rValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,4); %For Ref Composite 17_1009 rValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,4); %For Ref Composite 17_1009
mval1=median(medValLst); %mval1=median(Exp(expN).Dexp(1).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5)); mval1=median(medValLst); %mval1=median(Exp(expN).Dexp(1).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5));
RFmd1pos=find(mval1==(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))); RFmd1pos=find(mval1==(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5)));
RFmd1loc(1)=ceil(RFmd1pos/24); %calc r value RFmd1loc(1)=ceil(RFmd1pos/24); %calc r value
@@ -530,7 +509,6 @@ aa(lstindx,1)= {strcat('RF1cmp(',num2str(d+1),')')};
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)={strcat('RF1cmp(',num2str(d+1),')')}; bb(lstindxOrf,1)={strcat('RF1cmp(',num2str(d+1),')')};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
%*******************************************************
Exp(expN).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(1).RFmd1indx(d+1)=RFmd1pos; Exp(expN).Dexp(1).RFmd1indx(d+1)=RFmd1pos;
@@ -559,7 +537,6 @@ Exp(expN).Dexp(1).RFcmpr(1).dm(d+1).mean= mean(rValLst); %For Ref Composite 17_1
Exp(expN).Dexp(1).RFcmpr(1).dm(d+1).std=std(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpr(1).dm(d+1).std=std(rValLst); %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpr(1).dm(d+1).min=min(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpr(1).dm(d+1).min=min(rValLst); %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpr(1).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpr(1).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009
else else
% Need to set L r K values to zeros or pick the first spot with zeros % Need to set L r K values to zeros or pick the first spot with zeros
% Spot 1 could be other than zero as the median isn't calculated if % Spot 1 could be other than zero as the median isn't calculated if
@@ -568,15 +545,14 @@ else
firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(expN).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(expN).Dexp(1).RFmd1indx(d+1)=firstZero;
Exp(expN).Dexp(1).RFmd1pltN=RF1mp; Exp(expN).Dexp(1).RFmd1pltN=RF1mp;
try
try medValList1{d+1}= Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; medValList1{d+1}=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt;
catch, catcherror='Ln356', catch
catcherror='Ln356'
end end
end % ~isempty(nonZeroIndx) && length(medianIndx) > (.15*384) end % ~isempty(nonZeroIndx) && length(medianIndx) > (.15*384)
catch %try ~ln375 catch
medianCalcTryFailed1='Failed! Failed! Ln362 But process continued with bogus P1ind384 spot value!' medianCalcTryFailed1='Failed! Failed! Ln362 But process continued with bogus P1ind384 spot value!'
try try
firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(expN).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(expN).Dexp(1).RFmd1indx(d+1)=firstZero;
@@ -590,49 +566,40 @@ catch %try ~ln375
catchissue='Ln372' catchissue='Ln372'
Exp(expN).Dexp(1).RFmd1pltN=1; Exp(expN).Dexp(1).RFmd1pltN=1;
end end
end
end
end
error='EZexpSel lineAfter 258' % Calc RF2 median if a full plate of RF2s exist
end %try ~ln375
end %for d=0:DMnum
end % if exist('RF1scanN','var')
%**********************************************************************************
%Calc RF2 median if a full plate of RF2s exist**************************
Exp(expN).Dexp(1).RFmd2indx=[]; Exp(expN).Dexp(1).RFmd2indx=[];
Exp(expN).Dexp(1).RFmd2pltN=[]; Exp(expN).Dexp(1).RFmd2pltN=[];
if exist('RF2scanN','var') if exist('RF2scanN','var')
for d=0:(DMnum-1) for d=0:(DMnum-1)
medianIndx2=[]; medianIndx2=[];
nonZeroIndx2=[]; nonZeroIndx2=[];
medValList2=[]; medValList2=[];
rf2scN=RF2scanN+d; rf2scN=RF2scanN+d;
try % if RF2scanN doesn't exist this addition to list will be skipped try % if RF2scanN doesn't exist this addition to list will be skipped
nonZeroIndx2=find(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5)); nonZeroIndx2=find(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5));
if isempty(nonZeroIndx2), nonZeroCnt2=0; medianIndx2= nonZeroIndx2; if isempty(nonZeroIndx2)
nonZeroCnt2=0
medianIndx2=nonZeroIndx2;
else nonZeroCnt2=length(nonZeroIndx2); else nonZeroCnt2=length(nonZeroIndx2);
end end
%
if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)==0, medianIndx2=nonZeroIndx2(1:nonZeroCnt2-1); end if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)==0, medianIndx2=nonZeroIndx2(1:nonZeroCnt2-1); end
if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)~=0, medianIndx2=nonZeroIndx2; end if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)~=0, medianIndx2=nonZeroIndx2; end
clear medValLst2 clear medValLst2
clear kValLst2 clear kValLst2
clear rValLst2 clear rValLst2
if ~isempty(nonZeroIndx2) && length(medianIndx2) > (.15*384) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(nonZeroIndx2) && length(medianIndx2) > (.15*384) % to calc. a median, more than 15% of spots must be nonZero
medValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5); medValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5);
medValList2{d+1}=medValLst2; medValList2{d+1}=medValLst2;
min2=min(medValLst2); min2=min(medValLst2);
max2=max(medValLst2); max2=max(medValLst2);
std2=std(medValLst2); std2=std(medValLst2);
mean2=mean(medValLst2); mean2=mean(medValLst2);
kValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,3); % for Ref Composite 17_1009
kValLst2= Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,3); %For Ref Composite 17_1009 rValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,4); % for Ref Composite 17_1009
rValLst2= Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,4); %For Ref Composite 17_1009
mval2=median(medValLst2); %mval2=median(Exp(expN).Dexp(1).scan(RF2mps).plate(1).CFout(1:383,5)); mval2=median(medValLst2); %mval2=median(Exp(expN).Dexp(1).scan(RF2mps).plate(1).CFout(1:383,5));
RFmd2pos=find(mval2==(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))); RFmd2pos=find(mval2==(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5)));
RFmd2loc(1)=ceil(RFmd2pos/24); %calc r value RFmd2loc(1)=ceil(RFmd2pos/24); %calc r value
@@ -650,7 +617,6 @@ aa(lstindx,1)= {strcat('RF2cmp(',num2str(d+1),')')};
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)={strcat('RF2cmp(',num2str(d+1),')')}; bb(lstindxOrf,1)={strcat('RF2cmp(',num2str(d+1),')')};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
Exp(expN).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(1).RFmd2indx(d+1)=RFmd2pos; Exp(expN).Dexp(1).RFmd2indx(d+1)=RFmd2pos;
Exp(expN).Dexp(1).RFmd2pltN=RF2mp; Exp(expN).Dexp(1).RFmd2pltN=RF2mp;
@@ -678,7 +644,6 @@ Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).mean= mean(rValLst2); %For Ref Composite 17_
Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).std=std(rValLst2); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).std=std(rValLst2); %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).min=min(rValLst2); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).min=min(rValLst2); %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009
else else
% Pick the first spot with zeros % Pick the first spot with zeros
% Use that position to satisfy and keep process OK % Use that position to satisfy and keep process OK
@@ -686,19 +651,14 @@ Exp(expN).Dexp(1).RFcmpr(2).dm(d+1).max= max(rValLst); %For Ref Composite 17_100
firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(expN).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(expN).Dexp(1).RFmd2indx(d+1)=firstZero2;
Exp(expN).Dexp(1).RFmd2pltN=RF2mp; Exp(expN).Dexp(1).RFmd2pltN=RF2mp;
try medValList2{d+1}=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5); nonZeroCnt2; catch, catchissue='Ln431', end try medValList2{d+1}=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5); nonZeroCnt2; catch, catchissue='Ln431', end
end end
catch catch
medianCalcTryFailed2='Failed! Failed! Ln436 No RF1median But process continued with bogus P1ind384 spot value!' medianCalcTryFailed2='Failed! Failed! Ln436 No RF1median But process continued with bogus P1ind384 spot value!'
try try
firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first'); firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first');
Exp(expN).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(expN).Dexp(1).RFmd2indx(d+1)=firstZero2;
catch catch
catchissue='Ln442'
Exp(expN).Dexp(1).RFmd2indx(d+1)=384; %if crapout,Then use spot384 as default to keep going Exp(expN).Dexp(1).RFmd2indx(d+1)=384; %if crapout,Then use spot384 as default to keep going
end end
try try
@@ -707,10 +667,7 @@ catch
catchissue='Ln448' catchissue='Ln448'
Exp(expN).Dexp(1).RFmd2pltN=1; Exp(expN).Dexp(1).RFmd2pltN=1;
end end
end
error='EZexpSel lineAfter 279'
end %if RF2scanN doesn't exist this addition to list will be skipped
clear RFcombValList clear RFcombValList
RFcombValList=cat(1,medValList1{d+1},medValList2{d+1}); RFcombValList=cat(1,medValList1{d+1},medValList2{d+1});
Exp(expN).Dexp(1).RFmean(d+1)=mean(RFcombValList); Exp(expN).Dexp(1).RFmean(d+1)=mean(RFcombValList);
@@ -719,28 +676,22 @@ end %if RF2scanN doesn't exist this addition to list will be skipped
catch, Exp(expN).Dexp(1).RFmin(d+1)=0; end catch, Exp(expN).Dexp(1).RFmin(d+1)=0; end
try, Exp(expN).Dexp(1).RFmax(d+1)=max(RFcombValList); try, Exp(expN).Dexp(1).RFmax(d+1)=max(RFcombValList);
catch, Exp(expN).Dexp(1).RFmax(d+1)=0; end catch, Exp(expN).Dexp(1).RFmax(d+1)=0; end
end
end %for d=0:DMnum ln446
elseif exist('RF1scanN','var') elseif exist('RF1scanN','var')
Exp(expN).Dexp(1).RFmean=Exp(expN).Dexp(1).mean1; Exp(expN).Dexp(1).RFmean=Exp(expN).Dexp(1).mean1;
Exp(expN).Dexp(1).RFstd=Exp(expN).Dexp(1).std1; Exp(expN).Dexp(1).RFstd=Exp(expN).Dexp(1).std1;
Exp(expN).Dexp(1).RFmin=Exp(expN).Dexp(1).min1; Exp(expN).Dexp(1).RFmin=Exp(expN).Dexp(1).min1;
Exp(expN).Dexp(1).RFmax=Exp(expN).Dexp(1).max1; Exp(expN).Dexp(1).RFmax=Exp(expN).Dexp(1).max1;
end %if exist('RF2scanN','var') ln445 end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Disperse Reference Plates
%*************************************************************************************************
%***********DISPERSE REFERENCE PLATES
Exp(expN).Dexp(1).RFmdPindx=[]; Exp(expN).Dexp(1).RFmdPindx=[];
Exp(expN).Dexp(1).RFmdPpltN=[]; Exp(expN).Dexp(1).RFmdPpltN=[];
if exist('drf','var') if exist('drf','var')
% Det. index of change from one MP to the next % Det. index of change from one MP to the next
i=2; i=2;
chgIndx(1)=1; chgIndx(1)=1;
for j=1:length(drf(:,3)) for j=1:length(drf(:,3))
if j>1 if j>1
if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end end
@@ -749,27 +700,21 @@ chgIndx(length(chgIndx)+1)= length(drf)+1;
uu=zeros(size(drf,1),4); uu=zeros(size(drf,1),4);
uu(:,1:4)=cell2mat(drf(:,3:6)) uu(:,1:4)=cell2mat(drf(:,3:6))
vv=zeros(length(drf),DMnum); vv=zeros(length(drf),DMnum);
%************************************
dMPs=unique(cell2mat(drf(:,3))); dMPs=unique(cell2mat(drf(:,3)));
%*****************************************
for mm=1:length(dMPs) % length(chgIndx) for mm=1:length(dMPs) % length(chgIndx)
for d=1:(DMnum) for d=1:(DMnum)
medianIndxDisp=[]; medianIndxDisp=[];
NZrefIndxP=[]; NZrefIndxP=[];
nonZeroValsP=[]; nonZeroValsP=[];
medValLstDisp=[]; medValLstDisp=[];
rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d); rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d);
try % Determine the dispersed RFs median mean and std if such exist try % Determine the dispersed RFs median mean and std if such exist
NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); %find(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(drf(chgIndx(cI):chgIndx(cI+1)),5)); NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); %find(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(drf(chgIndx(cI):chgIndx(cI+1)),5));
%vv=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); %vv=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
%For Global Ref Composite 17_1009 %************************************************************************** %For Global Ref Composite 17_1009
vvK(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,3); vvK(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,3);
vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,4); vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,4);
%*****************************************************************************************************
nonZeroValsP=nonzeros(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5)); nonZeroValsP=nonzeros(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
std1Disp=std(nonZeroValsP); std1Disp=std(nonZeroValsP);
mean1Disp=mean(nonZeroValsP); mean1Disp=mean(nonZeroValsP);
@@ -779,13 +724,16 @@ try % Determine the dispersed RFs median mean and std if such exist
% MEDIAN Determination for PLATES with Dispersed RFs % MEDIAN Determination for PLATES with Dispersed RFs
% NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5)); % NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
if isempty(NZrefIndxP), nonZeroCntDisp=0, medianIndxDisp= NZrefIndxP; if isempty(NZrefIndxP)
else nonZeroCntDisp=length(NZrefIndxP); nonZeroCntDisp=0
medianIndxDisp=NZrefIndxP;
else
nonZeroCntDisp=length(NZrefIndxP);
end end
if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end
if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)~=0, medianIndxDisp=NZrefIndxP; end if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)~=0, medianIndxDisp=NZrefIndxP; end
if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) % to calc. a median, more than 15% of spots must be nonZero
medValLstDisp=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(medianIndxDisp,5); medValLstDisp=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(medianIndxDisp,5);
% medValList1Disp{d}=medValLstDisp; % medValList1Disp{d}=medValLstDisp;
mval1Disp=median(medValLstDisp); % mval1=median(Exp(expN).Dexp(1).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5)); mval1Disp=median(medValLstDisp); % mval1=median(Exp(expN).Dexp(1).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5));
@@ -793,7 +741,6 @@ if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a med
RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); % drfPindx((RFmd1posIndx),dMPs(mm)); RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); % drfPindx((RFmd1posIndx),dMPs(mm));
RFmd1locD(1)=ceil(RFmd1posD/24); % calc r value RFmd1locD(1)=ceil(RFmd1posD/24); % calc r value
RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); % calc c value RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); % calc c value
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RF1mdP(',num2str(d),')')}; aa(lstindx,1)={strcat('RF1mdP(',num2str(d),')')};
@@ -819,18 +766,14 @@ else
firstZeroD=drfPindx((firstZeroDindx),dMPs(mm)); firstZeroD=drfPindx((firstZeroDindx),dMPs(mm));
Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroD; Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroD;
Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number??? Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number???
end
catch
end %~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 ln584
catch %try ln565
medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with bogus Plate spot value!' medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with bogus Plate spot value!'
try try
firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first'); firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first');
firstZeroPindx=uu(firstZeroindxD,4); firstZeroPindx=uu(firstZeroindxD,4);
Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroPindx; Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroPindx;
catch catch
catchissue='try at Ln565' catchissue='try at Ln565'
Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
@@ -842,13 +785,11 @@ catch %try ln565
catchissue='Ln619' catchissue='Ln619'
Exp(expN).Dexp(1).RFmdPpltN=1; %This might keep from breaking BUT ??? Exp(expN).Dexp(1).RFmdPpltN=1; %This might keep from breaking BUT ???
end end
error='EZexpSel lineAfter 565' end
end %try ~ln565 end
end
end %for d=0:DMnum % Calc. Global Mean, Std, And Median For Distributed References
end %for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES******************************************************************
uu=horzcat(uu,vv); uu=horzcat(uu,vv);
for d=1:DMnum for d=1:DMnum
medianIndxG=[]; medianIndxG=[];
@@ -858,16 +799,15 @@ for d=1:DMnum
RFmeanG=mean(nonzeros(vv(:,d))); RFmeanG=mean(nonzeros(vv(:,d)));
RFstdG=std(nonzeros(vv(:,d))); RFstdG=std(nonzeros(vv(:,d)));
NZrfIndxG=find(vv(:,d)); % find(nonzeros(vv(:,d))); WWRONG FOR A WHILE! NZrfIndxG=find(vv(:,d)); % find(nonzeros(vv(:,d))); WWRONG FOR A WHILE!
if isempty(RFmeanG)
if isempty(RFmeanG), nonZeroCntD=0, %medianIndxDisp= RFmeanG(d); nonZeroCntD=0; % medianIndxDisp=RFmeanG(d);
else nonZeroCntD= length(nonzeros(vv(:,d))); else
nonZeroCntD=length(nonzeros(vv(:,d)));
end end
% Calc. of median requires an odd number of indx items % Calc. of median requires an odd number of indx items
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end
if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) % to calc. a median, more than 15% of spots must be nonZero
if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero
mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d))); mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d)));
nzPosIndxDG=find(mvalsDG==vv(:,d)); nzPosIndxDG=find(mvalsDG==vv(:,d));
RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value
@@ -879,14 +819,13 @@ aa(lstindx,1)= {strcat('RF1mdG(',num2str(d),')')};
aa(lstindx,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; aa(lstindx,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))};
bb(lstindxOrf,1)={strcat('RF1mdG(',num2str(d),')')}; bb(lstindxOrf,1)={strcat('RF1mdG(',num2str(d),')')};
bb(lstindxOrf,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; bb(lstindxOrf,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))};
%Composite Reference Amalgum Plot ****************** % Composite Reference Amalgum Plot
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RFcmpG(',num2str(d),')')}; aa(lstindx,1)={strcat('RFcmpG(',num2str(d),')')};
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)={strcat('RFcmpG(',num2str(d),')')}; bb(lstindxOrf,1)={strcat('RFcmpG(',num2str(d),')')};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
%*****************************************************
% Exp(expN).Dexp(1).RFmdGLvals=vv(medianIndxD,d); %17_1201 TrendOL % Exp(expN).Dexp(1).RFmdGLvals=vv(medianIndxD,d); %17_1201 TrendOL
Exp(expN).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(1).RFmdGindx(d)=nzPosIndxDG; Exp(expN).Dexp(1).RFmdGindx(d)=nzPosIndxDG;
@@ -897,7 +836,6 @@ Exp(expN).Dexp(1).RFminG(d)= minG;
Exp(expN).Dexp(1).RFmaxG(d)=maxG; Exp(expN).Dexp(1).RFmaxG(d)=maxG;
Exp(expN).Dexp(1).RFstdG(d)=RFstdG; Exp(expN).Dexp(1).RFstdG(d)=RFstdG;
Exp(expN).Dexp(1).RFmeanG(d)=RFmeanG; Exp(expN).Dexp(1).RFmeanG(d)=RFmeanG;
Exp(expN).Dexp(1).RFcmpGL.dm(d).Lvals=vv(medianIndxD,d); %17_1201 TrendOL Exp(expN).Dexp(1).RFcmpGL.dm(d).Lvals=vv(medianIndxD,d); %17_1201 TrendOL
Exp(expN).Dexp(1).RFcmpGL.dm(d).med=median(vv(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpGL.dm(d).med=median(vv(medianIndxD,d)); %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpGL.dm(d).mean=mean(vv(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpGL.dm(d).mean=mean(vv(medianIndxD,d)); %For Ref Composite 17_1009
@@ -916,49 +854,22 @@ Exp(expN).Dexp(1).RFcmpGr.dm(d).mean= mean(vvr(medianIndxD,d)); %For Ref Composi
Exp(expN).Dexp(1).RFcmpGr.dm(d).std=std(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpGr.dm(d).std=std(vvr(medianIndxD,d)); %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpGr.dm(d).min=min(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpGr.dm(d).min=min(vvr(medianIndxD,d)); %For Ref Composite 17_1009
Exp(expN).Dexp(1).RFcmpGr.dm(d).max=max(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(1).RFcmpGr.dm(d).max=max(vvr(medianIndxD,d)); %For Ref Composite 17_1009
end
end %if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) %To calc. a median, more than 15% end
end end
end % if exist('drf','var')
%END OF DISPERSE REFERENCE PLATAES CALCULATIONS AND LIST ADDITIONS
%*********************************************************************
%Added 17-1023 For User Addition of Gene Composites to ListBox
%Expaa{ic,1}= aa; Expbb{ic,1}= bb;
%**********************************************************************
%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
%try
for mp=1:MPnum % length(Exp(expN).Dexp(1).MP) for mp=1:MPnum % length(Exp(expN).Dexp(1).MP)
for ind384=1:384 for ind384=1:384
spN=spN+1; spN=spN+1;
end
end end
%catch
%end %try for user selected Reference routine
end
%****************************************************************************************************
gnLstRaw=strcat(aa(:,1),aa(:,2)); gnLstRaw=strcat(aa(:,1),aa(:,2));
Exp(expN).Dexp(1).srtGnLst=sort(gnLstRaw); Exp(expN).Dexp(1).srtGnLst=sort(gnLstRaw);
orfLstRaw=strcat(bb(:,1),bb(:,2)); orfLstRaw=strcat(bb(:,1),bb(:,2));
Exp(expN).Dexp(1).srtOrfLst=sort(orfLstRaw); Exp(expN).Dexp(1).srtOrfLst=sort(orfLstRaw);
%********Auto select Zone and load listboxGnOrf data**********
% Auto select Zone and load listboxGnOrf data
zeroCLn=zeros(1,DMnum); zeroCLn=zeros(1,DMnum);
Exp(expN).expLoadCnt=Exp(expN).expLoadCnt+1; expLdCnt=Exp(expN).expLoadCnt; Exp(expN).expLoadCnt=Exp(expN).expLoadCnt+1; expLdCnt=Exp(expN).expLoadCnt;
zonePB=expN; zonePB=expN;
@@ -994,7 +905,6 @@ if expN==2
end end
DNLaxes2=handles.DNLaxes2; % ZoneRelated DNLaxes2=handles.DNLaxes2; % ZoneRelated
Exp(2).hzeroCLn(expLdCnt)=plot(DNLaxes2,zeroCLn,1:DMnum,'y'); Exp(2).hzeroCLn(expLdCnt)=plot(DNLaxes2,zeroCLn,1:DMnum,'y');
end end
if expN==3 if expN==3
@@ -1015,104 +925,86 @@ if expN==3
end end
if Exp(4).interacPBsel==0 % if interaction "raw" don't show a center line if Exp(4).interacPBsel==0 % if interaction "raw" don't show a center line
for i=1:Exp(expN).expLoadCnt, for i=1:Exp(expN).expLoadCnt
try set(Exp(expN).hzeroCLn(i),'visible','off'); try
set(Exp(expN).hzeroCLn(i),'visible','off');
catch catch
catchissue= strcat('Ln521',i)
end,
end %ZoneRelated
end end
%********************************************************* end
EZdiagRFsSheet %** end
%*****************
EZdiagRFsSheet
%*********************************************************
RFconfig=0; RFconfig=0;
if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean')) ...
~isempty(Exp(expN).Dexp(1).RFmean)&&... && ~isempty(Exp(expN).Dexp(1).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG')) ...
isempty(Exp(expN).Dexp(1).RFmeanG) && isempty(Exp(expN).Dexp(1).RFmeanG)
RFconfig=1; RFconfig=1;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))==0 ||... if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))==0 ...
isempty(Exp(expN).Dexp(1).RFmean)&&... || isempty(Exp(expN).Dexp(1).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG')) ...
~isempty(Exp(expN).Dexp(1).RFmeanG) && ~isempty(Exp(expN).Dexp(1).RFmeanG)
RFconfig=2; RFconfig=2;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean')) ...
~isempty(Exp(expN).Dexp(1).RFmean)&&... && ~isempty(Exp(expN).Dexp(1).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG')) ...
~isempty(Exp(expN).Dexp(1).RFmeanG) && ~isempty(Exp(expN).Dexp(1).RFmeanG)
RFconfig=3; RFconfig=3;
end end
Exp(expN).RFconfig=RFconfig; % ZoneRelated Exp(expN).RFconfig=RFconfig; % ZoneRelated
%******************************************
if RFconfig~=0 if RFconfig~=0
Exp(expN).Dexp(1).RFrnames=rnames; Exp(expN).Dexp(1).RFrnames=rnames;
Exp(expN).Dexp(1).RFdata=data; Exp(expN).Dexp(1).RFdata=data;
Exp(expN).Dexp(1).resetHtmpTg=5; % ZoneRelated Exp(expN).Dexp(1).resetHtmpTg=5; % ZoneRelated
% HtMapTog 'string', 'Current user L/N' selection' % HtMapTog 'string', 'Current user L/N' selection'
Exp(expN).Dexp(1).spotIndx=[]; Exp(expN).Dexp(1).spotIndx=[];
if expN==1, if expN==1
Exp(1).htmapPBsel=0; Exp(1).htmapPBsel=0;
set(handles.HtMapTog1,'string','L') set(handles.HtMapTog1,'string','L')
%********* EZhtMap
EZhtMap %*
%*********
end end
if expN==2, if expN==2
Exp(2).htmapPBsel=0; Exp(2).htmapPBsel=0;
set(handles.HtMapTog2,'string','L') set(handles.HtMapTog2,'string','L')
%********* EZhtMap
EZhtMap %*
%*********
end end
if expN==3, if expN==3,
Exp(3).htmapPBsel=0; Exp(3).htmapPBsel=0;
set(handles.HtMapTog3,'string','L') set(handles.HtMapTog3,'string','L')
%********* EZhtMap
EZhtMap %*
%*********
end end
htMapTogPBfg=0; htMapTogPBfg=0;
elseif RFconfig==0
elseif RFconfig==0,
RFconfigMsg='No RF1 references in this Experiment Job' RFconfigMsg='No RF1 references in this Experiment Job'
try try
%*********************
EZsingleExUserRF EZsingleExUserRF
%EZmultiDayGui %* % EZmultiDayGui
%cd(w) %* % cd(w)
%EZmultiDay %* % EZmultiDay
%EZmultiExLoad %* % EZmultiExLoad
%*********************
catch catch
RFconfigMsg='No RF1 or User selected references in this Experiment Job' RFconfigMsg='No RF1 or User selected references in this Experiment Job'
Exp(expN).Dexp(1).resetHtmpTg=3; % ZoneRelated Exp(expN).Dexp(1).resetHtmpTg=3; % ZoneRelated
end end
% Exp(expN).Dexp(1).resetHtmpTg=3; %ZoneRelated % Exp(expN).Dexp(1).resetHtmpTg=3; %ZoneRelated
end end
%*****************************************
%**********************************************
%{ %{
try msgBadGeneName, catch, end try msgBadGeneName, catch, end
try try
if RFconfig==0, if RFconfig==0,
RFconfigMsg='No RF1 references in this Experiment Job' RFconfigMsg='No RF1 references in this Experiment Job'
Exp(expN).Dexp(1).resetHtmpTg=3; %ZoneRelated Exp(expN).Dexp(1).resetHtmpTg=3; %ZoneRelated
end end
catch catch
end end
%***************************
%} %}
%*******************************************************************
elseif expType==2 %Multiple Experiment from in one Folder extraction elseif expType==2 %Multiple Experiment from in one Folder extraction
Exp(expN).DexpType='chrono'; Exp(expN).DexpType='chrono';
%*********************
% Test for Bad MP cell array (usually 384 [NaN}'s) % Test for Bad MP cell array (usually 384 [NaN}'s)
% replaced length(Exp(expN).Dexp(1).MP) with MPnum % replaced length(Exp(expN).Dexp(1).MP) with MPnum
for mx=1:length(Exp(expN).Dexp(1).MP) for mx=1:length(Exp(expN).Dexp(1).MP)
@@ -1123,18 +1015,16 @@ elseif expType==2 %Multiple Experiment from in one Folder extraction
break break
end end
end end
%*************************************************
ww=pwd; ww=pwd;
try EZmultiDayGui; catch ME try EZmultiDayGui; catch ME
msg=ME.message, cd(ww); end %* %* msg=ME.message, cd(ww); end
try EZmultiDay; catch ME try EZmultiDay; catch ME
msg=ME.message, cd(ww); end %* msg=ME.message, cd(ww); end
try EZmultiExLoad; catch ME try EZmultiExLoad; catch ME
msg=ME.message, cd(ww); end %* msg=ME.message, cd(ww); end
%*********************
elseif expType==3 elseif expType==3
Exp(expN).DexpType='multi'; Exp(expN).DexpType='multi';
%*********************
% Test for Bad MP cell array (usually 384 [NaN}'s) % Test for Bad MP cell array (usually 384 [NaN}'s)
% replaced length(Exp(expN).Dexp(1).MP) with MPnum % replaced length(Exp(expN).Dexp(1).MP) with MPnum
for mx=1:length(Exp(expN).Dexp(1).MP) for mx=1:length(Exp(expN).Dexp(1).MP)
@@ -1145,23 +1035,20 @@ elseif expType==3
break break
end end
end end
%*************************************************
ww=pwd; ww=pwd;
try EZmultiDayGui; catch ME try EZmultiDayGui; catch ME
msg=ME.message,cd(ww); end %* %* msg=ME.message,cd(ww); end
try EZmultiDay; catch ME try EZmultiDay; catch ME
msg=ME.message, cd(ww); end %* msg=ME.message, cd(ww); end
try EZmultiExLoad; catch ME try EZmultiExLoad; catch ME
msg=ME.message, cd(ww); end %* msg=ME.message, cd(ww); end
%*********************
else else
disp('Cancel Load Exp') disp('Cancel Load Exp')
end end
% Deprecated Functions
%{
%__________________________________________________________________________
%Bone Yard***********************************
%Exp(expN).Dexp(1).RF1cmpK.[]; %For Ref Composite 17_1009 %Exp(expN).Dexp(1).RF1cmpK.[]; %For Ref Composite 17_1009
%Exp(expN).Dexp(1).std1K=[]; %For Ref Composite 17_1009 %Exp(expN).Dexp(1).std1K=[]; %For Ref Composite 17_1009
%Exp(expN).Dexp(1).min1K=[]; %For Ref Composite 17_1009 %Exp(expN).Dexp(1).min1K=[]; %For Ref Composite 17_1009
@@ -1200,9 +1087,6 @@ end
%rstd2=std(rValLst2); %For Ref Composite 17_1009 %rstd2=std(rValLst2); %For Ref Composite 17_1009
%rmean2=mean(rValLst2); %For Ref Composite 17_1009 %rmean2=mean(rValLst2); %For Ref Composite 17_1009
%{
%User Reference Input Dialog Box used in the multiExperiment Chrono setup %User Reference Input Dialog Box used in the multiExperiment Chrono setup
prompt={'Enter GeneName to use as Reference:',... prompt={'Enter GeneName to use as Reference:',...
@@ -1216,8 +1100,6 @@ end
rfSpec=answer(2); %if strcmpi(answer(2),'None'), rfSpec=''; end rfSpec=answer(2); %if strcmpi(answer(2),'None'), rfSpec=''; end
rfGnSp=strcat(rfGene,rfSpec); rfGnSp=strcat(rfGene,rfSpec);
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%First user input prototype code %First user input prototype code
if ~exist('RF1scanN','var') && ~exist('RF2scanN','var') %change || && if ~exist('RF1scanN','var') && ~exist('RF2scanN','var') %change || &&
prompt={'Enter Masterplate Number(s) of Your Reference GeneName spots:',... prompt={'Enter Masterplate Number(s) of Your Reference GeneName spots:',...

View File

@@ -2,7 +2,6 @@
%Uses data stored from OLay ; Clearing OLay clears data used by this %Uses data stored from OLay ; Clearing OLay clears data used by this
%Trending Utility %Trending Utility
global Exp global Exp
global userPars global userPars
@@ -18,7 +17,6 @@ else
cmpTogFlg=0; cmpTogFlg=0;
end end
DexpN=Exp(expN).DexpN; DexpN=Exp(expN).DexpN;
if strcmp(Exp(expN).DexpType, 'chrono') if strcmp(Exp(expN).DexpType, 'chrono')
maxRows=1; Lmax=1; bpInd=0; maxRows=1; Lmax=1; bpInd=0;
@@ -26,7 +24,6 @@ for n=1:length(Exp(expN).Dexp) %LOOP Thru DayExps
for trc=1:Exp(expN).traceN %length(Exp(expN).Trace) for trc=1:Exp(expN).traceN %length(Exp(expN).Trace)
try try
if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') if isequal(get(Exp(expN).hOL(trc),'Visible'),'on')
dmSel=Exp(expN).Trace(trc).dmSel; dmSel=Exp(expN).Trace(trc).dmSel;
if iscell(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals) if iscell(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals)
rows=length(cell2mat(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals)); rows=length(cell2mat(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals));
@@ -44,11 +41,10 @@ for n=1:length(Exp(expN).Dexp) %LOOP Thru DayExps
end % if isequal(get(Exp(1).hOL(trc),'Visible'),'on') end % if isequal(get(Exp(1).hOL(trc),'Visible'),'on')
catch catch
end end
end % for trc= 1: end
end %for n=1:length(Exp(expN).Dexp) end
maxCols=bpInd; % length(Exp(expN).Dexp) * length(Exp(expN).Trace) maxCols=bpInd; % length(Exp(expN).Dexp) * length(Exp(expN).Trace)
BPvals(1:maxRows,1:maxCols)=nan; % BoxPlot requires a matrix with uniform length even if data is not of the same length BPvals(1:maxRows,1:maxCols)=nan; % BoxPlot requires a matrix with uniform length even if data is not of the same length
bpInd=0; bpInd=0;
for n=1:length(Exp(expN).Dexp) %LOOP Thru DayExps for n=1:length(Exp(expN).Dexp) %LOOP Thru DayExps
for trc=1:Exp(expN).traceN %length(Exp(expN).Trace) for trc=1:Exp(expN).traceN %length(Exp(expN).Trace)
@@ -94,22 +90,20 @@ for n=1:length(Exp(expN).Dexp) %LOOP Thru DayExps
label=strcat(dayLbl,'-', Exp(expN).Trace(trc).UsrGLB, dmStr,scnt); %scnt(bpInd)); label=strcat(dayLbl,'-', Exp(expN).Trace(trc).UsrGLB, dmStr,scnt); %scnt(bpInd));
tickLabelStr{bpInd}=label; tickLabelStr{bpInd}=label;
end %if isequal(get(Exp(1).hOL(trc),'Visible'),'on') end
catch catch
end end
end %for trc= end
end %for n=1:length(Exp(expN).Dexp) end
else % if 'single' or 'multi' experiment setup for DM trends else % if 'single' or 'multi' experiment setup for DM trends
maxRows=1; Lmax=1; bpInd=0; maxRows=1; Lmax=1; bpInd=0;
%for n=1:length(Exp(expN).Dexp) %LOOP Thru Multi Experiments % for n=1:length(Exp(expN).Dexp) % Loop Thru Multi Experiments
DexpN=Exp(expN).DexpN; DexpN=Exp(expN).DexpN;
for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) % LOOP Thru DM perturbations for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) % LOOP Thru DM perturbations
for trc=1:Exp(expN).traceN %length(Exp(expN).Trace) for trc=1:Exp(expN).traceN %length(Exp(expN).Trace)
% tempLB=Exp(expN).Trace(trc).UsrGLB; % tempLB=Exp(expN).Trace(trc).UsrGLB;
try try
if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') if isequal(get(Exp(expN).hOL(trc),'Visible'),'on')
DexpN=Exp(expN).Trace(trc).DexpN; DexpN=Exp(expN).Trace(trc).DexpN;
if iscell(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals) if iscell(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals)
rows=length(cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals)); rows=length(cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals));
@@ -124,18 +118,14 @@ for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru DM perturbations
end end
if LsmpMax> Lmax, Lmax=LsmpMax; end if LsmpMax> Lmax, Lmax=LsmpMax; end
bpInd=bpInd+1; bpInd=bpInd+1;
end %if isequal(get(Exp(1).hOL(trc),'Visible'),'on') end
catch catch
end end
end
end % for trc= 1: end
end %for % end <- to stop here
%end %for n=1:length(Exp(expN).Dexp)
%end
maxCols=bpInd; % length(Exp(expN).Dexp) * length(Exp(expN).Trace) maxCols=bpInd; % length(Exp(expN).Dexp) * length(Exp(expN).Trace)
BPvals(1:maxRows,1:maxCols)=nan; % BoxPlot requires a matrix with uniform length even if data is not of the same length BPvals(1:maxRows,1:maxCols)=nan; % BoxPlot requires a matrix with uniform length even if data is not of the same length
bpInd=0; bpInd=0;
for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru DM perturbations for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru DM perturbations
for trc=1:Exp(expN).traceN % length(Exp(expN).Trace) for trc=1:Exp(expN).traceN % length(Exp(expN).Trace)
@@ -150,7 +140,6 @@ for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru DM perturbations
cnt=length(kFiltrIndx); cnt=length(kFiltrIndx);
%BPvals(1:length(cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals)),bpInd)=cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals); %BPvals(1:length(cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals)),bpInd)=cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals);
%cnt=length(cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals)); %cnt=length(cell2mat(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals));
else else
if length(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals)> 1 if length(Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrLvals)> 1
kFiltrIndx=find(((Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrKvals))<=kfiltLim); kFiltrIndx=find(((Exp(expN).Trace(trc).Dexp(DexpN).DM(dm).UsrKvals))<=kfiltLim);
@@ -179,15 +168,13 @@ for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru DM perturbations
dayNpos=max(strfind(Exp(expN).Dexp(DexpN).ExpFoldr, '_D')); dayNpos=max(strfind(Exp(expN).Dexp(DexpN).ExpFoldr, '_D'));
dayLbl=Exp(expN).Dexp(DexpN).ExpFoldr(dayNpos+1:end); dayLbl=Exp(expN).Dexp(DexpN).ExpFoldr(dayNpos+1:end);
if ~isempty(dayLbl), dayLbl=strcat(dayLbl,'_'); end if ~isempty(dayLbl), dayLbl=strcat(dayLbl,'_'); end
label=strcat(dayLbl,Exp(expN).Trace(trc).UsrGLB, dmStr,scnt); label=strcat(dayLbl,Exp(expN).Trace(trc).UsrGLB, dmStr,scnt);
tickLabelStr{bpInd}=label; tickLabelStr{bpInd}=label;
end %if isequal(get(Exp(1).hOL(trc),'Visible'),'on') end %if isequal(get(Exp(1).hOL(trc),'Visible'),'on')
catch catch
end end
end %for trc= end
end %for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) end
%{ %{
if isequal(tempLB(4:6),'cmp')||isequal(tempLB(3:6),'cmpG'), if isequal(tempLB(4:6),'cmp')||isequal(tempLB(3:6),'cmpG'),
RFcmpFlg=1; RFcmpFlg=1;
@@ -195,9 +182,8 @@ end %for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug)
RFcmpFlg=0; RFcmpFlg=0;
end end
%} %}
end
end %if strcmp(Exp(expN).DexpType, 'chrono') else if Single or Multi experiment
%***********************************************************************************************
% Box Plot Plotting section % Box Plot Plotting section
if userPars.boxplotFlg==1 if userPars.boxplotFlg==1
BPoutliers=userPars.BPoutliers; BPoutliers=userPars.BPoutliers;
@@ -217,7 +203,6 @@ rotation= userPars.BProt;
% sh=0.3; %sh is shift value % sh=0.3; %sh is shift value
width=.5*sh; width=.5*sh;
% pos=[1+sh 2-sh 3+sh 4-sh 5+sh 6-sh 7+sh 8-sh 9+sh]; % pos=[1+sh 2-sh 3+sh 4-sh 5+sh 6-sh 7+sh 8-sh 9+sh];
bpn=1; bpn=1;
if strcmp(Exp(expN).DexpType, 'chrono') if strcmp(Exp(expN).DexpType, 'chrono')
@@ -240,12 +225,14 @@ rotation= userPars.BProt;
% boxplot % boxplot
figure figure
set(gcf,'OuterPosition',(get(0,'screensize'))) set(gcf,'OuterPosition',(get(0,'screensize')))
if strcmpi(BPnotch,'on'), if strcmpi(BPnotch,'on')
boxplot(final_res, 'notch', 'on', ... boxplot(final_res, ...
'notch', 'on', ...
'positions', pos,... 'positions', pos,...
'widths', wid) 'widths', wid)
elseif strcmpi(BPnotch,'off'), elseif strcmpi(BPnotch,'off'),
boxplot(final_res, 'notch', 'off', ... boxplot(final_res, ...
'notch', 'off', ...
'positions', pos,... 'positions', pos,...
'widths', wid) 'widths', wid)
end end
@@ -261,15 +248,15 @@ rotation= userPars.BProt;
% rotation=45; % rotation=45;
for cnt=1:length(text_h) for cnt=1:length(text_h)
set(text_h(cnt), 'FontSize', fontSize,... set(text_h(cnt), ...
'FontSize', fontSize,...
'Rotation', rotation, ... 'Rotation', rotation, ...
'String', tickLabelStr{length(tickLabelStr)-cnt+1}, ... 'String', tickLabelStr{length(tickLabelStr)-cnt+1}, ...
'HorizontalAlignment', 'right') 'HorizontalAlignment', 'right')
end end
% 'VerticalAlignment', 'cap', ... % 'VerticalAlignment', 'cap', ...
% Smaller box for axes, in order to un-hide the labels
% smaller box for axes, in order to un-hide the labels
squeeze=0.2; squeeze=0.2;
left=0.02; left=0.02;
right=1; right=1;
@@ -277,7 +264,7 @@ rotation= userPars.BProt;
top=1-squeeze; top=1-squeeze;
set(gca, 'OuterPosition', [left bottom right top]) set(gca, 'OuterPosition', [left bottom right top])
% remove outliers % Remove outliers
hout=findobj(gca,'tag','Outliers'); hout=findobj(gca,'tag','Outliers');
for out_cnt=1 : length(hout) for out_cnt=1 : length(hout)
if strcmpi(BPoutliers,'on'), if strcmpi(BPoutliers,'on'),
@@ -286,16 +273,10 @@ rotation= userPars.BProt;
set(hout(out_cnt), 'Visible', 'off') set(hout(out_cnt), 'Visible', 'off')
end end
end end
end
end %if userlPars.boxplotFlg==1 % Plot Overlay Code
% END OF BOX PLOT CODE**************************************************** % Plot Overlay Of Trends For Chrono Or Drug-Media Permutations
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%*****************PLOT OVERLAY CODE**************************************
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%++++++++PLOT OVERLAY OF TRENDS FOR CHRONO OR DRUG-MEDIA PERMUTATIONS++++++++
try try
lnwidth=str2num(Exp(4).plotPars{1}); lnwidth=str2num(Exp(4).plotPars{1});
axisFontSz=str2num(Exp(4).plotPars{2}); axisFontSz=str2num(Exp(4).plotPars{2});
@@ -308,12 +289,10 @@ catch
markerSz=5; markerSz=5;
end end
if userPars.boxplotFlg~=1 % PLOT OVERLAY OF TRENDS if userPars.boxplotFlg~=1 % PLOT OVERLAY OF TRENDS
figure figure
set(gcf,'OuterPosition',(get(0,'screensize'))) set(gcf,'OuterPosition',(get(0,'screensize')))
if strcmp(Exp(expN).DexpType, 'chrono') % Chrono if strcmp(Exp(expN).DexpType, 'chrono') % Chrono
% Plot median values for each DAY of the selected Trace % Plot median values for each DAY of the selected Trace
% (Gene-Specifics)using single DM of trace % (Gene-Specifics)using single DM of trace
range=0; range=0;
@@ -325,7 +304,6 @@ if userPars.boxplotFlg~=1 %PLOT OVERLAY OF TRENDS
tmp=[]; tmp=[];
try try
%if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') %if isequal(get(Exp(expN).hOL(trc),'Visible'),'on')
dmSel=Exp(expN).Trace(trc).dmSel; dmSel=Exp(expN).Trace(trc).dmSel;
if iscell(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals) if iscell(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals)
kFiltrIndx=find((cell2mat(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrKvals))<=kfiltLim); kFiltrIndx=find((cell2mat(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrKvals))<=kfiltLim);
@@ -340,7 +318,7 @@ if userPars.boxplotFlg~=1 %PLOT OVERLAY OF TRENDS
dayStd(trc,n)=std(tmp(kFiltrIndx)); %std(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals); dayStd(trc,n)=std(tmp(kFiltrIndx)); %std(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals);
cnt=length(kFiltrIndx); %length(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals); cnt=length(kFiltrIndx); %length(Exp(expN).Trace(trc).Dexp(n).DM(dmSel).UsrLvals);
end end
%*************Make LEGEND list ******************************** % Make LEGEND list
% Make Sample Count Label item; % Make Sample Count Label item;
if n~=length(Exp(expN).Dexp) if n~=length(Exp(expN).Dexp)
scnt=strcat(scnt,num2str(cnt),','); scnt=strcat(scnt,num2str(cnt),',');
@@ -362,7 +340,6 @@ if userPars.boxplotFlg~=1 %PLOT OVERLAY OF TRENDS
loc=strfind(Exp(expN).Dexp(n).ExpFoldr,'_D'); loc=strfind(Exp(expN).Dexp(n).ExpFoldr,'_D');
daystr=Exp(expN).Dexp(n).ExpFoldr((loc+2):end); daystr=Exp(expN).Dexp(n).ExpFoldr((loc+2):end);
dayNums(n)=str2num(daystr); dayNums(n)=str2num(daystr);
%trcInd=trcInd+1; %trcInd=trcInd+1;
catch catch
end end
@@ -371,10 +348,8 @@ try
lowerStd(trc,n)=dayMed(trc,n) - dayStd(trc,n); lowerStd(trc,n)=dayMed(trc,n) - dayStd(trc,n);
catch catch
end end
end
end %for n=1:length(Exp(expN).Dexp) % end
% end %if isequal(get(Exp(1).hOL(trc),'Visible'),'on')
% Plot Trend Data % Plot Trend Data
% if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') % if isequal(get(Exp(expN).hOL(trc),'Visible'),'on')
try try
@@ -384,9 +359,9 @@ end
else else
clear NmLstStr clear NmLstStr
if iscell(NmLst(trc)),NmLstStr=cell2mat(NmLst(trc)); else NmLstStr=NmLstStr(trc); end if iscell(NmLst(trc)),NmLstStr=cell2mat(NmLst(trc)); else NmLstStr=NmLstStr(trc); end
if isequal(NmLstStr(4:6),'cmp') ||... if isequal(NmLstStr(4:6),'cmp') ||
isequal(NmLstStr(3:6),'cmpG') || ... || isequal(NmLstStr(3:6),'cmpG') ...
isequal(NmLstStr(3:6),'cmpP'), || isequal(NmLstStr(3:6),'cmpP')
hTrendFig=plot(dayNums,dayMed(trc,1:n),'lineWidth',2); hold on hTrendFig=plot(dayNums,dayMed(trc,1:n),'lineWidth',2); hold on
linecolor(trc)={get(hTrendFig,'color')}; linecolor(trc)={get(hTrendFig,'color')};
else else
@@ -400,22 +375,19 @@ end
hTrendFig=plot(1:n,dayMed(trc,1:n),'lineWidth',2); hold on hTrendFig=plot(1:n,dayMed(trc,1:n),'lineWidth',2); hold on
linecolor(trc)={get(hTrendFig,'color')}; linecolor(trc)={get(hTrendFig,'color')};
ylabel('Experiment Day Index') ylabel('Experiment Day Index')
end %try end
end % if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') approx ln322 end
grid on grid on
% set(gca,'linewidth',4) %0.5 then 1.5 now 6 % set(gca,'linewidth',4) %0.5 then 1.5 now 6
% set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 % set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
hold all hold all
try % if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') try % if isequal(get(Exp(expN).hOL(trc),'Visible'),'on')
tmpRange=ceil(max(upperStd(trc,1:end))) - floor(min(lowerStd(trc,1:end))); tmpRange=ceil(max(upperStd(trc,1:end))) - floor(min(lowerStd(trc,1:end)));
range=max(range,tmpRange); range=max(range,tmpRange);
catch, end catch, end
end %for trc= 1:Exp(expN).traceN approx. ln319 end
%************** Standard Deviation range bars *****************************
% Standard Deviation range bars
% range=ceil(max(upperStd(trc,1:end))) - floor(min(lowerStd(trc,1:end))); % range=ceil(max(upperStd(trc,1:end))) - floor(min(lowerStd(trc,1:end)));
spacing=range*0.0034; %marker splacing for building range bars spacing=range*0.0034; %marker splacing for building range bars
for trc=1:Exp(expN).traceN %length(Exp(expN).Trace) for trc=1:Exp(expN).traceN %length(Exp(expN).Trace)
@@ -430,10 +402,9 @@ for trc= 1:Exp(expN).traceN %length(Exp(expN).Trace)
% line(n,(dayMed(trc,n)+0.1):0.05:upperStd(trc,n),'marker','v','LineWidth',1,'markerEdgeColor',cell2mat(linecolor(trc))); hold on % line(n,(dayMed(trc,n)+0.1):0.05:upperStd(trc,n),'marker','v','LineWidth',1,'markerEdgeColor',cell2mat(linecolor(trc))); hold on
end end
end end
end %for n=1:length(Exp(expN).Dexp) end
end % if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') end
end %for trc= 1:Exp(expN).traceN end
% legName=strrep(NmLst,'_','-'); % legName=strrep(NmLst,'_','-');
mm=1; mm=1;
for nn=1:length(NmLst) for nn=1:length(NmLst)
@@ -445,24 +416,18 @@ end
legName=strrep(legName,'/','-'); legName=strrep(legName,'/','-');
hleg=legend((legName),'location','NEO'); hleg=legend((legName),'location','NEO');
set(hleg,'fontsize',legFontSz) set(hleg,'fontsize',legFontSz)
end end
xlabel('Days') xlabel('Days')
ylabel('L in Hours') ylabel('L in Hours')
title('Chronological Trend Plot with Standard Deviations') title('Chronological Trend Plot with Standard Deviations')
hold off hold off
%***************************************************************
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
% Single or Multi Experiment
%***************************************************************
%SINGLE or MULTI-Experiment
if ~strcmp(Exp(expN).DexpType, 'chrono') %Single or Multi-Experiment if ~strcmp(Exp(expN).DexpType, 'chrono') %Single or Multi-Experiment
% Plot median values for each DM of the selected Trace (Gene-DM) % Plot median values for each DM of the selected Trace (Gene-DM)
% (Gene-Specifics)using single DAY of trace % (Gene-Specifics)using single DAY of trace
for trc=1:Exp(expN).traceN %length(Exp(expN).Trace) for trc=1:Exp(expN).traceN %length(Exp(expN).Trace)
trcInd=0; trcInd=0;
DexpN=Exp(expN).Trace(trc).DexpN; DexpN=Exp(expN).Trace(trc).DexpN;
@@ -496,7 +461,8 @@ for trc= 1:Exp(expN).traceN %length(Exp(expN).Trace)
dmStd(trc,n)=std(tmp(kFiltrIndx)); %std(Exp(expN).Trace(trc).Dexp(DexpN).DM(n).UsrLvals); dmStd(trc,n)=std(tmp(kFiltrIndx)); %std(Exp(expN).Trace(trc).Dexp(DexpN).DM(n).UsrLvals);
cnt=length(kFiltrIndx); %length(Exp(expN).Trace(trc).Dexp(DexpN).DM(n).UsrLvals); cnt=length(kFiltrIndx); %length(Exp(expN).Trace(trc).Dexp(DexpN).DM(n).UsrLvals);
end end
%*************Make LEGEND list ********************************
% Make Legend list
% Make Sample Count Label item % Make Sample Count Label item
if n~=length(Exp(expN).Dexp(DexpN).DM.drug) if n~=length(Exp(expN).Dexp(DexpN).DM.drug)
scnt=strcat(scnt,num2str(cnt),','); scnt=strcat(scnt,num2str(cnt),',');
@@ -517,10 +483,8 @@ for trc= 1:Exp(expN).traceN %length(Exp(expN).Trace)
trcInd=trcInd+1; trcInd=trcInd+1;
upperStd(trc,n)=dmMed(trc,n) + dmStd(trc,n); upperStd(trc,n)=dmMed(trc,n) + dmStd(trc,n);
lowerStd(trc,n)=dmMed(trc,n) - dmStd(trc,n); lowerStd(trc,n)=dmMed(trc,n) - dmStd(trc,n);
end %if isequal(get(Exp(1).hOL(trc),'Visible'),'on') end
end
end %for n=1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru Drug-Media perturbations
% Plot Trend Data % Plot Trend Data
if isequal(get(Exp(expN).hOL(trc),'Visible'),'on') if isequal(get(Exp(expN).hOL(trc),'Visible'),'on')
@@ -530,29 +494,26 @@ for trc= 1:Exp(expN).traceN %length(Exp(expN).Trace)
else else
clear NmLstStr clear NmLstStr
if iscell(NmLst(trc)),NmLstStr=cell2mat(NmLst(trc)); else NmLstStr=NmLst(trc); end if iscell(NmLst(trc)),NmLstStr=cell2mat(NmLst(trc)); else NmLstStr=NmLst(trc); end
if isequal(NmLstStr(4:6),'cmp') ||... if isequal(NmLstStr(4:6),'cmp'), ...
isequal(NmLstStr(3:6),'cmpG') || ... || isequal(NmLstStr(3:6),'cmpG'), ...
isequal(NmLstStr(3:6),'cmpP'), || isequal(NmLstStr(3:6),'cmpP')
hTrendFig=plot(1:n,dmMed(trc,1:n),'lineWidth',2); hold on hTrendFig=plot(1:n,dmMed(trc,1:n),'lineWidth',2); hold on
linecolor(trc)={get(hTrendFig,'color')}; linecolor(trc)={get(hTrendFig,'color')};
else else
hTrendFig=plot(1:n,dmMed(trc,1:n),'marker','^','lineWidth',2); hold on hTrendFig=plot(1:n,dmMed(trc,1:n),'marker','^','lineWidth',2); hold on
linecolor(trc)={get(hTrendFig,'color')}; linecolor(trc)={get(hTrendFig,'color')};
end end
end end
% yTicks=get(gca,'yTickLabel'); Ydelta=max(max(yTicks))-min(min(yTicks)); % yTicks=get(gca,'yTickLabel'); Ydelta=max(max(yTicks))-min(min(yTicks));
% spacing=Ydelta* 0.0034; %line spacing for STD marker % spacing=Ydelta* 0.0034; %line spacing for STD marker
end end
grid on grid on
% set(gca,'linewidth',4) %0.5 then 1.5 now 6 % set(gca,'linewidth',4) %0.5 then 1.5 now 6
% set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 % set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
hold all hold all
end %for trc= 1:Exp(expN).traceN end
%************** Standard Deviation range bars ***************************** % Standard Deviation range bars
% range=ceil(max(max(upperStd))) - floor(min(min(lowerStd))); % range=ceil(max(max(upperStd))) - floor(min(min(lowerStd)));
range=ceil(max(upperStd(trc,1:end))) - floor(min(lowerStd(trc,1:end))); range=ceil(max(upperStd(trc,1:end))) - floor(min(lowerStd(trc,1:end)));
spacing=range*0.0034; spacing=range*0.0034;
@@ -563,11 +524,10 @@ for trc= 1:Exp(expN).traceN %length(Exp(expN).Trace)
line(n,lowerStd(trc,n):spacing:(dmMed(trc,n)-.05),'marker','^','LineWidth',1,'markerEdgeColor',cell2mat(linecolor(trc))); hold on line(n,lowerStd(trc,n):spacing:(dmMed(trc,n)-.05),'marker','^','LineWidth',1,'markerEdgeColor',cell2mat(linecolor(trc))); hold on
line(n,(dmMed(trc,n)+0.05):spacing:upperStd(trc,n),'marker','v','LineWidth',1,'markerEdgeColor',cell2mat(linecolor(trc))); hold on line(n,(dmMed(trc,n)+0.05):spacing:upperStd(trc,n),'marker','v','LineWidth',1,'markerEdgeColor',cell2mat(linecolor(trc))); hold on
catch catch
end end
end end
end %for n=1:length(Exp(expN).Dexp) end
end %for trc= 1:Exp(expN).traceN end
mm=1; mm=1;
for nn=1:length(NmLst) for nn=1:length(NmLst)
@@ -579,16 +539,11 @@ end
legName=strrep(legName,'/','-'); legName=strrep(legName,'/','-');
hleg=legend((legName),'location','NEO'); hleg=legend((legName),'location','NEO');
set(hleg,'fontsize',legFontSz) set(hleg,'fontsize',legFontSz)
xlabel('Drug-Media Index') xlabel('Drug-Media Index')
ylabel('L in Hours') ylabel('L in Hours')
title('Drug-Media Trend Plot with Standard Deviations') title('Drug-Media Trend Plot with Standard Deviations')
hold off hold off
end %if ~strcmp(Exp(expN).DexpType, 'chrono') %Single or Multi-Experiment 395 end
%***************************************************************
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%end
hold off hold off
end %if userPars.boxplotFlg~=1 %PLOT OVERLAY OF TRENDS 266 end %if userPars.boxplotFlg~=1 %PLOT OVERLAY OF TRENDS 266

View File

@@ -39,14 +39,13 @@ if expN==1,htTog= Exp(1).htmapPBsel;end
if expN==2,htTog=Exp(2).htmapPBsel;end if expN==2,htTog=Exp(2).htmapPBsel;end
if expN==3,htTog=Exp(3).htmapPBsel;end if expN==3,htTog=Exp(3).htmapPBsel;end
%00000000 LLLLLLLLLLLLLL 00000000000000000000000000000000000000000000000
if htTog==0 if htTog==0
colormap(flipud(modJet1)) % colormap(modJet2) colormap(flipud(modJet1)) % colormap(modJet2)
L=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,5); L=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,5);
L=reshape(L,24,16); L=reshape(L,24,16);
LpStd=mean(nonzeros(L(:)))+(adj*std(nonzeros(L(:)))); LpStd=mean(nonzeros(L(:)))+(adj*std(nonzeros(L(:))));
LnStd=mean(nonzeros(L(:))-(adj*std(nonzeros(L(:))))); LnStd=mean(nonzeros(L(:))-(adj*std(nonzeros(L(:)))));
% Data rescaling for Heatmap display (color range- mean+/std*adjustment) % Data rescaling for Heatmap display (color range- mean+/std*adjustment)
for i=1:size(L,1) for i=1:size(L,1)
for j=1:size(L,2) for j=1:size(L,2)
@@ -56,14 +55,13 @@ for i=1:size(L,1)
L4hMap(i,j)=LnStd; L4hMap(i,j)=LnStd;
elseif L(i,j)==0 elseif L(i,j)==0
L4hMap(i,j)=LpStd+0.2*std(L(:)); L4hMap(i,j)=LpStd+0.2*std(L(:));
else else
L4hMap(i,j)=L(i,j); L4hMap(i,j)=L(i,j);
end end
end end
end end
% L4hMap=1-(L4hMap/(max(L4hMap(:)))); % L4hMap=1-(L4hMap/(max(L4hMap(:))));
%---------------------------------------------------
if prntHt==0 if prntHt==0
hTogHt=figure; hTogHt=figure;
h=image(cleanPallet); % hTogHt=image(cleanPallet); h=image(cleanPallet); % hTogHt=image(cleanPallet);
@@ -106,14 +104,13 @@ else %if clicking to produce a 'printable' save display
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18}) %set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar colorbar
expLblHtmap=Exp(expN).Dexp.ExpFoldr; expLblHtmap=Exp(expN).Dexp.ExpFoldr;
mediaLBhtmap= char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},... mediaLBhtmap=char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',...
' ',Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel})); Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}));
title({strcat('L HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)}) title({strcat('L HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)})
end end
colormap(modJet1) %Fix added 230814 colormap(modJet1)
%3333333333 KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
elseif htTog==1 elseif htTog==1
colormap(modJet1); colormap(modJet1);
K=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,3); K=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,3);
@@ -134,7 +131,7 @@ for i=1:size(K,1)
end end
end end
end end
%---------------------------------------------------
if prntHt==0 if prntHt==0
hTogHt=figure; hTogHt=figure;
h=image(cleanPallet); h=image(cleanPallet);
@@ -160,12 +157,12 @@ else
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18}) %set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar colorbar
expLblHtmap=Exp(expN).Dexp.ExpFoldr; expLblHtmap=Exp(expN).Dexp.ExpFoldr;
mediaLBhtmap= char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},... mediaLBhtmap=char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',...
' ',Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel})); Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}));
title({strcat('K HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)}) title({strcat('K HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)})
end end
%444444444 rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
elseif htTog==2 elseif htTog==2
colormap(modJet1); colormap(modJet1);
r=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,4); r=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,4);
@@ -186,7 +183,6 @@ for i=1:size(r,1)
end end
end end
end end
%---------------------------------------------------
if prntHt==0 if prntHt==0
hTogHt=figure; hTogHt=figure;
h=image(cleanPallet); h=image(cleanPallet);
@@ -201,7 +197,6 @@ set(h,'CDataMapping','scale')
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
if prntHt==0 if prntHt==0
close(hTogHt) close(hTogHt)
else else
@@ -212,13 +207,12 @@ else
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18}) %set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar colorbar
expLblHtmap=Exp(expN).Dexp.ExpFoldr; expLblHtmap=Exp(expN).Dexp.ExpFoldr;
mediaLBhtmap= char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},... mediaLBhtmap=char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',...
' ',Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel})); Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}));
title({strcat('r HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)}) title({strcat('r HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)})
end end
%33333333333333333333333333333333333333333333333333333(1111111111111111111)
elseif htTog==3 elseif htTog==3
RFconfig=Exp(expN).RFconfig; %ZoneRelated RFconfig=Exp(expN).RFconfig; %ZoneRelated
if htMapTogPBfg==1 if htMapTogPBfg==1
@@ -234,12 +228,8 @@ elseif htTog==3
defaultanswer={'F','L'}; %{'80','60','100','3,4,5','N','39','Y','F','L'}; defaultanswer={'F','L'}; %{'80','60','100','3,4,5','N','39','Y','F','L'};
try defaultanswer=Exp(expN).htmapRFanswer; catch, defaultanswer={'F','L'}; end %ZoneRelated try defaultanswer=Exp(expN).htmapRFanswer; catch, defaultanswer={'F','L'}; end %ZoneRelated
end end
if RFconfig~=1, if RFconfig~=1,
prompt={ prompt={QctrlRF,QpertRF};
QctrlRF,...
QpertRF,...
};
name='Interaction User Input'; name='Interaction User Input';
numlines=1; numlines=1;
answer=inputdlg(prompt,name,numlines,defaultanswer); answer=inputdlg(prompt,name,numlines,defaultanswer);
@@ -255,7 +245,7 @@ elseif htTog==3
answer(2)=strrep(answer(2),'f','F'); answer(2)=strrep(answer(2),'g','G'); answer(2)=strrep(answer(2),'l','L'); answer(2)=strrep(answer(2),'f','F'); answer(2)=strrep(answer(2),'g','G'); answer(2)=strrep(answer(2),'l','L');
Exp(expN).htmapRFanswer=answer; %ZoneRelated %store user last selections Exp(expN).htmapRFanswer=answer; %ZoneRelated %store user last selections
end end
end %if htMapTogPBfg==1 end
htMapTogPBfg=0; htMapTogPBfg=0;
answer=Exp(expN).htmapRFanswer; %ZoneRelated answer=Exp(expN).htmapRFanswer; %ZoneRelated
@@ -264,10 +254,9 @@ elseif htTog==3
j=dmSel; j=dmSel;
DM0=dmSel; DMj=dmSel; DM0=dmSel; DMj=dmSel;
m=mpSel; m=mpSel;
%**************** anN=[1 2];
anN= [1 2]; %* % Call subroutine to interpret user RF inputs & det. Rn and Rs values
EZintRFs %* Call subroutine to interpret user RF inputs & det. Rn and Rs values EZintRFs
%****************
scnNdm1=1 + (dmN*(m-1)) scnNdm1=1 + (dmN*(m-1))
scnN=j + (dmN*(m-1)) % 1,6,11..; 2,7,12 ..; 3,8,13..; scnN=j + (dmN*(m-1)) % 1,6,11..; 2,7,12 ..; 3,8,13..;
Xn{m,j,1}=[]; Xn{m,j,1}=[];
@@ -278,12 +267,9 @@ elseif htTog==3
Xhn{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,12); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,12); Xhn{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,12); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,12);
Xn{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).plate(1).CFout(:,5); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,5); Xn{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).plate(1).CFout(:,5); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,5);
htmpCpyXn=Xn{m,j,:}'; % Use to find and delineate no growth spots with 999 in text field (infinite interaction) value; htmpCpyXn=Xn{m,j,:}'; % Use to find and delineate no growth spots with 999 in text field (infinite interaction) value;
Xn{m,j,:}(Xn{m,j,:}==0)=1.2*(max(Xn{m,j,:})); %to keep the colormap scale tighter %=140; Xn{m,j,:}(Xn{m,j,:}==0)=1.2*(max(Xn{m,j,:})); %to keep the colormap scale tighter %=140;
Xln{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).plate(1).CFout(:,11); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,11); Xln{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).plate(1).CFout(:,11); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,11);
Xhn{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).plate(1).CFout(:,12); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,12); Xhn{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).plate(1).CFout(:,12); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,12);
%*********************************************************
%intL{m,j,:}=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1))); %intL{m,j,:}=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1)));
intL=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1))); intL=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1)));
Exp(expN).HtMpIntN2=intL; %ZoneRelated Exp(expN).HtMpIntN2=intL; %ZoneRelated
@@ -293,12 +279,10 @@ elseif htTog==3
%} %}
percentRs=100; percentRs=100;
RsReduced(j)=percentRs/100* Rs(j); RsReduced(j)=percentRs/100* Rs(j);
deltaRp(j)=(Rn(j)+RsReduced(j))-(Rn(1)+RsReduced(1)); deltaRp(j)=(Rn(j)+RsReduced(j))-(Rn(1)+RsReduced(1));
deltaRn(j)=(Rn(j)-RsReduced(j))-(Rn(1)-RsReduced(1)); deltaRn(j)=(Rn(j)-RsReduced(j))-(Rn(1)-RsReduced(1));
if deltaRp(j)==0, deltaRp(j)=0.0002; end if deltaRp(j)==0, deltaRp(j)=0.0002; end
if deltaRn(j)==0, deltaRn(j)=0.0002; end if deltaRn(j)==0, deltaRn(j)=0.0002; end
deltaYp=zeros(1,384); deltaYn=zeros(1,384); deltaYp=zeros(1,384); deltaYn=zeros(1,384);
deltaXRp=zeros(1,384); deltaXRn=zeros(1,384); deltaXRp=zeros(1,384); deltaXRn=zeros(1,384);
deltaXR{m,j}=zeros(1,384); deltaXR{m,j}=zeros(1,384);
@@ -320,16 +304,15 @@ elseif htTog==3
if deltaYn(i)==0, deltaXR{m,j}(i)=0; end if deltaYn(i)==0, deltaXR{m,j}(i)=0; end
end end
% Ambiguous results that have delta gene values that are less than the variance of Reference+/-std % Ambiguous results that have delta gene values that are less than the variance of Reference+/-std
end %for i=1:384 end
deltaXRl=deltaXR{m,j,:}; deltaXRl=deltaXR{m,j,:};
htMpN1Lzeros999=deltaXR{m,j,:}; htMpN1Lzeros999=deltaXR{m,j,:};
deltaXRl(htmpCpyXn==0)=1.2*max(deltaXRl); deltaXRl(htmpCpyXn==0)=1.2*max(deltaXRl);
htMpN1Lzeros999(htmpCpyXn==0)=999; htMpN1Lzeros999(htmpCpyXn==0)=999;
Exp(expN).HtMpIntN1=htMpN1Lzeros999'; Exp(expN).HtMpIntN1=htMpN1Lzeros999';
%**************************************************************************
I=reshape(deltaXRl,24,16); I=reshape(deltaXRl,24,16);
if prntHt==0 if prntHt==0
hTogHt=figure; hTogHt=figure;
h=image(cleanPallet); h=image(cleanPallet);
@@ -356,27 +339,21 @@ else
% set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18}) % set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar colorbar
expLblHtmap=Exp(expN).Dexp.ExpFoldr; expLblHtmap=Exp(expN).Dexp.ExpFoldr;
mediaLBhtmap= char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},... mediaLBhtmap=char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',...
' ',Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel})); Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}));
title({strcat('N1 HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)}) title({strcat('N1 HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)})
end end
% end %for m=1:1
%end %for j=1:1
%4444444444444444444444444444444444444444444444444444444444(22222222222222222)
elseif htTog==4 elseif htTog==4
answer=Exp(expN).htmapRFanswer; % ZoneRelated answer=Exp(expN).htmapRFanswer; % ZoneRelated
RFconfig=Exp(expN).RFconfig; % ZoneRelated RFconfig=Exp(expN).RFconfig; % ZoneRelated
answer=Exp(expN).htmapRFanswer; % ZoneRelated answer=Exp(expN).htmapRFanswer; % ZoneRelated
j=dmSel; j=dmSel;
DM0=dmSel; DMj=dmSel; DM0=dmSel; DMj=dmSel;
m=mpSel; m=mpSel;
%**************** anN=[1 2];
anN= [1 2]; %* EZintRFs % Call subroutine to interpret user RF inputs
EZintRFs %* Call subroutine to interpret user RF inputs
%****************
scnNdm1=1 + (dmN*(m-1)) scnNdm1=1 + (dmN*(m-1))
scnN=j + (dmN*(m-1)) % 1,6,11..; 2,7,12 ..; 3,8,13..; scnN=j + (dmN*(m-1)) % 1,6,11..; 2,7,12 ..; 3,8,13..;
Xn{m,j,1}=[]; Xn{m,j,1}=[];
@@ -385,14 +362,13 @@ elseif htTog==4
htmpCpyXn=Xn{m,j,:}'; % Use to find and delineate no growth spots with 999 in text field (infinite interaction) value; htmpCpyXn=Xn{m,j,:}'; % Use to find and delineate no growth spots with 999 in text field (infinite interaction) value;
intL=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1))); intL=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1)));
Exp(expN).HtMpIntN2=intL; % ZoneRelated Exp(expN).HtMpIntN2=intL; % ZoneRelated
intL=Exp(expN).HtMpIntN2; % ZoneRelated intL=Exp(expN).HtMpIntN2; % ZoneRelated
I=reshape(intL,24,16); I=reshape(intL,24,16);
if prntHt==0 if prntHt==0
hTogHt=figure; hTogHt=figure;
h=image(cleanPallet); h=image(cleanPallet);
elsef elseif
figure figure
h=image(cleanPallet); h=image(cleanPallet);
end end
@@ -414,14 +390,16 @@ end
% set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18}) % set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar colorbar
expLblHtmap=Exp(expN).Dexp.ExpFoldr; expLblHtmap=Exp(expN).Dexp.ExpFoldr;
mediaLBhtmap= char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},... mediaLBhtmap=char(strcat(', Agar-',Exp(expN).Dexp(DexpN).DM.media{pertSel},' ',...
' ',Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel})); Exp(expN).Dexp(DexpN).DM.drug{pertSel},Exp(expN).Dexp(DexpN).DM.conc{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',...
Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}));
title({strcat('N2 HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)}) title({strcat('N2 HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)})
end end
end
end %if htTog==
prntHt=0; prntHt=0;
%************* *****
EZhtMapText %* Update htMapText for location on the first 'roll thru of htMapPB % Update htMapText for location on the first 'roll thru of htMapPB
%************* ***** EZhtMapText

View File

@@ -1,5 +1,5 @@
%EZhtMapText.m %EZhtMapText.m
%*********************HeatMap Text Field********************************* % HeatMap Text Field
try try
indx=Exp(expN).Dexp(DexpN).spotIndx; indx=Exp(expN).Dexp(DexpN).spotIndx;
l=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(indx,5); l=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(indx,5);
@@ -29,8 +29,6 @@ catch
htr=' '; htr=' ';
end end
try try
n1=num2str(Exp(expN).HtMpIntN1(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx)); n1=num2str(Exp(expN).HtMpIntN1(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx));
if length(n1)>5,N1=n1(1:5);else N1=n1; end if length(n1)>5,N1=n1(1:5);else N1=n1; end
@@ -76,7 +74,6 @@ if expN==3,set(ghandles.HtMapVals3,'string',htmapStr);end
end end
catch catch
end end
catch catch
msg='No spot selected (indx=Exp(expN).Dexp(DexpN).spotIndx)' msg='No spot selected (indx=Exp(expN).Dexp(DexpN).spotIndx)'
end end

View File

@@ -1,6 +1,4 @@
%print Interaction Data Output file %print Interaction Data Output file
%**************************************************************************************
%resDir=Exp(expN).Dexp(DexpN).resDir; %resDir=Exp(expN).Dexp(DexpN).resDir;
%expN=1; %temp entry %expN=1; %temp entry
if strcmp(Exp(expN).DexpType, 'single') || strcmp(Exp(expN).DexpType,'multi') if strcmp(Exp(expN).DexpType, 'single') || strcmp(Exp(expN).DexpType,'multi')
@@ -14,7 +12,6 @@ elseif strcmp(Exp(expN).DexpType, 'chrono')
pertTypeLB= '; Dayselections:'; pertTypeLB= '; Dayselections:';
Rsmax=max(Rs(1),Rs(1:dmN)); Rsmax=max(Rs(1),Rs(1:dmN));
%MKDIR for ChonologicalStudy results in Exp Group folder %MKDIR for ChonologicalStudy results in Exp Group folder
%For chrono studies, put the interaction results in the first Exp of selected group. i.e., DexpN=1; %For chrono studies, put the interaction results in the first Exp of selected group. i.e., DexpN=1;
intLfilename1= fullfile(Exp(expN).Dexp(1).resDir,'PrintResults','!AggrevatingL-Chrono.txt'); intLfilename1= fullfile(Exp(expN).Dexp(1).resDir,'PrintResults','!AggrevatingL-Chrono.txt');
intLfilename2= fullfile(Exp(expN).Dexp(1).resDir,'PrintResults','!AlleviatingL-Chrono.txt'); intLfilename2= fullfile(Exp(expN).Dexp(1).resDir,'PrintResults','!AlleviatingL-Chrono.txt');
@@ -22,10 +19,10 @@ elseif strcmp(Exp(expN).DexpType, 'chrono')
intLfilename4= fullfile(Exp(expN).Dexp(1).resDir,'PrintResults','!AlleviatingLadjusted-Chrono.txt'); intLfilename4= fullfile(Exp(expN).Dexp(1).resDir,'PrintResults','!AlleviatingLadjusted-Chrono.txt');
end end
userInputs=cell2mat(strcat( 'ExpZone:',num2str(expN), '; LeftPercent',answer(1),'; RightPercent:',answer(2),'; RFstdPercent:',answer(3),pertTypeLB,answer(4),'; RemoveNoGrowthInfLs:',answer(5),... userInputs=cell2mat(strcat( 'ExpZone:',num2str(expN), '; LeftPercent',answer(1),'; RightPercent:',answer(2),...
'; RFstdPercent:',answer(3),pertTypeLB,answer(4),'; RemoveNoGrowthInfLs:',answer(5),...
'; NumberOfHistogramBins:',answer(6),'; Subplots:',answer(7))); %answer(7) '; NumberOfHistogramBins:',answer(6),'; Subplots:',answer(7))); %answer(7)
%********************11111111111111111111111111111111111111111****************************************************************************************************************
% Interaction Printout for Positive (longer L interaction values) Non-Adjusted for Ref std and curve fit boundaries % Interaction Printout for Positive (longer L interaction values) Non-Adjusted for Ref std and curve fit boundaries
fid=fopen(intLfilename1,'w'); fid=fopen(intLfilename1,'w');
ln=1; ln=1;
@@ -52,7 +49,6 @@ for i=1:size(selIntP,1)
fprintf(fid,'%s\t%s\t%s\t',cell2mat(IPspecifics(i)),cell2mat(IPorfRep(i)),cell2mat(IPstrain(i))); fprintf(fid,'%s\t%s\t%s\t',cell2mat(IPspecifics(i)),cell2mat(IPorfRep(i)),cell2mat(IPstrain(i)));
fprintf(fid,'%.5f\t%.5f\t%.5f\t',selIntPx{1}(i,2),selIntPx{1}(i,4),selIntPx{1}(i,5),InterslstPos{1}(i)) fprintf(fid,'%.5f\t%.5f\t%.5f\t',selIntPx{1}(i,2),selIntPx{1}(i,4),selIntPx{1}(i,5),InterslstPos{1}(i))
fprintf(fid, '\n'); fprintf(fid, '\n');
end end
else else
ln=ln+1; ln=ln+1;
@@ -61,7 +57,7 @@ else
end end
% fprintf(fid, 'Num.\tDiagnostics\tDrug\tConc\tMedia\tModifier1\tConc1\tModifier2\tConc2\tORF\tGene\tAUC\triseTm\tK\tr\tl\tR-squared\tK-lower\tK-upper\tr-lower\tr-upper\tl-lower\tl-upper\tArea\tLastInten\tSplineMaxRateTm\tLastFitTm\t1stFitTm\tMedianBase\tFitBase\tMinTm\tThreshTm\tTotFitPts\tPostThreshFitPts\t1stBackgrd\tLstBackgrd\t1stMeanTotBackgrd\tLstMeanTotBackgrd'); % fprintf(fid, 'Num.\tDiagnostics\tDrug\tConc\tMedia\tModifier1\tConc1\tModifier2\tConc2\tORF\tGene\tAUC\triseTm\tK\tr\tl\tR-squared\tK-lower\tK-upper\tr-lower\tr-upper\tl-lower\tl-upper\tArea\tLastInten\tSplineMaxRateTm\tLastFitTm\t1stFitTm\tMedianBase\tFitBase\tMinTm\tThreshTm\tTotFitPts\tPostThreshFitPts\t1stBackgrd\tLstBackgrd\t1stMeanTotBackgrd\tLstMeanTotBackgrd');
fclose(fid) fclose(fid)
%********************222222222222222222222222222222222222222222222****************************************************************************************************************
% Interaction Printout for Negative (shorter L interaction values) Non-Adjusted for Ref std and curve fit boundaries % Interaction Printout for Negative (shorter L interaction values) Non-Adjusted for Ref std and curve fit boundaries
fid=fopen(intLfilename2,'w'); fid=fopen(intLfilename2,'w');
ln=1; ln=1;
@@ -87,14 +83,12 @@ for i=1:size(selIntN,1)
% fprintf(fid,'%.5f\t%.5f\t%.5f\t',ipL(i),ipLlower(i),ipLupper(i)) % fprintf(fid,'%.5f\t%.5f\t%.5f\t',ipL(i),ipLlower(i),ipLupper(i))
fprintf(fid,'%s\t%s\t%s\t',cell2mat(INspecifics(i)),cell2mat(INorfRep(i)),cell2mat(INstrain(i))); fprintf(fid,'%s\t%s\t%s\t',cell2mat(INspecifics(i)),cell2mat(INorfRep(i)),cell2mat(INstrain(i)));
fprintf(fid,'%.5f\t%.5f\t%.5f\t%.5f\t',selIntNx{1}(i,2),selIntNx{1}(i,4),selIntNx{1}(i,5),InterslstNeg{1}(i)) fprintf(fid,'%.5f\t%.5f\t%.5f\t%.5f\t',selIntNx{1}(i,2),selIntNx{1}(i,4),selIntNx{1}(i,5),InterslstNeg{1}(i))
fprintf(fid, '\n'); fprintf(fid, '\n');
end end
end end
fclose(fid) fclose(fid)
%********************3333333333333333333333333333333333333333333333****************************************************************************************************************
% Interaction Printout for Positive (longer L interaction values) "ADJUSTED" for Ref std and curve fit boundaries % Interaction Printout for Positive (longer L interaction values) "ADJUSTED" for Ref std and curve fit boundaries
fid=fopen(intLfilename3,'w'); fid=fopen(intLfilename3,'w');
ln=1; ln=1;
@@ -120,14 +114,10 @@ for i=1:size(selIntPAdj,1)
fprintf(fid,'%s\t%s\t%s\t',cell2mat(IPspecificsAdj(i)),cell2mat(IPorfRepAdj(i)),cell2mat(IPstrainAdj(i))); fprintf(fid,'%s\t%s\t%s\t',cell2mat(IPspecificsAdj(i)),cell2mat(IPorfRepAdj(i)),cell2mat(IPstrainAdj(i)));
fprintf(fid,'%.5f\t%.5f\t%.5f\t',selIntPxAdj{1}(i,2),selIntPxAdj{1}(i,4),selIntPxAdj{1}(i,5),InterslstPosAdj{1}(i)) fprintf(fid,'%.5f\t%.5f\t%.5f\t',selIntPxAdj{1}(i,2),selIntPxAdj{1}(i,4),selIntPxAdj{1}(i,5),InterslstPosAdj{1}(i))
fprintf(fid, '\n'); fprintf(fid, '\n');
end end
% fprintf(fid, 'Num.\tDiagnostics\tDrug\tConc\tMedia\tModifier1\tConc1\tModifier2\tConc2\tORF\tGene\tAUC\triseTm\tK\tr\tl\tR-squared\tK-lower\tK-upper\tr-lower\tr-upper\tl-lower\tl-upper\tArea\tLastInten\tSplineMaxRateTm\tLastFitTm\t1stFitTm\tMedianBase\tFitBase\tMinTm\tThreshTm\tTotFitPts\tPostThreshFitPts\t1stBackgrd\tLstBackgrd\t1stMeanTotBackgrd\tLstMeanTotBackgrd'); % fprintf(fid, 'Num.\tDiagnostics\tDrug\tConc\tMedia\tModifier1\tConc1\tModifier2\tConc2\tORF\tGene\tAUC\triseTm\tK\tr\tl\tR-squared\tK-lower\tK-upper\tr-lower\tr-upper\tl-lower\tl-upper\tArea\tLastInten\tSplineMaxRateTm\tLastFitTm\t1stFitTm\tMedianBase\tFitBase\tMinTm\tThreshTm\tTotFitPts\tPostThreshFitPts\t1stBackgrd\tLstBackgrd\t1stMeanTotBackgrd\tLstMeanTotBackgrd');
fclose(fid) fclose(fid)
%********************44444444444444444444444444444444444444444444****************************************************************************************************************%Interaction Printout for Negative (shorter L interaction values) Non-Adjusted for Ref std and curve fit boundaries
fid=fopen(intLfilename4,'w'); fid=fopen(intLfilename4,'w');
ln=1; ln=1;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
@@ -153,9 +143,7 @@ for i=1:size(selIntNAdj,1)
% fprintf(fid,'%.5f\t%.5f\t%.5f\t',ipL(i),ipLlower(i),ipLupper(i)) % fprintf(fid,'%.5f\t%.5f\t%.5f\t',ipL(i),ipLlower(i),ipLupper(i))
fprintf(fid,'%s\t%s\t%s\t',cell2mat(INspecificsAdj(i)),cell2mat(INorfRepAdj(i)),cell2mat(INstrainAdj(i))); fprintf(fid,'%s\t%s\t%s\t',cell2mat(INspecificsAdj(i)),cell2mat(INorfRepAdj(i)),cell2mat(INstrainAdj(i)));
fprintf(fid,'%.5f\t%.5f\t%.5f\t',selIntNxAdj{1}(i,2),selIntNxAdj{1}(i,4),selIntNxAdj{1}(i,5),InterslstNegAdj{1}(i)) fprintf(fid,'%.5f\t%.5f\t%.5f\t',selIntNxAdj{1}(i,2),selIntNxAdj{1}(i,4),selIntNxAdj{1}(i,5),InterslstNegAdj{1}(i))
fprintf(fid, '\n'); fprintf(fid, '\n');
end end
end end

View File

@@ -3,9 +3,12 @@
%Provides Trace data storage for use by EZfigTrendOL.m %Provides Trace data storage for use by EZfigTrendOL.m
RFcmpGFlg=0; RFcmpGFlg=0;
if isequal(tempLB(4:6),'cmp'), RFnum= str2double(tempLB(3)); if isequal(tempLB(4:6),'cmp')
elseif isequal(tempLB(3:6),'cmpG'), RFcmpGFlg=1; RFnum=str2double(tempLB(3));
elseif isequal(tempLB(3:6),'cmpP'), RFcmpGFlg=1; %I beleive handling will be the same as RFcmpG elseif isequal(tempLB(3:6),'cmpG')
RFcmpGFlg=1;
elseif isequal(tempLB(3:6),'cmpP')
RFcmpGFlg=1; %I beleive handling will be the same as RFcmpG
end end
Exp(expN).cLmdEven=0; %Added for Cummulative Median and Mean 'C' plot Exp(expN).cLmdEven=0; %Added for Cummulative Median and Mean 'C' plot
RFDMflg=0; RFDMflg=0;
@@ -22,16 +25,14 @@ if (~isempty(dmNum)&& isnumeric(dmNum)),RFDMflg=1; end
catch catch
end end
if RFDMflg, Exp(zoneSel).Dexp(DexpN).pertSel=dmNum; end %pertSel=pert; if RFDMflg, Exp(zoneSel).Dexp(DexpN).pertSel=dmNum; end %pertSel=pert;
sgdInfoOnly=get(handles.InfoToggle,'value'); sgdInfoOnly=get(handles.InfoToggle,'value');
if sgdInfoOnly==1 if sgdInfoOnly==1
EZviewInfoBox EZviewInfoBox
else % Runs to end of EZlstBoxExt.m within this else condition else % Runs to end of EZlstBoxExt.m within this else condition
%***********PLOT Selected Gene/Orf Spot ****************************************** % Plot Selected Gene/Orf Spot
%try %try
if RFcmpGFlg==0 if RFcmpGFlg==0
K=Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).med; Ks=num2str(K); K=Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).med; Ks=num2str(K);
@@ -58,7 +59,6 @@ try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end
try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end
try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end
t=1:200; t=1:200;
clear g; clear g;
@@ -69,48 +69,45 @@ gFast= Ku ./ (1 + exp(-ru.* (t - lfast )));
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
%tser=(scan(1,plateNum).plate(1).t0Series(:)); %tser=(scan(1,plateNum).plate(1).t0Series(:));
%rawData=scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx); %rawData=scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx);
if zoneSel==1
if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1; plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1;
Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1;
Exp(1).traceN=Exp(1).traceN+1; Exp(1).traceN=Exp(1).traceN+1;
traceN=Exp(1).traceN; traceN=Exp(1).traceN;
end end
if zoneSel==2, plotAxes=ghandles.Paxes2; OLaxes=ghandles.OLaxes2;Daxes=ghandles.Daxes2; if zoneSel==2
plotAxes=ghandles.Paxes2; OLaxes=ghandles.OLaxes2;Daxes=ghandles.Daxes2;
Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2;
Exp(2).traceN=Exp(2).traceN+1; Exp(2).traceN=Exp(2).traceN+1;
traceN=Exp(2).traceN; traceN=Exp(2).traceN;
end end
if zoneSel==3, plotAxes=ghandles.Paxes3; OLaxes=ghandles.OLaxes3;Daxes=ghandles.Daxes3; if zoneSel==3
plotAxes=ghandles.Paxes3; OLaxes=ghandles.OLaxes3;Daxes=ghandles.Daxes3;
Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3;
Exp(3).traceN=Exp(3).traceN+1; Exp(3).traceN=Exp(3).traceN+1;
traceN=Exp(3).traceN; traceN=Exp(3).traceN;
end end
plot(plotAxes,t,g);hold (plotAxes,'on'); % plot(plotAxes,tser,rawData,'g*'); plot(plotAxes,t,g);hold (plotAxes,'on'); % plot(plotAxes,tser,rawData,'g*');
plot(plotAxes,t,gSlow,'y'); plot(plotAxes,t,gFast,'r');hold (plotAxes,'off'); plot(plotAxes,t,gSlow,'y'); plot(plotAxes,t,gFast,'r');hold (plotAxes,'off');
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
% Store L R and K valves for Composite [C] plots % Store L R and K valves for Composite [C] plots
Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K; Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K;
if RFcmpGFlg==0 if RFcmpGFlg==0
Exp(expN).lstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; Exp(expN).lstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
Exp(expN).kstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std; Exp(expN).kstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
Exp(expN).rstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std; Exp(expN).rstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug) for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug)
Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrLvals={Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(dm).Lvals}; Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrLvals={Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(dm).Lvals};
Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrKvals={Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(dm).Kvals}; Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrKvals={Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(dm).Kvals};
Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).Usrrvals={Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(dm).rvals}; Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).Usrrvals={Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(dm).rvals};
end end
Exp(expN).Trace(traceN).dmSel=inDM; Exp(expN).Trace(traceN).dmSel=inDM;
Exp(expN).Trace(traceN).DexpN=DexpN; Exp(expN).Trace(traceN).DexpN=DexpN;
Exp(expN).Trace(traceN).UsrGLB=selGnOrf; Exp(expN).Trace(traceN).UsrGLB=selGnOrf;
elseif RFcmpGFlg==1 elseif RFcmpGFlg==1
Exp(expN).lstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std; Exp(expN).lstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std;
Exp(expN).kstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std; Exp(expN).kstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std;
Exp(expN).rstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).std; Exp(expN).rstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).std;
if strcmp(Exp(expN).DexpType,'chrono') if strcmp(Exp(expN).DexpType,'chrono')
for nn=1:length(Exp(expN).Dexp) %replaced dmSel with inDM for 'chrono' and RFcmpGFlg for nn=1:length(Exp(expN).Dexp) %replaced dmSel with inDM for 'chrono' and RFcmpGFlg
Exp(expN).Trace(traceN).Dexp(nn).DM(inDM).UsrLvals=Exp(expN).Dexp(nn).RFcmpGL.dm(inDM).Lvals; Exp(expN).Trace(traceN).Dexp(nn).DM(inDM).UsrLvals=Exp(expN).Dexp(nn).RFcmpGL.dm(inDM).Lvals;
@@ -124,18 +121,21 @@ Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrKvals= Exp(expN).Dexp(DexpN).RFcmp
Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).Usrrvals=Exp(expN).Dexp(DexpN).RFcmpGr.dm(dm).rvals; Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).Usrrvals=Exp(expN).Dexp(DexpN).RFcmpGr.dm(dm).rvals;
end end
end end
Exp(expN).Trace(traceN).dmSel=inDM; Exp(expN).Trace(traceN).dmSel=inDM;
Exp(expN).Trace(traceN).DexpN=DexpN; Exp(expN).Trace(traceN).DexpN=DexpN;
Exp(expN).Trace(traceN).UsrGLB=selGnOrf; Exp(expN).Trace(traceN).UsrGLB=selGnOrf;
end end
Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast; Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast;
Exp(expN).lKl(traceN)=Kl; Exp(expN).Ku(traceN)=Ku; Exp(expN).lKl(traceN)=Kl; Exp(expN).Ku(traceN)=Ku;
Exp(expN).lrl(traceN)=rl; Exp(expN).ru(traceN)=ru; Exp(expN).lrl(traceN)=rl; Exp(expN).ru(traceN)=ru;
%************************************************************************
try for i=1:length(Exp(zoneSel).hOL(:)),set(Exp(zoneSel).hOL(i),'color',[0 0 1]); end, catch; end try
for i=1:length(Exp(zoneSel).hOL(:))
set(Exp(zoneSel).hOL(i),'color',[0 0 1]);
end
catch
end
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on; Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(zoneSel).hOL(traceN),'color',[1 0 0]) set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
% Exp(zoneSel).hOLb(traceN)=plot(OLaxes,tser,rawData,'g*'); %No Raw Data, Ref Composite 17_1009 % Exp(zoneSel).hOLb(traceN)=plot(OLaxes,tser,rawData,'g*'); %No Raw Data, Ref Composite 17_1009
@@ -177,20 +177,15 @@ Exp(zoneSel).hOLname(traceN)= spotDescrip; %graphStr; %ghandles.Exp(zoneSel).h
Exp(zoneSel).hOLexpNm(traceN)=expStr; %ghandles.Exp(expN).hOLexpNm(traceN)=expStr; Exp(zoneSel).hOLexpNm(traceN)=expStr; %ghandles.Exp(expN).hOLexpNm(traceN)=expStr;
Exp(zoneSel).hOLresDir(traceN)={Exp(zoneSel).Dexp(DexpN).resDir}; Exp(zoneSel).hOLresDir(traceN)={Exp(zoneSel).Dexp(DexpN).resDir};
%Exp(zoneSel).hOLplateNum(traceN)=plateNum; %Exp(zoneSel).hOLplateNum(traceN)=plateNum;
%traceData=vertcat(get(Exp(OLay).hOL(traceN),'XData'),get(ghandles.Exp(OLay).hOL(traceN),'YData')); %traceData=vertcat(get(Exp(OLay).hOL(traceN),'XData'),get(ghandles.Exp(OLay).hOL(traceN),'YData'));
if zoneSel==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value. if zoneSel==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value.
if zoneSel==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end if zoneSel==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end
if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end
if zoneSel==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end %graphStr);end % Displays the value. if zoneSel==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end %graphStr);end % Displays the value.
if zoneSel==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end if zoneSel==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end
if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end
%catch
%catchissue='Ln33 EZlstBoxCmpExt' % Write Spot and Exp Info to OLay title areas
% msg='Error'
%end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot)
%**************Write Spot and Exp Info to OLay title areas****************************************************************************
if zoneSel==1, %&& get(ghandles.rotPB1,'value')~=1 if zoneSel==1, %&& get(ghandles.rotPB1,'value')~=1
if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay1,'FontSize',8);end if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay1,'FontSize',8);end
@@ -210,29 +205,13 @@ if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);en
if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp3,'FontSize',8);end if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp3,'FontSize',8);end
set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(traceN)); set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(traceN));
end end
end %if sgdInfoOnly==1
%***********************GraphicDestinationPerturbationComparison**15_0821************************************************
lstBoxCmpFlg=1;
EZdatatip=0; %**
if strcmp((Exp(expN).DexpType),'single')||...
strcmp((Exp(expN).DexpType),'multi')
%****************
EZdestComp %**
%****************
elseif strcmp((Exp(expN).DexpType),'chrono')
%EZdatatip=2; %**
%************
EZmDayTrend %**
%************
end end
%***********************************************************************************************************************
% GraphicDestinationPerturbationComparison**15_0821
lstBoxCmpFlg=1;
EZdatatip=0;
if strcmp((Exp(expN).DexpType),'single') || strcmp((Exp(expN).DexpType),'multi')
EZdestComp
elseif strcmp((Exp(expN).DexpType),'chrono')
EZmDayTrend
end

View File

@@ -4,13 +4,12 @@
% or by EZviewGui.m (listboxGnOrf_Callback) % or by EZviewGui.m (listboxGnOrf_Callback)
% Replace get(ghandles.CompositeTog1,'value')==1 ... with get(handles.... % Replace get(ghandles.CompositeTog1,'value')==1 ... with get(handles....
if expN==1 && get(handles.CompositeTog1,'value')==1 ||... if expN==1 && get(handles.CompositeTog1,'value')==1 ...
expN==2 && get(handles.CompositeTog2,'value')==1 ||... || expN==2 && get(handles.CompositeTog2,'value')==1 ...
expN==3 && get(handles.CompositeTog3,'value')==1 || expN==3 && get(handles.CompositeTog3,'value')==1
CompositeTrendFlg=1; else CompositeTrendFlg=0; CompositeTrendFlg=1; else CompositeTrendFlg=0;
end end
Exp(expN).cLmdEven=0; % Added for Cummulative Median and Mean 'C' plot Exp(expN).cLmdEven=0; % Added for Cummulative Median and Mean 'C' plot
RFDMflg=0; RFDMflg=0;
if zoneSel==1,DexpN=(get(handles.DN1,'value')); end if zoneSel==1,DexpN=(get(handles.DN1,'value')); end
@@ -25,14 +24,11 @@ if (~isempty(dmNum)&& isnumeric(dmNum)),RFDMflg=1; end
catch catch
end end
if RFDMflg, Exp(zoneSel).Dexp(DexpN).pertSel=dmNum; end % pertSel=pert; if RFDMflg, Exp(zoneSel).Dexp(DexpN).pertSel=dmNum; end % pertSel=pert;
inMP=selGnOrf{1}((LBdlims{:,:}(1))+1:(LBdlims{:,:}(2))-1) inMP=selGnOrf{1}((LBdlims{:,:}(1))+1:(LBdlims{:,:}(2))-1)
% LBmp=str2double(inMP); % LBmp=str2double(inMP);
sgdInfoOnly=get(handles.InfoToggle,'value'); sgdInfoOnly=get(handles.InfoToggle,'value');
if sgdInfoOnly==1 if sgdInfoOnly==1
%*************** EZviewInfoBox
EZviewInfoBox %*
%***************
else % Runs to end of EZlstBoxExt.m within this else condition else % Runs to end of EZlstBoxExt.m within this else condition
if zoneSel==1 if zoneSel==1
Max=floor(get(handles.MPsldr1,'max')); Max=floor(get(handles.MPsldr1,'max'));
@@ -67,8 +63,7 @@ else
if str2num(inMP) <=Min, set(handles.MPsldr3,'value',Min),set(handles.MPed3,'string',num2str(Min));end if str2num(inMP) <=Min, set(handles.MPsldr3,'value',Min),set(handles.MPed3,'string',num2str(Min));end
end end
end end
if RFDMflg
if RFDMflg,
if zoneSel==1 if zoneSel==1
Max=floor(get(handles.DMsldr1,'max')); Max=floor(get(handles.DMsldr1,'max'));
Min=floor(get(handles.DMsldr1,'min')); Min=floor(get(handles.DMsldr1,'min'));
@@ -103,23 +98,17 @@ else
end end
end end
end end
%**************************************************************************
EZVimDisplay %** EZVimDisplay
%**************************************************************************
% 17_111 If CompositeTog_ set, Routine called to find all gene replicates and produce composite values % 17_111 If CompositeTog_ set, Routine called to find all gene replicates and produce composite values
if CompositeTrendFlg==1 if CompositeTrendFlg==1
if strcmp(Exp(expN).DexpType, 'chrono') if strcmp(Exp(expN).DexpType, 'chrono')
%*********************** EZmDayPlotUcmp
EZmDayPlotUcmp %*
%***********************
else else
%*********************** EZplotUcmp
EZplotUcmp %*
%***********************
end end
% Plot Selected Gene/Orf Spot
%*******************************************************************
%***********PLOT Selected Gene/Orf Spot ******************************************
% if non-Composite ("normal") then - ... % if non-Composite ("normal") then - ...
elseif CompositeTrendFlg~=1 elseif CompositeTrendFlg~=1
destPerMP=Exp(zoneSel).Dexp(DexpN).destPerMP; %length(gS.DM1.drug); destPerMP=Exp(zoneSel).Dexp(DexpN).destPerMP; %length(gS.DM1.drug);
@@ -127,7 +116,6 @@ elseif CompositeTrendFlg~=1
plateNum=(LBmp-1)*destPerMP + pertSel; plateNum=(LBmp-1)*destPerMP + pertSel;
indx=((LBr-1)*24) +LBc indx=((LBr-1)*24) +LBc
MP=Exp(zoneSel).Dexp(DexpN).MP; MP=Exp(zoneSel).Dexp(DexpN).MP;
try try
K=scan(1,plateNum).plate(1).CFout(indx,3); Ks=num2str(K); K=scan(1,plateNum).plate(1).CFout(indx,3); Ks=num2str(K);
r=scan(1,plateNum).plate(1).CFout(indx,4); rs=num2str(r); r=scan(1,plateNum).plate(1).CFout(indx,4); rs=num2str(r);
@@ -135,26 +123,21 @@ l=scan(1,plateNum).plate(1).CFout(indx,5); Ls= num2str(l);
try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end
try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end
try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end
Kl=scan(1,plateNum).plate(1).CFout(indx,7); Kl=scan(1,plateNum).plate(1).CFout(indx,7);
Ku=scan(1,plateNum).plate(1).CFout(indx,8); Ku=scan(1,plateNum).plate(1).CFout(indx,8);
rl=scan(1,plateNum).plate(1).CFout(indx,9); rl=scan(1,plateNum).plate(1).CFout(indx,9);
ru=scan(1,plateNum).plate(1).CFout(indx,10); ru=scan(1,plateNum).plate(1).CFout(indx,10);
lfast=scan(1,plateNum).plate(1).CFout(indx,11); lfast=scan(1,plateNum).plate(1).CFout(indx,11);
lslow=scan(1,plateNum).plate(1).CFout(indx,12); lslow=scan(1,plateNum).plate(1).CFout(indx,12);
t=1:200; t=1:200;
clear g; clear g;
try try
g=K ./ (1 + exp(-r.* (t - l ))); g=K ./ (1 + exp(-r.* (t - l )));
gSlow=Kl ./ (1 + exp(-rl.* (t - lslow ))); gSlow=Kl ./ (1 + exp(-rl.* (t - lslow )));
gFast=Ku ./ (1 + exp(-ru.* (t - lfast ))); gFast=Ku ./ (1 + exp(-ru.* (t - lfast )));
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
tser=(scan(1,plateNum).plate(1).t0Series(:)); tser=(scan(1,plateNum).plate(1).t0Series(:));
rawData=scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx); rawData=scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx);
if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1; if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1;
Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1;
Exp(1).traceN=Exp(1).traceN+1; Exp(1).traceN=Exp(1).traceN+1;
@@ -172,18 +155,16 @@ rawData= scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(i
end end
plot(plotAxes,t,g);hold (plotAxes,'on');plot(plotAxes,tser,rawData,'g*'); plot(plotAxes,t,g);hold (plotAxes,'on');plot(plotAxes,tser,rawData,'g*');
plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off'); plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off');
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
% Store L R and K valves for Composite [C] plots % Store L R and K valves for Composite [C] plots
Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K; Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K;
Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast; Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast;
%************************************************************************
try for i=1:length(Exp(zoneSel).hOL(:)),set(Exp(zoneSel).hOL(i),'color',[0 0 1]); end, catch; end try for i=1:length(Exp(zoneSel).hOL(:)),set(Exp(zoneSel).hOL(i),'color',[0 0 1]); end, catch; end
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on; Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(zoneSel).hOL(traceN),'color',[1 0 0]) set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
Exp(zoneSel).hOLb(traceN)=plot(OLaxes,tser,rawData,'g*'); Exp(zoneSel).hOLb(traceN)=plot(OLaxes,tser,rawData,'g*');
catch catch
catchissue='Ln100 EZlstBoxExt' catchissue='Ln100 EZlstBoxExt'
end %trycatch end
% Get the DM agar description % Get the DM agar description
if expN==1,DMstr=char(get(handles.DM1,'string'));end if expN==1,DMstr=char(get(handles.DM1,'string'));end
@@ -221,7 +202,6 @@ Exp(zoneSel).hOLresDir(traceN)= {Exp(zoneSel).Dexp(DexpN).resDir};
Exp(zoneSel).hOLplateNum(traceN)=plateNum; Exp(zoneSel).hOLplateNum(traceN)=plateNum;
% traceData=vertcat(get(Exp(OLay).hOL(traceN),'XData'),get(ghandles.Exp(OLay).hOL(traceN),'YData')); % traceData=vertcat(get(Exp(OLay).hOL(traceN),'XData'),get(ghandles.Exp(OLay).hOL(traceN),'YData'));
if zoneSel==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value. if zoneSel==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value.
if zoneSel==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end if zoneSel==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end
if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end
@@ -231,14 +211,11 @@ if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);en
catch catch
catchissue='Ln141 EZlstBoxExt' catchissue='Ln141 EZlstBoxExt'
msg='Error' msg='Error'
end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot) end
end
end %if get(ghandles.CompositeTog1,'value')==1 % Write Spot and Exp Info to OLay title areas
if zoneSel==1 %&& get(ghandles.rotPB1,'value')~=1
%**************Write Spot and Exp Info to OLay title areas****************************************************************************
if zoneSel==1, %&& get(ghandles.rotPB1,'value')~=1
if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay1,'FontSize',8);end if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay1,'FontSize',8);end
set(ghandles.OLay1,'string', Exp(zoneSel).hOLname(traceN)); set(ghandles.OLay1,'string', Exp(zoneSel).hOLname(traceN));
if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp1,'FontSize',8);end if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp1,'FontSize',8);end
@@ -257,7 +234,7 @@ end %if get(ghandles.CompositeTog1,'value')==1
set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(traceN)); set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(traceN));
end end
%*****************Highlight gene/orf select Spot on Image********* % Highlight gene/orf select Spot on Image
tPtSel=Exp(zoneSel).Dexp(DexpN).tPtSel; tPtSel=Exp(zoneSel).Dexp(DexpN).tPtSel;
Rim=16-(LBr-1); Cim =LBc; Rim=16-(LBr-1); Cim =LBc;
spotCoor=Exp(zoneSel).Dexp(DexpN).FexpScanSpots{1,plateNum}{Cim,Rim,tPtSel}; spotCoor=Exp(zoneSel).Dexp(DexpN).FexpScanSpots{1,plateNum}{Cim,Rim,tPtSel};
@@ -267,21 +244,16 @@ spotCoor=Exp(zoneSel).Dexp(DexpN).FexpScanSpots{1,plateNum}{Cim,Rim,tPtSel};
%axes(ghandles.Iaxes1) %axes(ghandles.Iaxes1)
plot(expAxes,(spotCoor(2)+24),(spotCoor(1)+24),'.y') plot(expAxes,(spotCoor(2)+24),(spotCoor(1)+24),'.y')
% GraphicDestinationPerturbationComparison**15_0821
%***********************GraphicDestinationPerturbationComparison**15_0821************************************************
EZdatatip=0; %** EZdatatip=0; %**
if strcmp((Exp(expN).DexpType),'single')||... if strcmp((Exp(expN).DexpType),'single') ...
strcmp((Exp(expN).DexpType),'multi') || strcmp((Exp(expN).DexpType),'multi')
%**************** EZdestComp
EZdestComp %**
%****************
elseif strcmp((Exp(expN).DexpType),'chrono') elseif strcmp((Exp(expN).DexpType),'chrono')
%************ EZmDayTrend
EZmDayTrend %**
%************
end end
%***********************************************************************************************************************
%*********************HeatMap Text Field********************************* % HeatMap Text Field
try try
ll=num2str(l); ll=num2str(l);
if length(ll)>5,htl=ll(1:5);else htl=ll;end if length(ll)>5,htl=ll(1:5);else htl=ll;end
@@ -302,6 +274,4 @@ if expN==2,set(ghandles.HtMapVals2,'string',htmapStr);end
if expN==3,set(ghandles.HtMapVals3,'string',htmapStr);end if expN==3,set(ghandles.HtMapVals3,'string',htmapStr);end
catch catch
end end
end
end %if sgdInfoOnly==1

View File

@@ -1,18 +1,16 @@
%***********User find and build composite of Selected Gene Composite and % User find and build composite of Selected Gene Composite and
%*************Plot it on OLay Plot and Trend plot DNLaxles % Plot it on OLay Plot and Trend plot DNLaxles
%***************For Chonological Studies (multi Day Studies) % For Chonological Studies (multi Day Studies)
% Called when Composite_ toggle button is clicked. % Called when Composite_ toggle button is clicked.
% Data stored for printable Trend Plot production (click [L] in DNLaxes ) % Data stored for printable Trend Plot production (click [L] in DNLaxes )
%*********************
global ghandles global ghandles
global Exp global Exp
global exDlst global exDlst
global exFolder global exFolder
traceN=Exp(expN).traceN; traceN=Exp(expN).traceN;
DexpN=Exp(expN).DexpN; % Temp input for development DexpN=Exp(expN).DexpN; % Temp input for development
patrnN=strfind(selGnOrf{1},':'); %Extract Gene-Orf Name patrnN=strfind(selGnOrf{1},':'); %Extract Gene-Orf Name
patrndash=strfind(selGnOrf{1},'-'); patrndash=strfind(selGnOrf{1},'-');
selStrNm=char(selGnOrf) selStrNm=char(selGnOrf)
@@ -22,14 +20,14 @@ else
usrGene=selStrNm(1:(patrnN(1)-1)); usrGene=selStrNm(1:(patrnN(1)-1));
end end
prompt={'Enter Specifics Term if used to futher specify selection '} prompt={'Enter Specifics Term if used to futher specify selection '}
dlg_title='User Specifics Term for Refinement Composite'; dlg_title='User Specifics Term for Refinement Composite';
num_lines=1; num_lines=1;
def={'None'}; def={'None'};
answer=inputdlg(prompt,dlg_title,num_lines,def); answer=inputdlg(prompt,dlg_title,num_lines,def);
usrSpec=cell2mat(answer(1)); usrSpec=cell2mat(answer(1));
if strcmpi(usrSpec,'None'), usrGnSp= {strcat(usrGene,'-')}; if strcmpi(usrSpec,'None')
usrGnSp={strcat(usrGene,'-')};
elseif length(usrSpec)> 8, elseif length(usrSpec)> 8,
trimUspec=usrSpec(1:8); trimUspec=usrSpec(1:8);
usrGnSp=strcat(usrGene,',',{trimUspec}); usrGnSp=strcat(usrGene,',',{trimUspec});
@@ -38,29 +36,19 @@ end
usrGnSp=strcat(usrGene,',',{trimUspec}); usrGnSp=strcat(usrGene,',',{trimUspec});
end end
for n=1:Exp(expN).DexpLength % LOOP Thru DayExps for n=1:Exp(expN).DexpLength % LOOP Thru DayExps
MPnum=length(Exp(expN).Dexp(n).MP); MPnum=length(Exp(expN).Dexp(n).MP);
DMnum=length(Exp(expN).Dexp(n).DM.drug); DMnum=length(Exp(expN).Dexp(n).DM.drug);
%Extract expDay from ExpName string %Extract expDay from ExpName string
dayNpos=max(strfind(Exp(expN).Dexp(n).ExpFoldr, '_D')) dayNpos=max(strfind(Exp(expN).Dexp(n).ExpFoldr, '_D'))
dayLbl=Exp(expN).Dexp(n).ExpFoldr(dayNpos+1:end); dayLbl=Exp(expN).Dexp(n).ExpFoldr(dayNpos+1:end);
%*********************************
dRF1indx=0; dRF1indx=0;
usrSp=usrSpec; %user entry of Specifics for Ref selection usrSp=usrSpec; %user entry of Specifics for Ref selection
%*******************************************************
for mp=1:length(Exp(expN).Dexp(n).MP) for mp=1:length(Exp(expN).Dexp(n).MP)
for ind384=1:384 for ind384=1:384
try % try
% Insert test for numeric in genename and orf if isnumeric % Insert test for numeric in genename and orf if isnumeric
% Correct common EXCEL problem of converting OCT1 into a date numeric % Correct common EXCEL problem of converting OCT1 into a date numeric
if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991, if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991,
@@ -68,32 +56,25 @@ for mp=1:length(Exp(expN).Dexp(n).MP)
elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))) elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '}; Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '};
end end
%*****************************************************************
% DISPersed REFerence capture and find Medians % DISPersed REFerence capture and find Medians
if ( ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) && ... if ( ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) ...
strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),usrSp)))... && strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),usrSp))) ...
|| ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) && ... || ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) ...
strcmpi(usrSp,'None'))) ), && strcmpi(usrSp,'None'))) )
dRF1indx=dRF1indx+1; dRF1indx=dRF1indx+1;
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' ');
drf(dRF1indx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)); drf(dRF1indx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384));
drf(dRF1indx,2)={mp}; drfMP(dRF1indx,mp)=mp; drf(dRF1indx,2)={mp}; drfMP(dRF1indx,mp)=mp;
drf(dRF1indx,3)={ind384}; drfPindx(dRF1indx,mp)=ind384; drf(dRF1indx,3)={ind384}; drfPindx(dRF1indx,mp)=ind384;
%drf(dRF1indx,7)=(Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)); %drf(dRF1indx,7)=(Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384));
end
end %if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))),'blank'))...
%*******************************************************************************
catch catch
msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384)) msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end end
end % end associated with for ind384=1:384 end % end associated with for ind384=1:384
mp mp
end %end associated with for mp=1:length(Exp(expN).Dexp(n).MP) end
%*****************************************************
%************************************************************************************************
vvL=[]; %Initialize to cover case where all spot are Zero NoGrowth See NIGrowthflg==0 vvL=[]; %Initialize to cover case where all spot are Zero NoGrowth See NIGrowthflg==0
if exist('drf','var') if exist('drf','var')
@@ -107,47 +88,40 @@ for j=1:length(drf(:,3))
end end
end end
chgIndx(length(chgIndx)+1)=size(drf,1) +1; %length(drf)+1; chgIndx(length(chgIndx)+1)=size(drf,1) +1; %length(drf)+1;
vvL=zeros(size(drf,1),1 ); %length(drf)+1; vvL=zeros(size(drf,1),1 ); %length(drf)+1;
%************************************
dMPs=unique(cell2mat(drf(:,2))); dMPs=unique(cell2mat(drf(:,2)));
%*****************************************
for mm=1:length(dMPs) % length(chgIndx) for mm=1:length(dMPs) % length(chgIndx)
usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel); usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel);
NZusrIndx=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); medianIndxDisp=NZusrIndx; NZusrIndx=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); medianIndxDisp=NZusrIndx;
vvL(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZusrIndx,5); vvL(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZusrIndx,5);
%For Global Ref Composite 17_1009 %************************************************************************** % For Global Ref Composite 17_1009
vvK(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZusrIndx,3); vvK(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZusrIndx,3);
vvr(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZusrIndx,4); vvr(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZusrIndx,4);
%***************************************************************************************************** end
end %for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES******************************************************************
% Calc. Global Mean, Std, And Median For Distributed References
for d=dmSel:dmSel for d=dmSel:dmSel
NZusrIndxG=[]; NZusrIndxG=[];
NZusrIndxG=find(vvL); NZusrIndxG=find(vvL);
if isempty(nonzeros(vvL)), nonZeroCntD=0; if isempty(nonzeros(vvL))
else nonZeroCntD= length(nonzeros(vvL)); nonZeroCntD=0;
else
nonZeroCntD=length(nonzeros(vvL));
end end
% Calc. of median value for composite doesn't require and odd number of Indx items % Calc. of median value for composite doesn't require and odd number of Indx items
NZusrIndxG=NZusrIndxG(:); NZusrIndxG=NZusrIndxG(:);
if ~isempty(NZusrIndxG) && length(NZusrIndxG) > 0 %(.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZusrIndxG) && length(NZusrIndxG) > 0 %(.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero
UsrLvals{n}=vvL(NZusrIndxG); UsrLvals{n}=vvL(NZusrIndxG);
UsrKvals{n}=vvK(NZusrIndxG); UsrKvals{n}=vvK(NZusrIndxG);
Usrrvals{n}=vvr(NZusrIndxG); Usrrvals{n}=vvr(NZusrIndxG);
end end
end end
end
end
end % if exist('drf','var')
%END OF DISPERSE Gene data collection
%*********************************************************************
%####################################################################
end %for n=1:Exp(expN).DexpLength %Loop thru Dayexps
if ~exist('drf','var'), if ~exist('drf','var'),
errordlg('Gene-Specifics combination not found. Check spelling of Specifics entry.','Entry Warning'); errordlg('Gene-Specifics combination not found. Check spelling of Specifics entry.','Entry Warning');
break; break;
@@ -159,13 +133,9 @@ if isempty(vvL),
NoGrowthflg=1; NoGrowthflg=1;
end end
%Exp(expN).UgeneCnt=Exp(expN).UgeneCnt +1; %Exp(expN).UgeneCnt=Exp(expN).UgeneCnt +1;
%Exp(expN).UgeneSpLst(Exp(expN).UgeneCnt)=usrGnSp; %Exp(expN).UgeneSpLst(Exp(expN).UgeneCnt)=usrGnSp;
%####################################################################### % Plot Values Selected Gene-Specifics Composite
%***********PLOT Values Selected Gene-Specifics Composite ******************************************try
if NoGrowthflg==0 if NoGrowthflg==0
smpSz=size(NZusrIndxG,1); smpSz=size(NZusrIndxG,1);
K=median(cell2mat((UsrKvals(DexpN)))); Ks=num2str(K); Kstd=std(cell2mat((UsrKvals(DexpN)))); KstdStr=num2str(Kstd); K=median(cell2mat((UsrKvals(DexpN)))); Ks=num2str(K); Kstd=std(cell2mat((UsrKvals(DexpN)))); KstdStr=num2str(Kstd);
@@ -194,71 +164,63 @@ try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end
try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end
try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end
pertSel=Exp(zoneSel).Dexp(DexpN).pertSel; %floor(get(handles.DMsldr1,'value')); pertSel=Exp(zoneSel).Dexp(DexpN).pertSel; %floor(get(handles.DMsldr1,'value'));
plateNum=(LBmp-1)*destPerMP + pertSel; plateNum=(LBmp-1)*destPerMP + pertSel;
MP=Exp(zoneSel).Dexp(DexpN).MP; MP=Exp(zoneSel).Dexp(DexpN).MP;
try try
t=1:200; t=1:200;
clear g; clear g;
try try
g=K ./ (1 + exp(-r.* (t - l ))); g=K ./ (1 + exp(-r.* (t - l )));
gSlow=Kl ./ (1 + exp(-rl.* (t - lslow ))); gSlow=Kl ./ (1 + exp(-rl.* (t - lslow )));
gFast=Ku ./ (1 + exp(-ru.* (t - lfast ))); gFast=Ku ./ (1 + exp(-ru.* (t - lfast )));
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1; if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1;
Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1;
Exp(1).traceN=Exp(1).traceN+1; Exp(1).traceN=Exp(1).traceN+1;
traceN=Exp(1).traceN; traceN=Exp(1).traceN;
end end
if zoneSel==2, plotAxes=ghandles.Paxes2; OLaxes=ghandles.OLaxes2;Daxes=ghandles.Daxes2; if zoneSel==2
plotAxes=ghandles.Paxes2; OLaxes=ghandles.OLaxes2;Daxes=ghandles.Daxes2;
Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2;
Exp(2).traceN=Exp(2).traceN+1; Exp(2).traceN=Exp(2).traceN+1;
traceN=Exp(2).traceN; traceN=Exp(2).traceN;
end end
if zoneSel==3, plotAxes=ghandles.Paxes3; OLaxes=ghandles.OLaxes3;Daxes=ghandles.Daxes3; if zoneSel==3
plotAxes=ghandles.Paxes3; OLaxes=ghandles.OLaxes3;Daxes=ghandles.Daxes3;
Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3;
Exp(3).traceN=Exp(3).traceN+1; Exp(3).traceN=Exp(3).traceN+1;
traceN=Exp(3).traceN; traceN=Exp(3).traceN;
end end
plot(plotAxes,t,g);hold (plotAxes,'on'); plot(plotAxes,t,g);hold (plotAxes,'on');
plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off'); plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off');
Exp(expN).Trace(traceN).UsrGLB=usrGnSp; Exp(expN).Trace(traceN).UsrGLB=usrGnSp;
Exp(expN).Trace(traceN).dmSel=dmSel; Exp(expN).Trace(traceN).dmSel=dmSel;
for n=1:Exp(expN).DexpLength %LOOP Thru DayExps for n=1:Exp(expN).DexpLength % Loop Thru DayExps
Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).UsrLvals=UsrLvals(n); Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).UsrLvals=UsrLvals(n);
Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).UsrKvals=UsrKvals(n); Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).UsrKvals=UsrKvals(n);
Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).Usrrvals=Usrrvals(n); Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).Usrrvals=Usrrvals(n);
end end
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
% Store L R and K valves for manual selected Composite [C] plots % Store L R and K valves for manual selected Composite [C] plots
Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K; Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K;
Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast; Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast;
%************************************************************************
try for i=1:length(Exp(zoneSel).hOL(:)),set(Exp(zoneSel).hOL(i),'color',[0 0 1]); end, catch; end try for i=1:length(Exp(zoneSel).hOL(:)),set(Exp(zoneSel).hOL(i),'color',[0 0 1]); end, catch; end
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on; Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(zoneSel).hOL(traceN),'color',[1 0 0]) set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
catch catch
catchissue='Ln100 EZlstBoxExt' catchissue='Ln100 EZlstBoxExt'
end %trycatch end
%Get the DM agar description %Get the DM agar description
if expN==1,DMstr=char(get(handles.DM1,'string'));end if expN==1,DMstr=char(get(handles.DM1,'string'));end
if expN==2,DMstr=char(get(handles.DM2,'string'));end if expN==2,DMstr=char(get(handles.DM2,'string'));end
if expN==3,DMstr=char(get(handles.DM3,'string'));end if expN==3,DMstr=char(get(handles.DM3,'string'));end
gene=usrGnSp; orf='' %MP(1,LBmp).orf{1,1}(indx); gene=usrGnSp; orf='' %MP(1,LBmp).orf{1,1}(indx);
geneOrfstr=strcat(gene,'_',orf,'_'); geneOrfstr=strcat(gene,'_',orf,'_');
grfgenestr=strcat(gene,'_',orf,'_'); grfgenestr=strcat(gene,'_',orf,'_');
graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr); graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr);
spotDescrip=strcat(graphStr,'->',DMstr); spotDescrip=strcat(graphStr,'->',DMstr);
@@ -278,8 +240,6 @@ Exp(zoneSel).hOLexpNm(traceN)= expStr;
Exp(zoneSel).hOLresDir(traceN)={Exp(zoneSel).Dexp(DexpN).resDir}; Exp(zoneSel).hOLresDir(traceN)={Exp(zoneSel).Dexp(DexpN).resDir};
Exp(zoneSel).hOLplateNum(traceN)=plateNum; Exp(zoneSel).hOLplateNum(traceN)=plateNum;
if zoneSel==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value. if zoneSel==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value.
if zoneSel==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end if zoneSel==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end
if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end
@@ -287,6 +247,5 @@ if zoneSel==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end %graphStr);en
if zoneSel==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end if zoneSel==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end
if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end
catch catch
catchissue='Ln141 EZlstBoxExt'
msg='Error' msg='Error'
end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot) end

View File

@@ -1,23 +1,20 @@
%***********User find and build composite of Selected Gene Composite and % User find and build composite of Selected Gene Composite and
%*************Plot it on OLay Plot and Trend plot DNLaxles % Plot it on OLay Plot and Trend plot DNLaxles
%***************For Chonological Studies (multi Day Studies) % For Chonological Studies (multi Day Studies)
% Called when Composite_ toggle button is clicked. % Called when Composite_ toggle button is clicked.
% Data stored for printable Trend Plot production (click [L] in DNLaxes ) % Data stored for printable Trend Plot production (click [L] in DNLaxes )
%*********************
global ghandles global ghandles
global Exp global Exp
global exDlst global exDlst
global exFolder global exFolder
tracN=Exp(expN).traceN; tracN=Exp(expN).traceN;
n=Exp(expN).DexpN; % Temp input for development n=Exp(expN).DexpN; % Temp input for development
% UmDayaa=cell(3,n); UmDaybb=cell(3,n); % UmDayaa=cell(3,n); UmDaybb=cell(3,n);
patrnN=strfind(selGnOrf{1},':'); % Extract Gene-Orf Name patrnN=strfind(selGnOrf{1},':'); % Extract Gene-Orf Name
selStrNm=char(selGnOrf) selStrNm=char(selGnOrf)
usrGene=selStrNm(1:(patrnN(1)-1)) usrGene=selStrNm(1:(patrnN(1)-1))
prompt={'Enter Specifics Term if used to futher specify selection '} prompt={'Enter Specifics Term if used to futher specify selection '}
dlg_title='User Specifics Term for Refinement Composite'; dlg_title='User Specifics Term for Refinement Composite';
num_lines=1; num_lines=1;
@@ -29,9 +26,7 @@ usrGene= selStrNm(1:(patrnN(1)-1))
if strcmpi(usrSpec,'None'), usrGnSp={strcat(usrGene,'-')}; end if strcmpi(usrSpec,'None'), usrGnSp={strcat(usrGene,'-')}; end
% if strfind(Exp(expN).UgeneSpLst,usrGnSp), break; end % if strfind(Exp(expN).UgeneSpLst,usrGnSp), break; end
Exp(expN).Dexp(n).UsrmdPLB={[]}; Exp(expN).Dexp(n).UsrmdPLB={[]};
Exp(expN).Dexp(n).UsrMedianG=[]; Exp(expN).Dexp(n).UsrMedianG=[];
Exp(expN).Dexp(n).UsrminG=[]; Exp(expN).Dexp(n).UsrminG=[];
Exp(expN).Dexp(n).UsrmaxG=[]; Exp(expN).Dexp(n).UsrmaxG=[];
@@ -40,51 +35,40 @@ Exp(expN).Dexp(n).UsrmeanG= [];
Exp(expN).Dexp(n).UsrCmpGL=[]; % For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGL=[]; % For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGK=[]; % For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGK=[]; % For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGr=[]; % For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGr=[]; % For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrGLB={}; Exp(expN).Dexp(n).UsrGLB={};
for n=1:Exp(expN).DexpLength %LOOP Thru DayExps for n=1:Exp(expN).DexpLength % Loop Thru Dayexps
MPnum=length(Exp(expN).Dexp(n).MP); MPnum=length(Exp(expN).Dexp(n).MP);
DMnum=length(Exp(expN).Dexp(n).DM.drug); DMnum=length(Exp(expN).Dexp(n).DM.drug);
tPtsSize=size(Exp(expN).Dexp(n).FexpScanBMtp{1,1},(3)); tPtsSize=size(Exp(expN).Dexp(n).FexpScanBMtp{1,1},(3));
%*********************************
% lstindx=size(aa,1); % lstindx=size(aa,1);
% lstindxOrf=size(bb,1); % lstindxOrf=size(bb,1);
spN=0; spN=0;
rfcnt=0; rfcnt=0;
dRF1indx=0; dRF1indx=0;
% usrGene=cell2mat(usrGene); %user entry of Specifics for Ref selection % usrGene=cell2mat(usrGene); %user entry of Specifics for Ref selection
usrSp=cell2mat(usrSpec); %user entry of Specifics for Ref selection usrSp=cell2mat(usrSpec); %user entry of Specifics for Ref selection
%*******************************************************
for mp=1:length(Exp(expN).Dexp(n).MP) for mp=1:length(Exp(expN).Dexp(n).MP)
% RF1fullPlate=0; % RF1fullPlate=0;
for ind384=1:384 for ind384=1:384
spN=spN+1; spN=spN+1;
try
try %
r=ceil(ind384/24); r=ceil(ind384/24);
if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end
% Insert test for numeric in genename and orf if isnumeric % Insert test for numeric in genename and orf if isnumeric
% Correct common EXCEL problem of converting OCT1 into a date numeric % Correct common EXCEL problem of converting OCT1 into a date numeric
if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991, if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={'OCT1_'}; Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={'OCT1_'};
elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))) elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '}; Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '};
end end
%*****************************************************************
% DISPersed REFerence capture and find Medians % DISPersed REFerence capture and find Medians
if ( ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) && ... if ( ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) ...
strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),usrSp)))... && strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),usrSp))) ...
|| ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) && ... || ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),usrGene) ...
strcmpi(usrSp,'None'))) ), && strcmpi(usrSp,'None'))) )
dRF1indx=dRF1indx+1; dRF1indx=dRF1indx+1;
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' ');
drf(dRF1indx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)); drf(dRF1indx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384));
@@ -94,36 +78,25 @@ for mp=1:length(Exp(expN).Dexp(n).MP)
drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c; drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c;
drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384; drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384;
%drf(dRF1indx,7)=(Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)); %drf(dRF1indx,7)=(Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384));
end
end %if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))),'blank'))...
%*******************************************************************************
catch catch
error='EZexpSel lineAfter 24 EZmultiGeneLst.m' error='EZexpSel lineAfter 24 EZmultiGeneLst.m'
mp %Disable in future to prevent a bomb out OR put into a nested TryCatch mp %Disable in future to prevent a bomb out OR put into a nested TryCatch
ind384 %Disable in future to prevent a bomb out OR put into a nested TryCatch ind384 %Disable in future to prevent a bomb out OR put into a nested TryCatch
msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384)) msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end end
end
end %end associated with for ind384=1:384
mp mp
end %end associated with for mp=1:length(Exp(expN).Dexp(n).MP) end
%*****************************************************
%************************************************************************************************
% Exp(expN).Dexp(n).UsrmdPindx=[]; % Exp(expN).Dexp(n).UsrmdPindx=[];
% Exp(expN).Dexp(n).UsrmdPpltN=[]; % Exp(expN).Dexp(n).UsrmdPpltN=[];
if exist('drf','var') if exist('drf','var')
% Det. index of change from one MP to the next % Det. index of change from one MP to the next
i=2; i=2;
clear chgIndx clear chgIndx
chgIndx(1)=1; chgIndx(1)=1;
for j=1:length(drf(:,3)) for j=1:length(drf(:,3))
if j>1 if j>1
if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end end
@@ -132,20 +105,17 @@ chgIndx(length(chgIndx)+1)= length(drf)+1;
uu=zeros(size(drf,1),4); uu=zeros(size(drf,1),4);
uu(:,1:4)=cell2mat(drf(:,3:6)); uu(:,1:4)=cell2mat(drf(:,3:6));
vv=zeros(length(drf),1 ); % DMnum); vv=zeros(length(drf),1 ); % DMnum);
%************************************
dMPs=unique(cell2mat(drf(:,3))); dMPs=unique(cell2mat(drf(:,3)));
%*****************************************
for mm=1:length(dMPs) % length(chgIndx) for mm=1:length(dMPs) % length(chgIndx)
usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel); usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel);
NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); medianIndxDisp=NZrefIndxP; NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); medianIndxDisp=NZrefIndxP;
vv(chgIndx(mm):(chgIndx(mm+1)-1),dmSel)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,5); vv(chgIndx(mm):(chgIndx(mm+1)-1),dmSel)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,5);
%For Global Ref Composite 17_1009 %************************************************************************** % For Global Ref Composite 17_1009
vvK(chgIndx(mm):(chgIndx(mm+1)-1),dmSel)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3); vvK(chgIndx(mm):(chgIndx(mm+1)-1),dmSel)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3);
vvr(chgIndx(mm):(chgIndx(mm+1)-1),dmSel)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4); vvr(chgIndx(mm):(chgIndx(mm+1)-1),dmSel)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4);
%*****************************************************************************************************
end % for mm=1:length(dMPs) end % for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES****************************************************************** % Calc. Global Mean, Std, And Median For Distributed References
uu=horzcat(uu,vv); uu=horzcat(uu,vv);
for d=dmSel:dmSel for d=dmSel:dmSel
medianIndxG=[]; medianIndxG=[];
@@ -155,32 +125,27 @@ for d=dmSel:dmSel
usrmeanG=mean(nonzeros(vv(:,d))); usrmeanG=mean(nonzeros(vv(:,d)));
usrStdG=std(nonzeros(vv(:,d))); usrStdG=std(nonzeros(vv(:,d)));
NZusrIndxG=find(vv(:,d)); NZusrIndxG=find(vv(:,d));
if isempty(usrmeanG)
if isempty(usrmeanG), nonZeroCntD=0, %medianIndxDisp= RFmeanG(d); nonZeroCntD=0 % medianIndxDisp=RFmeanG(d);
else nonZeroCntD= length(nonzeros(vv(:,d))); else
nonZeroCntD=length(nonzeros(vv(:,d)));
end end
% Calc. of median value for composite doesn't require and odd number of Indx items % Calc. of median value for composite doesn't require and odd number of Indx items
medianIndxG=NZusrIndxG(:); medianIndxG=NZusrIndxG(:);
if ~isempty(NZusrIndxG) && length(medianIndxG) > 0 %(.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZusrIndxG) && length(medianIndxG) > 0 %(.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero
Exp(expN).Dexp(n).UsrGLB(d)=usrGnSp; % strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(n).UsrGLB(d)=usrGnSp; % strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(n).UsrLvals=vv(medianIndxG); Exp(expN).Dexp(n).UsrLvals=vv(medianIndxG);
Exp(expN).Dexp(n).UsrKvals=vvK(medianIndxG); Exp(expN).Dexp(n).UsrKvals=vvK(medianIndxG);
Exp(expN).Dexp(n).Usrrvals=vvr(medianIndxG); Exp(expN).Dexp(n).Usrrvals=vvr(medianIndxG);
end end
end end
end
end
end % if exist('drf','var')
%END OF DISPERSE REFERENCE PLATAES CALCULATIONS AND LIST ADDITIONS
%*********************************************************************
%####################################################################
end %for n=1:Exp(expN).DexpLength %Loop thru Dayexps
Exp(expN).UgeneCnt=Exp(expN).UgeneCnt +1; Exp(expN).UgeneCnt=Exp(expN).UgeneCnt +1;
Exp(expN).UgeneSpLst(Exp(expN).UgeneCnt)=usrGnSp; Exp(expN).UgeneSpLst(Exp(expN).UgeneCnt)=usrGnSp;
%#######################################################################
% PLOT Values Selected Gene-Specifics Composite
%***********PLOT Values Selected Gene-Specifics Composite ******************************************try
smpSz=size(medianIndxG,1); smpSz=size(medianIndxG,1);
K=median(vvK(medianIndxG,dmSel)); Ks=num2str(K); Kstd=std(vvK(medianIndxG,dmSel)); KstdStr=num2str(Kstd); K=median(vvK(medianIndxG,dmSel)); Ks=num2str(K); Kstd=std(vvK(medianIndxG,dmSel)); KstdStr=num2str(Kstd);
r=median(vvr(medianIndxG,dmSel)); rs=num2str(r); rstd=std(vvr(medianIndxG,dmSel)); rstdStr=num2str(rstd); r=median(vvr(medianIndxG,dmSel)); rs=num2str(r); rstd=std(vvr(medianIndxG,dmSel)); rstdStr=num2str(rstd);
@@ -196,23 +161,19 @@ try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end
try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end
try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end
pertSel=Exp(zoneSel).Dexp(DexpN).pertSel; %floor(get(handles.DMsldr1,'value')); pertSel=Exp(zoneSel).Dexp(DexpN).pertSel; %floor(get(handles.DMsldr1,'value'));
plateNum=(LBmp-1)*destPerMP + pertSel; plateNum=(LBmp-1)*destPerMP + pertSel;
indx=((LBr-1)*24) +LBc indx=((LBr-1)*24) +LBc
MP=Exp(zoneSel).Dexp(DexpN).MP; MP=Exp(zoneSel).Dexp(DexpN).MP;
try try
t=1:200; t=1:200;
clear g; clear g;
try try
g=K ./ (1 + exp(-r.* (t - l ))); g=K ./ (1 + exp(-r.* (t - l )));
gSlow=Kl ./ (1 + exp(-rl.* (t - lslow ))); gSlow=Kl ./ (1 + exp(-rl.* (t - lslow )));
gFast=Ku ./ (1 + exp(-ru.* (t - lfast ))); gFast=Ku ./ (1 + exp(-ru.* (t - lfast )));
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1; if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1;
Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1;
Exp(1).traceN=Exp(1).traceN+1; Exp(1).traceN=Exp(1).traceN+1;
@@ -230,26 +191,25 @@ if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
end end
plot(plotAxes,t,g);hold (plotAxes,'on'); plot(plotAxes,t,g);hold (plotAxes,'on');
plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off'); plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off');
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
% Store L R and K valves for Composite [C] plots % Store L R and K valves for Composite [C] plots
Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K; Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K;
Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast; Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast;
%************************************************************************ try
try for i=1:length(Exp(zoneSel).hOL(:)),set(Exp(zoneSel).hOL(i),'color',[0 0 1]); end, catch; end for i=1:length(Exp(zoneSel).hOL(:))
set(Exp(zoneSel).hOL(i),'color',[0 0 1]);
end
catch
end
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on; Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(zoneSel).hOL(traceN),'color',[1 0 0]) set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
catch catch
catchissue='Ln100 EZlstBoxExt' catchissue='Ln100 EZlstBoxExt'
end %trycatch end
% Get the DM agar description % Get the DM agar description
if expN==1,DMstr=char(get(handles.DM1,'string'));end if expN==1,DMstr=char(get(handles.DM1,'string'));end
if expN==2,DMstr=char(get(handles.DM2,'string'));end if expN==2,DMstr=char(get(handles.DM2,'string'));end
if expN==3,DMstr=char(get(handles.DM3,'string'));end if expN==3,DMstr=char(get(handles.DM3,'string'));end
gene=usrGnSp; orf='' % MP(1,LBmp).orf{1,1}(indx); gene=usrGnSp; orf='' % MP(1,LBmp).orf{1,1}(indx);
geneOrfstr=strcat(gene,'_',orf,'_'); geneOrfstr=strcat(gene,'_',orf,'_');
grfgenestr=strcat(gene,'_',orf,'_'); grfgenestr=strcat(gene,'_',orf,'_');
@@ -259,7 +219,6 @@ if expN==3,DMstr=char(get(handles.DM3,'string'));end
% graphStr=strcat(grfgenestr,'_','L=',Lstr,'_','r=',rstr,'_','K=',Kstr); % graphStr=strcat(grfgenestr,'_','L=',Lstr,'_','r=',rstr,'_','K=',Kstr);
graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr); graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr);
spotDescrip=strcat(graphStr,'->',DMstr); spotDescrip=strcat(graphStr,'->',DMstr);
xp=char(Exp(zoneSel).Dexp(DexpN).resDir); xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
if ispc, if ispc,
slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\'); slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\');
@@ -284,58 +243,12 @@ if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end
if zoneSel==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end %graphStr);end % Displays the value. if zoneSel==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end %graphStr);end % Displays the value.
if zoneSel==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end if zoneSel==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end
if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end
catch catch ME
catchissue='Ln141 EZlstBoxExt' msg='ME.message';
msg='Error'
end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot) end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot)
% Deprecated functions
%{ %{
% If a specific spot median is ever needed % If a specific spot median is ever needed
%Calc. of EXACT median specific culture requires an odd number of indx items %Calc. of EXACT median specific culture requires an odd number of indx items

View File

@@ -1,13 +1,12 @@
% GraphicDestinationPertibationComparison**15_821 % GraphicDestinationPertibationComparison**15_821
% Called by EZlstBoxExt or EZvDatatip.m, Then calls EZRFs4DayComp % Called by EZlstBoxExt or EZvDatatip.m, Then calls EZRFs4DayComp
CompositeTrendFlg=0; CompositeTrendFlg=0;
if expN==1 && get(ghandles.CompositeTog1,'value')==1 ||... if expN==1 && get(ghandles.CompositeTog1,'value')==1 ...
expN==2 && get(ghandles.CompositeTog2,'value')==1 ||... || expN==2 && get(ghandles.CompositeTog2,'value')==1 ...
expN==3 && get(ghandles.CompositeTog3,'value')==1. || expN==3 && get(ghandles.CompositeTog3,'value')==1
CompositeTrendFlg=1; CompositeTrendFlg=1;
end end
% if (isequal(destcompMsg,'GoodDataTip')&&~isequal(destcompMsg, 'BadDataTip'))|| isequal(destcompMsg,'Olay') % if (isequal(destcompMsg,'GoodDataTip')&&~isequal(destcompMsg, 'BadDataTip'))|| isequal(destcompMsg,'Olay')
% hold off % hold off
if expN==1,DexpN=(get(ghandles.DN1,'value')); end if expN==1,DexpN=(get(ghandles.DN1,'value')); end
@@ -21,9 +20,6 @@
if expN==3,pertSel=floor(get(ghandles.DMsldr3,'value')); end if expN==3,pertSel=floor(get(ghandles.DMsldr3,'value')); end
dmSel=pertSel; dmSel=pertSel;
if EZdatatip==1 %adaptation for image spot selection if EZdatatip==1 %adaptation for image spot selection
%plNums=plateNum; %plNums=plateNum;
destPerMP=Exp(expN).Dexp(DexpN).destPerMP; destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
@@ -33,11 +29,9 @@ if EZdatatip==1 %adaptation for image spot selection
if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end
if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end
if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end
if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end
if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end
if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end
elseif EZdatatip==2 % adaption for Overlay plot selection elseif EZdatatip==2 % adaption for Overlay plot selection
destPerMP=Exp(expN).Dexp(DexpN).destPerMP; destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
MPlateN=ceil(OLplateNum/destPerMP); MPlateN=ceil(OLplateNum/destPerMP);
@@ -50,7 +44,6 @@ elseif EZdatatip==2 %adaption for Overlay plot selection
if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222 if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222
if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222 if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222
if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222 if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222
elseif EZdatatip==0 elseif EZdatatip==0
if lstBoxCmpFlg~=1 if lstBoxCmpFlg~=1
% destPerMP=Exp(expN).Dexp(DexpN).destPerMP; % destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
@@ -70,19 +63,16 @@ elseif EZdatatip==0
end end
if EZdatatip==2 % Response to Overlay click if EZdatatip==2 % Response to Overlay click
%++++++++++++++++++++LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL+++++++++++++++++++++++
% seltraceN comes from EZvDatatip; % seltraceN comes from EZvDatatip;
% Exp(OLay).seltraceN iscaptured from EZvDatatip % Exp(OLay).seltraceN iscaptured from EZvDatatip
% if an OLay trace is selected % if an OLay trace is selected
% else it is captured below if EZdatatip is not equal to 2 % else it is captured below if EZdatatip is not equal to 2
try try
set(Exp(zoneSel).hLRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','on'); set(Exp(zoneSel).hLRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','on');
catch, end catch, end
try try
set(Exp(zoneSel).hL(seltraceN),'visible','on'); set(Exp(zoneSel).hLb(seltraceN),'visible','on'); set(Exp(zoneSel).hL(seltraceN),'visible','on'); set(Exp(zoneSel).hLb(seltraceN),'visible','on');
catch, end catch, end
% Plot new intL % Plot new intL
try try
set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on'); set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on');
@@ -92,7 +82,7 @@ if EZdatatip==2 %Response to Overlay click
catch, end catch, end
if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
%++++++++++++++++++++++KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK++++++++++++++++++++++ % K values
for J=1:(tracN), for J=1:(tracN),
try try
set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off'); set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
@@ -107,8 +97,7 @@ if EZdatatip==2 %Response to Overlay click
try try
set(Exp(zoneSel).hK(seltraceN),'visible','on'); set(Exp(zoneSel).hKb(seltraceN),'visible','on'); set(Exp(zoneSel).hK(seltraceN),'visible','on'); set(Exp(zoneSel).hKb(seltraceN),'visible','on');
catch, end catch, end
%+++++++++++++++++++++rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr+++++++++++++++++++++++++++++ for J=1:(tracN)
for J=1:(tracN),
try try
set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off'); set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
catch, end catch, end
@@ -122,8 +111,7 @@ if EZdatatip==2 %Response to Overlay click
try try
set(Exp(zoneSel).hr(seltraceN),'visible','on'); set(Exp(zoneSel).hrb(seltraceN),'visible','on'); set(Exp(zoneSel).hr(seltraceN),'visible','on'); set(Exp(zoneSel).hrb(seltraceN),'visible','on');
catch, end catch, end
else % if EZdatatip==1 or if EZdatatip==0
else %if EZdatatip==1 or if EZdatatip==0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
% Attempt fix for overlaying L and intL from image datatip==1 18_0103 % Attempt fix for overlaying L and intL from image datatip==1 18_0103
try try
set(Exp(zoneSel).hLRF1(seltraceN),'visible','off'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','off'); set(Exp(zoneSel).hLRF1(seltraceN),'visible','off'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','off');
@@ -140,40 +128,29 @@ else %if EZdatatip==1 or if EZdatatip==0 ++++++++++++++++++++++++++++++++++++++
set(Exp(zoneSel).hintLadj(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadj(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','off');
catch, end catch, end
% Plot RFmd1 and RFmd2 indexes
%*************Plot RFmd1 and RFmd2 indexes*********************
if lstBoxCmpFlg~=1 % If selection is a "normal" item with a location in the label if lstBoxCmpFlg~=1 % If selection is a "normal" item with a location in the label
days=Exp(expN).DexpLength; days=Exp(expN).DexpLength;
for nn=1:Exp(expN).DexpLength % length(Exp(zoneSel).Dexp) for nn=1:Exp(expN).DexpLength % length(Exp(zoneSel).Dexp)
RFconfig=Exp(zoneSel).Dexp(DexpN).RFconfig; RFconfig=Exp(zoneSel).Dexp(DexpN).RFconfig;
%***************************** EZRFs4DayComp
EZRFs4DayComp %***************
%*****************************
if lstBoxCmpFlg~=1 if lstBoxCmpFlg~=1
Exp(zoneSel).seltraceN=tracN; Exp(zoneSel).seltraceN=tracN;
seltraceN=tracN; seltraceN=tracN;
end end
%**************Plot L K r for all Day pertibation(XdestinationX) Plates*************** % Plot L K r for all Day pertibation(XdestinationX) Plates
try RF1mdNums=(RF1mdPltN-1)*destPerMP + (pertSel); catch, end % RF1mdPltN
try RF1mdNums= (RF1mdPltN-1)*destPerMP + (pertSel); catch, end %RF1mdPltN % try RF2mdNums=(RF2mdPltN-1)*destPerMP + (pertSel); catch, end % RF2mdPltN
try RF2mdNums= (RF2mdPltN-1)*destPerMP + (pertSel); catch, end %RF2mdPltN %
if CompositeTrendFlg==0 || EZdatatip==1 if CompositeTrendFlg==0 || EZdatatip==1
lvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,5); lvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,5);
if lvals(nn)==0, lvals(nn)=140; end if lvals(nn)==0, lvals(nn)=140; end
kvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,3); kvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,3);
rvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,4); rvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,4);
Exp(expN).Trace(traceN).dmSel=pertSel; Exp(expN).Trace(traceN).dmSel=pertSel;
Exp(expN).Trace(traceN).UsrGLB=selGnOrf; %usrGnSp; Exp(expN).Trace(traceN).UsrGLB=selGnOrf; %usrGnSp;
Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).UsrLvals=lvals(nn); Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).UsrLvals=lvals(nn);
Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).UsrKvals=kvals(nn); Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).UsrKvals=kvals(nn);
Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals=rvals(nn); Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals=rvals(nn);
elseif CompositeTrendFlg==1 && EZdatatip==0 % Gene-Specifics Composite from listBox elseif CompositeTrendFlg==1 && EZdatatip==0 % Gene-Specifics Composite from listBox
days=Exp(expN).DexpLength; days=Exp(expN).DexpLength;
if iscell(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals) if iscell(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals)
@@ -187,8 +164,7 @@ Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals= rvals(nn);
kvals(nn)=median(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrKvals); kvals(nn)=median(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrKvals);
rvals(nn)=median(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).Usrrvals); rvals(nn)=median(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).Usrrvals);
end end
end %if CompositeTrendFlg==0 || EZdatatip==1 end
try try
% lvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx(nn),5); % lvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx(nn),5);
lvalsRF1md(nn)=RFmdVal(nn); %RFmdVal(nn) gets the above if 'F', or the global median if 'G' or the local median if 'L' selected lvalsRF1md(nn)=RFmdVal(nn); %RFmdVal(nn) gets the above if 'F', or the global median if 'G' or the local median if 'L' selected
@@ -215,7 +191,6 @@ Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals= rvals(nn);
rvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx,4); rvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx,4);
catch catch
end end
% Added for INTERACTION Calculating Utility 2016_0219 % Added for INTERACTION Calculating Utility 2016_0219
try try
if CompositeTrendFlg==0 || EZdatatip==1 % 18_0103 Add || EZdatatip==1 if CompositeTrendFlg==0 || EZdatatip==1 % 18_0103 Add || EZdatatip==1
@@ -235,23 +210,18 @@ Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals= rvals(nn);
else else
deltaXR(nn)=Xhn(nn)-(Rn(nn)-Rs(nn)); deltaXR(nn)=Xhn(nn)-(Rn(nn)-Rs(nn));
end end
catch catch
msg='No Refs! ->No Interaction Calculations!' msg='No Refs! ->No Interaction Calculations!'
end end
end %for nn=1:Exp(expN).DexpLength end
%**************************ELSEIF elseif lstBoxCmpFlg==1 % determine values of RF1cmp or RFcmpG
elseif lstBoxCmpFlg==1 %Determine values of RF1cmp or RFcmpG
days=Exp(expN).DexpLength; days=Exp(expN).DexpLength;
if strcmp(Exp(expN).DexpType,'chrono'), DM=inDM; else DM=pertSel; end % else DM=dmSel; if strcmp(Exp(expN).DexpType,'chrono'), DM=inDM; else DM=pertSel; end % else DM=dmSel;
Exp(zoneSel).seltraceN=tracN; % added fix 2020_1103 Exp(zoneSel).seltraceN=tracN; % added fix 2020_1103
seltraceN=tracN; % added fix 2020_1103 seltraceN=tracN; % added fix 2020_1103
for nn=1:Exp(expN).DexpLength % length(Exp(zoneSel).Dexp) for nn=1:Exp(expN).DexpLength % length(Exp(zoneSel).Dexp)
RFconfig=Exp(zoneSel).Dexp(DexpN).RFconfig; RFconfig=Exp(zoneSel).Dexp(DexpN).RFconfig;
%***************************** EZRFs4DayComp
EZRFs4DayComp %***************
%*****************************
if RFcmpGFlg==0 % RF1cmp or RF2cmp clicked if RFcmpGFlg==0 % RF1cmp or RF2cmp clicked
lvals(nn)=Exp(expN).Dexp(nn).RFcmpL(RFnum).dm(DM).med; lvals(nn)=Exp(expN).Dexp(nn).RFcmpL(RFnum).dm(DM).med;
if lvals(nn)==0, lvals(dm)=140; end if lvals(nn)==0, lvals(dm)=140; end
@@ -263,7 +233,6 @@ Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals= rvals(nn);
kvals(nn)=Exp(expN).Dexp(nn).RFcmpGK.dm(DM).med; % Ks=num2str(K); kvals(nn)=Exp(expN).Dexp(nn).RFcmpGK.dm(DM).med; % Ks=num2str(K);
rvals(nn)=Exp(expN).Dexp(nn).RFcmpGr.dm(DM).med; % rs=num2str(r); rvals(nn)=Exp(expN).Dexp(nn).RFcmpGr.dm(DM).med; % rs=num2str(r);
end end
% Added for INTERACTION Calculating Utility 2016_0219 % Added for INTERACTION Calculating Utility 2016_0219
try try
Xn(nn)=lvals(nn); Xn(nn)=lvals(nn);
@@ -282,30 +251,16 @@ Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals= rvals(nn);
else else
deltaXR(nn)=Xhn(nn)-(Rn(nn)-Rs(nn)); deltaXR(nn)=Xhn(nn)-(Rn(nn)-Rs(nn));
end end
catch catch
msg='No Refs! ->No Interaction Calculations!' msg='No Refs! ->No Interaction Calculations!'
end end
end
end % Second for nn loop lstBoxCmpFlg==1 %for nn=1:Exp(expN).DexpLength end
end %if lstBoxCmpFlg~= 1
%end %end
%///////////////////////////////////////////////////////////////////
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
% Interaction Plotting Utility 2016_0219
%***********INTERACTION Plotting Utility 2016_0219*********************************************
try try
if Rn(1)==0, % If Ref mean is zero if Rn(1)==0 % If Ref mean is zero
intL=0; proGrIntL=0; intLadj=0; proGrIntLadj=0; intL=0; proGrIntL=0; intLadj=0; proGrIntLadj=0;
intNormL=6.66;intNormLadj=6.66; proGrIntNormL=6.66;proGrIntNormLadj=6.66; intNormL=6.66;intNormLadj=6.66; proGrIntNormL=6.66;proGrIntNormLadj=6.66;
else else
@@ -313,14 +268,12 @@ else
intL=(Xn-Rn); intL=(Xn-Rn);
intL(Xn==0)=140; intL(Xn==0)=140;
intLadj=(deltaXR); intLadj=(deltaXR);
Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL=intL; Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL=intL;
end end
catch catch
FailMessage='Problem with Reference Rn value; Unable to produce Interaction values! Ln119 EZdestComp' FailMessage='Problem with Reference Rn value; Unable to produce Interaction values! Ln119 EZdestComp'
end end
hidem(ghandles.Daxes1) hidem(ghandles.Daxes1)
if zoneSel==1,showm(ghandles.Dlaxes1);showm(ghandles.Dkaxes1);showm(ghandles.Draxes1);end if zoneSel==1,showm(ghandles.Dlaxes1);showm(ghandles.Dkaxes1);showm(ghandles.Draxes1);end
if zoneSel==2,showm(ghandles.Dlaxes2);showm(ghandles.Dkaxes2);showm(ghandles.Draxes2);end if zoneSel==2,showm(ghandles.Dlaxes2);showm(ghandles.Dkaxes2);showm(ghandles.Draxes2);end
@@ -333,7 +286,6 @@ end
if zoneSel==3,showm(ghandles.DNLaxes3); end if zoneSel==3,showm(ghandles.DNLaxes3); end
set(DNLaxes,'NextPlot','add'); set(DNLaxes,'NextPlot','add');
%+++++++++++++++++LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL+++++++++++++++++++++++++++++++++
% Make visible the current L plot and store it for retrieval by OLay code % Make visible the current L plot and store it for retrieval by OLay code
% Plot RF1 and/or RF2 OR if No RF1-RF2 Plot RFcmpGL % Plot RF1 and/or RF2 OR if No RF1-RF2 Plot RFcmpGL
try %Some experiments do not have ref. plates try %Some experiments do not have ref. plates
@@ -358,17 +310,16 @@ end
Exp(zoneSel).hLRF1(tracN)=plot(Dlaxes,lvalsRF1md,1:days,'y'); Exp(zoneSel).hLRF1(tracN)=plot(Dlaxes,lvalsRF1md,1:days,'y');
catch catch
end end
%************************************************************ % Plot User Selection Data
%Plot USER SELECTION DATA**************************************
try try
Exp(zoneSel).hL(tracN)=plot(Dlaxes,lvals,1:days); Exp(zoneSel).hLb(tracN)=plot(Dlaxes,lvals,1:days,'rs'); Exp(zoneSel).hL(tracN)=plot(Dlaxes,lvals,1:days); Exp(zoneSel).hLb(tracN)=plot(Dlaxes,lvals,1:days,'rs');
catch catch
end end
%*************************************************************
if zoneSel==1,set(ghandles.Dlaxes1,'xlim',[0,140]); end if zoneSel==1,set(ghandles.Dlaxes1,'xlim',[0,140]); end
if zoneSel==2,set(ghandles.Dlaxes2,'xlim',[0,140]); end if zoneSel==2,set(ghandles.Dlaxes2,'xlim',[0,140]); end
if zoneSel==3,set(ghandles.Dlaxes3,'xlim',[0,140]); end if zoneSel==3,set(ghandles.Dlaxes3,'xlim',[0,140]); end
%*************************************************
% Make visible Plot for Interaction Data, Store and Hide unless a N (InteractionPBsel) set that plot on Top of the RawData Plots. % Make visible Plot for Interaction Data, Store and Hide unless a N (InteractionPBsel) set that plot on Top of the RawData Plots.
% Plot new intL % Plot new intL
try try
@@ -376,17 +327,14 @@ end
% Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:days,'y'); % Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:days,'y');
Exp(zoneSel).hintL(tracN)= plot(DNLaxes,intL,1:days); Exp(zoneSel).hintLb(tracN)=plot(DNLaxes,intL,1:days,'rs'); Exp(zoneSel).hintL(tracN)= plot(DNLaxes,intL,1:days); Exp(zoneSel).hintLb(tracN)=plot(DNLaxes,intL,1:days,'rs');
Exp(zoneSel).hintLadj(tracN)= plot(DNLaxes,intLadj,1:days,'g'); Exp(zoneSel).hintLadjb(tracN)=plot(DNLaxes,intLadj,1:days,'gs'); Exp(zoneSel).hintLadj(tracN)= plot(DNLaxes,intLadj,1:days,'g'); Exp(zoneSel).hintLadjb(tracN)=plot(DNLaxes,intLadj,1:days,'gs');
catch, catch
end end
if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
if zoneSel==2,set(ghandles.DNLaxes2,'xlim',[-75,75]); end if zoneSel==2,set(ghandles.DNLaxes2,'xlim',[-75,75]); end
if zoneSel==3,set(ghandles.DNLaxes3,'xlim',[-75,75]); end if zoneSel==3,set(ghandles.DNLaxes3,'xlim',[-75,75]); end
%+++++++++++++++++KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK+++++++++++++++++++++++++++++++++++++++++++++++++++++++
% Hide all K plots % Hide all K plots
for J=1:(tracN-1)
for J=1:(tracN-1),
try try
set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off'); set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
catch, end catch, end
@@ -394,6 +342,7 @@ end
set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off'); set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off');
catch, end catch, end
end end
% Make visible the current L plot and store it for retrieval by OLay code % Make visible the current L plot and store it for retrieval by OLay code
try % Some experiments do not have ref. plates try % Some experiments do not have ref. plates
Exp(zoneSel).hKRF1(tracN)=plot(Dkaxes,kvalsRF1md,1:days,'y'); Exp(zoneSel).hKRF1(tracN)=plot(Dkaxes,kvalsRF1md,1:days,'y');
@@ -404,10 +353,9 @@ end
catch, end catch, end
set(Dkaxes,'xlim',[0,200]) % max(kvals+20) set(Dkaxes,'xlim',[0,200]) % max(kvals+20)
set(Dkaxes,'ycolor',[.9,.9,1]) set(Dkaxes,'ycolor',[.9,.9,1])
%++++++++++++++++++rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr+++++++++++++++++++++++++++++++++++++++++++++++
%Hide all r plots
for J=1:(tracN-1), % Hide all r plots
for J=1:(tracN-1)
try try
set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off'); set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
catch, end catch, end
@@ -415,6 +363,7 @@ end
set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off'); set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off');
catch, end catch, end
end end
% Make visible the current r plot and store it for retrieval by OLay code % Make visible the current r plot and store it for retrieval by OLay code
try % Some experiments do not have ref. plates try % Some experiments do not have ref. plates
Exp(zoneSel).hrRF1(tracN)=plot(Draxes,rvalsRF1md,1:days,'y'); Exp(zoneSel).hrRF1(tracN)=plot(Draxes,rvalsRF1md,1:days,'y');
@@ -425,10 +374,7 @@ end
catch, end catch, end
set(Draxes,'xlim',[0,1]) set(Draxes,'xlim',[0,1])
set(Draxes,'ycolor',[.9,.9,1]) set(Draxes,'ycolor',[.9,.9,1])
end
end %if EZdatatip==2 Response to Overlay click
if CompositeTrendFlg==1 && EZdatatip~=0 if CompositeTrendFlg==1 && EZdatatip~=0
% lbLKr=strcat(gene,'_',spec,'_'); % lbLKr=strcat(gene,'_',spec,'_');
@@ -448,16 +394,13 @@ end
if zoneSel==3, set(ghandles.geneOrfLKr3,'string', grfgenestr);end if zoneSel==3, set(ghandles.geneOrfLKr3,'string', grfgenestr);end
%********************************************************************************************************************* % Display Selection PlotFilter
%*********************************************************************************************************************
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%___________________________________Display Selection PlotFilter ____________________
if lstBoxCmpFlg~=1, if lstBoxCmpFlg~=1,
seltraceN=Exp(zoneSel).seltraceN seltraceN=Exp(zoneSel).seltraceN
end end
if EZdatatip==0, seltraceN=tracN; end if EZdatatip==0, seltraceN=tracN; end
if Exp(4).interacPBsel==0 %00000000000000000000000000000 if Exp(4).interacPBsel==0
% replace ghandles.DNLaxes1 (Dlaxes2)etc. with a single % replace ghandles.DNLaxes1 (Dlaxes2)etc. with a single
% Exp(zoneSel).DNLaxes,.... % Exp(zoneSel).DNLaxes,....
set(ghandles.Dlaxes1,'Visible','on') set(ghandles.Dlaxes1,'Visible','on')
@@ -474,7 +417,6 @@ end
try try
set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off'); set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off');
catch, end catch, end
try try
set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off'); set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off');
catch, end catch, end
@@ -492,10 +434,7 @@ end
for i=1:Exp(zoneSel).expLoadCnt, for i=1:Exp(zoneSel).expLoadCnt,
try set(Exp(zoneSel).hzeroCLn(i),'visible','off'); catch ME, end try set(Exp(zoneSel).hzeroCLn(i),'visible','off'); catch ME, end
end end
elseif Exp(4).interacPBsel==1
elseif Exp(4).interacPBsel==1 %111111111111111111111111111
set(ghandles.DNLaxes1,'Visible','on') set(ghandles.DNLaxes1,'Visible','on')
set(ghandles.DNLaxes2,'Visible','on') set(ghandles.DNLaxes2,'Visible','on')
set(ghandles.DNLaxes3,'Visible','on') set(ghandles.DNLaxes3,'Visible','on')
@@ -503,7 +442,6 @@ end
set(ghandles.Dlaxes2,'Visible','off') set(ghandles.Dlaxes2,'Visible','off')
set(ghandles.Dlaxes3,'Visible','off') set(ghandles.Dlaxes3,'Visible','off')
for n=1:Exp(zoneSel).traceN for n=1:Exp(zoneSel).traceN
try set(Exp(zoneSel).hLRF1(n),'visible','off'); catch, end try set(Exp(zoneSel).hLRF1(n),'visible','off'); catch, end
try set(Exp(zoneSel).hLRF2(n),'visible','off'); catch, end try set(Exp(zoneSel).hLRF2(n),'visible','off'); catch, end
@@ -513,24 +451,11 @@ end
end end
try set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on'); catch, end try set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on'); catch, end
try set(Exp(zoneSel).hintLadj(seltraceN),'visible','on'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','on'); catch, end try set(Exp(zoneSel).hintLadj(seltraceN),'visible','on'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','on'); catch, end
for i=1:Exp(zoneSel).expLoadCnt, for i=1:Exp(zoneSel).expLoadCnt
try set(Exp(zoneSel).hzeroCLn(i),'visible','on'); catch ME, end try set(Exp(zoneSel).hzeroCLn(i),'visible','on'); catch ME, end
end end
elseif Exp(4).interacPBsel==2 %2222222222222222222222222222 TEMPorily Same as interacPBsel==1 elseif Exp(4).interacPBsel==2
% set(ghandles.DNLaxes1,'Visible','on') end
%set(ghandles.Dlaxes1,'Visible','off')
end %if Exp(4).interacPBsel==0
%pause(2)
%------------------------------------------------------------------------------------------------------------
%=====================================================================================================================
%end %if isempty(msg)
%{ %{
% Attempt fix for overlaying L and intL from image datatip==1 18_0103 % Attempt fix for overlaying L and intL from image datatip==1 18_0103
@@ -552,7 +477,6 @@ end
set(Exp(zoneSel).hintLadj(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadj(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','off');
catch, end catch, end
end end
%} %}

View File

@@ -8,8 +8,8 @@ d=strfind(exDlst,'_');
clear expDlstS clear expDlstS
ii=0; ii=0;
for n=1:(size(c,1)) for n=1:(size(c,1))
if ((sum(ismember(cell2mat(c(n)),[3,4]))==1 && ~isempty(ismember(cell2mat(c(n)),[3,4]))) ||... if ((sum(ismember(cell2mat(c(n)),[3,4]))==1 && ~isempty(ismember(cell2mat(c(n)),[3,4]))) ...
(sum(ismember(cell2mat(d(n)),[3,4]))==1 && ~isempty(ismember(cell2mat(d(n)),[3,4])))) || (sum(ismember(cell2mat(d(n)),[3,4]))==1 && ~isempty(ismember(cell2mat(d(n)),[3,4]))))
ii=ii+1; ii=ii+1;
expDlst(ii)=exDlst(n); expDlst(ii)=exDlst(n);
end end

View File

@@ -1,3 +1,4 @@
% Is the callback supposed to be nested?
function EZmultiDayGui function EZmultiDayGui
%global Exp %global Exp
global exDlst global exDlst
@@ -6,21 +7,17 @@ global exDlst
btnWid=0.10; btnWid=0.10;
btnHt=0.05; btnHt=0.05;
spacing=0.02;% Spacing between the button and the next command's label spacing=0.02;% Spacing between the button and the next command's label
%====================================
% The ADD Groups button % The ADD Groups button
btnNumber=1; btnNumber=1;
yPos=0.85-(btnNumber-1)*(btnHt+spacing); yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt]; btnPos=[xPos yPos-spacing btnWid btnHt];
%fhImParm=gcf; %fhImParm=gcf;
%====================================
exFolder=uigetdir exFolder=uigetdir
exDirs=dir(exFolder) exDirs=dir(exFolder)
exFs={exDirs.name} exFs={exDirs.name}
f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' ); f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' );
hListbox=uicontrol(... hListbox=uicontrol(...
'Style', 'listbox',... 'Style', 'listbox',...
@@ -33,7 +30,6 @@ hListbox=uicontrol(...
'callback',{@load_listbox}); % 'uiresume(gcbf)'); 'Position', [5 100 60 20]) 'callback',{@load_listbox}); % 'uiresume(gcbf)'); 'Position', [5 100 60 20])
function load_listbox(source,eventdata) function load_listbox(source,eventdata)
% global CSrchRng % global CSrchRng
% global CSrearchRange % global CSrearchRange
userIndx=(get(source,'value')) userIndx=(get(source,'value'))
@@ -42,9 +38,8 @@ userStr=(get(source,'string'))
user_entry=userStr(userIndx) user_entry=userStr(userIndx)
exDlst=user_entry exDlst=user_entry
end end
exFs exFs
btnNumber=10; btnNumber=10;
@@ -62,6 +57,5 @@ uiwait(gcf);
close(f) close(f)
end end
%*******************
% EZmultiDay % EZmultiDay
%*****************************************************************

View File

@@ -1,4 +1,4 @@
% EZmultiDayGui.m called by EZexpSel.m ln957 && ln963 % EZmultiDayGui.m called by EZexpSel.m
% EZmultiday is called after this EZmultiDayGui.m also by EZexpSel.m % EZmultiday is called after this EZmultiDayGui.m also by EZexpSel.m
function EZmultiDayGui function EZmultiDayGui

View File

@@ -1,5 +1,6 @@
% EZmultiExLoad % EZmultiExLoad
% Calls to EZVimDisplay (ln 185) EZmultiGeneRFsLst (ln213) EZdiagRFsSheet(ln218) % Calls to EZVimDisplay (ln 185) EZmultiGeneRFsLst (ln213) EZdiagRFsSheet(ln218)
% TODO this file could use some elseif's
global Exp global Exp
global zonePB global zonePB
@@ -13,15 +14,12 @@ expN=zonePB; % added to accomodate AppDesigner limitations 230821
Exp(expN).UgeneCnt=0; Exp(expN).UgeneCnt=0;
Exp(expN).DexpLength=size(matFile,2); DexpLength=size(matFile,2); Exp(expN).DexpLength=size(matFile,2); DexpLength=size(matFile,2);
for n=1:Exp(expN).DexpLength % size(matFile,2) for n=1:Exp(expN).DexpLength % size(matFile,2)
if expN==1 if expN==1
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
end end
if expN==2 if expN==2
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
end end
if expN==3 if expN==3
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
end end
@@ -63,13 +61,12 @@ Exp(expN).Dexp(n).FexpScanSpots= Exp(expN).Dexp(n).temp.FexpScanSpots;
Exp(expN).Dexp(n).FexpScanBMtp=Exp(expN).Dexp(n).temp.FexpScanBMtp; Exp(expN).Dexp(n).FexpScanBMtp=Exp(expN).Dexp(n).temp.FexpScanBMtp;
Exp(expN).Dexp(n).anlZoneRefs=Exp(expN).Dexp(n).temp.anlZoneRefs; Exp(expN).Dexp(n).anlZoneRefs=Exp(expN).Dexp(n).temp.anlZoneRefs;
Exp(expN).Dexp(n).ImParMat=Exp(expN).Dexp(n).temp.ImParMat; Exp(expN).Dexp(n).ImParMat=Exp(expN).Dexp(n).temp.ImParMat;
Exp(expN).Dexp((Exp(expN).DexpLength+1):end)=[]; Exp(expN).Dexp((Exp(expN).DexpLength+1):end)=[];
Exp(expN).Dexp(n).temp=[]; Exp(expN).Dexp(n).temp=[];
end
end %for n=1:size(matFile,2) % Load First new ExpJOb
%Load First new ExpJOb***************** if expN==1
if expN==1,
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3); tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3);
set(handles.MPsldr1,'max',MPnum); %length(MP) set(handles.MPsldr1,'max',MPnum); %length(MP)
set(handles.DMsldr1,'max',length(DM.drug)); set(handles.DMsldr1,'max',length(DM.drug));
@@ -121,7 +118,7 @@ set(handles.DN2,'value',1)
set(handles.DN2,'string',1) set(handles.DN2,'string',1)
end end
if expN==3, if expN==3
% Exp(3).traceN=0; % Exp(3).traceN=0;
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); % size(FexpScanBMtp{1,1},3); tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); % size(FexpScanBMtp{1,1},3);
set(handles.MPsldr3,'max',MPnum); set(handles.MPsldr3,'max',MPnum);
@@ -133,7 +130,6 @@ DMnum= length(Exp(expN).Dexp(1).DM.drug);
set(handles.DMsldr3,'min',1,'max',DMnum) set(handles.DMsldr3,'min',1,'max',DMnum)
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
set(handles.Tptsldr3,'min',1,'max',tPtsSize) set(handles.Tptsldr3,'min',1,'max',tPtsSize)
set(handles.MPsldr3,'value',1) set(handles.MPsldr3,'value',1)
set(handles.DMsldr3,'value',1) set(handles.DMsldr3,'value',1)
set(handles.Tptsldr3,'value',1) set(handles.Tptsldr3,'value',1)
@@ -143,34 +139,33 @@ set(handles.Tpted3,'string','1')
set(handles.MPsldr3,'SliderStep',[1/MPnum 1/MPnum]); % 1/length(MP) 1/length(MP)]) set(handles.MPsldr3,'SliderStep',[1/MPnum 1/MPnum]); % 1/length(MP) 1/length(MP)])
set(handles.DMsldr3,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]); set(handles.DMsldr3,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]);
set(handles.Tptsldr3,'SliderStep',[1/tPtsSize 1/tPtsSize]); set(handles.Tptsldr3,'SliderStep',[1/tPtsSize 1/tPtsSize]);
set(handles.DN3,'value',1) set(handles.DN3,'value',1)
set(handles.DN3,'string',1) set(handles.DN3,'string',1)
end end
if expN==1,set(handles.GeneOrfLoc1,'string',{''}); if expN==1
set(handles.GeneOrfLoc1,'string',{''});
set(handles.graphStrLoc1,'string',{''}); set(handles.graphStrLoc1,'string',{''});
cla(handles.Paxes1) cla(handles.Paxes1)
end end
if expN==2,set(handles.GeneOrfLoc2,'string',{''}); if expN==2
set(handles.GeneOrfLoc2,'string',{''});
set(handles.graphStrLoc2,'string',{''}); set(handles.graphStrLoc2,'string',{''});
cla(handles.Paxes2) cla(handles.Paxes2)
end end
if expN==3,set(handles.GeneOrfLoc3,'string',{''}); if expN==3
set(handles.GeneOrfLoc3,'string',{''});
set(handles.graphStrLoc3,'string',{''}) set(handles.graphStrLoc3,'string',{''})
cla(handles.Paxes3) cla(handles.Paxes3)
end end
Exp(expN).Dexp(1).srtGnLst={('CheckMP/MPDMfile')}; Exp(expN).Dexp(1).srtGnLst={('CheckMP/MPDMfile')};
Exp(expN).Dexp(1).srtOrfLst={('CheckMP/MPDMfile')}; Exp(expN).Dexp(1).srtOrfLst={('CheckMP/MPDMfile')};
set(handles.listboxGnOrf,'value',1) %Fix accomodation for bug in App Designer .. .wlapp converter 230918 set(handles.listboxGnOrf,'value',1) %Fix accomodation for bug in App Designer .. .wlapp converter 230918
set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtGnLst)
set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(expN).Dexp(1).srtOrfLst)
%--------------------------------------------------------------------------
EZVimDisplay
%*********************
EZVimDisplay %*
%*********************
usrRefFg=0; usrRefFg=0;
prompt={'Enter GeneName to use as Reference:',... prompt={'Enter GeneName to use as Reference:',...
@@ -191,63 +186,52 @@ EZVimDisplay %*
if strcmpi(rfSpec,'None'), rfGnSp={strcat(rfGene,'-')}; end if strcmpi(rfSpec,'None'), rfGnSp={strcat(rfGene,'-')}; end
% Added 17-1023 For User Addition of Gene Composites to ListBox % Added 17-1023 For User Addition of Gene Composites to ListBox
Expaa{expN,1}= []; Expbb{expN,1}= []; Expaa{expN,1}=[]
Expbb{expN,1}=[];
for n=1:size(matFile,2) for n=1:size(matFile,2)
%*********************************************************************
try try
EZmultiGeneRFsLst %** EZmultiGeneRFsLst
catch catch
msg='EZmultiGeneRFLst failed possibly Too Few non-zero Median spots' msg='EZmultiGeneRFLst failed possibly Too Few non-zero Median spots'
end end
%********************************************************* EZdiagRFsSheet
EZdiagRFsSheet %**
%********************
Exp(expN).Dexp(n).RFrnames=rnames; Exp(expN).Dexp(n).RFrnames=rnames;
Exp(expN).Dexp(n).RFdata=data; Exp(expN).Dexp(n).RFdata=data;
%*********************************************************
RFconfig=0; RFconfig=0;
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean')) ...
~isempty(Exp(expN).Dexp(n).RFmean)&&... && ~isempty(Exp(expN).Dexp(n).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
isempty(Exp(expN).Dexp(n).RFmeanG) && isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=1; RFconfig=1;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))==0 ||... if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))==0 ...
isempty(Exp(expN).Dexp(n).RFmean)&&... || isempty(Exp(expN).Dexp(n).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
~isempty(Exp(expN).Dexp(n).RFmeanG) && ~isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=2; RFconfig=2;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean')) ...
~isempty(Exp(expN).Dexp(n).RFmean)&&... && ~isempty(Exp(expN).Dexp(n).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
~isempty(Exp(expN).Dexp(n).RFmeanG) && ~isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=3; RFconfig=3;
end end
Exp(expN).RFconfig=RFconfig; Exp(expN).RFconfig=RFconfig;
Exp(expN).Dexp(n).RFconfig=RFconfig; Exp(expN).Dexp(n).RFconfig=RFconfig;
%********************************************** try msgBadGeneName
try msgBadGeneName, catch, end catch, end
try try
Exp(expN).Dexp(n).resetHtmpTg =5; %Exp(expN).resetHtmpTg =5; Exp(expN).Dexp(n).resetHtmpTg =5; %Exp(expN).resetHtmpTg =5;
if RFconfig==0, if RFconfig==0
RFconfigMsg='No RF1 references in this Experiment Job' RFconfigMsg='No RF1 references in this Experiment Job'
Exp(expN).Dexp(n).resetHtmpTg =3; %Exp(expN).resetHtmpTg =3; Exp(expN).Dexp(n).resetHtmpTg =3; %Exp(expN).resetHtmpTg =3;
end end
catch catch
end end
%***************************
%*********************************************************************
end end
%###############################################################################
% Auto Select Zone And Load Listboxgnorf Data
%********Auto select Zone and load listboxGnOrf data**********
DexpN=1; DexpN=1;
zeroCLn=zeros(1,DMnum); zeroCLn=zeros(1,DMnum);
Exp(expN).expLoadCnt=Exp(expN).expLoadCnt+1; expLdCnt=Exp(expN).expLoadCnt; Exp(expN).expLoadCnt=Exp(expN).expLoadCnt+1; expLdCnt=Exp(expN).expLoadCnt;
@@ -258,7 +242,6 @@ if expN==1 %Adapted to accomodate AppDesigner 230821
set(handles.zonePB1,'BackgroundColor',[1.0 0.6 0.6]) set(handles.zonePB1,'BackgroundColor',[1.0 0.6 0.6])
set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0]) set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0])
set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0]) set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0])
orfLstSel=get(handles.GeneOrfTog,'value') orfLstSel=get(handles.GeneOrfTog,'value')
if orfLstSel==1 if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtOrfLst)
@@ -284,7 +267,6 @@ if expN==2 %Adapted to accomodate AppDesigner 230821
end end
DNLaxes2=handles.DNLaxes2; DNLaxes2=handles.DNLaxes2;
Exp(2).hzeroCLn(expLdCnt)=plot(DNLaxes2,zeroCLn,1:DMnum,'y'); Exp(2).hzeroCLn(expLdCnt)=plot(DNLaxes2,zeroCLn,1:DMnum,'y');
end end
if expN==3 % Adapted to accomodate AppDesigner 230821 if expN==3 % Adapted to accomodate AppDesigner 230821
@@ -314,7 +296,6 @@ if Exp(4).interacPBsel==0 %if interaction "raw" don't show a center line
end end
end end
%***************************
% HtMapTog 'string', 'Current user L/N' selection' % HtMapTog 'string', 'Current user L/N' selection'
Exp(expN).Dexp(DexpN).spotIndx=[]; Exp(expN).Dexp(DexpN).spotIndx=[];
if expN==1, if expN==1,
@@ -334,5 +315,3 @@ if expN==3,
end end
htMapTogPBfg=0; htMapTogPBfg=0;
%*******************************************************************

View File

@@ -2,8 +2,8 @@
% Called by EZmultiExLoad about line173 Which is called by EZexpSel % Called by EZmultiExLoad about line173 Which is called by EZexpSel
% User Select Reference Gene and Specifics Added % User Select Reference Gene and Specifics Added
%****Compile GeneList and OrfList,**************************************** % Compile GeneList and OrfList
%****Sort and add the medians of Ref Plates if RF1,RF2 exist************** % Sort and add the medians of Ref Plates if RF1,RF2 exist
clear aa bb c uu vv drf drfPindx drfr drfc clear aa bb c uu vv drf drfPindx drfr drfc
clear RF1scanN RF2scanN clear RF1scanN RF2scanN
@@ -18,26 +18,22 @@ end
DMnum=length(Exp(expN).Dexp(n).DM.drug); DMnum=length(Exp(expN).Dexp(n).DM.drug);
tPtsSize=size(Exp(expN).Dexp(n).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3); tPtsSize=size(Exp(expN).Dexp(n).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3);
%*********************************
lstindx=0; lstindx=0;
lstindxOrf=0; lstindxOrf=0;
spN=0; Exp(expN).Dexp(n).RFrnames %<--??? spN=0;
Exp(expN).Dexp(n).RFrnames %<--???
rfcnt=0; rfcnt=0;
dRF1indx=0; dRF1indx=0;
RF1mp=[]; RF2mp=[]; RF1mp=[]; RF2mp=[];
rfSp=cell2mat(rfSpec); % user entry of Specifics for Ref selection rfSp=cell2mat(rfSpec); % user entry of Specifics for Ref selection
%*******************************************************
for mp=1:MPnum for mp=1:MPnum
% RF1fullPlate=0; % RF1fullPlate=0;
for ind384=1:384 for ind384=1:384
spN=spN+1; spN=spN+1;
try
try %
r=ceil(ind384/24); r=ceil(ind384/24);
if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end
% Insert test for numeric in genename and orf if isnumeric % Insert test for numeric in genename and orf if isnumeric
% Correct common EXCEL problem of converting OCT1 into a date numeric % Correct common EXCEL problem of converting OCT1 into a date numeric
if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991, if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991,
@@ -50,7 +46,6 @@ for mp=1:MPnum
try RF1fullPlate=sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}),rfGene))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end try RF1fullPlate=sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}),rfGene))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end
RF2fullPlate=0; RF2fullPlate=0;
try RF2fullPlate=sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}),'RF2'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end try RF2fullPlate=sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}),'RF2'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end
%*************************************************************************
% Capture non-reference spot location and ORF data % Capture non-reference spot location and ORF data
if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384))),'blank'))... %'\<blank\>' if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384))),'blank'))... %'\<blank\>'
&& ~isnumeric(Exp(expN).Dexp(n).MP(mp).orf{1}(ind384))... && ~isnumeric(Exp(expN).Dexp(n).MP(mp).orf{1}(ind384))...
@@ -58,13 +53,12 @@ for mp=1:MPnum
&& ~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),' ')... && ~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),' ')...
&& ~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),'')... && ~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),'')...
&& ~isempty((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)))... && ~isempty((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)))...
&& ((~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene)|| ~strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp))&&... && ((~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene)|| ~strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp))...
(~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene)|| ~strcmpi(rfSp,'None')))... && (~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene)|| ~strcmpi(rfSp,'None')))...
&& ((~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),rfGene)|| ~strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp))&&... && ((~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),rfGene)|| ~strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp))...
(~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),rfGene)|| ~strcmpi(rfSp,'None')))... && (~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),rfGene)|| ~strcmpi(rfSp,'None')))...
&& (~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),'RF2')||~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'RF2'))... && (~strcmpi((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),'RF2')||~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'RF2'))...
&& iscellstr((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384))) && iscellstr((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)))
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),':',' '); Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)),':',' ');
bb(lstindxOrf,1)=(Exp(expN).Dexp(n).MP(mp).orf{1}(ind384)); bb(lstindxOrf,1)=(Exp(expN).Dexp(n).MP(mp).orf{1}(ind384));
@@ -72,10 +66,10 @@ for mp=1:MPnum
bb(lstindxOrf,3)={mp}; bb(lstindxOrf,3)={mp};
bb(lstindxOrf,4)={r}; bb(lstindxOrf,4)={r};
bb(lstindxOrf,5)={c}; bb(lstindxOrf,5)={c};
mutorfs(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract mutorfs(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract
% Exp(expN).Dexp(n).mutSpotIndx(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract % Exp(expN).Dexp(n).mutSpotIndx(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract
end end
% Capture non-reference spot location and GENENAME data % Capture non-reference spot location and GENENAME data
if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))),'blank'))... %'\<blank\>' if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))),'blank'))... %'\<blank\>'
&& ~isnumeric(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))... && ~isnumeric(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))...
@@ -83,11 +77,11 @@ for mp=1:MPnum
&& ~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),' ')... && ~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),' ')...
&& ~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'')... && ~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'')...
&& ~isempty((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))... && ~isempty((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))...
&& (~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene) || ~strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp))&&... % AddSpecifics rfSp && ~RF1fullPlate)... && (~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene)...
(~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene) || ~strcmpi(rfSp,'None'))... || ~strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp))... % AddSpecifics rfSp && ~RF1fullPlate)...
&& (~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene) || ~strcmpi(rfSp,'None'))...
&& (~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'RF2'))... % && ~RF2fullPlate)... && (~strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'RF2'))... % && ~RF2fullPlate)...
&& iscellstr((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))) && iscellstr((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))
lstindx=lstindx+1; lstindx=lstindx+1;
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' ');
aa(lstindx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)); aa(lstindx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384));
@@ -95,33 +89,27 @@ for mp=1:MPnum
aa(lstindx,3)={mp}; aa(lstindx,3)={mp};
aa(lstindx,4)={r}; aa(lstindx,4)={r};
aa(lstindx,5)={c}; aa(lstindx,5)={c};
mutgenes(lstindx)=spN; mutgenes(lstindx)=spN;
elseif (RF1fullPlate==1 ... % sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}),rfGene))==384 || ...
|| (((length(unique(Exp(expN).Dexp(n).MP(mp).genename{1}(1:384))))==1 && mp==1 ) ... % (isequal((Exp(expN).Dexp(n).MP(mp).genename{1}(1:384)), (Exp(expN).Dexp(n).MP(mp).genename{1}(384:-1:1)))&& mp==1 )) && ...
elseif (RF1fullPlate==1 ||... %sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}),rfGene))==384 || ... && ~exist('RF1scanN','var')))
(((length(unique(Exp(expN).Dexp(n).MP(mp).genename{1}(1:384)))) ==1 && mp==1 ) && ... %(isequal((Exp(expN).Dexp(n).MP(mp).genename{1}(1:384)), (Exp(expN).Dexp(n).MP(mp).genename{1}(384:-1:1)))&& mp==1 )) && ...
~exist('RF1scanN','var')))
RF1mp=mp RF1mp=mp
RF1scanN=(mp*DMnum)-(DMnum-1) %mp; RF1scanN=(mp*DMnum)-(DMnum-1)
rfcnt=rfcnt+1; rfcnt=rfcnt+1;
RFs(spN:spN+383)=spN:spN+383; RFs(spN:spN+383)=spN:spN+383;
elseif (RF2fullPlate==1|| ... % sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'RF2'))==384 ||... elseif (RF2fullPlate==1|| ... % sum(ismember((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),'RF2'))==384 ||...
(((length(unique(Exp(expN).Dexp(n).MP(mp).genename{1}(1:384))))==1 && mp==MPnum ) && ... (((length(unique(Exp(expN).Dexp(n).MP(mp).genename{1}(1:384))))==1 && mp==MPnum ) && ...
~exist('RF2scanN','var'))) ~exist('RF2scanN','var')))
RF2mp=mp RF2mp=mp
rfcnt=rfcnt+1; rfcnt=rfcnt+1;
RFs(spN:spN+383)=spN:spN+383; RFs(spN:spN+383)=spN:spN+383;
RF2scanN= (mp*DMnum)-(DMnum-1) %mp; RF2scanN=(mp*DMnum)-(DMnum-1)
% DISPersed REFerence capture and find Medians % DISPersed REFerence capture and find Medians
elseif ( ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene) && ... elseif ( ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene) ...
strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp)))... && strcmpi((Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)),rfSp))) ...
|| ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene) && ... || ((strcmpi((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),rfGene) ...
strcmpi(rfSp,'None'))) )... && strcmpi(rfSp,'None'))) ) &&(RF1fullPlate~=1)
&& (RF1fullPlate~=1),
dRF1indx=dRF1indx+1; dRF1indx=dRF1indx+1;
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)),':',' ');
drf(dRF1indx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)); drf(dRF1indx,1)=(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384));
@@ -131,20 +119,16 @@ for mp=1:MPnum
drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c; drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c;
drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384; drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384;
% drf(dRF1indx,7)=(Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384)); % drf(dRF1indx,7)=(Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384));
end % if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))),'blank'))... end % if isempty(regexpi(char((Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))),'blank'))...
%*******************************************************************************
catch catch
error='EZexpSel lineAfter 24 EZmultiGeneLst.m'
mp % Disable in future to prevent a bomb out OR put into a nested TryCatch mp % Disable in future to prevent a bomb out OR put into a nested TryCatch
ind384 % Disable in future to prevent a bomb out OR put into a nested TryCatch ind384 % Disable in future to prevent a bomb out OR put into a nested TryCatch
msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384)) msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end end
end
end %end associated with for ind384=1:384
mp mp
end %end associated with for mp=1:length(Exp(expN).Dexp(n).MP) end
%*****************************************************
% Cover case if mutorfs RFs are labeled RF1 or RF2 % Cover case if mutorfs RFs are labeled RF1 or RF2
try try
Exp(expN).Dexp(n).mutSpotIndx.wRFs=union(RFs, mutorfs); Exp(expN).Dexp(n).mutSpotIndx.wRFs=union(RFs, mutorfs);
@@ -159,11 +143,6 @@ end %end associated with for mp=1:length(Exp(expN).Dexp(n).MP)
Exp(expN).Dexp(n).mutSpotIndx.woRFs=mutorfs; Exp(expN).Dexp(n).mutSpotIndx.woRFs=mutorfs;
end end
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Exp(expN).Dexp(n).RFmd1indx=[]; Exp(expN).Dexp(n).RFmd1indx=[];
Exp(expN).Dexp(n).RFmd1pltN=[]; Exp(expN).Dexp(n).RFmd1pltN=[];
Exp(expN).Dexp(n).RFmd1LB={[]}; Exp(expN).Dexp(n).RFmd1LB={[]};
@@ -226,10 +205,12 @@ if exist('RF1scanN','var')
try %if RF1scanN doesn't exist this addition to list will be skipped try %if RF1scanN doesn't exist this addition to list will be skipped
nonZeroIndx=find(Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5)); nonZeroIndx=find(Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5));
if isempty(nonZeroIndx), nonZeroCnt=0, medianIndx= nonZeroIndx; if isempty(nonZeroIndx)
else nonZeroCnt=length(nonZeroIndx); nonZeroCnt=0
medianIndx=nonZeroIndx;
else
nonZeroCnt=length(nonZeroIndx);
end end
%
if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)==0, medianIndx=nonZeroIndx(1:nonZeroCnt-1); end if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)==0, medianIndx=nonZeroIndx(1:nonZeroCnt-1); end
if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)~=0, medianIndx=nonZeroIndx; end if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)~=0, medianIndx=nonZeroIndx; end
clear medValLst clear medValLst
@@ -242,10 +223,8 @@ if ~isempty(nonZeroIndx) && length(medianIndx) > (.15*384) %To calc. a median, m
max1=max(medValLst); max1=max(medValLst);
std1=std(medValLst); std1=std(medValLst);
mean1=mean(medValLst); mean1=mean(medValLst);
kValLst=Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,3); % For Ref Composite 17_1009 kValLst=Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,3); % For Ref Composite 17_1009
rValLst=Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,4); % For Ref Composite 17_1009 rValLst=Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,4); % For Ref Composite 17_1009
mval1=median(medValLst); %mval1=median(Exp(expN).Dexp(n).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5)); mval1=median(medValLst); %mval1=median(Exp(expN).Dexp(n).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5));
RFmd1pos=find(mval1==(Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5))); RFmd1pos=find(mval1==(Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5)));
RFmd1loc(1)=ceil(RFmd1pos/24); %calc r value RFmd1loc(1)=ceil(RFmd1pos/24); %calc r value
@@ -256,14 +235,13 @@ aa(lstindx,1)= {strcat('RF1md(',num2str(d+1),')')}; %{'RF1md'};
aa(lstindx,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,'std_',num2str(std1))}; aa(lstindx,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,'std_',num2str(std1))};
bb(lstindxOrf,1)={strcat('RF1md(',num2str(d+1),')')}; %remove string2cell brackets {...} %{'RF1md'}; bb(lstindxOrf,1)={strcat('RF1md(',num2str(d+1),')')}; %remove string2cell brackets {...} %{'RF1md'};
bb(lstindxOrf,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,'std_',num2str(std1))}; bb(lstindxOrf,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,'std_',num2str(std1))};
%Composite Reference Amalgum Plot ********************** % Composite Reference Amalgum Plot
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RF1cmp(',num2str(d+1),')')}; aa(lstindx,1)={strcat('RF1cmp(',num2str(d+1),')')};
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)={strcat('RF1cmp(',num2str(d+1),')')}; bb(lstindxOrf,1)={strcat('RF1cmp(',num2str(d+1),')')};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
%********************************************************
Exp(expN).Dexp(n).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(n).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(n).RFmd1indx(d+1)=RFmd1pos; Exp(expN).Dexp(n).RFmd1indx(d+1)=RFmd1pos;
@@ -291,7 +269,6 @@ Exp(expN).Dexp(n).RFcmpr(1).dm(d+1).mean= mean(rValLst); %For Ref Composite 17_1
Exp(expN).Dexp(n).RFcmpr(1).dm(d+1).std=std(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpr(1).dm(d+1).std=std(rValLst); %For Ref Composite 17_1009
Exp(expN).Dexp(n).RFcmpr(1).dm(d+1).min=min(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpr(1).dm(d+1).min=min(rValLst); %For Ref Composite 17_1009
Exp(expN).Dexp(n).RFcmpr(1).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpr(1).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009
else else
% Need to set L r K values to zeros or pick the first spot with zeros % Need to set L r K values to zeros or pick the first spot with zeros
% Spot 1 could be other than zero as the median isn't calculated if % Spot 1 could be other than zero as the median isn't calculated if
@@ -300,36 +277,26 @@ else
firstZero=find(((Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero=find(((Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(expN).Dexp(n).RFmd1indx(d+1)=firstZero; Exp(expN).Dexp(n).RFmd1indx(d+1)=firstZero;
Exp(expN).Dexp(n).RFmd1pltN=RF1mp; Exp(expN).Dexp(n).RFmd1pltN=RF1mp;
try medValList1{d+1}=Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; catch, catcherror='Ln356', end try medValList1{d+1}=Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; catch, catcherror='Ln356', end
end
end %~isempty(nonZeroIndx) && length(medianIndx) > (.15*384) catch
catch %try ~ln375
medianCalcTryFailed1='Failed! Failed! Ln362 But process continued with placeholder P1ind384 spot value!' medianCalcTryFailed1='Failed! Failed! Ln362 But process continued with placeholder P1ind384 spot value!'
try try
firstZero=find(((Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero=find(((Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(expN).Dexp(n).RFmd1indx(d+1)=firstZero; Exp(expN).Dexp(n).RFmd1indx(d+1)=firstZero;
catch catch
catchissue='Ln209'
Exp(expN).Dexp(n).RFmd1indx(d+1)=384; %if crapout,Then use spot384 as default to keep going Exp(expN).Dexp(n).RFmd1indx(d+1)=384; %if crapout,Then use spot384 as default to keep going
end end
try try
Exp(expN).Dexp(n).RFmd1pltN=RF1mp; Exp(expN).Dexp(n).RFmd1pltN=RF1mp;
catch catch
catchissue='Ln209'
Exp(expN).Dexp(n).RFmd1pltN=1; Exp(expN).Dexp(n).RFmd1pltN=1;
end end
end
end
end
error='EZexpSel lineAfter 209' % Calc RF2 median if a full plate of RF2s exist
end %try ~ln209
end %for d=0:DMnum
end % if exist('RF1scanN','var')
%**********************************************************************************
%Calc RF2 median if a full plate of RF2s exist**************************
Exp(expN).Dexp(n).RFmd2indx=[]; Exp(expN).Dexp(n).RFmd2indx=[];
Exp(expN).Dexp(n).RFmd2pltN=[]; Exp(expN).Dexp(n).RFmd2pltN=[];
@@ -342,23 +309,24 @@ if exist('RF2scanN','var')
try %if RF2scanN doesn't exist this addition to list will be skipped try %if RF2scanN doesn't exist this addition to list will be skipped
nonZeroIndx2=find(Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(1:384,5)); nonZeroIndx2=find(Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(1:384,5));
if isempty(nonZeroIndx2), nonZeroCnt2=0; medianIndx2= nonZeroIndx2; if isempty(nonZeroIndx2)
else nonZeroCnt2=length(nonZeroIndx2); nonZeroCnt2=0;
medianIndx2=nonZeroIndx2;
else
nonZeroCnt2=length(nonZeroIndx2);
end end
%
if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)==0, medianIndx2=nonZeroIndx2(1:nonZeroCnt2-1); end if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)==0, medianIndx2=nonZeroIndx2(1:nonZeroCnt2-1); end
if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)~=0, medianIndx2=nonZeroIndx2; end if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)~=0, medianIndx2=nonZeroIndx2; end
clear medValLst2 clear medValLst2
clear kValLst2 clear kValLst2
clear rValLst2 clear rValLst2
if ~isempty(nonZeroIndx2) && length(medianIndx2) > (.15*384) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(nonZeroIndx2) && length(medianIndx2) > (.15*384) % to calc. a median, more than 15% of spots must be nonZero
medValLst2=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,5); medValLst2=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,5);
medValList2{d+1}=medValLst2; medValList2{d+1}=medValLst2;
min2=min(medValLst2); min2=min(medValLst2);
max2=max(medValLst2); max2=max(medValLst2);
std2=std(medValLst2); std2=std(medValLst2);
mean2=mean(medValLst2); mean2=mean(medValLst2);
kValLst2=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,3); %For Ref Composite 17_1009 kValLst2=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,3); %For Ref Composite 17_1009
rValLst2=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,4); %For Ref Composite 17_1009 rValLst2=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,4); %For Ref Composite 17_1009
mval2=median(medValLst2); %mval2=median(Exp(expN).Dexp(n).scan(RF2mps).plate(1).CFout(1:383,5)); mval2=median(medValLst2); %mval2=median(Exp(expN).Dexp(n).scan(RF2mps).plate(1).CFout(1:383,5));
@@ -405,7 +373,6 @@ Exp(expN).Dexp(n).RFcmpr(2).dm(d+1).mean= mean(rValLst2); %For Ref Composite 17_
Exp(expN).Dexp(n).RFcmpr(2).dm(d+1).std=std(rValLst2); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpr(2).dm(d+1).std=std(rValLst2); %For Ref Composite 17_1009
Exp(expN).Dexp(n).RFcmpr(2).dm(d+1).min=min(rValLst2); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpr(2).dm(d+1).min=min(rValLst2); %For Ref Composite 17_1009
Exp(expN).Dexp(n).RFcmpr(2).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpr(2).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009
else else
% Pick the first spot with zeros % Pick the first spot with zeros
% Use that position to satisfy and keep process OK % Use that position to satisfy and keep process OK
@@ -413,14 +380,10 @@ else
firstZero2=find(((Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero2=find(((Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(expN).Dexp(n).RFmd2indx(d+1)=firstZero2; Exp(expN).Dexp(n).RFmd2indx(d+1)=firstZero2;
Exp(expN).Dexp(n).RFmd2pltN=RF2mp; Exp(expN).Dexp(n).RFmd2pltN=RF2mp;
try medValList2{d+1}=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,5); nonZeroCnt2; catch, catchissue='Ln431', end try medValList2{d+1}=Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(medianIndx2,5); nonZeroCnt2; catch, catchissue='Ln431', end
end end
catch catch
medianCalcTryFailed2='Failed! Failed! Ln436 No RF1median But process continued with placeholder P1ind384 spot value!' medianCalcTryFailed2='Failed! Failed! Ln436 No RF1median But process continued with placeholder P1ind384 spot value!'
try try
firstZero2=find(((Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first'); firstZero2=find(((Exp(expN).Dexp(n).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first');
Exp(expN).Dexp(n).RFmd2indx(d+1)=firstZero2; Exp(expN).Dexp(n).RFmd2indx(d+1)=firstZero2;
@@ -434,10 +397,7 @@ catch
catchissue='Ln448' catchissue='Ln448'
Exp(expN).Dexp(n).RFmd2pltN=1; Exp(expN).Dexp(n).RFmd2pltN=1;
end end
end
error='EZexpSel lineAfter 279'
end %if RF2scanN doesn't exist this addition to list will be skipped
clear RFcombValList clear RFcombValList
RFcombValList=cat(1,medValList1{d+1},medValList2{d+1}); RFcombValList=cat(1,medValList1{d+1},medValList2{d+1});
Exp(expN).Dexp(n).RFmean(d+1)=mean(RFcombValList); Exp(expN).Dexp(n).RFmean(d+1)=mean(RFcombValList);
@@ -446,28 +406,23 @@ end %if RF2scanN doesn't exist this addition to list will be skipped
catch, Exp(expN).Dexp(n).RFmin(d+1)=0; end catch, Exp(expN).Dexp(n).RFmin(d+1)=0; end
try, Exp(expN).Dexp(n).RFmax(d+1)=max(RFcombValList); try, Exp(expN).Dexp(n).RFmax(d+1)=max(RFcombValList);
catch, Exp(expN).Dexp(n).RFmax(d+1)=0; end catch, Exp(expN).Dexp(n).RFmax(d+1)=0; end
end
end %for d=0:DMnum ln446
elseif exist('RF1scanN','var') elseif exist('RF1scanN','var')
Exp(expN).Dexp(n).RFmean=Exp(expN).Dexp(n).mean1; Exp(expN).Dexp(n).RFmean=Exp(expN).Dexp(n).mean1;
Exp(expN).Dexp(n).RFstd=Exp(expN).Dexp(n).std1; Exp(expN).Dexp(n).RFstd=Exp(expN).Dexp(n).std1;
Exp(expN).Dexp(n).RFmin=Exp(expN).Dexp(n).min1; Exp(expN).Dexp(n).RFmin=Exp(expN).Dexp(n).min1;
Exp(expN).Dexp(n).RFmax=Exp(expN).Dexp(n).max1; Exp(expN).Dexp(n).RFmax=Exp(expN).Dexp(n).max1;
end %if exist('RF2scanN','var') ln445 end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Disperse reference plates
%*************************************************************************************************
%***********DISPERSE REFERENCE PLATES
Exp(expN).Dexp(n).RFmdPindx=[]; Exp(expN).Dexp(n).RFmdPindx=[];
Exp(expN).Dexp(n).RFmdPpltN=[]; Exp(expN).Dexp(n).RFmdPpltN=[];
if exist('drf','var') % ('RF1scanN','var') if exist('drf','var') % ('RF1scanN','var')
% Det. index of change from one MP to the next % Det. index of change from one MP to the next
i=2; i=2;
clear chgIndx clear chgIndx
chgIndx(1)=1; chgIndx(1)=1;
for j=1:length(drf(:,3)) for j=1:length(drf(:,3))
if j>1 if j>1
if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end end
@@ -476,20 +431,15 @@ chgIndx(length(chgIndx)+1)= length(drf)+1;
uu=zeros(size(drf,1),4); uu=zeros(size(drf,1),4);
uu(:,1:4)=cell2mat(drf(:,3:6)); uu(:,1:4)=cell2mat(drf(:,3:6));
vv=zeros(size(drf,1),DMnum); %(length(drf),DMnum); vv=zeros(size(drf,1),DMnum); %(length(drf),DMnum);
%************************************
dMPs=unique(cell2mat(drf(:,3))); dMPs=unique(cell2mat(drf(:,3)));
%*****************************************
%{ %{
for mm=1:MPnum for mm=1:MPnum
nonZrfIndx.mp{mm,:}=drfPindx((find(drfPindx(:,mm))),mm); nonZrfIndx.mp{mm,:}=drfPindx((find(drfPindx(:,mm))),mm);
end end
%} %}
% nzValsG=zeros(DMnum,size(drf,1)); % nzValsG=zeros(DMnum,size(drf,1));
% nzValsAcc=zeros(DMnum,384); % nzValsAcc=zeros(DMnum,384);
for mm=1:length(dMPs) % length(chgIndx) for mm=1:length(dMPs) % length(chgIndx)
for d=1:(DMnum) for d=1:(DMnum)
medianIndxDisp=[]; medianIndxDisp=[];
NZrefIndxP=[]; NZrefIndxP=[];
@@ -497,27 +447,28 @@ vv= zeros(size(drf,1),DMnum); %(length(drf),DMnum);
medValLstDisp=[]; medValLstDisp=[];
rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d); rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d);
try % Determine the dispersed RFs median mean and std if such exist % Determine the dispersed RFs median mean and std if such exist
try
NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); % find(Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(drf(chgIndx(cI):chgIndx(cI+1)),5)); NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); % find(Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(drf(chgIndx(cI):chgIndx(cI+1)),5));
% vv=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); % vv=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
%For Global Ref Composite 17_1009 %************************************************************************** % For Global Ref Composite 17_1009
vvK(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,3); vvK(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,3);
vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,4); vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,4);
%*****************************************************************************************************
nonZeroValsP=nonzeros(Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5)); nonZeroValsP=nonzeros(Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
std1Disp=std(nonZeroValsP); std1Disp=std(nonZeroValsP);
mean1Disp=mean(nonZeroValsP); mean1Disp=mean(nonZeroValsP);
minDisp=min(nonZeroValsP); minDisp=min(nonZeroValsP);
maxDisp=max(nonZeroValsP); maxDisp=max(nonZeroValsP);
drfVals=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); drfVals=Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
% nzValsAcc(mm).DM(d,:)=nonZeroValsP; % nzValsAcc(mm).DM(d,:)=nonZeroValsP;
% MEDIAN Determination for PLATES with Dispersed RFs % MEDIAN Determination for PLATES with Dispersed RFs
% NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5)); % NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(n).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
if isempty(NZrefIndxP), nonZeroCntDisp=0, medianIndxDisp= NZrefIndxP; if isempty(NZrefIndxP)
else nonZeroCntDisp=length(NZrefIndxP); nonZeroCntDisp=0;
medianIndxDisp=NZrefIndxP;
else
nonZeroCntDisp=length(NZrefIndxP);
end end
if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end
@@ -530,7 +481,6 @@ if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 0 %(.15*384) %To calc. a med
RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); % drfPindx((RFmd1posIndx),dMPs(mm)); RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); % drfPindx((RFmd1posIndx),dMPs(mm));
RFmd1locD(1)=ceil(RFmd1posD/24); % calc r value RFmd1locD(1)=ceil(RFmd1posD/24); % calc r value
RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); % calc c value RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); % calc c value
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
if usrRefFg==0, rfPLbl='RF1mdP('; else rfPLbl=strcat('RF-',rfGnSp,'mdP('); end % accomodate User Ref Selection if usrRefFg==0, rfPLbl='RF1mdP('; else rfPLbl=strcat('RF-',rfGnSp,'mdP('); end % accomodate User Ref Selection
@@ -543,7 +493,6 @@ else
end end
aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))};
bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))};
Exp(expN).Dexp(n).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(n).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(n).RFmdPindx(d,dMPs(mm))=RFmd1posD; Exp(expN).Dexp(n).RFmdPindx(d,dMPs(mm))=RFmd1posD;
Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also??? Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also???
@@ -561,18 +510,14 @@ else
firstZeroD=drfPindx((firstZeroDindx),dMPs(mm)); firstZeroD=drfPindx((firstZeroDindx),dMPs(mm));
Exp(expN).Dexp(n).RFmdPindx(d,dMPs(mm))=firstZeroD; Exp(expN).Dexp(n).RFmdPindx(d,dMPs(mm))=firstZeroD;
Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm); % RF1mp; % Is this supposed to be the MP number or the ScanPlate number??? Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm); % RF1mp; % Is this supposed to be the MP number or the ScanPlate number???
end
catch
end %~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 ln584
catch %try ln565
medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with placeholder Plate spot value!' medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with placeholder Plate spot value!'
try try
firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first'); firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first');
firstZeroPindx=uu(firstZeroindxD,4); firstZeroPindx=uu(firstZeroindxD,4);
Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
Exp(expN).Dexp(n).RFmdPindx(d,dMPs(mm))=firstZeroPindx; Exp(expN).Dexp(n).RFmdPindx(d,dMPs(mm))=firstZeroPindx;
catch catch
catchissue='try at Ln565' catchissue='try at Ln565'
Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(n).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
@@ -582,15 +527,13 @@ catch %try ln565
Exp(expN).Dexp(n).RFmdPpltN=dMPs(mm); Exp(expN).Dexp(n).RFmdPpltN=dMPs(mm);
catch catch
catchissue='Ln619' catchissue='Ln619'
Exp(expN).Dexp(n).RFmdPpltN= 1; %This might keep from breaking BUT ??? Exp(expN).Dexp(n).RFmdPpltN=1; % this might keep from breaking BUT ???
end
end
end
end end
error='EZexpSel lineAfter 565'
end %try ~ln565
end %for d=0:DMnum % Calc. Global Mean, Std, And Median For Distributed References
end %for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES******************************************************************
uu=horzcat(uu,vv); uu=horzcat(uu,vv);
for d=1:DMnum for d=1:DMnum
medianIndxG=[]; medianIndxG=[];
@@ -601,15 +544,16 @@ for d=1:DMnum
RFstdG=std(nonzeros(vv(:,d))); RFstdG=std(nonzeros(vv(:,d)));
NZrfIndxG=find(vv(:,d)); % find(nonzeros(vv(:,d))); NZrfIndxG=find(vv(:,d)); % find(nonzeros(vv(:,d)));
if isempty(RFmeanG), nonZeroCntD=0, %medianIndxDisp= RFmeanG(d); if isempty(RFmeanG)
else nonZeroCntD= length(nonzeros(vv(:,d))); nonZeroCntD=0 % medianIndxDisp=RFmeanG(d);
else
nonZeroCntD=length(nonzeros(vv(:,d)));
end end
% Calc. of median requires an odd number of indx items % Calc. of median requires an odd number of indx items
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end
if ~isempty(NZrfIndxG) && length(medianIndxD) > 0 %(.15*size(drf,1)) % to calc. a median, more than 15% of spots must be nonZero
if ~isempty(NZrfIndxG) && length(medianIndxD) > 0 %(.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero
mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d))); mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d)));
nzPosIndxDG=find(mvalsDG==vv(:,d)); nzPosIndxDG=find(mvalsDG==vv(:,d));
RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value
@@ -617,7 +561,6 @@ RFmdDGloc(d,2)= uu(nzPosIndxDG,2); %calc r value
RFmdDGloc(d,3)=uu(nzPosIndxDG,3); % calc c value RFmdDGloc(d,3)=uu(nzPosIndxDG,3); % calc c value
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
if usrRefFg==0, rfGLbl='RF1mdG('; else rfGLbl=strcat('RF-',rfGnSp,'mdG('); end %accomodate User Ref Selection if usrRefFg==0, rfGLbl='RF1mdG('; else rfGLbl=strcat('RF-',rfGnSp,'mdG('); end %accomodate User Ref Selection
if iscell(strcat(rfPLbl,num2str(d),')')), if iscell(strcat(rfPLbl,num2str(d),')')),
aa(lstindx,1)=strcat(rfGLbl,num2str(d),')'); % remove string2cell brackets {...} aa(lstindx,1)=strcat(rfGLbl,num2str(d),')'); % remove string2cell brackets {...}
@@ -628,9 +571,7 @@ bb(lstindxOrf,1)= {strcat(rfGLbl,num2str(d),')')};
end end
aa(lstindx,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; aa(lstindx,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))};
bb(lstindxOrf,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; bb(lstindxOrf,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))};
% Composite Reference Amalgum Plot
%Composite Reference Amalgum Plot ******************
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
if usrRefFg==0, rfcmpGLbl='RFcmpG('; else rfcmpGLbl=strcat('RFcmpG-',rfGnSp,'('); end %accomodate User Ref Selection if usrRefFg==0, rfcmpGLbl='RFcmpG('; else rfcmpGLbl=strcat('RFcmpG-',rfGnSp,'('); end %accomodate User Ref Selection
@@ -644,7 +585,6 @@ end
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
%*****************************************************
Exp(expN).Dexp(n).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(n).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(n).RFmdGindx(d)=nzPosIndxDG; Exp(expN).Dexp(n).RFmdGindx(d)=nzPosIndxDG;
Exp(expN).Dexp(n).RFmdGpltN(d)=RFmdDGloc(d,1); Exp(expN).Dexp(n).RFmdGpltN(d)=RFmdDGloc(d,1);
@@ -654,7 +594,6 @@ Exp(expN).Dexp(n).RFminG(d)= minG;
Exp(expN).Dexp(n).RFmaxG(d)=maxG; Exp(expN).Dexp(n).RFmaxG(d)=maxG;
Exp(expN).Dexp(n).RFstdG(d)=RFstdG; Exp(expN).Dexp(n).RFstdG(d)=RFstdG;
Exp(expN).Dexp(n).RFmeanG(d)=RFmeanG; Exp(expN).Dexp(n).RFmeanG(d)=RFmeanG;
Exp(expN).Dexp(n).RFcmpGL.dm(d).Lvals=vv(medianIndxD,d); %17_1201 TrendOL Exp(expN).Dexp(n).RFcmpGL.dm(d).Lvals=vv(medianIndxD,d); %17_1201 TrendOL
Exp(expN).Dexp(n).RFcmpGL.dm(d).med=median(vv(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpGL.dm(d).med=median(vv(medianIndxD,d)); %For Ref Composite 17_1009
Exp(expN).Dexp(n).RFcmpGL.dm(d).mean=mean(vv(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpGL.dm(d).mean=mean(vv(medianIndxD,d)); %For Ref Composite 17_1009
@@ -673,37 +612,17 @@ Exp(expN).Dexp(n).RFcmpGr.dm(d).mean= mean(vvr(medianIndxD,d)); %For Ref Composi
Exp(expN).Dexp(n).RFcmpGr.dm(d).std=std(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpGr.dm(d).std=std(vvr(medianIndxD,d)); %For Ref Composite 17_1009
Exp(expN).Dexp(n).RFcmpGr.dm(d).min=min(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpGr.dm(d).min=min(vvr(medianIndxD,d)); %For Ref Composite 17_1009
Exp(expN).Dexp(n).RFcmpGr.dm(d).max=max(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(expN).Dexp(n).RFcmpGr.dm(d).max=max(vvr(medianIndxD,d)); %For Ref Composite 17_1009
end
end end
end end
end % if exist('drf','var') % EZusrSelRef
%END OF DISPERSE REFERENCE PLATAES CALCULATIONS AND LIST ADDITIONS
%*********************************************************************
%Added 17-1023 For User Addition of Gene Composites to ListBox
%Expaa{expN,n}= aa; Expbb{expN,n}= bb;
%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
%********************************************************************
%EZusrSelRef %*
%********************************************************************
%****************************************************************************************************
gnLstRaw=strcat(aa(:,1),aa(:,2)); gnLstRaw=strcat(aa(:,1),aa(:,2));
Exp(expN).Dexp(n).srtGnLst=sort(gnLstRaw); Exp(expN).Dexp(n).srtGnLst=sort(gnLstRaw);
orfLstRaw=strcat(bb(:,1),bb(:,2)); orfLstRaw=strcat(bb(:,1),bb(:,2));
Exp(expN).Dexp(n).srtOrfLst=sort(orfLstRaw); Exp(expN).Dexp(n).srtOrfLst=sort(orfLstRaw);
%####################################################################
%
%{ %{
%set(handles.MPsldr2,'max',length(MP)); %set(handles.MPsldr2,'max',length(MP));
%set(handles.DMsldr2,'max',length(DM.drug)); %set(handles.DMsldr2,'max',length(DM.drug));
@@ -725,6 +644,3 @@ Exp(expN).Dexp(n).srtOrfLst= sort(orfLstRaw);
%set(handles.DMsldr2,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]); %set(handles.DMsldr2,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]);
%set(handles.Tptsldr2,'SliderStep',[1/tPtsSize 1/tPtsSize]); %set(handles.Tptsldr2,'SliderStep',[1/tPtsSize 1/tPtsSize]);
%} %}

View File

@@ -1,7 +1,6 @@
% EZsingleExUserRF % EZsingleExUserRF
global exp global exp
usrRefFg=0; usrRefFg=0;
prompt={'Enter GeneName to use as Reference:',... prompt={'Enter GeneName to use as Reference:',...
'Enter Specifics Term if used to futher specify Reference '} 'Enter Specifics Term if used to futher specify Reference '}
@@ -15,28 +14,23 @@ global exp
rfGnSp=strcat(rfGene,rfSpec); rfGnSp=strcat(rfGene,rfSpec);
if strcmpi(rfSpec,'None'), rfGnSp=strcat(rfGene,'-'); end if strcmpi(rfSpec,'None'), rfGnSp=strcat(rfGene,'-'); end
% for n=1:size(matFile,2) % for n=1:size(matFile,2)
n=1; n=1;
%********************************************************************* EZmultiGeneRFsLst
EZmultiGeneRFsLst %** EZdiagRFsSheet
%*********************************************************
EZdiagRFsSheet %**
%********************
Exp(expN).Dexp(n).RFrnames=rnames; Exp(expN).Dexp(n).RFrnames=rnames;
Exp(expN).Dexp(n).RFdata=data; Exp(expN).Dexp(n).RFdata=data;
%*********************************************************
RFconfig=0; RFconfig=0;
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean')) ...
~isempty(Exp(expN).Dexp(n).RFmean)&&... && ~isempty(Exp(expN).Dexp(n).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
isempty(Exp(expN).Dexp(n).RFmeanG) && isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=1; RFconfig=1;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))==0 ||... if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))==0 ...
isempty(Exp(expN).Dexp(n).RFmean)&&... || isempty(Exp(expN).Dexp(n).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
~isempty(Exp(expN).Dexp(n).RFmeanG) && ~isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=2; RFconfig=2;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&...
@@ -47,7 +41,6 @@ if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&...
end end
Exp(expN).RFconfig=RFconfig; Exp(expN).RFconfig=RFconfig;
Exp(expN).Dexp(n).RFconfig=RFconfig; Exp(expN).Dexp(n).RFconfig=RFconfig;
%**********************************************
try msgBadGeneName, catch, end try msgBadGeneName, catch, end
try try
Exp(expN).Dexp(n).resetHtmpTg =5; %Exp(expN).resetHtmpTg =5; Exp(expN).Dexp(n).resetHtmpTg =5; %Exp(expN).resetHtmpTg =5;
@@ -57,16 +50,8 @@ try
end end
catch catch
end end
%***************************
%********************************************************************* % Auto select Zone and load listboxGnOrf data
%end
%###############################################################################
%}
%********Auto select Zone and load listboxGnOrf data**********
DexpN=1; DexpN=1;
zeroCLn=zeros(1,DMnum); zeroCLn=zeros(1,DMnum);
Exp(expN).expLoadCnt=Exp(expN).expLoadCnt+1; expLdCnt=Exp(expN).expLoadCnt; Exp(expN).expLoadCnt=Exp(expN).expLoadCnt+1; expLdCnt=Exp(expN).expLoadCnt;
@@ -96,7 +81,6 @@ if expN==2
end end
DNLaxes2=handles.DNLaxes2; DNLaxes2=handles.DNLaxes2;
Exp(2).hzeroCLn(expLdCnt)=plot(DNLaxes2,zeroCLn,1:DMnum,'y'); Exp(2).hzeroCLn(expLdCnt)=plot(DNLaxes2,zeroCLn,1:DMnum,'y');
end end
if expN==3 if expN==3
@@ -118,13 +102,11 @@ if Exp(4).interacPBsel==0 %if interaction "raw" don't show a center line
try try
set(Exp(expN).hzeroCLn(i),'visible','off'); set(Exp(expN).hzeroCLn(i),'visible','off');
catch catch
catchissue='Ln521'
i i
end end
end end
end end
%***************************
% HtMapTog 'string', 'Current user L/N' selection' % HtMapTog 'string', 'Current user L/N' selection'
Exp(expN).Dexp(DexpN).spotIndx=[]; Exp(expN).Dexp(DexpN).spotIndx=[];
if expN==1, if expN==1,
@@ -143,5 +125,3 @@ if expN==3,
EZhtMap EZhtMap
end end
htMapTogPBfg=0; htMapTogPBfg=0;
%*******************************************************************

View File

@@ -1,14 +1,12 @@
function EZspotview(expN,DexpN, imLoc,OLresDir,OLplateNum,NoOLay) function EZspotview(expN,DexpN, imLoc,OLresDir,OLplateNum,NoOLay)
datacursormode(gcf)
global Exp global Exp
global ghandles global ghandles
datacursormode(gcf)
w=pwd; w=pwd;
aCnt=0; aCnt=0;
prevExp=0; prevExp=0;
if NoOLay==0 if NoOLay==0
cd(fullfile(char(OLresDir))) cd(fullfile(char(OLresDir)))
cd .. cd ..
expDir=pwd; expDir=pwd;
@@ -21,12 +19,10 @@ if NoOLay==0
if prevExp==0 if prevExp==0
expDir=Exp(expN).Dexp(DexpN).ExpFoldr; expDir=Exp(expN).Dexp(DexpN).ExpFoldr;
else else
cd(fullfile(char(OLresDir))) cd(fullfile(char(OLresDir)))
cd .. cd ..
expDir=pwd; expDir=pwd;
cd(w) cd(w)
%expDir=fullfile(char(OLresDir),'..'); %expDir=fullfile(char(OLresDir),'..');
end end
else else
@@ -34,25 +30,21 @@ else
end end
%ExpHmDir=char(Exp(expN).Dexp(DexpN).resDir); %ExpHmDir=char(Exp(expN).Dexp(DexpN).resDir);
try close(ghandles.hfstrip), catch, end % hfIm try close(ghandles.hfstrip), catch, end % hfIm
%*************CIRCLE related************************* % CIRCLE related
doCircle=1; doCircle=1;
radius=14; radius=14;
diaExt=2*(radius+1); diaExt=2*(radius+1);
%>>>>>>>>>>>>>>>>>>>>>>
EZvNIcircle EZvNIcircle
%<<<<<<<<<<<<<<<<<<<<<<<
rIm=imLoc(1); % use the "picture/Image' r and c not the plate annotation r c) rIm=imLoc(1); % use the "picture/Image' r and c not the plate annotation r c)
cIm=imLoc(2); cIm=imLoc(2);
plateNum=Exp(expN).Dexp(DexpN).plateNum; plateNum=Exp(expN).Dexp(DexpN).plateNum;
%*****************************************
if prevExp==0 if prevExp==0
FexpScanSpots=Exp(expN).Dexp(DexpN).FexpScanSpots; FexpScanSpots=Exp(expN).Dexp(DexpN).FexpScanSpots;
FexpScanBMtp=Exp(expN).Dexp(DexpN).FexpScanBMtp; FexpScanBMtp=Exp(expN).Dexp(DexpN).FexpScanBMtp;
anlZoneRefs=Exp(expN).Dexp(DexpN).anlZoneRefs; anlZoneRefs=Exp(expN).Dexp(DexpN).anlZoneRefs;
ImParMat=Exp(expN).Dexp(DexpN).ImParMat; ImParMat=Exp(expN).Dexp(DexpN).ImParMat;
else else
% check if the request expJob is already loaded in one of the other zones % check if the request expJob is already loaded in one of the other zones
matchfound=0; matchfound=0;
@@ -72,17 +64,14 @@ else
load(fullfile(char(OLresDir),'Fotos','anlZones')) load(fullfile(char(OLresDir),'Fotos','anlZones'))
load(fullfile(char(OLresDir),'Fotos','BGatTpts')) load(fullfile(char(OLresDir),'Fotos','BGatTpts'))
load(fullfile(char(OLresDir),'PTmats','NImParameters')) load(fullfile(char(OLresDir),'PTmats','NImParameters'))
end %if matchfound==1 end
end %if prevExp==0 end
% Parameter Entry
%**************Parameter Entry******************
width=ImParMat(5); width=ImParMat(5);
widthEx=width-1; %width extention from reference point widthEx=width-1; %width extention from reference point
%================================================================= % Start Spot selection and Manipulation section
%=================================================================
%++++Start Spot selection and Manipulation section+++++++++++
Fcutsc=[]; Fcutsc=[];
Fstrip=[]; Fstrip=[];
%{ %{
@@ -105,11 +94,10 @@ coord=[];
try try
% FtifFile=fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat(num2str(tPt),'.bmp')); %char(tifFileLst(tPt)); % FtifFile=fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat(num2str(tPt),'.bmp')); %char(tifFileLst(tPt));
FtifFile=fullfile(char(expDir),num2str(plateNum),strcat(num2str(tPt),'.bmp')); FtifFile=fullfile(char(expDir),num2str(plateNum),strcat(num2str(tPt),'.bmp'));
Fimg=imread(FtifFile); Fimg=imread(FtifFile);
% For Visualization Purposes *********************** % For Visualization Purposes
Fram=ones(2075,1400); %(size(Empsc,1),size(Empsc,2)); Fram=ones(2075,1400); %(size(Empsc,1),size(Empsc,2));
%FRAME ANALYSIS AREA******************************************************* % FRAME ANALYSIS AREA
if size(FexpScanSpots,2)>1 if size(FexpScanSpots,2)>1
coord=FexpScanSpots{plateNum}{rIm,cIm,tPt}; coord=FexpScanSpots{plateNum}{rIm,cIm,tPt};
else else
@@ -123,12 +111,10 @@ end
xLoc=xyLoc(2); xLoc=xyLoc(2);
yLoc=xyLoc(1); yLoc=xyLoc(1);
%*************CIRCLE related************************* % CIRCLE related
doCircle=1; % temp test value insertion to get square images
doCircle=1; %Temp test value insertion to get square images if doCircle==1
if doCircle==1,
Fram=FoptCirMask; Fram=FoptCirMask;
else else
% 1->2 across rt 1, 2-4 % 1->2 across rt 1, 2-4
Fram(yLoc,xLoc:(xLoc+widthEx))=0.8; Fram(yLoc,xLoc:(xLoc+widthEx))=0.8;
@@ -140,8 +126,7 @@ Fram(yLoc:(yLoc+widthEx),(xLoc+1+widthEx))=0.8;
Fram((yLoc+1+widthEx),(xLoc+1):(xLoc+1+widthEx))=0.8; Fram((yLoc+1+widthEx),(xLoc+1):(xLoc+1+widthEx))=0.8;
Fram=Fram(coord(1):coord(3),coord(2):coord(4)); Fram=Fram(coord(1):coord(3),coord(2):coord(4));
end end
%CUT SPOT OUT OF IMAGE***************************************************** % Cut Spot Out Of Image
% Fbg=FexpScanBMtp{selScan,1}(rIm,cIm,tPt); % Fbg=FexpScanBMtp{selScan,1}(rIm,cIm,tPt);
Fbg=FexpScanBMtp{plateNum}(rIm,cIm,tPt); %{selScan,1} Fbg=FexpScanBMtp{plateNum}(rIm,cIm,tPt); %{selScan,1}
% Fimg=imread(FtifFile); %,'PixelRegion', {[coord(1),coord(3)],[coord(2),coord(4)]}); % Fimg=imread(FtifFile); %,'PixelRegion', {[coord(1),coord(3)],[coord(2),coord(4)]});
@@ -153,12 +138,10 @@ if doCircle==1
% Fram=padarray(Fram,[expansion expansion],1,'pre'); % Fram=padarray(Fram,[expansion expansion],1,'pre');
Fram=padarray(Fram,[varExtPre],1,'pre'); Fram=padarray(Fram,[varExtPre],1,'pre');
Fram=padarray(Fram,[varExtPost],1,'post'); Fram=padarray(Fram,[varExtPost],1,'post');
% Fram=padarray(Fram,rem(varExt,2),1,'post'); % Fram=padarray(Fram,rem(varExt,2),1,'post');
%Fram=padarray(Fram,floor((varExt-2)./2),1); %Fram=padarray(Fram,floor((varExt-2)./2),1);
end end
%INVERT IMGAGE % Invert Image
Fcutsc=double(Fcutsc) .* Fram; Fcutsc=double(Fcutsc) .* Fram;
%Fcutsc=Fcutsc .* uint8(Fram); %Fcutsc=Fcutsc .* uint8(Fram);
Fcutsc=uint8(Fcutsc); Fcutsc=uint8(Fcutsc);
@@ -184,25 +167,22 @@ if aCnt>1
%Hspace=zeros(size(Fstrip,1),4)+255; %Hspace=zeros(size(Fstrip,1),4)+255;
Fstrip=horzcat(Fstrip,vcat,Hspace); Fstrip=horzcat(Fstrip,vcat,Hspace);
end end
% For Visualization Purposes only
% For Visualization Purposes only
if makeVis==1 if makeVis==1
% if aCnt==1,figure;end % if aCnt==1,figure;end
% resIm=uint8((double(BGsc) + OptmapOnesDbl) .* double(fullsc)); % resIm=uint8((double(BGsc) + OptmapOnesDbl) .* double(fullsc));
% clear('OptmapOnesDbl') % clear('OptmapOnesDbl')
hfstrip=imagesc(Fcutsc); colormap(gray); %hfstrip=imshow(Fcutsc); colormap(gray); %hfscanIm=imagesc(Fcutsc); colormap(gray); hfstrip=imagesc(Fcutsc); colormap(gray); %hfstrip=imshow(Fcutsc); colormap(gray); %hfscanIm=imagesc(Fcutsc); colormap(gray);
ghandles.hfstrip=gcf; ghandles.hfstrip=gcf;
haxis=gca; haxis=gca;
title(strcat('Scan',num2str(plateNum),'->timePt-',num2str(tPt))); title(strcat('Scan',num2str(plateNum),'->timePt-',num2str(tPt)));
clf(hfstrip,'reset'); colormap(gray); %clf(hfscanIm,'reset'); colormap(gray); clf(hfstrip,'reset'); colormap(gray); %clf(hfscanIm,'reset'); colormap(gray);
set(ghandles.hfstrip,'NumberTitle','off') set(ghandles.hfstrip,'NumberTitle','off')
end end
expLabel=strcat('->',char(fullfile(char(OLresDir),num2str(OLplateNum)))) expLabel=strcat('->',char(fullfile(char(OLresDir),num2str(OLplateNum))))
% catch % catch
% expLabel=strcat('->',char(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum)))) % expLabel=strcat('->',char(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum))))
if expN==1 if expN==1
set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay1,'string')),expLabel)) %ghandles.hfIm %{'ExpOutmat'} %strcat('EASYconsole- ',char(resDir))) set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay1,'string')),expLabel)) %ghandles.hfIm %{'ExpOutmat'} %strcat('EASYconsole- ',char(resDir)))
elseif expN==2 elseif expN==2
@@ -210,13 +190,13 @@ end
elseif expN==3 elseif expN==3
set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay3,'string')),expLabel)) set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay3,'string')),expLabel))
end end
%hgsave(fullfile(resDir,'Fotos',strcat('FScan',num2str(selScan),'_timePt-',num2str(tPt)))); %hgsave(fullfile(resDir,'Fotos',strcat('FScan',num2str(selScan),'_timePt-',num2str(tPt))));
catch catch
end end
end %for tPt=1:tPtsSize end of for Fotos Spot image cutout end
catch catch
end end
%figure(ghandles.hFstrip) %figure(ghandles.hFstrip)
imshow(Fstrip); imshow(Fstrip);
%{ %{
@@ -236,10 +216,5 @@ imshow(Fstrip);
%datacursormode off; %datacursormode off;
%datacursormode on; %datacursormode on;
%close(figure(hsafety)) %close(figure(hsafety))
end %function end end
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

View File

@@ -31,30 +31,25 @@ if n==1 && ~exist('RF1scanN','var') && ~exist('RF2scanN','var') %change || &&
answer=inputdlg(prompt,dlg_title,num_lines,def); answer=inputdlg(prompt,dlg_title,num_lines,def);
rfGenestr=cell2mat(answer(1)); rfGenestr=cell2mat(answer(1));
rfSpec=cell2mat(answer(2)); rfSpec=cell2mat(answer(2));
end end
%try %try
for mp=1:length(Exp(expN).Dexp(DexpN).MP) for mp=1:length(Exp(expN).Dexp(DexpN).MP)
for ind384=1:384 for ind384=1:384
spN=spN+1; spN=spN+1;
end end
%catch %catch
%end %try for user selected Reference routine %end %try for user selected Reference routine
end end
%***********DISPERSE REFERENCE PLATES
% Disperse Reference Plates
Exp(expN).Dexp(DexpN).RFmdPindx=[]; Exp(expN).Dexp(DexpN).RFmdPindx=[];
Exp(expN).Dexp(DexpN).RFmdPpltN=[]; Exp(expN).Dexp(DexpN).RFmdPpltN=[];
if exist('drf','var') % ('RF1scanN','var') if exist('drf','var') % ('RF1scanN','var')
%Det. index of change from one MP to the next %Det. index of change from one MP to the next
i=2; i=2;
chgIndx(1)=1; chgIndx(1)=1;
for j=1:length(drf(:,3)) for j=1:length(drf(:,3))
if j>1 if j>1
if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end end
@@ -63,9 +58,7 @@ chgIndx(length(chgIndx)+1)= length(drf)+1;
uu=zeros(size(drf,1),4); uu=zeros(size(drf,1),4);
uu(:,1:4)=cell2mat(drf(:,3:6)) uu(:,1:4)=cell2mat(drf(:,3:6))
vv=zeros(length(drf),DMnum); vv=zeros(length(drf),DMnum);
%************************************
dMPs=unique(cell2mat(drf(:,3))); dMPs=unique(cell2mat(drf(:,3)));
%*****************************************
%{ %{
for mm=1:MPnum for mm=1:MPnum
nonZrfIndx.mp{mm,:}=drfPindx((find(drfPindx(:,mm))),mm); nonZrfIndx.mp{mm,:}=drfPindx((find(drfPindx(:,mm))),mm);
@@ -74,16 +67,13 @@ vv= zeros(length(drf),DMnum);
%} %}
% nzValsG=zeros(DMnum,size(drf,1)); % nzValsG=zeros(DMnum,size(drf,1));
% nzValsAcc=zeros(DMnum,384); % nzValsAcc=zeros(DMnum,384);
for mm=1:length(dMPs) % length(chgIndx) for mm=1:length(dMPs) % length(chgIndx)
for d=1:(DMnum) for d=1:(DMnum)
medianIndxDisp=[]; medianIndxDisp=[];
NZrefIndxP=[]; NZrefIndxP=[];
nonZeroValsP=[]; nonZeroValsP=[];
medValLstDisp=[]; medValLstDisp=[];
rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d); rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d);
try % Determine the dispersed RFs median mean and std if such exist try % Determine the dispersed RFs median mean and std if such exist
NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); %find(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(drf(chgIndx(cI):chgIndx(cI+1)),5)); NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); %find(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(drf(chgIndx(cI):chgIndx(cI+1)),5));
% vv=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); % vv=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
@@ -94,15 +84,15 @@ try % Determine the dispersed RFs median mean and std if such exist
minDisp=min(nonZeroValsP); minDisp=min(nonZeroValsP);
maxDisp=max(nonZeroValsP); maxDisp=max(nonZeroValsP);
drfVals=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); drfVals=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
%nzValsAcc(mm).DM(d,:)=nonZeroValsP; %nzValsAcc(mm).DM(d,:)=nonZeroValsP;
%MEDIAN Determination for PLATES with Dispersed RFs %MEDIAN Determination for PLATES with Dispersed RFs
%NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5)); %NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
if isempty(NZrefIndxP), nonZeroCntDisp=0, medianIndxDisp= NZrefIndxP; if isempty(NZrefIndxP)
else nonZeroCntDisp=length(NZrefIndxP); nonZeroCntDisp=0
medianIndxDisp=NZrefIndxP;
else
nonZeroCntDisp=length(NZrefIndxP);
end end
if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end
if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)~=0, medianIndxDisp=NZrefIndxP; end if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)~=0, medianIndxDisp=NZrefIndxP; end
if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero
@@ -113,14 +103,12 @@ if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a med
RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); %drfPindx((RFmd1posIndx),dMPs(mm)); RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); %drfPindx((RFmd1posIndx),dMPs(mm));
RFmd1locD(1)=ceil(RFmd1posD/24); %calc r value RFmd1locD(1)=ceil(RFmd1posD/24); %calc r value
RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); %calc c value RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); %calc c value
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RF1mdP(',num2str(d),')')}; aa(lstindx,1)={strcat('RF1mdP(',num2str(d),')')};
aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))};
bb(lstindxOrf,1)={strcat('RF1mdP(',num2str(d),')')}; bb(lstindxOrf,1)={strcat('RF1mdP(',num2str(d),')')};
bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))};
Exp(expN).Dexp(DexpN).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(DexpN).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=RFmd1posD; Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=RFmd1posD;
Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also??? Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also???
@@ -138,36 +126,28 @@ else
firstZeroD=drfPindx((firstZeroDindx),dMPs(mm)); firstZeroD=drfPindx((firstZeroDindx),dMPs(mm));
Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=firstZeroD; Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=firstZeroD;
Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number??? Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number???
end
catch
end %~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 ln584
catch %try ln565
medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with bogus Plate spot value!' medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with bogus Plate spot value!'
try try
firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first'); firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first');
firstZeroPindx=uu(firstZeroindxD,4); firstZeroPindx=uu(firstZeroindxD,4);
Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=firstZeroPindx; Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=firstZeroPindx;
catch catch
catchissue='try at Ln565'
Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=384; %if crapout,Then use spot384 as default to keep going Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=384; %if crapout,Then use spot384 as default to keep going
end end
try try
Exp(expN).Dexp(DexpN).RFmdPpltN=dMPs(mm); Exp(expN).Dexp(DexpN).RFmdPpltN=dMPs(mm);
catch catch
catchissue='Ln619'
Exp(expN).Dexp(DexpN).RFmdPpltN=1; %This might keep from breaking BUT ??? Exp(expN).Dexp(DexpN).RFmdPpltN=1; %This might keep from breaking BUT ???
end end
error='EZexpSel lineAfter 565' end
end %try ~ln565
end % for d=0:DMnum end % for d=0:DMnum
end % for mm=1:length(dMPs) end % for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES****************************************************************** % Calc. Global Mean, Std, And Median For Distributed References
uu=horzcat(uu,vv); uu=horzcat(uu,vv);
for d=1:DMnum for d=1:DMnum
medianIndxG=[]; medianIndxG=[];
@@ -178,15 +158,17 @@ for d=1:DMnum
RFstdG=std(nonzeros(vv(:,d))); RFstdG=std(nonzeros(vv(:,d)));
NZrfIndxG=find(nonzeros(vv(:,d))); NZrfIndxG=find(nonzeros(vv(:,d)));
if isempty(RFmeanG), nonZeroCntD=0, %medianIndxDisp= RFmeanG(d); if isempty(RFmeanG)
else nonZeroCntD= length(nonzeros(vv(:,d))); nonZeroCntD=0
% medianIndxDisp=RFmeanG(d);
else
nonZeroCntD=length(nonzeros(vv(:,d)));
end end
% Calc. of median requires an odd number of indx items % Calc. of median requires an odd number of indx items
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end
if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) % To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) % To calc. a median, more than 15% of spots must be nonZero
mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d))); mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d)));
nzPosIndxDG=find(mvalsDG==vv(:,d)); nzPosIndxDG=find(mvalsDG==vv(:,d));
RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value
@@ -208,16 +190,10 @@ Exp(expN).Dexp(DexpN).RFminG(d)= minG;
Exp(expN).Dexp(DexpN).RFmaxG(d)=maxG; Exp(expN).Dexp(DexpN).RFmaxG(d)=maxG;
Exp(expN).Dexp(DexpN).RFstdG(d)=RFstdG; Exp(expN).Dexp(DexpN).RFstdG(d)=RFstdG;
Exp(expN).Dexp(DexpN).RFmeanG(d)=RFmeanG; Exp(expN).Dexp(DexpN).RFmeanG(d)=RFmeanG;
end end
end end
end
end % if exist('drf','var')
%END OF DISPERSE REFERENCE PLATAES CALCULATIONS AND LIST ADDITIONS
%*********************************************************************
catch catch
msg='Failed attempt to apply User Selected Reference' msg='Failed attempt to apply User Selected Reference'
end %if n==1 && ~exist('RF1scanN','var') && ~exist('RF2scanN','var') end

View File

@@ -7,7 +7,6 @@ global zonePB
RFcmpGFlg=0; %Test 180105 as it goes to EZmDayTrend.m RFcmpGFlg=0; %Test 180105 as it goes to EZmDayTrend.m
lstBoxCmpFlg=0; lstBoxCmpFlg=0;
curKey=get(gcf,'currentkey') curKey=get(gcf,'currentkey')
htMapFg=0; htMapFg=0;
@@ -31,7 +30,6 @@ lstBoxCmpFlg=0;
% Exp(expN).DexpN=DexpN; % Exp(expN).DexpN=DexpN;
if strcmp(Exp(expN).DexpType,'single'), DexpN=1; end if strcmp(Exp(expN).DexpType,'single'), DexpN=1; end
if exist('OLay','var'), clear ExpN; end if exist('OLay','var'), clear ExpN; end
if ~exist('OLay','var') if ~exist('OLay','var')
try try
ImageSel=expN<4 ImageSel=expN<4
@@ -41,33 +39,27 @@ try
tPtSel=Exp(expN).Dexp(DexpN).tPtSel; %floor(get(handles.Tptsldr1,'value')); tPtSel=Exp(expN).Dexp(DexpN).tPtSel; %floor(get(handles.Tptsldr1,'value'));
plateNum=Exp(expN).Dexp(DexpN).plateNum; %(MPsel1-1)*destPerMP1 + pertSel1; plateNum=Exp(expN).Dexp(DexpN).plateNum; %(MPsel1-1)*destPerMP1 + pertSel1;
scan=Exp(expN).Dexp(DexpN).scan; scan=Exp(expN).Dexp(DexpN).scan;
MP=Exp(expN).Dexp(DexpN).MP; MP=Exp(expN).Dexp(DexpN).MP;
ptrPos=[cpos(1),cpos(2)]; %for VerticleImage ptrPos=[cpos(1),cpos(2)]; %for VerticleImage
if htMapFg==0 %Comes from spot image Iaxes if htMapFg==0 %Comes from spot image Iaxes
try try
for m=1:24 for m=1:24
for n=1:16 for n=1:16
coord=Exp(expN).Dexp(DexpN).FexpScanSpots{plateNum}{m,n,tPtSel}; %replace {1} with {plateNum} coord=Exp(expN).Dexp(DexpN).FexpScanSpots{plateNum}{m,n,tPtSel}; %replace {1} with {plateNum}
if ptrPos(2)> coord(1) && ptrPos(2)< coord(3) if ptrPos(2)> coord(1) && ptrPos(2)< coord(3)
if ptrPos(1)> coord(2) && ptrPos(1)<coord(4) if ptrPos(1)> coord(2) && ptrPos(1)<coord(4)
picLoc1=[n,m]; picLoc1=[n,m];
spotFrm=Exp(expN).Dexp(DexpN).FexpScanSpots{plateNum}{m,n,tPtSel}; %20160108 spotFrm=Exp(expN).Dexp(DexpN).FexpScanSpots{plateNum}{m,n,tPtSel}; %20160108
end end
end end
end %for n=1:16 end
end %for m=1:24 end
destcompMsg='GoodDataTip'; destcompMsg='GoodDataTip';
catch catch
destcompMsg='BadDataTip'; destcompMsg='BadDataTip';
m m
n n
end end
plateLoc=[(17-picLoc1(1)) picLoc1(2)]; plateLoc=[(17-picLoc1(1)) picLoc1(2)];
indx=(plateLoc(1)-1)*24+plateLoc(2); indx=(plateLoc(1)-1)*24+plateLoc(2);
elseif htMapFg==1 %Comes from HeatMap image Haxes elseif htMapFg==1 %Comes from HeatMap image Haxes
@@ -75,14 +67,12 @@ try
indx=(plateLoc(1)-1)*24+plateLoc(2); indx=(plateLoc(1)-1)*24+plateLoc(2);
end end
Exp(expN).Dexp(DexpN).spotIndx=indx; Exp(expN).Dexp(DexpN).spotIndx=indx;
K=scan(1,plateNum).plate(1).CFout(indx,3); Ks=num2str(K); K=scan(1,plateNum).plate(1).CFout(indx,3); Ks=num2str(K);
r=scan(1,plateNum).plate(1).CFout(indx,4); rs=num2str(r); r=scan(1,plateNum).plate(1).CFout(indx,4); rs=num2str(r);
l=scan(1,plateNum).plate(1).CFout(indx,5); Ls=num2str(l); l=scan(1,plateNum).plate(1).CFout(indx,5); Ls=num2str(l);
try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end
try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end
try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end
Kl=scan(1,plateNum).plate(1).CFout(indx,7); Kl=scan(1,plateNum).plate(1).CFout(indx,7);
Ku=scan(1,plateNum).plate(1).CFout(indx,8); Ku=scan(1,plateNum).plate(1).CFout(indx,8);
rl=scan(1,plateNum).plate(1).CFout(indx,9); rl=scan(1,plateNum).plate(1).CFout(indx,9);
@@ -99,7 +89,6 @@ gFast= Ku ./ (1 + exp(-ru.* (t - lfast )));
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
tser=(scan(1,plateNum).plate(1).t0Series(:)); tser=(scan(1,plateNum).plate(1).t0Series(:));
rawData=scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx); rawData=scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx);
if expN==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1; if expN==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1;
Exp(1).traceN=Exp(1).traceN+1; Exp(1).traceN=Exp(1).traceN+1;
traceN=Exp(1).traceN; traceN=Exp(1).traceN;
@@ -116,28 +105,23 @@ plot(plotAxes,t,g);hold(plotAxes,'on');
plot(plotAxes,tser,rawData,'g*'); plot(plotAxes,tser,rawData,'g*');
plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r'); plot(plotAxes,t,gSlow,'y');plot(plotAxes,t,gFast,'r');
hold(plotAxes,'off'); hold(plotAxes,'off');
try
try for i=1:length(Exp(expN).hOL(:)),set(Exp(expN).hOL(i),'color',[0 0 1]); end, catch, end %ZoneRelated for i=1:length(Exp(expN).hOL(:)),set(Exp(expN).hOL(i),'color',[0 0 1]); end, catch, end %ZoneRelated
if verLessThan('matlab','8.4') if verLessThan('matlab','8.4')
else % accomodate new matlab changes after 2014a fix 23_0807 else % accomodate new matlab changes after 2014a fix 23_0807
tempFig=figure; tempFig=figure;
end end
Exp(expN).hOL(traceN)=plot(OLaxes,t,g);hold on; Exp(expN).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(expN).hOL(traceN),'color',[1 0 0]) set(Exp(expN).hOL(traceN),'color',[1 0 0])
Exp(expN).hOLb(traceN)=plot(OLaxes,tser,rawData,'g*'); Exp(expN).hOLb(traceN)=plot(OLaxes,tser,rawData,'g*');
% Added for Composite Plot utility [C] 170419 % Added for Composite Plot utility [C] 170419
Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K; Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K;
%************************************************
if verLessThan('matlab','8.4') if verLessThan('matlab','8.4')
else % accomodate new matlab changes after 2014a fix update 23_0807 else % accomodate new matlab changes after 2014a fix update 23_0807
close(tempFig) close(tempFig)
end end
catch catch
%{ %{
g=K ./ (1 + exp(-r.* (t - l ))); g=K ./ (1 + exp(-r.* (t - l )));
@@ -147,7 +131,7 @@ catch
plot(plotAxes, plot(t,g),hold on,plot(tser,rawData,'g*'),hold off); plot(plotAxes, plot(t,g),hold on,plot(tser,rawData,'g*'),hold off);
plot(OLaxes, plot(t,g),hold on,plot(tser,rawData,'g*'); plot(OLaxes, plot(t,g),hold on,plot(tser,rawData,'g*');
%} %}
end %trycatch end
% Get the DM agar description % Get the DM agar description
if expN==1,DMstr=char(get(ghandles.DM1,'string'));end if expN==1,DMstr=char(get(ghandles.DM1,'string'));end
if expN==2,DMstr=char(get(ghandles.DM2,'string'));end if expN==2,DMstr=char(get(ghandles.DM2,'string'));end
@@ -159,10 +143,8 @@ tPtStr=strcat('T=', num2str(scan(1,plateNum).plate(1).t0Series(tPtSel)));
geneOrfstr=strcat(gene,'_',orf,'_','r',num2str(plateLoc(1)),'c',num2str(plateLoc(2)),'_',tPtStr); geneOrfstr=strcat(gene,'_',orf,'_','r',num2str(plateLoc(1)),'c',num2str(plateLoc(2)),'_',tPtStr);
grfgenestr=strcat(gene,'_',orf,'_','r',num2str(plateLoc(1)),'c',num2str(plateLoc(2))); grfgenestr=strcat(gene,'_',orf,'_','r',num2str(plateLoc(1)),'c',num2str(plateLoc(2)));
selGnOrf=grfgenestr; % added for EZdestComp.m and EZmDayTrend.m selGnOrf=grfgenestr; % added for EZdestComp.m and EZmDayTrend.m
graphStr=strcat(grfgenestr,'_','L=',Lstr,'_','r=',rstr,'_','K=',Kstr); graphStr=strcat(grfgenestr,'_','L=',Lstr,'_','r=',rstr,'_','K=',Kstr);
spotDescrip=strcat(graphStr,'->',DMstr); spotDescrip=strcat(graphStr,'->',DMstr);
xp=char(Exp(expN).Dexp(DexpN).resDir); xp=char(Exp(expN).Dexp(DexpN).resDir);
if ispc, if ispc,
slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'\'); slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'\');
@@ -180,14 +162,13 @@ Exp(expN).hOLresDir(traceN)= {Exp(expN).Dexp(DexpN).resDir};
Exp(expN).hOLplateNum(traceN)=plateNum; Exp(expN).hOLplateNum(traceN)=plateNum;
% traceData=vertcat(get(Exp(OLay).hOL(traceN),'XData'),get(ghandles.Exp(OLay).hOL(traceN),'YData')); % traceData=vertcat(get(Exp(OLay).hOL(traceN),'XData'),get(ghandles.Exp(OLay).hOL(traceN),'YData'));
if expN==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value. if expN==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value.
if expN==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end if expN==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end
if expN==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end if expN==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end
if expN==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end % graphStr);end % Displays the value. if expN==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end % graphStr);end % Displays the value.
if expN==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end % graphStr);end if expN==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end % graphStr);end
if expN==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end % graphStr);end if expN==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end % graphStr);end
%************************* ********************* ***************************
try try
if expN==1, %&& get(ghandles.rotPB1,'value')~=1 if expN==1, %&& get(ghandles.rotPB1,'value')~=1
try if length(char(Exp(expN).hOLname(traceN)))>40,set(ghandles.OLay1,'FontSize',8);end, catch end try if length(char(Exp(expN).hOLname(traceN)))>40,set(ghandles.OLay1,'FontSize',8);end, catch end
@@ -210,7 +191,6 @@ try
catch catch
end end
%*******************************************************
%{ %{
if expN==1 if expN==1
zonesel=1; zonesel=1;
@@ -251,7 +231,7 @@ if expN==3
end end
end end
%} %}
%****************************************************************
% Zone PB set here as replacement for zonePB radio buttons 230815 % Zone PB set here as replacement for zonePB radio buttons 230815
if expN==1 if expN==1
zonesel=1; zonesel=1;
@@ -303,8 +283,6 @@ if expN==3
set(ghandles.listboxGnOrf,'string',Exp(3).Dexp(DexpN).srtGnLst) set(ghandles.listboxGnOrf,'string',Exp(3).Dexp(DexpN).srtGnLst)
end end
end end
%***********************************************************************
Exp(expN).Trace(traceN).UsrGLB=geneOrfstr; Exp(expN).Trace(traceN).UsrGLB=geneOrfstr;
Exp(expN).Trace(traceN).dmSel=pertSel; Exp(expN).Trace(traceN).dmSel=pertSel;
@@ -312,17 +290,11 @@ Exp(expN).Trace(traceN).DexpN= DexpN;
Exp(expN).Trace(traceN).Dexp(DexpN).DM(pertSel).UsrLvals=l; Exp(expN).Trace(traceN).Dexp(DexpN).DM(pertSel).UsrLvals=l;
Exp(expN).Trace(traceN).Dexp(DexpN).DM(pertSel).UsrKvals=K; Exp(expN).Trace(traceN).Dexp(DexpN).DM(pertSel).UsrKvals=K;
Exp(expN).Trace(traceN).Dexp(DexpN).DM(pertSel).Usrrvals=r; Exp(expN).Trace(traceN).Dexp(DexpN).DM(pertSel).Usrrvals=r;
%**************************************************************
catch catch
msg='NotImage' msg='NotImage'
end % trycatch expN<4 datatip selection from Image (not from an OverLay Plot) end
end
% Write Selected Trace Info to OLAY header
end %if ~exist('OLay','var')
%******************************************************************************************
%Write Selected Trace Info to OLAY header********************+++++++++++++++++*************
try try
OLayTest=OLay<4 OLayTest=OLay<4
msg='OLay' msg='OLay'
@@ -348,7 +320,6 @@ if htargetAxes==Exp(OLay).hOL(i)
plateNum=Exp(expN).Dexp(DexpN).plateNum plateNum=Exp(expN).Dexp(DexpN).plateNum
OLplateNum=Exp(OLay).hOLplateNum(i); OLplateNum=Exp(OLay).hOLplateNum(i);
seltraceN=i; seltraceN=i;
end end
if OLay==2 && get(ghandles.rotPB2,'value') ~=1 if OLay==2 && get(ghandles.rotPB2,'value') ~=1
set(htargetAxes,'color',[1 0 0]) set(htargetAxes,'color',[1 0 0])
@@ -380,16 +351,13 @@ if htargetAxes==Exp(OLay).hOL(i)
else else
msg='Cant Find trace' msg='Cant Find trace'
end end
end
end % => for i=1:length(Exp(OLay).hOL(:))
% Extract row and col values from stored trace label for dest compare plots(EZdestComp) % Extract row and col values from stored trace label for dest compare plots(EZdestComp)
% if a RFcmp_ is selected Need alternate method. % if a RFcmp_ is selected Need alternate method.
% if the Composite button is active, Need yet another method. % if the Composite button is active, Need yet another method.
try try
tracename=char(Exp(OLay).hOLname(seltraceN)) tracename=char(Exp(OLay).hOLname(seltraceN))
pos_=strfind(tracename,'_') pos_=strfind(tracename,'_')
rxcy=tracename(pos_(2):pos_(3)) rxcy=tracename(pos_(2):pos_(3))
cindx=strfind(rxcy,'c') cindx=strfind(rxcy,'c')
@@ -408,25 +376,19 @@ try
catch catch
msg='Not from an OLay selected trace' msg='Not from an OLay selected trace'
end end
catch catch
msg='Not in OLay frame-axis 0' msg='Not in OLay frame-axis 0'
end %=> try for Write Selected Trace Info to OLAY header****** end
% Hide selected plot trace: rotPBx used for 'Hide'
%HIDE HIDE HIDE ---------------------------------------------------
%HIDE selected plot trace****rotPBx used for 'Hide'****************
try try
OLayTest=OLay<4 OLayTest=OLay<4
msg='OLay' msg='OLay'
OLay OLay
if get(ghandles.rotPB1,'value') ==1 && OLay==1, if get(ghandles.rotPB1,'value') ==1 && OLay==1,
% make all traces blue % make all traces blue
for i=1:length(Exp(OLay).hOL(:)) for i=1:length(Exp(OLay).hOL(:))
set(Exp(OLay).hOL(i),'color',[0 0 1]) set(Exp(OLay).hOL(i),'color',[0 0 1])
end end
for i=1:length(Exp(OLay).hOL(:)) for i=1:length(Exp(OLay).hOL(:))
if htargetAxes==Exp(OLay).hOL(i) if htargetAxes==Exp(OLay).hOL(i)
hidAx1traceN=i hidAx1traceN=i
@@ -449,10 +411,9 @@ if get(ghandles.rotPB1,'value') ==1 && OLay==1,
OLresDir=Exp(OLay).hOLresDir(maxhN); OLresDir=Exp(OLay).hOLresDir(maxhN);
OLplateNum=Exp(OLay).hOLplateNum(maxhN); OLplateNum=Exp(OLay).hOLplateNum(maxhN);
end end
end end
%------HIDE 22222222222222222----- % Hide
if get(ghandles.rotPB2,'value')==1 && OLay==2, % if get(ghandles.rotPB2,'value')==1 && OLay==2, %
for j=1:length(Exp(OLay).hOL(:)) %Set all traces blue for j=1:length(Exp(OLay).hOL(:)) %Set all traces blue
try set(Exp(OLay).hOL(i),'color',[0 0 1]), catch, end try set(Exp(OLay).hOL(i),'color',[0 0 1]), catch, end
@@ -480,15 +441,14 @@ if get(ghandles.rotPB2,'value')==1 && OLay==2, %
OLresDir=Exp(OLay).hOLresDir(maxhN); OLresDir=Exp(OLay).hOLresDir(maxhN);
OLplateNum=Exp(OLay).hOLplateNum(maxhN); OLplateNum=Exp(OLay).hOLplateNum(maxhN);
end end
end %if rotPB2 ....==1 end
%------HIDE 33333333333333----- % Hide 3
if get(ghandles.rotPB3,'value') ==1 && OLay==3, if get(ghandles.rotPB3,'value') ==1 && OLay==3,
% make all traces blue % make all traces blue
for i=1:length(Exp(OLay).hOL(:)) for i=1:length(Exp(OLay).hOL(:))
try set(Exp(OLay).hOL(i),'color',[0 0 1]), catch, end try set(Exp(OLay).hOL(i),'color',[0 0 1]), catch, end
end end
for i=1:length(Exp(OLay).hOL(:)) for i=1:length(Exp(OLay).hOL(:))
if htargetAxes==Exp(OLay).hOL(i) if htargetAxes==Exp(OLay).hOL(i)
hidAx3traceN=i hidAx3traceN=i
@@ -511,20 +471,12 @@ if get(ghandles.rotPB3,'value') ==1 && OLay==3,
OLresDir=Exp(OLay).hOLresDir(maxhN); OLresDir=Exp(OLay).hOLresDir(maxhN);
OLplateNum=Exp(OLay).hOLplateNum(maxhN); OLplateNum=Exp(OLay).hOLplateNum(maxhN);
end end
end end
destcompMsg='Olay'; destcompMsg='Olay';
catch catch
msg='Not in OLay frame-axis 1' msg='Not in OLay frame-axis 1'
end end
%**********************************************************************************
NoOLay=0; NoOLay=0;
try try
OLay OLay
@@ -542,20 +494,15 @@ if get(ghandles.spotTog,'value')==1 && NoOLay
EZspotview(expN,DexpN, imLoc,OLresDir,OLplateNum,NoOLay) EZspotview(expN,DexpN, imLoc,OLresDir,OLplateNum,NoOLay)
end end
%*****GraphicPertibationComparison**15_821*OR Chrono Day Comparison****************** % GraphicPertibationComparison**15_821*OR Chrono Day Comparison
if strcmpi(Exp(expN).DexpType,'single') ...
if strcmpi(Exp(expN).DexpType,'single')||... || strcmpi(Exp(expN).DexpType,'multi')
strcmpi(Exp(expN).DexpType,'multi') EZdestComp
%************ elseif strcmpi(Exp(expN).DexpType,'chrono') ...
EZdestComp %* && length(Exp(expN).Dexp)>1
%************ EZmDayTrend
elseif strcmpi(Exp(expN).DexpType,'chrono') && ...
length(Exp(expN).Dexp)>1
%*************
EZmDayTrend %**
%*************
end end
%********************************
% spotTog && ~Hide && Olay Capture spot location for spotview May need to % spotTog && ~Hide && Olay Capture spot location for spotview May need to
% add DexpN BUT the OLresDir likely get spotview to where it needs to go. % add DexpN BUT the OLresDir likely get spotview to where it needs to go.
try try
@@ -570,15 +517,14 @@ cUsr=str2num(rcStr(cPos+1:end));
imLoc=[cUsr, (17-rUsr)]; %picLoc1 %transform horz user data to vert image for picLocation data imLoc=[cUsr, (17-rUsr)]; %picLoc1 %transform horz user data to vert image for picLocation data
OLresDir %=Exp(expN).hOLresDir(traceN); OLresDir %=Exp(expN).hOLresDir(traceN);
OLplateNum %=Exp(expN).hOLplateNum(traceN); OLplateNum %=Exp(expN).hOLplateNum(traceN);
%******************************************************** EZspotview(expN, imLoc,OLresDir,OLplateNum,NoOLay)
EZspotview(expN, imLoc,OLresDir,OLplateNum,NoOLay) %*
%********************************************************
end end
end end
catch catch
end end
[output_txt]=datatipp(obj,event_obj); [output_txt]=datatipp(obj,event_obj);
%*********************HeatMap Text Field*********************************
% HeatMap Text Field
try try
ll=num2str(l); ll=num2str(l);
if length(ll)>5,htl=ll(1:5);else htl=ll;end if length(ll)>5,htl=ll(1:5);else htl=ll;end
@@ -597,7 +543,6 @@ if length(rr)>5,htr= rr(1:5);else htr=rr;end
catch catch
htr=' '; htr=' ';
end end
try try
n1=num2str(Exp(expN).HtMpIntN1(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx)); n1=num2str(Exp(expN).HtMpIntN1(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx));
if length(n1)>5,N1=n1(1:5);else N1=n1; end if length(n1)>5,N1=n1(1:5);else N1=n1; end
@@ -628,7 +573,6 @@ end
try try
if Exp(expN).htmapPBsel==1 || Exp(expN).htmapPBsel==2 if Exp(expN).htmapPBsel==1 || Exp(expN).htmapPBsel==2
if expN==1,set(ghandles.HtMapVals1,'string',htmapStr);end if expN==1,set(ghandles.HtMapVals1,'string',htmapStr);end
if expN==2,set(ghandles.HtMapVals2,'string',htmapStr);end if expN==2,set(ghandles.HtMapVals2,'string',htmapStr);end
if expN==3,set(ghandles.HtMapVals3,'string',htmapStr);end if expN==3,set(ghandles.HtMapVals3,'string',htmapStr);end
@@ -637,7 +581,7 @@ catch
end end
% datacursormode(gcf) % datacursormode(gcf)
%**********************************************Test Area % Test Area
% Added 18_0105 to define RFcmpGFlg for EZmDayTrend.m when an Image spot % Added 18_0105 to define RFcmpGFlg for EZmDayTrend.m when an Image spot
% is clicked % is clicked

View File

@@ -3,8 +3,6 @@
global ghandles global ghandles
global Exp global Exp
try try
lnwidth=str2num(Exp(4).plotPars{1}) lnwidth=str2num(Exp(4).plotPars{1})
axisFontSz=str2num(Exp(4).plotPars{2}) axisFontSz=str2num(Exp(4).plotPars{2})
@@ -38,7 +36,6 @@ set(gcf,'OuterPosition',(get(0,'screensize')))
disphOLbX(1)={get(Exp(zone).hOLb(1),'XData')} disphOLbX(1)={get(Exp(zone).hOLb(1),'XData')}
disphOLbY(1)={get(Exp(zone).hOLb(1),'YData')} disphOLbY(1)={get(Exp(zone).hOLb(1),'YData')}
catch end catch end
hn=hn+1 hn=hn+1
notDup=1; notDup=1;
end end
@@ -65,12 +62,12 @@ for hN=2:length(Exp(zone).hOL)
try try
disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')}; disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')};
disphOLbY(hn)={get(Exp(zone).hOLb(hN),'YData')}; disphOLbY(hn)={get(Exp(zone).hOLb(hN),'YData')};
catch end catch
end
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-') tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
catch ME catch ME
disp(ME) disp(ME)
display('error leading to line 59 catch') display('error leading to line 59 catch')
end end
end end
end end
@@ -82,14 +79,12 @@ for hN=2:length(Exp(zone).hOL)
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')}; linecolor(i)={get(hprint,'color')};
else else
hprint=semilogy(cell2mat(disphOLX(i)),cell2mat(disphOLY(i))) hprint=semilogy(cell2mat(disphOLX(i)),cell2mat(disphOLY(i)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')}; linecolor(i)={get(hprint,'color')};
end end
hold all hold all
end end
@@ -97,7 +92,6 @@ hold all
legName=tmp legName=tmp
hleg=legend((legName),'location','NEO') hleg=legend((legName),'location','NEO')
set(hleg,'fontsize',legFontSz) set(hleg,'fontsize',legFontSz)
try try
for i=1:hn for i=1:hn
if semiLog==0 if semiLog==0
@@ -106,11 +100,10 @@ try
hprint=semilogy(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none') hprint=semilogy(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none')
end end
end end
catch end catch
end
hold off hold off
%*******End of Standard Overlay Plot*********************** % End of Standard Overlay Plot
else % if Composite Plot else % if Composite Plot
for hcN=1:(Exp(zone).cTraceN -1) for hcN=1:(Exp(zone).cTraceN -1)
disphOLX(hcN)={get(Exp(zone).hCmean(hcN),'XData')}; disphOLX(hcN)={get(Exp(zone).hCmean(hcN),'XData')};
@@ -120,28 +113,21 @@ hold off
disphOLcX(hcN)={get(Exp(zone).hBound2(hcN),'XData')}; disphOLcX(hcN)={get(Exp(zone).hBound2(hcN),'XData')};
disphOLcY(hcN)={get(Exp(zone).hBound2(hcN),'YData')}; disphOLcY(hcN)={get(Exp(zone).hBound2(hcN),'YData')};
tmp(hcN)=(Exp(zone).cName(hcN)) tmp(hcN)=(Exp(zone).cName(hcN))
if semiLog==0 if semiLog==0
hprint=plot(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN))) hprint=plot(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')}; linecolor(hcN)={get(hprint,'color')};
else else
hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN))) hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')}; linecolor(hcN)={get(hprint,'color')};
end end
hold all hold all
legName=tmp legName=tmp
hleg=legend((legName),'location','NEO') hleg=legend((legName),'location','NEO')
set(hleg,'fontsize',legFontSz) set(hleg,'fontsize',legFontSz)
%{ %{
for i=1:hn for i=1:hn
hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none') hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none')
@@ -153,12 +139,9 @@ set(hleg,'fontsize',legFontSz)
hBprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i))) hBprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)))
set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6 set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6
set(hBprint,'color',linecolor{i}) set(hBprint,'color',linecolor{i})
hCprint=plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i))) hCprint=plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i)))
set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6 set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6
set(hBprint,'color',linecolor{i}) set(hBprint,'color',linecolor{i})
end end
hold off hold off
end end

View File

@@ -4,12 +4,10 @@ dirLst=dir(ExpPath)
for i=1:size(dirLst,1) for i=1:size(dirLst,1)
if ~isempty(str2num(dirLst(i).name)) || ~isempty(strfind(dirLst(i).name,'Scan')) % && jpgOut==1 if ~isempty(str2num(dirLst(i).name)) || ~isempty(strfind(dirLst(i).name,'Scan')) % && jpgOut==1
scLst=fullfile(ExpPath,dirLst(i).name); scLst=fullfile(ExpPath,dirLst(i).name);
for n=1:size(filelst,1) for n=1:size(filelst,1)
try try
if ~isempty(strfind(filelst(n).name,'bmp'))||~isempty(strfind(filelst(n).name,'tif')) if ~isempty(strfind(filelst(n).name,'bmp'))||~isempty(strfind(filelst(n).name,'tif'))
tptImLst(n)=filelst(n).name; tptImLst(n)=filelst(n).name;
end end
catch catch
end end
@@ -18,6 +16,7 @@ for i=1:size(dirLst,1)
end end
scLength=length(scLst); scLength=length(scLst);
end end
I=imread(ExpOutImFile); I=imread(ExpOutImFile);
expAxes=handles.Iaxes1; expAxes=handles.Iaxes1;
imshow(I) imshow(I)
@@ -29,4 +28,3 @@ expAxes=handles.Iaxes3;
imshow(I) imshow(I)
set(expAxes,'xtick',[],'ytick',[]) set(expAxes,'xtick',[],'ytick',[])

View File

@@ -6,14 +6,14 @@ global userPars
global usrExpJobsDir global usrExpJobsDir
global zonePB global zonePB
global mpdmFile global mpdmFile
global ghandles
% Initialize some variables from matlab % Initialize some variables from matlab
ezPath=which(mfilename); ezPath=which(mfilename);
[ezDir,ezFileName]=fileparts(ezPath); [ezDir,ezFileName]=fileparts(ezPath);
ezDir=fullfile(easyDir); ezDir=fullfile(easyDir);
[parentDir, ~]=fileparts(ezDir); [parentDir, ~]=fileparts(ezDir);
parentDir=fullfile(parentDir); % ../easy/apps parentDir=fullfile(parentDir);
debug=1; debug=1;
if debug if debug
disp('Running in debug mode'); disp('Running in debug mode');
@@ -21,39 +21,54 @@ if debug
whos; whos;
end end
% Set scansDir (project scans directory) intelligently fprintf('This script name: %s\n', ezFileName);
if exist('PROJECT', 'var') && ~isempty(getenv('PROJECT'))
project=getenv('PROJECT');
fprintf('Using project path: %s from environment variable PROJECT\n', scansDir); % Set scansDir (project scans directory) intelligently
disp('This usually indicates that we are in standalone mode'); if exist('PROJECT_SCANS_DIR', 'var') && ~isempty(getenv('PROJECT_SCANS_DIR'))
elseif exist('PROJECT_SCANS_DIR', 'var') && ~isempty(getenv('PROJECT_SCANS_DIR')) scansDir=fullfile(getenv('PROJECT_SCANS_DIR'));
scansDir=getenv('PROJECT_SCANS_DIR'); if exist(scansDir, 'dir')
fprintf('Using scans directory: %s from environment variable PROJECT_SCANS_DIR\n', scansDir); fprintf('Using scans directory: %s from environment variable PROJECT_SCANS_DIR\n', scansDir);
disp('This usually indicates that we are in module mode'); disp('This usually indicates that we are in module mode');
if ~exist('PROJECT', 'var') || isempty(getenv('PROJECT'))
dirInfo=fileparts(scansDir);
project=dirInfo.name;
end
else
disp('WARNING: PROJECT_SCANS_DIR does not exist');
end
elseif exist('PROJECT', 'var') && ~isempty(getenv('PROJECT')) % for standalone mode
% scansDir=fullfile(parentDir, '..', '..', 'scans', getenv('PROJECT') 'out', 'easy', getenv('PROJECT'));
scansDir=fullfile(parentDir, '..', '..', 'scans', getenv('PROJECT'));
project=getenv('PROJECT');
fprintf('Using project path: %s from environment variable PROJECT\n', scansDir);
disp('This usually indicates that we are in standalone mode');
else else
% TODO Lots of this is hardcoded logic, this TODO is just a reminder to change this block % TODO Lots of this is hardcoded logic, this TODO is just a reminder to change this block
% when changing EZ_DIR and other variables in the parent script % when changing EASY/EZdir and other variables in the parent script
fprintf('WARNING: Running in standalone mode without PROJECT or PROJECT_SCANS_DIR environment variables (not recommended)\n');
fprintf('Beginning parent scans directory search\n'); fprintf('Beginning parent scans directory search\n');
fprintf('This usually indicates that we are in stand-alone mode without PROJECT or PROJECT_SCANS_DIR environment variables\n');
dirsToScan={ dirsToScan={
fullfile(parentDir,'..', '..', 'scans'), fullfile(parentDir, '..', '..', 'scans')
fullfile(parentDir, '..', '..', 'ExpJobs'), fullfile(parentDir, '..', '..', 'ExpJobs')
fullfile('/mnt/data/scans'), fullfile('mnt','data','scans')
fullfile('/mnt/data/ExpJobs'), fullfile('mnt','data', 'ExpJobs')
fullfile(parentDir, '..', '..', 'templates', 'scans-demo') fullfile(parentDir, '..', '..', 'templates', 'scans-demo')
}; };
for d=dirsToScan for i=1:length(dirsToScan)
d=dirsToScan(i);
if exist(d, 'dir') if exist(d, 'dir')
subDirs=dir(d); subDirs=dir(d);
if ~isempty(subDirs) pattern='^\d{6}_.*_.*';
fprintf('Found a non-empty parent scans directory in our list: %s\n', d); matchedDirs={dirs(regexp(subDirs.name, pattern)).name};
fprintf('Scanning inside for a project scan directory\n'); if ~isempty(matchedDirs)
[~, sortedIndices]=sort(datenum({dirs.date}), 'descend'); % sort by newest first fprintf('Found a non-empty scans directory in our list: %s\n', char(d));
sortedDirs=dirs{sortedIndices}; fprintf('Setting scansDir to %s\n', char(d));
scansDir=sortedDirs{1}; scansDir=fullfile(d);
fprintf('Selected newest project scans directory: %s\n', scansDir);
end end
fprintf('Scanning inside %s for a project directory\n', char(d));
sortedMatchedDirs=sortrows(matchedDirs);
project=sortedMatchedDirs{0}; % select the latest dir (by date prefix)
fprintf('Selected latest project directory %s\n', char(project));
end end
end end
end end
@@ -101,10 +116,7 @@ userPars.BProt=45;
userPars.Trenddefault={'1000'}; userPars.Trenddefault={'1000'};
userPars.kfiltLim=str2double(userPars.BPdefault(6)); userPars.kfiltLim=str2double(userPars.BPdefault(6));
try
% Generate the Exp arrays % Generate the Exp arrays
numExps=3; numExps=3;
for i=1:numExps for i=1:numExps
@@ -130,32 +142,20 @@ Exp(numExps+1).SGDtext=SGDtext;
Exp(numExps+1).SGDraw=SGDraw; Exp(numExps+1).SGDraw=SGDraw;
Exp(numExps+1).interacPBsel=0; Exp(numExps+1).interacPBsel=0;
% Big outer loop try catch to ln844 end ln868 % Big outer loop try catch to ln844 end ln868
% try to use user selected 'ExpJobs' folder otherwise use a default % try to use user selected 'ExpJobs' folder otherwise use a default
% directory in the uigetfile to load the experiment .mat file. % directory in the uigetfile to load the experiment .mat file.
try try
[openExpfile,scansDir]=uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off') [openExpfile,scansDir]=uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off')
load (fullfile(Exp(1).Dexp(1).ExpFoldr,'MasterPlateFiles','MPDMmat.mat')) load (fullfile(Exp(1).Dexp(1).ExpFoldr,'MasterPlateFiles','MPDMmat.mat'))
for i=1:numExps for i=1:numExps
Exp(i).Dexp.DM=; Exp(i).Dexp(1).DM=DM;
Exp(i).Dexp(1).MP=MP;
Exp(i).Dexp(1).scan=scan;
Exp(i).cTraceIndx(1)=1; Exp(i).cTraceIndx(1)=1;
end end
Exp(1).Dexp(1).DM=DM;
Exp(2).Dexp(1).DM=DM;
Exp(3).Dexp(1).DM=DM;
Exp(1).Dexp(1).MP=MP;
Exp(2).Dexp(1).MP=MP;
Exp(3).Dexp(1).MP=MP;
Exp(1).Dexp(1).scan=scan;
Exp(2).Dexp(1).scan=scan;
Exp(3).Dexp(1).scan=scan;
load(fullfile(resDir,'PTmats','NImParameters')) load(fullfile(resDir,'PTmats','NImParameters'))
Exp(1).Dexp(1).ImParMat=ImParMat; Exp(1).Dexp(1).ImParMat=ImParMat;
Exp(2).Dexp(1).ImParMat=ImParMat; Exp(2).Dexp(1).ImParMat=ImParMat;
@@ -165,51 +165,35 @@ try
load(fullfile(resDir,'Fotos','Coordinates')) load(fullfile(resDir,'Fotos','Coordinates'))
load(fullfile(resDir,'Fotos','anlZones')) load(fullfile(resDir,'Fotos','anlZones'))
load(fullfile(resDir,'Fotos','BGatTpts')) load(fullfile(resDir,'Fotos','BGatTpts'))
Exp(1).Dexp(1).FexpScanSpots=FexpScanSpots; for i=1:numExps
Exp(2).Dexp(1).FexpScanSpots=FexpScanSpots; Exp(i).Dexp(1).FexpScanSpots=FexpScanSpots;
Exp(3).Dexp(1).FexpScanSpots=FexpScanSpots; Exp(i).Dexp(1).FexpScanBMtp=FexpScanBMtp;
Exp(1).Dexp(1).FexpScanBMtp=FexpScanBMtp; Exp(i).Dexp(1).anlZoneRefs=anlZoneRefs;
Exp(2).Dexp(1).FexpScanBMtp=FexpScanBMtp; Exp(i).cTraceIndx(1)=1;
Exp(3).Dexp(1).FexpScanBMtp=FexpScanBMtp; end
Exp(1).Dexp(1).anlZoneRefs=anlZoneRefs;
Exp(2).Dexp(1).anlZoneRefs=anlZoneRefs;
Exp(3).Dexp(1).anlZoneRefs=anlZoneRefs;
catch catch
end end
Exp(1).traceN=0; Exp(2).traceN=0; Exp(3).traceN=0; %ZoneRelated for i=1:numExps
Exp(i).traceN=0; % ZoneRelated
Exp(i).traceN=0;
Exp(i).hOL=[];
Exp(i).hOLb=[];
Exp(i).hOLname={};
Exp(i).hOLexpNm={};
Exp(i).hOLresDir={}
Exp(i).hOLplateNum=[];
Exp(i).hOLresDir={};
Exp(i).RFmd1indx=[];
Exp(i).RFmd1pltN=[];
Exp(i).RFmd2indx=[];
Exp(i).RFmd2pltN=[];
end
Exp(1).hOL =[]; Exp(1).hOLb=[]; % default values for EZvFigPrint that meet JLH preferences
Exp(1).hOLname={}; Exp(1).hOLexpNm={}; Exp(1).hOLresDir={}
Exp(1).hOLplateNum=[];
Exp(1).hOLresDir= {};
Exp(1).RFmd1indx=[];
Exp(1).RFmd1pltN=[];
Exp(1).RFmd2indx=[];
Exp(1).RFmd2pltN=[];
Exp(2).hOL =[]; Exp(2).hOLb=[];
Exp(2).hOLname={}; Exp(2).hOLexpNm={}; Exp(2).hOLresDir={};
Exp(2).hOLplateNum=[];
Exp(2).hOLresDir= {};
Exp(2).RFmd1indx=[];
Exp(2).RFmd1pltN=[];
Exp(2).RFmd2indx=[];
Exp(2).RFmd2pltN=[];
Exp(3).hOL =[]; Exp(3).hOLb=[];
Exp(3).hOLname={}; Exp(3).hOLexpNm={}; Exp(3).hOLresDir={};
Exp(3).hOLplateNum=[];
Exp(3).hOLresDir= {};
Exp(3).RFmd1indx=[];
Exp(3).RFmd1pltN=[];
Exp(3).RFmd2indx=[];
Exp(3).RFmd2pltN=[];
%sefaults values for EZvFigPrint that meet JLH preferences
Exp(4).plotPars={'4','36','10','5'}; Exp(4).plotPars={'4','36','10','5'};
expN=1; expN=1;
% Test for Bad MP cell array (usually 384 [NaN}'s) % Test for Bad MP cell array (usually 384 [NaN}'s)
% replaced length(Exp(expN).Dexp(1).MP) with MPnum % replaced length(Exp(expN).Dexp(1).MP) with MPnum
for mx=1:length(Exp(expN).Dexp(1).MP) for mx=1:length(Exp(expN).Dexp(1).MP)
@@ -220,8 +204,6 @@ try
break break
end end
end end
%*************************************************
% MPnum=length(Exp(expN).Dexp(1).MP); % MPnum=length(Exp(expN).Dexp(1).MP);
set(handles.MPsldr1,'min',1,'max',MPnum) set(handles.MPsldr1,'min',1,'max',MPnum)
@@ -235,7 +217,6 @@ try
set(handles.Tptsldr1,'min',1,'max',tPtsSize) set(handles.Tptsldr1,'min',1,'max',tPtsSize)
set(handles.Tptsldr2,'min',1,'max',tPtsSize) set(handles.Tptsldr2,'min',1,'max',tPtsSize)
set(handles.Tptsldr3,'min',1,'max',tPtsSize) set(handles.Tptsldr3,'min',1,'max',tPtsSize)
set(handles.MPsldr1,'SliderStep',[1/MPnum 1/MPnum]); %[1/length(MP) 1/length(MP)]) set(handles.MPsldr1,'SliderStep',[1/MPnum 1/MPnum]); %[1/length(MP) 1/length(MP)])
set(handles.DMsldr1,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]); set(handles.DMsldr1,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]);
set(handles.Tptsldr1,'SliderStep',[1/tPtsSize 1/tPtsSize]); set(handles.Tptsldr1,'SliderStep',[1/tPtsSize 1/tPtsSize]);
@@ -248,7 +229,7 @@ try
try try
xp=char(Exp(expN).Dexp(1).resDir); xp=char(Exp(expN).Dexp(1).resDir);
if ispc, if ispc
slashPos=strfind(char(Exp(expN).Dexp(1).resDir),'\'); slashPos=strfind(char(Exp(expN).Dexp(1).resDir),'\');
else else
slashPos=strfind(char(Exp(expN).Dexp(1).resDir),'/'); slashPos=strfind(char(Exp(expN).Dexp(1).resDir),'/');
@@ -262,13 +243,11 @@ try
catch catch
cd(w) cd(w)
end %internal try xp=char(Exp(expN).Dexp(1).resDir); if ispc,... end %internal try xp=char(Exp(expN).Dexp(1).resDir); if ispc,...
catch catch
cd(w) cd(w)
msg='LOADing or Setup issue' msg='LOADing or Setup issue'
%if no load, then Message try SelExp PB to reload or try and different % if no load, then Message try SelExp PB to reload or try and different experiment
%Experiment end
end %nested try-catch-end from ->ExpOutmat= fullfile(scansDir,openExpfile);
try try
DNLaxes1=handles.DNLaxes1; DNLaxes2=handles.DNLaxes2; DNLaxes3=handles.DNLaxes3; DNLaxes1=handles.DNLaxes1; DNLaxes2=handles.DNLaxes2; DNLaxes3=handles.DNLaxes3;
@@ -280,22 +259,21 @@ try
Exp(1).expLoadCnt=1; Exp(1).expLoadCnt=1;
Exp(2).expLoadCnt=1; Exp(2).expLoadCnt=1;
Exp(3).expLoadCnt=1; Exp(3).expLoadCnt=1;
catch ME
catch ME, ME.message, ME.message,
end end
%********************************************************************** % Compile GeneList and OrfList
%****Compile GeneList and OrfList,**************************************** % Sort and add the medians of Ref Plates if RF1,RF2 exist
%****Sort and add the medians of Ref Plates if RF1,RF2 exist**************
set(handles.listboxGnOrf,'string',{('Loading')}) set(handles.listboxGnOrf,'string',{('Loading')})
lstindx=0; lstindx=0;
lstindxOrf=0; lstindxOrf=0;
spN=0; spN=0;
rfcnt=0; rfcnt=0;
dRF1indx=0; dRF1indx=0;
RF1mp=[]; RF2mp=[]; RF1mp=[];
RF2mp=[];
for mp=1:MPnum %length(Exp(expN).Dexp(1).MP) for mp=1:MPnum %length(Exp(expN).Dexp(1).MP)
RF1fullPlate=0; RF1fullPlate=0;
try RF1fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end try RF1fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end
RF2fullPlate=0; RF2fullPlate=0;
@@ -305,9 +283,6 @@ try
try % temp find data error try % temp find data error
r=ceil(ind384/24); r=ceil(ind384/24);
if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end if rem(ind384,24)==0, c=24; else c=rem(ind384,24); end
% Insert test for numeric in genename and orf if isnumeric % Insert test for numeric in genename and orf if isnumeric
% Correct common EXCEL problem of converting OCT1 into a date numeric % Correct common EXCEL problem of converting OCT1 into a date numeric
if cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))==38991, if cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))==38991,
@@ -316,14 +291,12 @@ try
elseif isnumeric(cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))) elseif isnumeric(cell2mat(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)={' '}; Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)={' '};
end end
%****Check for full(384spot) Reference Plates (RF1 or/and RF2)************** % Check for full(384spot) Reference Plates (RF1 or/and RF2)
RF1fullPlate=0; RF1fullPlate=0;
try RF1fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end try RF1fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end
RF2fullPlate=0; RF2fullPlate=0;
try RF2fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF2'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end try RF2fullPlate=sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF2'))==384; catch, mp, msg=strcat(num2str(mp),' genename ERROR'), end
if isempty(regexpi(char((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384))),'blank'))... %,'\<blank\>' if isempty(regexpi(char((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384))),'blank'))... %,'\<blank\>'
&& ~isnumeric(Exp(expN).Dexp(1).MP(mp).orf{1}(ind384))... && ~isnumeric(Exp(expN).Dexp(1).MP(mp).orf{1}(ind384))...
&& ~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),' ')... && ~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),' ')...
@@ -333,17 +306,14 @@ try
&& ~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF1')... && ~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF1')...
&& ~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF2')... && ~strcmpi((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)),'RF2')...
&& iscellstr((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384))) % .genename{1}(ind384))) && iscellstr((Exp(expN).Dexp(1).MP(mp).orf{1}(ind384))) % .genename{1}(ind384)))
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
bb(lstindxOrf,1)=(Exp(expN).Dexp(1).MP(mp).orf{1}(ind384)); bb(lstindxOrf,1)=(Exp(expN).Dexp(1).MP(mp).orf{1}(ind384));
bb(lstindxOrf,2)={strcat(':',num2str(mp),':',num2str(r),':',num2str(c))}; bb(lstindxOrf,2)={strcat(':',num2str(mp),':',num2str(r),':',num2str(c))};
bb(lstindxOrf,3)={mp}; bb(lstindxOrf,3)={mp};
bb(lstindxOrf,4)={r}; bb(lstindxOrf,4)={r};
bb(lstindxOrf,5)={c}; bb(lstindxOrf,5)={c};
mutorfs(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract mutorfs(lstindxOrf)=spN; %16_0318 added for Interaction EZinteract
end end
if isempty(regexpi(char((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))),'blank'))... %,'\<blank\>' if isempty(regexpi(char((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))),'blank'))... %,'\<blank\>'
&& ~isnumeric(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))... && ~isnumeric(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))...
&& ~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),' ')... && ~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),' ')...
@@ -353,40 +323,31 @@ try
&& ~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1')... && ~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1')...
&& ~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2')... && ~strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2')...
&& iscellstr((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))) && iscellstr((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)))
lstindx=lstindx+1; lstindx=lstindx+1;
aa(lstindx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)); aa(lstindx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384));
aa(lstindx,2)={strcat(':',num2str(mp),':',num2str(r),':',num2str(c))}; aa(lstindx,2)={strcat(':',num2str(mp),':',num2str(r),':',num2str(c))};
aa(lstindx,3)={mp}; aa(lstindx,3)={mp};
aa(lstindx,4)={r}; aa(lstindx,4)={r};
aa(lstindx,5)={c}; aa(lstindx,5)={c};
mutgenes(lstindx)=spN; mutgenes(lstindx)=spN;
% Exp(expN).Dexp(1).mutSpotIndx.woRFs(lstindx)=spN; % Exp(expN).Dexp(1).mutSpotIndx.woRFs(lstindx)=spN;
elseif (RF1fullPlate==1 ... % sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384 || ...
|| (length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384))))==1 && mp==1 ) ... %(isequal((Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)), (Exp(expN).Dexp(1).MP(mp).genename{1}(384:-1:1)))&& mp==1 )) && ...
elseif (RF1fullPlate==1 ||... %sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}),'RF1'))==384 || ... && ~exist('RF1scanN','var')
(length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)))) ==1 && mp==1 ) && ... %(isequal((Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)), (Exp(expN).Dexp(1).MP(mp).genename{1}(384:-1:1)))&& mp==1 )) && ...
~exist('RF1scanN','var')
RF1mp=mp RF1mp=mp
RF1scanN=(mp*DMnum)-(DMnum-1); %mp; RF1scanN=(mp*DMnum)-(DMnum-1); %mp;
rfcnt=rfcnt+1; rfcnt=rfcnt+1;
RFs(spN:spN+383)=spN:spN+383; RFs(spN:spN+383)=spN:spN+383;
elseif (RF2fullPlate==1 ... %sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))==384 ||...
elseif (RF2fullPlate==1|| ... %sum(ismember((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF2'))==384 ||... || (length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384))))==1 && mp==MPnum ) && ~exist('RF2scanN','var')
(length(unique(Exp(expN).Dexp(1).MP(mp).genename{1}(1:384)))) ==1 && mp== MPnum ) && ...
~exist('RF2scanN','var')
rfcnt=rfcnt+1; rfcnt=rfcnt+1;
RFs(spN:spN+383)=spN:spN+383; RFs(spN:spN+383)=spN:spN+383;
asdf=sparse(RFs); asdf=sparse(RFs);
asd=find(asdf); asd=find(asdf);
RFs=asd; RFs=asd;
RF2mp=mp RF2mp=mp
RF2scanN=(mp*DMnum)-(DMnum-1); %mp; RF2scanN=(mp*DMnum)-(DMnum-1); %mp;
elseif strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1') && ... elseif strcmpi((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),'RF1') && (RF1fullPlate~=1)
(RF1fullPlate~=1)
dRF1indx=dRF1indx+1; dRF1indx=dRF1indx+1;
Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)=strrep((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)),':',' ');
drf(dRF1indx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384)); drf(dRF1indx,1)=(Exp(expN).Dexp(1).MP(mp).genename{1}(ind384));
@@ -395,18 +356,16 @@ try
drf(dRF1indx,4)={r}; drfr(dRF1indx,mp)=r; drf(dRF1indx,4)={r}; drfr(dRF1indx,mp)=r;
drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c; drf(dRF1indx,5)={c}; drfc(dRF1indx,mp)=c;
drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384; drf(dRF1indx,6)={ind384}; drfPindx(dRF1indx,mp)=ind384;
end % if isempty(regexpi(char((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))),'blank'))... end % if isempty(regexpi(char((Exp(expN).Dexp(1).MP(mp).genename{1}(ind384))),'blank'))...
%**********************************************************************
catch catch
mp mp
ind384 ind384
msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384)) msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end end
end %end associated with for ind384=1:384 end
mp mp
end %end associated with for mp=1:length(Exp(expN).Dexp(1).MP) end
%*****************************************************
% Cover case if mutorfs RFs are labeled RF1 or RF2 % Cover case if mutorfs RFs are labeled RF1 or RF2
try try
Exp(1).Dexp(1).mutSpotIndx.wRFs=union(RFs, mutorfs); Exp(1).Dexp(1).mutSpotIndx.wRFs=union(RFs, mutorfs);
@@ -420,16 +379,16 @@ try
Exp(expN).Dexp(1).mutSpotIndx.woRFs=mutorfs; Exp(expN).Dexp(1).mutSpotIndx.woRFs=mutorfs;
msg='No RFs Found in Exp! woRFs' msg='No RFs Found in Exp! woRFs'
end end
Exp(2).Dexp(1).mutSpotIndx.wRFs=Exp(1).Dexp(1).mutSpotIndx.wRFs; Exp(2).Dexp(1).mutSpotIndx.wRFs=Exp(1).Dexp(1).mutSpotIndx.wRFs;
Exp(2).Dexp(1).mutSpotIndx.woRFs=Exp(1).Dexp(1).mutSpotIndx.woRFs; Exp(2).Dexp(1).mutSpotIndx.woRFs=Exp(1).Dexp(1).mutSpotIndx.woRFs;
Exp(3).Dexp(1).mutSpotIndx.wRFs=Exp(1).Dexp(1).mutSpotIndx.wRFs; Exp(3).Dexp(1).mutSpotIndx.wRFs=Exp(1).Dexp(1).mutSpotIndx.wRFs;
Exp(3).Dexp(1).mutSpotIndx.woRFs=Exp(1).Dexp(1).mutSpotIndx.woRFs; Exp(3).Dexp(1).mutSpotIndx.woRFs=Exp(1).Dexp(1).mutSpotIndx.woRFs;
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Exp(1).Dexp(1).RFmd1indx=[]; Exp(2).Dexp(1).RFmd1indx=[]; Exp(3).Dexp(1).RFmd1indx=[]; Exp(1).Dexp(1).RFmd1indx=[]; Exp(2).Dexp(1).RFmd1indx=[]; Exp(3).Dexp(1).RFmd1indx=[];
Exp(1).Dexp(1).RFmd1pltN=[]; Exp(2).Dexp(1).RFmd1pltN=[]; Exp(3).Dexp(1).RFmd1pltN=[]; Exp(1).Dexp(1).RFmd1pltN=[]; Exp(2).Dexp(1).RFmd1pltN=[]; Exp(3).Dexp(1).RFmd1pltN=[];
Exp(1).Dexp(1).RFmean=[]; Exp(2).Dexp(1).RFmean=[]; Exp(3).Dexp(1).RFmean=[]; Exp(1).Dexp(1).RFmean=[]; Exp(2).Dexp(1).RFmean=[]; Exp(3).Dexp(1).RFmean=[];
Exp(1).Dexp(1).RFmeanG=[]; Exp(2).Dexp(1).RFmeanG=[]; Exp(3).Dexp(1).RFmeanG=[]; Exp(1).Dexp(1).RFmeanG=[]; Exp(2).Dexp(1).RFmeanG=[]; Exp(3).Dexp(1).RFmeanG=[];
if exist('RF1scanN','var') if exist('RF1scanN','var')
for d=0:(DMnum-1) for d=0:(DMnum-1)
medianIndx=[]; medianIndx=[];
@@ -439,11 +398,12 @@ try
try %if RF1scanN doesn't exist this addition to list will be skipped try %if RF1scanN doesn't exist this addition to list will be skipped
nonZeroIndx=find(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5)); nonZeroIndx=find(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5));
if isempty(nonZeroIndx)
if isempty(nonZeroIndx), nonZeroCnt=0; medianIndx= nonZeroIndx; nonZeroCnt=0
else nonZeroCnt=length(nonZeroIndx); medianIndx=nonZeroIndx;
else
nonZeroCnt=length(nonZeroIndx);
end end
%
if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)==0, medianIndx=nonZeroIndx(1:nonZeroCnt-1); end if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)==0, medianIndx=nonZeroIndx(1:nonZeroCnt-1); end
if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)~=0, medianIndx=nonZeroIndx; end if ~isempty(nonZeroIndx) && mod(nonZeroCnt,2)~=0, medianIndx=nonZeroIndx; end
clear medValLst clear medValLst
@@ -456,10 +416,8 @@ try
max1=max(medValLst); max1=max(medValLst);
std1=std(medValLst); std1=std(medValLst);
mean1=mean(medValLst) mean1=mean(medValLst)
kValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,3); % For Ref Composite 17_1009 kValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,3); % For Ref Composite 17_1009
rValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,4); % For Ref Composite 17_1009 rValLst=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,4); % For Ref Composite 17_1009
mval1=median(medValLst); % (Exp(expN).Dexp(1).scan(RF1scanN).plate(1).CFout(383,5)); mval1=median(medValLst); % (Exp(expN).Dexp(1).scan(RF1scanN).plate(1).CFout(383,5));
RFmd1pos=find(mval1==(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))) RFmd1pos=find(mval1==(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5)))
RFmd1loc(1)=ceil(RFmd1pos/24); %calc r value RFmd1loc(1)=ceil(RFmd1pos/24); %calc r value
@@ -470,14 +428,13 @@ try
aa(lstindx,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,' std',num2str(std1))}; aa(lstindx,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,' std',num2str(std1))};
bb(lstindxOrf,1)={strcat('RF1md(',num2str(d+1),')')}; bb(lstindxOrf,1)={strcat('RF1md(',num2str(d+1),')')};
bb(lstindxOrf,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,' std',num2str(std1))}; bb(lstindxOrf,2)={strcat(':',num2str(RF1mp),':',num2str(RFmd1loc(1)),':',num2str(RFmd1loc(2)))}; %,' std',num2str(std1))};
%Composite Reference Amalgum Plot ******** % Composite Reference Amalgum Plot
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RF1cmp(',num2str(d+1),')')}; aa(lstindx,1)={strcat('RF1cmp(',num2str(d+1),')')};
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)={strcat('RF1cmp(',num2str(d+1),')')}; bb(lstindxOrf,1)={strcat('RF1cmp(',num2str(d+1),')')};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
%*******************************************
Exp(1).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(1).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmd1LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(1).Dexp(1).RFmd1indx(d+1)=RFmd1pos; Exp(2).Dexp(1).RFmd1indx(d+1)=RFmd1pos; Exp(3).Dexp(1).RFmd1indx(d+1)=RFmd1pos; Exp(1).Dexp(1).RFmd1indx(d+1)=RFmd1pos; Exp(2).Dexp(1).RFmd1indx(d+1)=RFmd1pos; Exp(3).Dexp(1).RFmd1indx(d+1)=RFmd1pos;
@@ -510,26 +467,20 @@ try
Exp(ic).Dexp(1).RFcmpr(1).dm(d+1).min=min(rValLst); %For Ref Composite 17_1009 Exp(ic).Dexp(1).RFcmpr(1).dm(d+1).min=min(rValLst); %For Ref Composite 17_1009
Exp(ic).Dexp(1).RFcmpr(1).dm(d+1).mean=max(rValLst); %For Ref Composite 17_1009 Exp(ic).Dexp(1).RFcmpr(1).dm(d+1).mean=max(rValLst); %For Ref Composite 17_1009
end end
else else
% Pick the first spot with zeros % Pick the first spot with zeros
medianCalcFailed='To Few nonZero spots for valid median RF1 selection' medianCalcFailed='To Few nonZero spots for valid median RF1 selection'
firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(1).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(2).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(3).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(1).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(2).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(3).Dexp(1).RFmd1indx(d+1)=firstZero;
Exp(1).Dexp(1).RFmd1pltN=RF1mp; Exp(2).Dexp(1).RFmd1pltN=RF1mp; Exp(3).Dexp(1).RFmd1pltN=RF1mp; %EZdestComp uses the masterplate number to get all the destPlates scanNumbers Exp(1).Dexp(1).RFmd1pltN=RF1mp; Exp(2).Dexp(1).RFmd1pltN=RF1mp; Exp(3).Dexp(1).RFmd1pltN=RF1mp; %EZdestComp uses the masterplate number to get all the destPlates scanNumbers
try, medValList1{d+1}=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; catch end try, medValList1{d+1}=Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; catch end
end end
catch %try ~ln219 catch
medianCalcTryFailed1='Failed! Failed! But process continued with bogus P1ind384 spot value!' medianCalcTryFailed1='Failed! Failed! But process continued with bogus P1ind384 spot value!'
try try
firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero=find(((Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(1).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(2).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(3).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(1).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(2).Dexp(1).RFmd1indx(d+1)=firstZero; Exp(3).Dexp(1).RFmd1indx(d+1)=firstZero;
catch catch
catchissue='Ln328'
Exp(1).Dexp(1).RFmd1indx(d+1)=384; Exp(2).Dexp(1).RFmd1indx(d+1)=384; Exp(3).Dexp(1).RFmd1indx(d+1)=384; %if crapout,Then use spot384 as default to keep going Exp(1).Dexp(1).RFmd1indx(d+1)=384; Exp(2).Dexp(1).RFmd1indx(d+1)=384; Exp(3).Dexp(1).RFmd1indx(d+1)=384; %if crapout,Then use spot384 as default to keep going
end end
try try
@@ -538,12 +489,9 @@ try
catchissue='Ln334' catchissue='Ln334'
Exp(1).Dexp(1).RFmd1pltN=1; Exp(2).Dexp(1).RFmd1pltN=1; Exp(3).Dexp(1).RFmd1pltN=1; Exp(1).Dexp(1).RFmd1pltN=1; Exp(2).Dexp(1).RFmd1pltN=1; Exp(3).Dexp(1).RFmd1pltN=1;
end end
error='EZvInit after Ln278' end
end %try ~ln219 end
end
end %for d=0:DMnum
end % if exist('RF1scanN','var')
%*************************************************************************************
Exp(1).Dexp(1).RFmd2indx=[]; Exp(2).Dexp(1).RFmd2indx=[]; Exp(3).Dexp(1).RFmd2indx=[]; Exp(1).Dexp(1).RFmd2indx=[]; Exp(2).Dexp(1).RFmd2indx=[]; Exp(3).Dexp(1).RFmd2indx=[];
Exp(1).Dexp(1).RFmd2pltN=[]; Exp(2).Dexp(1).RFmd2pltN=[]; Exp(3).Dexp(1).RFmd2pltN=[]; Exp(1).Dexp(1).RFmd2pltN=[]; Exp(2).Dexp(1).RFmd2pltN=[]; Exp(3).Dexp(1).RFmd2pltN=[];
@@ -554,29 +502,28 @@ try
nonZeroIndx2=[]; nonZeroIndx2=[];
medValList2=[]; medValList2=[];
rf2scN=RF2scanN+d; rf2scN=RF2scanN+d;
try % if RF2scanN doesn't exist this addition to list will be skipped try % if RF2scanN doesn't exist this addition to list will be skipped
nonZeroIndx2=find(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5)); nonZeroIndx2=find(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5));
if isempty(nonZeroIndx2), nonZeroCnt2=0; medianIndx2= nonZeroIndx2; if isempty(nonZeroIndx2)
else nonZeroCnt2=length(nonZeroIndx2); nonZeroCnt2=0
medianIndx2=nonZeroIndx2;
else
nonZeroCnt2=length(nonZeroIndx2);
end end
%
if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)==0, medianIndx2=nonZeroIndx2(1:nonZeroCnt2-1); end if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)==0, medianIndx2=nonZeroIndx2(1:nonZeroCnt2-1); end
if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)~=0, medianIndx2=nonZeroIndx2; end if ~isempty(nonZeroIndx2) && mod(nonZeroCnt2,2)~=0, medianIndx2=nonZeroIndx2; end
clear medValLst2 clear medValLst2
clear kValLst2 clear kValLst2
clear rValLst2 clear rValLst2
if ~isempty(nonZeroIndx2) && length(medianIndx2) > (.15*384) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(nonZeroIndx2) && length(medianIndx2) > (.15*384) % to calc. a median, more than 15% of spots must be nonZero
medValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5); medValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5);
medValList2{d+1}=medValLst2; medValList2{d+1}=medValLst2;
min2=min(medValLst2); min2=min(medValLst2);
max2=max(medValLst2); max2=max(medValLst2);
std2=std(medValLst2) std2=std(medValLst2)
mean2=mean(medValLst2); mean2=mean(medValLst2);
kValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,3); %For Ref Composite 17_1009 kValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,3); %For Ref Composite 17_1009
rValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,4); %For Ref Composite 17_1009 rValLst2=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,4); %For Ref Composite 17_1009
mval2=median(medValLst2); %(Exp(expN).Dexp(1).scan(RF2scanN).plate(1).CFout(1:383,5)); mval2=median(medValLst2); %(Exp(expN).Dexp(1).scan(RF2scanN).plate(1).CFout(1:383,5));
RFmd2pos=find(mval2==(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))); RFmd2pos=find(mval2==(Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5)));
RFmd2loc(1)=ceil(RFmd2pos/24); %calc r value RFmd2loc(1)=ceil(RFmd2pos/24); %calc r value
@@ -594,7 +541,6 @@ try
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)={strcat('RF2cmp(',num2str(d+1),')')}; bb(lstindxOrf,1)={strcat('RF2cmp(',num2str(d+1),')')};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
Exp(1).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(1).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmd2LB(d+1)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(1).Dexp(1).RFmd2indx(d+1)=RFmd2pos; Exp(2).Dexp(1).RFmd2indx(d+1)=RFmd2pos; Exp(3).Dexp(1).RFmd2indx(d+1)=RFmd2pos; Exp(1).Dexp(1).RFmd2indx(d+1)=RFmd2pos; Exp(2).Dexp(1).RFmd2indx(d+1)=RFmd2pos; Exp(3).Dexp(1).RFmd2indx(d+1)=RFmd2pos;
Exp(1).Dexp(1).RFmd2pltN=RF2mp; Exp(2).Dexp(1).RFmd2pltN=RF2mp; Exp(3).Dexp(1).RFmd2pltN=RF2mp; Exp(1).Dexp(1).RFmd2pltN=RF2mp; Exp(2).Dexp(1).RFmd2pltN=RF2mp; Exp(3).Dexp(1).RFmd2pltN=RF2mp;
@@ -626,7 +572,6 @@ try
Exp(ic).Dexp(1).RFcmpr(2).dm(d+1).min=min(rValLst2); %For Ref Composite 17_1009 Exp(ic).Dexp(1).RFcmpr(2).dm(d+1).min=min(rValLst2); %For Ref Composite 17_1009
Exp(ic).Dexp(1).RFcmpr(2).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009 Exp(ic).Dexp(1).RFcmpr(2).dm(d+1).max=max(rValLst); %For Ref Composite 17_1009
end end
else else
% Pick the first spot with zeros % Pick the first spot with zeros
% Use that position to satisfy and keep process OK % Use that position to satisfy and keep process OK
@@ -634,25 +579,23 @@ try
firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(1).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(2).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(3).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(1).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(2).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(3).Dexp(1).RFmd2indx(d+1)=firstZero2;
Exp(1).Dexp(1).RFmd2pltN=RF2mp; Exp(2).Dexp(1).RFmd2pltN=RF2mp; Exp(3).Dexp(1).RFmd2pltN=RF2mp; Exp(1).Dexp(1).RFmd2pltN=RF2mp; Exp(2).Dexp(1).RFmd2pltN=RF2mp; Exp(3).Dexp(1).RFmd2pltN=RF2mp;
try
try, medValList2{d+1}= Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5); nonZeroCnt2; catch end medValList2{d+1}=Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(medianIndx2,5);
nonZeroCnt2;
catch
end
end end
catch catch
medianCalcTryFailed2='Failed! Failed! No RF1median But process continued with bogus P1ind384 spot value!' medianCalcTryFailed2='Failed! Failed! No RF1median But process continued with bogus P1ind384 spot value!'
try try
firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first') firstZero2=find(((Exp(expN).Dexp(1).scan(rf2scN).plate(1).CFout(1:384,5))==0),1,'first')
Exp(1).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(2).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(3).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(1).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(2).Dexp(1).RFmd2indx(d+1)=firstZero2; Exp(3).Dexp(1).RFmd2indx(d+1)=firstZero2;
catch catch
catchissue='Ln402'
Exp(1).Dexp(1).RFmd2indx(d+1)=384; Exp(2).Dexp(1).RFmd2indx(d+1)=384; Exp(3).Dexp(1).RFmd2indx(d+1)=384; %if crapout,Then use spot384 as default to keep going Exp(1).Dexp(1).RFmd2indx(d+1)=384; Exp(2).Dexp(1).RFmd2indx(d+1)=384; Exp(3).Dexp(1).RFmd2indx(d+1)=384; %if crapout,Then use spot384 as default to keep going
end end
try try
Exp(1).Dexp(1).RFmd2pltN=RF2mp; Exp(2).Dexp(1).RFmd2pltN=RF2mp; Exp(3).Dexp(1).RFmd2pltN=RF2mp; Exp(1).Dexp(1).RFmd2pltN=RF2mp; Exp(2).Dexp(1).RFmd2pltN=RF2mp; Exp(3).Dexp(1).RFmd2pltN=RF2mp;
catch catch
catchissue='Ln408'
Exp(1).Dexp(1).RFmd2pltN=1; Exp(2).Dexp(1).RFmd2pltN=1; Exp(3).Dexp(1).RFmd2pltN=1; Exp(1).Dexp(1).RFmd2pltN=1; Exp(2).Dexp(1).RFmd2pltN=1; Exp(3).Dexp(1).RFmd2pltN=1;
end end
end % if RF2scanN doesn't exist this addition to list will be skipped end % if RF2scanN doesn't exist this addition to list will be skipped
@@ -661,31 +604,24 @@ try
Exp(1).Dexp(1).RFstd(d+1)=std(RFcombValList);Exp(2).Dexp(1).RFstd(d+1)=std(RFcombValList);Exp(3).Dexp(1).RFstd(d+1)=std(RFcombValList); Exp(1).Dexp(1).RFstd(d+1)=std(RFcombValList);Exp(2).Dexp(1).RFstd(d+1)=std(RFcombValList);Exp(3).Dexp(1).RFstd(d+1)=std(RFcombValList);
Exp(1).Dexp(1).RFmin(d+1)=min(RFcombValList);Exp(2).Dexp(1).RFmin(d+1)=min(RFcombValList);Exp(3).Dexp(1).RFmin(d+1)=min(RFcombValList); Exp(1).Dexp(1).RFmin(d+1)=min(RFcombValList);Exp(2).Dexp(1).RFmin(d+1)=min(RFcombValList);Exp(3).Dexp(1).RFmin(d+1)=min(RFcombValList);
Exp(1).Dexp(1).RFmax(d+1)=max(RFcombValList);Exp(2).Dexp(1).RFmax(d+1)=max(RFcombValList);Exp(3).Dexp(1).RFmax(d+1)=max(RFcombValList); Exp(1).Dexp(1).RFmax(d+1)=max(RFcombValList);Exp(2).Dexp(1).RFmax(d+1)=max(RFcombValList);Exp(3).Dexp(1).RFmax(d+1)=max(RFcombValList);
% TODO can delete the following redundant line of code
%can delete the following redundant line of code
Exp(2).Dexp(1).RFmean(d+1)=Exp(1).Dexp(1).RFmean(d+1); Exp(3).Dexp(1).RFmean(d+1)=Exp(1).Dexp(1).RFmean(d+1); Exp(2).Dexp(1).RFmean(d+1)=Exp(1).Dexp(1).RFmean(d+1); Exp(3).Dexp(1).RFmean(d+1)=Exp(1).Dexp(1).RFmean(d+1);
end
end %for d=0:DMnum
elseif exist('RF1scanN','var') elseif exist('RF1scanN','var')
Exp(1).Dexp(1).RFmean=Exp(1).Dexp(1).mean1; Exp(2).Dexp(1).RFmean=Exp(2).Dexp(1).mean1; Exp(3).Dexp(1).RFmean=Exp(3).Dexp(1).mean1; Exp(1).Dexp(1).RFmean=Exp(1).Dexp(1).mean1; Exp(2).Dexp(1).RFmean=Exp(2).Dexp(1).mean1; Exp(3).Dexp(1).RFmean=Exp(3).Dexp(1).mean1;
Exp(1).Dexp(1).RFstd=Exp(1).Dexp(1).std1; Exp(2).Dexp(1).RFstd=Exp(2).Dexp(1).std1; Exp(3).Dexp(1).RFstd=Exp(3).Dexp(1).std1; Exp(1).Dexp(1).RFstd=Exp(1).Dexp(1).std1; Exp(2).Dexp(1).RFstd=Exp(2).Dexp(1).std1; Exp(3).Dexp(1).RFstd=Exp(3).Dexp(1).std1;
Exp(1).Dexp(1).RFmin=Exp(1).Dexp(1).min1; Exp(2).Dexp(1).RFmin=Exp(2).Dexp(1).min1; Exp(3).Dexp(1).RFmin=Exp(3).Dexp(1).min1; Exp(1).Dexp(1).RFmin=Exp(1).Dexp(1).min1; Exp(2).Dexp(1).RFmin=Exp(2).Dexp(1).min1; Exp(3).Dexp(1).RFmin=Exp(3).Dexp(1).min1;
Exp(1).Dexp(1).RFmax=Exp(1).Dexp(1).max1; Exp(2).Dexp(1).RFmax=Exp(2).Dexp(1).max1; Exp(3).Dexp(1).RFmax=Exp(3).Dexp(1).max1; Exp(1).Dexp(1).RFmax=Exp(1).Dexp(1).max1; Exp(2).Dexp(1).RFmax=Exp(2).Dexp(1).max1; Exp(3).Dexp(1).RFmax=Exp(3).Dexp(1).max1;
end %if exist('RF2scanN','var') end
%************************************************************************************************* % DISPERSE REFERENCE PLATES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%*************************************************************************************************
%***********DISPERSE REFERENCE PLATES
Exp(expN).Dexp(1).RFmdPindx=[]; Exp(expN).Dexp(1).RFmdPindx=[];
Exp(expN).Dexp(1).RFmdPpltN=[]; Exp(expN).Dexp(1).RFmdPpltN=[];
if exist('drf','var') % ('RF1scanN','var') if exist('drf','var') % ('RF1scanN','var')
% Det. index of change from one MP to the next % Det. index of change from one MP to the next
i=2; i=2;
chgIndx(1)=1; chgIndx(1)=1;
for j=1:length(drf(:,3)) for j=1:length(drf(:,3))
if j>1 if j>1
if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end end
@@ -694,38 +630,33 @@ try
uu=zeros(size(drf,1),4); uu=zeros(size(drf,1),4);
uu(:,1:4)=cell2mat(drf(:,3:6)); uu(:,1:4)=cell2mat(drf(:,3:6));
vv=zeros(length(drf),DMnum); vv=zeros(length(drf),DMnum);
%************************************
dMPs=unique(cell2mat(drf(:,3))); dMPs=unique(cell2mat(drf(:,3)));
%*****************************************
for mm=1:length(dMPs) for mm=1:length(dMPs)
for d=1:(DMnum) for d=1:(DMnum)
medianIndxDisp=[]; medianIndxDisp=[];
NZrefIndxP=[]; NZrefIndxP=[];
nonZeroValsP=[]; nonZeroValsP=[];
medValLstDisp=[]; medValLstDisp=[];
rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d); rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d);
try % Determine the dispersed RFs median mean and std if such exist try % Determine the dispersed RFs median mean and std if such exist
NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); NZrefIndxP=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm));
vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
%For Global Ref Composite 17_1009 %************************************************************************** % For Global Ref Composite 17_1009
vvK(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,3); vvK(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,3);
vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,4); vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,4);
%*****************************************************************************************************
nonZeroValsP=nonzeros(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5)); nonZeroValsP=nonzeros(Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
minDisp=min(nonZeroValsP); minDisp=min(nonZeroValsP);
maxDisp=max(nonZeroValsP); maxDisp=max(nonZeroValsP);
std1Disp=std(nonZeroValsP); std1Disp=std(nonZeroValsP);
mean1Disp=mean(nonZeroValsP); mean1Disp=mean(nonZeroValsP);
drfVals=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5); drfVals=Exp(expN).Dexp(1).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
%MEDIAN Determination for PLATES with Dispersed RFs %MEDIAN Determination for PLATES with Dispersed RFs
if isempty(NZrefIndxP), nonZeroCntDisp=0, medianIndxDisp= NZrefIndxP; if isempty(NZrefIndxP)
else nonZeroCntDisp=length(NZrefIndxP); nonZeroCntDisp=0
medianIndxDisp=NZrefIndxP;
else
nonZeroCntDisp=length(NZrefIndxP);
end end
if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)==0, medianIndxDisp=NZrefIndxP(1:nonZeroCntDisp-1); end
if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)~=0, medianIndxDisp=NZrefIndxP; end if ~isempty(NZrefIndxP) && mod(nonZeroCntDisp,2)~=0, medianIndxDisp=NZrefIndxP; end
if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero
@@ -735,14 +666,12 @@ try
RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); RFmd1posD=NZrefIndxP(nonZeroMedPosIndx);
RFmd1locD(1)=ceil(RFmd1posD/24); %calc r value RFmd1locD(1)=ceil(RFmd1posD/24); %calc r value
RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); %calc c value RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); %calc c value
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RF1mdP(',num2str(d),')')}; %{'RF1md'}; aa(lstindx,1)={strcat('RF1mdP(',num2str(d),')')}; %{'RF1md'};
aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; %,'std_',num2str(std1))}; aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; %,'std_',num2str(std1))};
bb(lstindxOrf,1)={strcat('RF1mdP(',num2str(d),')')}; %{'RF1md'}; bb(lstindxOrf,1)={strcat('RF1mdP(',num2str(d),')')}; %{'RF1md'};
bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; %,'std_',num2str(std1))}; bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))}; %,'std_',num2str(std1))};
Exp(1).Dexp(1).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(1).Dexp(1).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(1).Dexp(1).RFmdPindx(d,dMPs(mm))=RFmd1posD; Exp(2).Dexp(1).RFmdPindx(d,dMPs(mm))=RFmd1posD; Exp(3).Dexp(1).RFmdPindx(d,dMPs(mm))=RFmd1posD; Exp(1).Dexp(1).RFmdPindx(d,dMPs(mm))=RFmd1posD; Exp(2).Dexp(1).RFmdPindx(d,dMPs(mm))=RFmd1posD; Exp(3).Dexp(1).RFmdPindx(d,dMPs(mm))=RFmd1posD;
Exp(1).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(2).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(3).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(1).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(2).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(3).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
@@ -751,7 +680,6 @@ try
Exp(1).Dexp(1).stdP(d,dMPs(mm))=std1Disp; Exp(2).Dexp(1).stdP(d,dMPs(mm))=std1Disp; Exp(3).Dexp(1).stdP(d,dMPs(mm))=std1Disp; Exp(1).Dexp(1).stdP(d,dMPs(mm))=std1Disp; Exp(2).Dexp(1).stdP(d,dMPs(mm))=std1Disp; Exp(3).Dexp(1).stdP(d,dMPs(mm))=std1Disp;
Exp(1).Dexp(1).minP(d,dMPs(mm))=minDisp; Exp(2).Dexp(1).minP(d,dMPs(mm))=minDisp; Exp(3).Dexp(1).minP(d,dMPs(mm))=minDisp; Exp(1).Dexp(1).minP(d,dMPs(mm))=minDisp; Exp(2).Dexp(1).minP(d,dMPs(mm))=minDisp; Exp(3).Dexp(1).minP(d,dMPs(mm))=minDisp;
Exp(1).Dexp(1).maxP(d,dMPs(mm))=maxDisp; Exp(2).Dexp(1).maxP(d,dMPs(mm))=maxDisp; Exp(3).Dexp(1).maxP(d,dMPs(mm))=maxDisp; Exp(1).Dexp(1).maxP(d,dMPs(mm))=maxDisp; Exp(2).Dexp(1).maxP(d,dMPs(mm))=maxDisp; Exp(3).Dexp(1).maxP(d,dMPs(mm))=maxDisp;
else else
% Need to set L r K values to zeros or pick the first spot with zeros % Need to set L r K values to zeros or pick the first spot with zeros
% Spot 1 could be other than zero as the median isn't calculated if fewer than some percent are nonzero % Spot 1 could be other than zero as the median isn't calculated if fewer than some percent are nonzero
@@ -760,18 +688,14 @@ try
firstZeroD=drfPindx((firstZeroDindx),dMPs(mm)); firstZeroD=drfPindx((firstZeroDindx),dMPs(mm));
Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroD; Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroD;
Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number??? Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number???
end
catch
end %~isempty(NZrefIndxP) && length(medianIndxDisp) > 3 ln584
catch %try ln565
medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with bogus Plate spot value!' medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with bogus Plate spot value!'
try try
firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first') firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first')
firstZeroPindx=uu(firstZeroindxD,4); firstZeroPindx=uu(firstZeroindxD,4);
Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroPindx; Exp(expN).Dexp(1).RFmdPindx(d,dMPs(mm))=firstZeroPindx;
catch catch
catchissue='try at Ln565' catchissue='try at Ln565'
Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm); Exp(expN).Dexp(1).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
@@ -783,12 +707,11 @@ try
catchissue='Ln' catchissue='Ln'
Exp(expN).Dexp(1).RFmdPpltN=1; %This might keep from breaking BUT ??? Exp(expN).Dexp(1).RFmdPpltN=1; %This might keep from breaking BUT ???
end end
end %try ~ln565 end
end
end
end %for d=0:DMnum % Calc. Global Mean, Std, And Median For Distributed References
end %for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES******************************************************************
uu=horzcat(uu,vv); uu=horzcat(uu,vv);
for d=1:DMnum for d=1:DMnum
medianIndxD=[]; medianIndxD=[];
@@ -798,16 +721,15 @@ try
RFmeanG=mean(nonzeros(vv(:,d))); RFmeanG=mean(nonzeros(vv(:,d)));
RFstdG=std(nonzeros(vv(:,d))); RFstdG=std(nonzeros(vv(:,d)));
NZrfIndxG=find(vv(:,d)); % find(nonzeros(vv(:,d))); WWRONG FOR A WHILE! find(nonzeros(vv(:,d))); NZrfIndxG=find(vv(:,d)); % find(nonzeros(vv(:,d))); WWRONG FOR A WHILE! find(nonzeros(vv(:,d)));
if isempty(RFmeanG)
if isempty(RFmeanG), nonZeroCntD=0; nonZeroCntD=0;
else nonZeroCntD= length(nonzeros(vv(:,d))); else
nonZeroCntD=length(nonzeros(vv(:,d)));
end end
% Calc. of median requires an odd number of indx items % Calc. of median requires an odd number of indx items
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)==0, medianIndxD=NZrfIndxG(1:(size(NZrfIndxG,1)-1)); end
if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end if ~isempty(NZrfIndxG) && mod(nonZeroCntD,2)~=0, medianIndxD=NZrfIndxG(:); end
if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) % To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) % To calc. a median, more than 15% of spots must be nonZero
mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d))); mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d)));
nzPosIndxDG=find(mvalsDG==vv(:,d)); nzPosIndxDG=find(mvalsDG==vv(:,d));
RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value
@@ -819,14 +741,13 @@ try
aa(lstindx,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; aa(lstindx,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))};
bb(lstindxOrf,1)={strcat('RF1mdG(',num2str(d),')')}; bb(lstindxOrf,1)={strcat('RF1mdG(',num2str(d),')')};
bb(lstindxOrf,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; bb(lstindxOrf,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))};
%Composite Reference Amalgum Plot ****************** % Composite Reference Amalgum Plot
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1; lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RFcmpG(',num2str(d),')')}; aa(lstindx,1)={strcat('RFcmpG(',num2str(d),')')};
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)={strcat('RFcmpG(',num2str(d),')')}; bb(lstindxOrf,1)={strcat('RFcmpG(',num2str(d),')')};
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
%*****************************************************
Exp(1).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(1).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(2).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2)); Exp(3).Dexp(1).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(1).Dexp(1).RFmdGindx(d)=nzPosIndxDG; Exp(2).Dexp(1).RFmdGindx(d)=nzPosIndxDG; Exp(3).Dexp(1).RFmdGindx(d)=nzPosIndxDG; Exp(1).Dexp(1).RFmdGindx(d)=nzPosIndxDG; Exp(2).Dexp(1).RFmdGindx(d)=nzPosIndxDG; Exp(3).Dexp(1).RFmdGindx(d)=nzPosIndxDG;
Exp(1).Dexp(1).RFmdGpltN(d)=RFmdDGloc(d,1); Exp(2).Dexp(1).RFmdGpltN(d)=RFmdDGloc(d,1); Exp(3).Dexp(1).RFmdGpltN(d)=RFmdDGloc(d,1); Exp(1).Dexp(1).RFmdGpltN(d)=RFmdDGloc(d,1); Exp(2).Dexp(1).RFmdGpltN(d)=RFmdDGloc(d,1); Exp(3).Dexp(1).RFmdGpltN(d)=RFmdDGloc(d,1);
@@ -856,19 +777,12 @@ try
Exp(ic).Dexp(1).RFcmpGr.dm(d).min=min(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(ic).Dexp(1).RFcmpGr.dm(d).min=min(vvr(medianIndxD,d)); %For Ref Composite 17_1009
Exp(ic).Dexp(1).RFcmpGr.dm(d).max=max(vvr(medianIndxD,d)); %For Ref Composite 17_1009 Exp(ic).Dexp(1).RFcmpGr.dm(d).max=max(vvr(medianIndxD,d)); %For Ref Composite 17_1009
end end
end %if ~isempty(NZrfIndxG(:,d)) && length(medianIndxD) > (.15*size(drf,1)) end
end %for d=1:DMnum end
end
end % if exist('drf','var')
%END OF DISPERSE REFERENCE PLATAES CALCULATIONS AND LIST ADDITIONS
%*****************************************************************************************************
%SORT and build GeneList
% End Of Disperse Reference Plataes Calculations And List Additions
% Sort And Build Genelist
Exp(1).Dexp(1).srtGnLst={('CheckMP/MPDMfile')}; Exp(1).Dexp(1).srtGnLst={('CheckMP/MPDMfile')};
gnLstRaw=strcat(aa(:,1),aa(:,2)); gnLstRaw=strcat(aa(:,1),aa(:,2));
Exp(1).Dexp(1).srtGnLst=sort(gnLstRaw); Exp(1).Dexp(1).srtGnLst=sort(gnLstRaw);
@@ -890,95 +804,75 @@ try
Exp(1).Dexp(1).srtOrfLst=cellstr([{'Failed To Load'}; {' '}]); Exp(1).Dexp(1).srtOrfLst=cellstr([{'Failed To Load'}; {' '}]);
Exp(2).Dexp(1).srtOrfLst=cellstr([{'Failed To Load'}; {' '}]); Exp(2).Dexp(1).srtOrfLst=cellstr([{'Failed To Load'}; {' '}]);
Exp(3).Dexp(1).srtOrfLst=cellstr([{'Failed To Load'}; {' '}]); Exp(3).Dexp(1).srtOrfLst=cellstr([{'Failed To Load'}; {' '}]);
%[openExpfile,scansDir] %[openExpfile,scansDir]
if isempty(strfind(openExpfile,'.mat')) if ~contains(openExpfile,'.mat')
cd(scansDir) cd(scansDir)
cd .. cd '..'
ExpPath=pwd; ExpPath=pwd;
cd(w) cd(w)
ExpOutImFile=fullfile(scansDir,openExpfile); ExpOutImFile=fullfile(scansDir,openExpfile);
EZvImagesOnly EZvImagesOnly
end end
end end
%*********************************************************
expN=1; % Fix 170424 expN=1; % Fix 170424
DexpN=1; DexpN=1;
EZdiagRFsSheet %* EZdiagRFsSheet
%****************
Exp(1).Dexp(1).RFrnames=rnames; Exp(2).Dexp(1).RFrnames=rnames; Exp(3).Dexp(1).RFrnames=rnames; Exp(1).Dexp(1).RFrnames=rnames; Exp(2).Dexp(1).RFrnames=rnames; Exp(3).Dexp(1).RFrnames=rnames;
Exp(1).Dexp(1).RFdata=data; Exp(2).Dexp(1).RFdata=data; Exp(3).Dexp(1).RFdata=data; Exp(1).Dexp(1).RFdata=data; Exp(2).Dexp(1).RFdata=data; Exp(3).Dexp(1).RFdata=data;
%*********************************************************
RFconfig=0; RFconfig=0;
if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean')) ...
~isempty(Exp(expN).Dexp(1).RFmean)&&... && ~isempty(Exp(expN).Dexp(1).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG')) ...
isempty(Exp(expN).Dexp(1).RFmeanG) && isempty(Exp(expN).Dexp(1).RFmeanG)
RFconfig=1; RFconfig=1;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))==0 ||... if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))==0 ...
isempty(Exp(expN).Dexp(1).RFmean)&&... || isempty(Exp(expN).Dexp(1).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG')) ...
~isempty(Exp(expN).Dexp(1).RFmeanG) && ~isempty(Exp(expN).Dexp(1).RFmeanG)
RFconfig=2; RFconfig=2;
end end
if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean'))&&... if sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmean')) ...
~isempty(Exp(expN).Dexp(1).RFmean)&&... && ~isempty(Exp(expN).Dexp(1).RFmean) ...
sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG'))&&... && sum(ismember(fieldnames(Exp(expN).Dexp(1)),'RFmeanG')) ...
~isempty(Exp(expN).Dexp(1).RFmeanG) && ~isempty(Exp(expN).Dexp(1).RFmeanG)
RFconfig=3; RFconfig=3;
end end
Exp(1).RFconfig=RFconfig; Exp(2).RFconfig=RFconfig; Exp(3).RFconfig=RFconfig; % ZoneRelated Exp(1).RFconfig=RFconfig; Exp(2).RFconfig=RFconfig; Exp(3).RFconfig=RFconfig; % ZoneRelated
%*****************************
try try
msgBadGeneName msgBadGeneName
catch catch
end end
try try
Exp(1).Dexp(1).resetHtmpTg=3; Exp(2).Dexp(1).resetHtmpTg=3; Exp(3).Dexp(1).resetHtmpTg=3; % ZoneRelated Exp(1).Dexp(1).resetHtmpTg=3; Exp(2).Dexp(1).resetHtmpTg=3; Exp(3).Dexp(1).resetHtmpTg=3; % ZoneRelated
if RFconfig==0, if RFconfig==0
RFconfigMsg='No RF1 references in this Experiment Job' RFconfigMsg='No RF1 references in this Experiment Job'
Exp(1).resetHtmpTg=3; Exp(2).resetHtmpTg=3; Exp(3).resetHtmpTg=3; % ZoneRelated Exp(1).resetHtmpTg=3; Exp(2).resetHtmpTg=3; Exp(3).resetHtmpTg=3; % ZoneRelated
end end
catch catch
end end
%*****************************
prntHt=0; prntHt=0;
% HtMapTog 'string', 'Current user HL/HN' selection' % HtMapTog 'string', 'Current user HL/HN' selection'
try try
Exp(1).htmapPBsel=0; Exp(1).htmapPBsel=0;
set(handles.HtMapTog1,'string','L') set(handles.HtMapTog1,'string','L')
Exp(2).htmapPBsel=0; %ZoneRelated Exp(2).htmapPBsel=0; %ZoneRelated
set(handles.HtMapTog2,'string','L') set(handles.HtMapTog2,'string','L')
Exp(3).htmapPBsel=0; Exp(3).htmapPBsel=0;
set(handles.HtMapTog3,'string','L') set(handles.HtMapTog3,'string','L')
catch catch
% expN=1; % expN=1;
end end
%************************************************************************
%Added 17-1023 For User Addition of Gene Composites to ListBox
for ic=1:3 for ic=1:3
Expaa{ic,1}= aa; Expbb{ic,1}= bb; Expaa{ic,1}=aa;
Expbb{ic,1}=bb;
end end
%**********************************************************************
htMapTogPBfg=0; htMapTogPBfg=0;
Exp(1).htmapRFanswer={'G','L'}; % ZoneRelated Exp(1).htmapRFanswer={'G','L'}; % ZoneRelated
Exp(2).htmapRFanswer={'G','L'}; Exp(2).htmapRFanswer={'G','L'};
Exp(3).htmapRFanswer={'G','L'}; Exp(3).htmapRFanswer={'G','L'};
zonePB=expN; % added 230828 to fix migration zonePB=expN; % added 230828 to fix migration
%------Adapt for AppDesigner 230821-----------
global ghandles
ghandles=handles; ghandles=handles;
%global Exp(4)
ghandles.guiFig=gcf; ghandles.guiFig=gcf;
Exp(4).guiFig=gcf; Exp(4).guiFig=gcf;

View File

@@ -20,7 +20,6 @@ clear all
%P=[40,40]; %P=[40,40];
%center=[refPtR+ round(.5*width), refPtC+ round(.5*width)]; %center=[refPtR+ round(.5*width), refPtC+ round(.5*width)];
%A=zeros(70,70); %A=zeros(70,70);
%---------------------------------------------------------------------
%radius=14; %radius=14;
diaExt=2*(radius+1); diaExt=2*(radius+1);
circBoxA=zeros(diaExt,diaExt); circBoxA=zeros(diaExt,diaExt);
@@ -30,13 +29,11 @@ X=bsxfun(@plus,(1:m)', zeros(1,n));
Y=bsxfun(@plus,(1:n), zeros(m,1)); Y=bsxfun(@plus,(1:n), zeros(m,1));
cirMask=sqrt(sum(bsxfun(@minus,cat(3,X,Y),reshape(center,1,1,[])) .^2,3))<=radius; cirMask=sqrt(sum(bsxfun(@minus,cat(3,X,Y),reshape(center,1,1,[])) .^2,3))<=radius;
area=pi*radius^2; area=pi*radius^2;
cirPixA=nnz(cirMask); cirPixA=nnz(cirMask);
optCirMask=double(cirMask); optCirMask=double(cirMask);
optCirMask(optCirMask==0)=0.8; optCirMask(optCirMask==0)=0.8;
%+++++++++++Foto Circle Fram(e)+++++++++++++++++++++ % Foto Circle Fram(e)
expansion=2; expansion=2;
radExpan=radius+expansion; radExpan=radius+expansion;
FdiaExt=2*(radExpan); FdiaExt=2*(radExpan);
@@ -46,17 +43,14 @@ center= [radExpan+1, radExpan+1];
X=bsxfun(@plus,(1:m)', zeros(1,n)); X=bsxfun(@plus,(1:m)', zeros(1,n));
Y=bsxfun(@plus,(1:n), zeros(m,1)); Y=bsxfun(@plus,(1:n), zeros(m,1));
FcirMask=sqrt(sum(bsxfun(@minus,cat(3,X,Y),reshape(center,1,1,[])) .^2,3))<=radExpan; FcirMask=sqrt(sum(bsxfun(@minus,cat(3,X,Y),reshape(center,1,1,[])) .^2,3))<=radExpan;
% FcirPixA=nnz(cirMask); % FcirPixA=nnz(cirMask);
FoptCirMask=double(FcirMask); FoptCirMask=double(FcirMask);
FoptCirMask(FoptCirMask==1)=2; FoptCirMask(FoptCirMask==1)=2;
% FoptCirMask(FoptCirMask==0)=1; % FoptCirMask(FoptCirMask==0)=1;
%********Combine Masks to create circular boundry************ % Combine Masks to create circular boundry
padOptCirMask=padarray(optCirMask,[expansion-1 expansion-1],0.8); padOptCirMask=padarray(optCirMask,[expansion-1 expansion-1],0.8);
FoptCirMask=FoptCirMask .* padOptCirMask; FoptCirMask=FoptCirMask .* padOptCirMask;
FoptCirMask(FoptCirMask==1.6)=0.8; FoptCirMask(FoptCirMask==1.6)=0.8;
FoptCirMask(FoptCirMask==0)=1; FoptCirMask(FoptCirMask==0)=1;
FoptCirMask(FoptCirMask==2)=1; FoptCirMask(FoptCirMask==2)=1;
%---------------------------------------------------
% imagesc(cirMask) % imagesc(cirMask)

View File

@@ -3,8 +3,6 @@
global ghandles global ghandles
global Exp global Exp
try try
lnwidth=str2num(Exp(4).plotPars{1}) lnwidth=str2num(Exp(4).plotPars{1})
axisFontSz=str2num(Exp(4).plotPars{2}) axisFontSz=str2num(Exp(4).plotPars{2})
@@ -34,12 +32,11 @@ set(gcf,'OuterPosition',(get(0,'screensize')))
disphOLbX(1)={get(Exp(zone).hOLb(1),'XData')} disphOLbX(1)={get(Exp(zone).hOLb(1),'XData')}
disphOLbY(1)={get(Exp(zone).hOLb(1),'YData')} disphOLbY(1)={get(Exp(zone).hOLb(1),'YData')}
catch end catch end
hn=hn+1 hn=hn+1
notDup=1; notDup=1;
end end
notDup=0; notDup=0;
for hN=2:length(Exp(zone).hOL) for hN=2:length(Exp(zone).hOL)
% Bounce-dupicate data removal % Bounce-dupicate data removal
for j=1:(hN-1) for j=1:(hN-1)
@@ -61,12 +58,12 @@ for hN=2:length(Exp(zone).hOL)
try try
disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')}; disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')};
disphOLbY(hn)={get(Exp(zone).hOLb(hN),'YData')}; disphOLbY(hn)={get(Exp(zone).hOLb(hN),'YData')};
catch end catch
end
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-') tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
catch ME catch ME
disp(ME) disp(ME)
display('error leading to line 59 catch') display('error leading to line 59 catch')
end end
end end
end end
@@ -78,14 +75,12 @@ for hN=2:length(Exp(zone).hOL)
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')}; linecolor(i)={get(hprint,'color')};
else else
hprint=semilogy(cell2mat(disphOLX(i)),cell2mat(disphOLY(i))) hprint=semilogy(cell2mat(disphOLX(i)),cell2mat(disphOLY(i)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')}; linecolor(i)={get(hprint,'color')};
end end
hold all hold all
end end
@@ -93,7 +88,6 @@ hold all
legName=tmp legName=tmp
hleg=legend((legName),'location','NEO') hleg=legend((legName),'location','NEO')
set(hleg,'fontsize',legFontSz) set(hleg,'fontsize',legFontSz)
try try
for i=1:hn for i=1:hn
if semiLog==0 if semiLog==0
@@ -102,11 +96,11 @@ try
hprint=semilogy(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none') hprint=semilogy(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none')
end end
end end
catch end catch
end
hold off hold off
%*******End of Standard Overlay Plot*********************** % End of Standard Overlay Plot
else %if Composite Plot else %if Composite Plot
for hcN=1:(Exp(zone).cTraceN -1) for hcN=1:(Exp(zone).cTraceN -1)
disphOLX(hcN)={get(Exp(zone).hCmean(hcN),'XData')}; disphOLX(hcN)={get(Exp(zone).hCmean(hcN),'XData')};
@@ -122,7 +116,6 @@ hold off
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21 set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')}; linecolor(hcN)={get(hprint,'color')};
else else
hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN))) hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0 set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
@@ -131,26 +124,19 @@ hold off
end end
hold all hold all
legName=tmp legName=tmp
hleg=legend((legName),'location','NEO') hleg=legend((legName),'location','NEO')
set(hleg,'fontsize',legFontSz) set(hleg,'fontsize',legFontSz)
%{ %{
for i=1:hn for i=1:hn
hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none') hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none')
end end
%} %}
end end
for i=1:(Exp(zone).cTraceN -1) for i=1:(Exp(zone).cTraceN -1)
hBprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i))) hBprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)))
set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6 set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6
set(hBprint,'color',linecolor{i}) set(hBprint,'color',linecolor{i})
hCprint=plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i))) hCprint=plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i)))
set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6 set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6
set(hBprint,'color',linecolor{i}) set(hBprint,'color',linecolor{i})

View File

@@ -1,4 +1,4 @@
% Create the text in an axis: % Create the text in an axis
hFstrip=figure; hFstrip=figure;
%figure(hFstrip,'Visible','off') %figure(hFstrip,'Visible','off')

View File

@@ -25,7 +25,6 @@ if get(handles.GeneOrfTog,'value')==0
if strcmpi(gnXref,'HO'), gene=strcat(gene,',',gnXref);end if strcmpi(gnXref,'HO'), gene=strcat(gene,',',gnXref);end
name=strcat(char(gene),'->',char(orfXref)); name=strcat(char(gene),'->',char(orfXref));
end end
elseif get(handles.GeneOrfTog,'value')==1 elseif get(handles.GeneOrfTog,'value')==1
orf=MP(1,LBmp).orf{1,1}(indx); orf=MP(1,LBmp).orf{1,1}(indx);
orfLength=length(char(orf)); orfLength=length(char(orf));
@@ -44,6 +43,7 @@ if isempty(a)
name='Not Found'; name='Not Found';
desc=[]; proc=[]; func=[]; loc=[]; desc=[]; proc=[]; func=[]; loc=[];
end end
%{ %{
if get(handles.listboxGnOrf,'value')&& ~isempty(a) if get(handles.listboxGnOrf,'value')&& ~isempty(a)
desc=char(text(a,32,:)); desc=char(text(a,32,:));

View File

@@ -60,13 +60,9 @@ function ButtonName=questdlg(Question,Title,Btn1,Btn2,Btn3,Default)
% %
% See also DIALOG, ERRORDLG, HELPDLG, INPUTDLG, LISTDLG, % See also DIALOG, ERRORDLG, HELPDLG, INPUTDLG, LISTDLG,
% MSGBOX, WARNDLG, FIGURE, TEXTWRAP, UIWAIT, UIRESUME. % MSGBOX, WARNDLG, FIGURE, TEXTWRAP, UIWAIT, UIRESUME.
% Copyright 1984-2010 The MathWorks, Inc. % Copyright 1984-2010 The MathWorks, Inc.
% $Revision: 5.55.4.17 $ % $Revision: 5.55.4.17 $
if nargin<1 if nargin<1
error('MATLAB:questdlg:TooFewArguments', 'Too few arguments for QUESTDLG'); error('MATLAB:questdlg:TooFewArguments', 'Too few arguments for QUESTDLG');
end end
@@ -74,21 +70,18 @@ end
Interpreter='none'; Interpreter='none';
Question=dialogCellstrHelper(Question); Question=dialogCellstrHelper(Question);
%%%%%%%%%%%%%%%%%%%%% % General Information
%%% General Info. %%%
%%%%%%%%%%%%%%%%%%%%%
Black =[0 0 0 ]/255; Black =[0 0 0 ]/255;
% LightGray =[192 192 192 ]/255; % LightGray =[192 192 192 ]/255;
% LightGray2 =[160 160 164 ]/255; % LightGray2 =[160 160 164 ]/255;
% MediumGray =[128 128 128 ]/255; % MediumGray =[128 128 128 ]/255;
% White =[255 255 255 ]/255; % White =[255 255 255 ]/255;
%%%%%%%%%%%%%%%%%%%% % Nargin Check
%%% Nargin Check %%%
%%%%%%%%%%%%%%%%%%%%
if nargout>1 if nargout>1
error('MATLAB:questdlg:WrongNumberOutputs', 'Wrong number of output arguments for QUESTDLG'); error('MATLAB:questdlg:WrongNumberOutputs', 'Wrong number of output arguments for QUESTDLG');
end end
if nargin==1,Title=' ';end if nargin==1,Title=' ';end
if nargin<=2, Default='Yes';end if nargin<=2, Default='Yes';end
if nargin==3, Default=Btn1 ;end if nargin==3, Default=Btn1 ;end
@@ -105,10 +98,7 @@ if isstruct(Default),
Default=Default.Default; Default=Default.Default;
end end
% Create QuestFig
%%%%%%%%%%%%%%%%%%%%%%%
%%% Create QuestFig %%%
%%%%%%%%%%%%%%%%%%%%%%%
FigPos=get(0,'DefaultFigurePosition'); FigPos=get(0,'DefaultFigurePosition');
FigPos(3)=267; FigPos(3)=267;
FigPos(4)=70; FigPos(4)=70;
@@ -127,29 +117,22 @@ QuestFig=dialog( ...
'Tag' ,Title ... 'Tag' ,Title ...
); );
%%%%%%%%%%%%%%%%%%%%% % Set Positions
%%% Set Positions %%%
%%%%%%%%%%%%%%%%%%%%%
DefOffset =10; DefOffset =10;
IconWidth =54; IconWidth =54;
IconHeight =54; IconHeight =54;
IconXOffset=DefOffset; IconXOffset=DefOffset;
IconYOffset=FigPos(4)-DefOffset-IconHeight; %#ok IconYOffset=FigPos(4)-DefOffset-IconHeight; %#ok
IconCMap=[Black;get(QuestFig,'Color')]; %#ok IconCMap=[Black;get(QuestFig,'Color')]; %#ok
DefBtnWidth =56; DefBtnWidth =56;
BtnHeight =22; BtnHeight =22;
BtnYOffset=DefOffset; BtnYOffset=DefOffset;
BtnWidth=DefBtnWidth; BtnWidth=DefBtnWidth;
ExtControl=uicontrol(...
ExtControl=uicontrol(QuestFig , ... QuestFig , ...
'Style' ,'pushbutton', ... 'Style' ,'pushbutton', ...
'String' ,' ' ... 'String' ,' ' ...
); );
btnMargin=1.4; btnMargin=1.4;
set(ExtControl,'String',Btn1); set(ExtControl,'String',Btn1);
BtnExtent=get(ExtControl,'Extent'); BtnExtent=get(ExtControl,'Extent');
@@ -165,38 +148,28 @@ if NumButtons > 1
end end
end end
BtnHeight=max(BtnHeight,BtnExtent(4)*btnMargin); BtnHeight=max(BtnHeight,BtnExtent(4)*btnMargin);
delete(ExtControl); delete(ExtControl);
MsgTxtXOffset=IconXOffset+IconWidth; MsgTxtXOffset=IconXOffset+IconWidth;
FigPos(3)=max(FigPos(3),MsgTxtXOffset+NumButtons*(BtnWidth+2*DefOffset)); FigPos(3)=max(FigPos(3),MsgTxtXOffset+NumButtons*(BtnWidth+2*DefOffset));
set(QuestFig,'Position',FigPos); set(QuestFig,'Position',FigPos);
BtnXOffset=zeros(NumButtons,1); BtnXOffset=zeros(NumButtons,1);
if NumButtons==1, if NumButtons==1,
BtnXOffset=(FigPos(3)-BtnWidth)/2; BtnXOffset=(FigPos(3)-BtnWidth)/2;
elseif NumButtons==2, elseif NumButtons==2,
BtnXOffset=[MsgTxtXOffset BtnXOffset=[MsgTxtXOffset FigPos(3)-DefOffset-BtnWidth];
FigPos(3)-DefOffset-BtnWidth];
elseif NumButtons==3, elseif NumButtons==3,
BtnXOffset=[MsgTxtXOffset BtnXOffset=[MsgTxtXOffset 0 FigPos(3)-DefOffset-BtnWidth];
0
FigPos(3)-DefOffset-BtnWidth];
BtnXOffset(2)=(BtnXOffset(1)+BtnXOffset(3))/2; BtnXOffset(2)=(BtnXOffset(1)+BtnXOffset(3))/2;
end end
MsgTxtYOffset=DefOffset+BtnYOffset+BtnHeight; MsgTxtYOffset=DefOffset+BtnYOffset+BtnHeight;
% Calculate current msg text width and height. If negative, % Calculate current msg text width and height. If negative,
% clamp it to 1 since its going to be recalculated/corrected later % clamp it to 1 since its going to be recalculated/corrected later
% based on the actual msg string % based on the actual msg string
MsgTxtWidth=max(1, FigPos(3)-DefOffset-MsgTxtXOffset-IconWidth); MsgTxtWidth=max(1, FigPos(3)-DefOffset-MsgTxtXOffset-IconWidth);
MsgTxtHeight=max(1, FigPos(4)-DefOffset-MsgTxtYOffset); MsgTxtHeight=max(1, FigPos(4)-DefOffset-MsgTxtYOffset);
MsgTxtForeClr=Black; MsgTxtForeClr=Black;
MsgTxtBackClr=get(QuestFig,'Color'); MsgTxtBackClr=get(QuestFig,'Color');
CBString='uiresume(gcbf)'; CBString='uiresume(gcbf)';
DefaultValid=false; DefaultValid=false;
DefaultWasPressed=false; DefaultWasPressed=false;
@@ -214,7 +187,6 @@ for i=1:NumButtons
DefaultValid=true; DefaultValid=true;
DefaultButton=1; DefaultButton=1;
end end
case 2 case 2
ButtonString=Btn2; ButtonString=Btn2;
ButtonTag='Btn2'; ButtonTag='Btn2';
@@ -260,11 +232,8 @@ MsgHandle=uicontrol(QuestFig , ...
); );
[WrapString,NewMsgTxtPos]=textwrap(MsgHandle,Question,75); [WrapString,NewMsgTxtPos]=textwrap(MsgHandle,Question,75);
% NumLines=size(WrapString,1); % NumLines=size(WrapString,1);
AxesHandle=axes('Parent',QuestFig,'Position',[0 0 1 1],'Visible','off'); AxesHandle=axes('Parent',QuestFig,'Position',[0 0 1 1],'Visible','off');
texthandle=text( ... texthandle=text( ...
'Parent' ,AxesHandle , ... 'Parent' ,AxesHandle , ...
'Units' ,'pixels' , ... 'Units' ,'pixels' , ...
@@ -279,42 +248,32 @@ texthandle=text( ...
); );
textExtent=get(texthandle, 'Extent'); textExtent=get(texthandle, 'Extent');
% (g357851)textExtent and extent from uicontrol are not the same. For window, extent from uicontrol is larger % (g357851)textExtent and extent from uicontrol are not the same. For window, extent from uicontrol is larger
% than textExtent. But on Mac, it is reverse. Pick the max value. % than textExtent. But on Mac, it is reverse. Pick the max value.
MsgTxtWidth=max([MsgTxtWidth NewMsgTxtPos(3)+2 textExtent(3)]); MsgTxtWidth=max([MsgTxtWidth NewMsgTxtPos(3)+2 textExtent(3)]);
MsgTxtHeight=max([MsgTxtHeight NewMsgTxtPos(4)+2 textExtent(4)]); MsgTxtHeight=max([MsgTxtHeight NewMsgTxtPos(4)+2 textExtent(4)]);
MsgTxtXOffset=IconXOffset+IconWidth+DefOffset; MsgTxtXOffset=IconXOffset+IconWidth+DefOffset;
FigPos(3)=max(NumButtons*(BtnWidth+DefOffset)+DefOffset, ... FigPos(3)=max(NumButtons*(BtnWidth+DefOffset)+DefOffset, ...
MsgTxtXOffset+MsgTxtWidth+DefOffset); MsgTxtXOffset+MsgTxtWidth+DefOffset);
% Center Vertically around icon % Center Vertically around icon
if IconHeight>MsgTxtHeight, if IconHeight>MsgTxtHeight,
IconYOffset=BtnYOffset+BtnHeight+DefOffset; IconYOffset=BtnYOffset+BtnHeight+DefOffset;
MsgTxtYOffset=IconYOffset+(IconHeight-MsgTxtHeight)/2; MsgTxtYOffset=IconYOffset+(IconHeight-MsgTxtHeight)/2;
FigPos(4)=IconYOffset+IconHeight+DefOffset; FigPos(4)=IconYOffset+IconHeight+DefOffset;
% center around text % Center around text
else else
MsgTxtYOffset=BtnYOffset+BtnHeight+DefOffset; MsgTxtYOffset=BtnYOffset+BtnHeight+DefOffset;
IconYOffset=MsgTxtYOffset+(MsgTxtHeight-IconHeight)/2; IconYOffset=MsgTxtYOffset+(MsgTxtHeight-IconHeight)/2;
FigPos(4)=MsgTxtYOffset+MsgTxtHeight+DefOffset; FigPos(4)=MsgTxtYOffset+MsgTxtHeight+DefOffset;
end end
if NumButtons==1, if NumButtons==1
BtnXOffset=(FigPos(3)-BtnWidth)/2; BtnXOffset=(FigPos(3)-BtnWidth)/2;
elseif NumButtons==2, elseif NumButtons==2
BtnXOffset=[(FigPos(3)-DefOffset)/2-BtnWidth BtnXOffset=[(FigPos(3)-DefOffset)/2-BtnWidth (FigPos(3)+DefOffset)/2];
(FigPos(3)+DefOffset)/2 elseif NumButtons==3
];
elseif NumButtons==3,
BtnXOffset(2)=(FigPos(3)-BtnWidth)/2; BtnXOffset(2)=(FigPos(3)-BtnWidth)/2;
BtnXOffset=[BtnXOffset(2)-DefOffset-BtnWidth BtnXOffset=[BtnXOffset(2)-DefOffset-BtnWidth BtnXOffset(2) BtnXOffset(2)+BtnWidth+DefOffset];
BtnXOffset(2)
BtnXOffset(2)+BtnWidth+DefOffset
];
end end
set(QuestFig ,'Position',getnicedialoglocation(FigPos, get(QuestFig,'Units'))); set(QuestFig ,'Position',getnicedialoglocation(FigPos, get(QuestFig,'Units')));
@@ -323,7 +282,6 @@ BtnPos=cellfun(@(bh)get(bh,'Position'), BtnHandle, 'UniformOutput', false);
BtnPos=cat(1,BtnPos{:}); BtnPos=cat(1,BtnPos{:});
BtnPos(:,1)=BtnXOffset; BtnPos(:,1)=BtnXOffset;
BtnPos=num2cell(BtnPos,2); BtnPos=num2cell(BtnPos,2);
assert(iscell(BtnPos)); assert(iscell(BtnPos));
cellfun(@(bh,pos)set(bh, 'Position', pos), BtnHandle, BtnPos, 'UniformOutput', false); cellfun(@(bh,pos)set(bh, 'Position', pos), BtnHandle, BtnPos, 'UniformOutput', false);
@@ -332,11 +290,8 @@ if DefaultValid
end end
delete(MsgHandle); delete(MsgHandle);
set(texthandle, 'Position',[MsgTxtXOffset MsgTxtYOffset 0]); set(texthandle, 'Position',[MsgTxtXOffset MsgTxtYOffset 0]);
IconAxes=axes(... IconAxes=axes(...
'Parent' ,QuestFig , ... 'Parent' ,QuestFig , ...
'Units' ,'Pixels' , ... 'Units' ,'Pixels' , ...
@@ -346,12 +301,10 @@ IconAxes=axes( ...
); );
set(QuestFig ,'NextPlot','add'); set(QuestFig ,'NextPlot','add');
load dialogicons.mat questIconData questIconMap; load dialogicons.mat questIconData questIconMap;
IconData=questIconData; IconData=questIconData;
questIconMap(256,:)=get(QuestFig,'Color'); questIconMap(256,:)=get(QuestFig,'Color');
IconCMap=questIconMap; IconCMap=questIconMap;
Img=image('CData',IconData,'Parent',IconAxes); Img=image('CData',IconData,'Parent',IconAxes);
set(QuestFig, 'Colormap', IconCMap); set(QuestFig, 'Colormap', IconCMap);
set(IconAxes, ... set(IconAxes, ...
@@ -361,10 +314,8 @@ set(IconAxes, ...
'YLim' ,get(Img,'YData') ... 'YLim' ,get(Img,'YData') ...
); );
% make sure we are on screen % Make sure we are on screen
movegui(QuestFig) movegui(QuestFig)
set(QuestFig ,'WindowStyle','modal','Visible','on'); set(QuestFig ,'WindowStyle','modal','Visible','on');
drawnow; drawnow;