Squashed initial commit
This commit is contained in:
217
qhtcp-workflow/apps/matlab/ezview/EZlstBoxCmpExt.m
Executable file
217
qhtcp-workflow/apps/matlab/ezview/EZlstBoxCmpExt.m
Executable file
@@ -0,0 +1,217 @@
|
||||
%EZlstBoxExtCmp.m
|
||||
%Called by EZviewGui.m NOT by EZvDatatip.m and EZlstBoxExt.m
|
||||
%Provides Trace data storage for use by EZfigTrendOL.m
|
||||
|
||||
RFcmpGFlg=0;
|
||||
if isequal(tempLB(4:6),'cmp')
|
||||
RFnum=str2double(tempLB(3));
|
||||
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
|
||||
Exp(expN).cLmdEven=0; %Added for Cummulative Median and Mean 'C' plot
|
||||
RFDMflg=0;
|
||||
if zoneSel==1,DexpN=(get(ghandles.DN1,'value')); end
|
||||
if zoneSel==2,DexpN=(get(ghandles.DN2,'value')); end
|
||||
if zoneSel==3,DexpN=(get(ghandles.DN3,'value')); end
|
||||
|
||||
try
|
||||
p1=cell2mat(strfind(selGnOrf,'('));
|
||||
p2=cell2mat(strfind(selGnOrf,')'));
|
||||
dmNum=str2num(selGnOrf{1}(p1+1:p2-1));
|
||||
inDM=str2num(selGnOrf{1}(p1+1:p2-1));
|
||||
if (~isempty(dmNum)&& isnumeric(dmNum)),RFDMflg=1; end
|
||||
catch
|
||||
end
|
||||
|
||||
if RFDMflg, Exp(zoneSel).Dexp(DexpN).pertSel=dmNum; end %pertSel=pert;
|
||||
|
||||
sgdInfoOnly=get(handles.InfoToggle,'value');
|
||||
if sgdInfoOnly==1
|
||||
EZviewInfoBox
|
||||
else % Runs to end of EZlstBoxExt.m within this else condition
|
||||
|
||||
% Plot Selected Gene/Orf Spot
|
||||
%try
|
||||
if RFcmpGFlg==0
|
||||
K=Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).med; Ks=num2str(K);
|
||||
r=Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).med; rs=num2str(r);
|
||||
l=Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).med; Ls=num2str(l);
|
||||
Kl=K - Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
|
||||
Ku=K + Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
|
||||
rl=r - Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
|
||||
ru=r + Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
|
||||
lfast=l - Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
|
||||
lslow=l + Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
|
||||
elseif RFcmpGFlg==1
|
||||
K=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; Ks=num2str(K);
|
||||
r=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; rs=num2str(r);
|
||||
l=Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).med; Ls=num2str(l);
|
||||
Kl=K - Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std;
|
||||
Ku=K + Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std;
|
||||
rl=r - Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).std;
|
||||
ru=r + Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).std;
|
||||
lfast=l - Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std;
|
||||
lslow=l + Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std;
|
||||
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 Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end
|
||||
|
||||
t=1:200;
|
||||
clear g;
|
||||
|
||||
%try
|
||||
g=K ./ (1 + exp(-r.* (t - l )));
|
||||
gSlow=Kl ./ (1 + exp(-rl.* (t - lslow )));
|
||||
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
|
||||
%tser=(scan(1,plateNum).plate(1).t0Series(:));
|
||||
%rawData=scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx);
|
||||
if zoneSel==1
|
||||
plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1;
|
||||
Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1;
|
||||
Exp(1).traceN=Exp(1).traceN+1;
|
||||
traceN=Exp(1).traceN;
|
||||
end
|
||||
if zoneSel==2
|
||||
plotAxes=ghandles.Paxes2; OLaxes=ghandles.OLaxes2;Daxes=ghandles.Daxes2;
|
||||
Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2;
|
||||
Exp(2).traceN=Exp(2).traceN+1;
|
||||
traceN=Exp(2).traceN;
|
||||
end
|
||||
if zoneSel==3
|
||||
plotAxes=ghandles.Paxes3; OLaxes=ghandles.OLaxes3;Daxes=ghandles.Daxes3;
|
||||
Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3;
|
||||
Exp(3).traceN=Exp(3).traceN+1;
|
||||
traceN=Exp(3).traceN;
|
||||
end
|
||||
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');
|
||||
|
||||
% 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;
|
||||
if RFcmpGFlg==0
|
||||
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).rstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
|
||||
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).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};
|
||||
end
|
||||
Exp(expN).Trace(traceN).dmSel=inDM;
|
||||
Exp(expN).Trace(traceN).DexpN=DexpN;
|
||||
Exp(expN).Trace(traceN).UsrGLB=selGnOrf;
|
||||
elseif RFcmpGFlg==1
|
||||
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).rstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).std;
|
||||
if strcmp(Exp(expN).DexpType,'chrono')
|
||||
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).UsrKvals=Exp(expN).Dexp(nn).RFcmpGK.dm(inDM).Kvals;
|
||||
Exp(expN).Trace(traceN).Dexp(nn).DM(inDM).Usrrvals=Exp(expN).Dexp(nn).RFcmpGr.dm(inDM).rvals;
|
||||
end
|
||||
else
|
||||
for dm=1:length(Exp(expN).Dexp(DexpN).DM.drug)
|
||||
Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrLvals=Exp(expN).Dexp(DexpN).RFcmpGL.dm(dm).Lvals;
|
||||
Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrKvals=Exp(expN).Dexp(DexpN).RFcmpGK.dm(dm).Kvals;
|
||||
Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).Usrrvals=Exp(expN).Dexp(DexpN).RFcmpGr.dm(dm).rvals;
|
||||
end
|
||||
end
|
||||
Exp(expN).Trace(traceN).dmSel=inDM;
|
||||
Exp(expN).Trace(traceN).DexpN=DexpN;
|
||||
Exp(expN).Trace(traceN).UsrGLB=selGnOrf;
|
||||
end
|
||||
|
||||
Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast;
|
||||
Exp(expN).lKl(traceN)=Kl; Exp(expN).Ku(traceN)=Ku;
|
||||
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
|
||||
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
|
||||
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
|
||||
% catch
|
||||
% catchissue='Ln68 EZlstBoxCmpExt'
|
||||
% end %trycatch
|
||||
|
||||
% Get the DM agar description
|
||||
if expN==1,DMstr=char(get(handles.DM1,'string'));end
|
||||
if expN==2,DMstr=char(get(handles.DM2,'string'));end
|
||||
if expN==3,DMstr=char(get(handles.DM3,'string'));end
|
||||
|
||||
if isequal(selGnOrf{1}(1:3),'RF1')|| isequal(selGnOrf{1}(1:3),'RF2')|| RFcmpGFlg==1
|
||||
gene={selGnOrf{1}(1:p2)};
|
||||
geneOrfstr=gene;
|
||||
grfgenestr=gene;
|
||||
else
|
||||
gene=MP(1,LBmp).genename{1,1}(indx); orf=MP(1,LBmp).orf{1,1}(indx);
|
||||
geneOrfstr=strcat(gene,'_',orf,'_','m',num2str(LBmp),'r',num2str(LBr),'c',num2str(LBc),'_',tPtStr);
|
||||
grfgenestr=strcat(gene,'_',orf,'_','m',num2str(LBmp),'r',num2str(LBr),'c',num2str(LBc));
|
||||
end
|
||||
%spec=MP(1,LBmp).specifics{1,1}(indx); %orfrep=MP(1,plateNum).orfRep{1,1}(indx);
|
||||
%tPtStr=strcat('T=', num2str(scan(1,plateNum).plate(1).t0Series(tPtSel)));
|
||||
graphStr=strcat(grfgenestr,'_','L=',Lstr,'_','r=',rstr,'_','K=',Kstr);
|
||||
spotDescrip=strcat(graphStr,'->',DMstr);
|
||||
|
||||
xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
|
||||
if ispc,
|
||||
slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\');
|
||||
else
|
||||
slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'/');
|
||||
end
|
||||
|
||||
startPos=slashPos(length(slashPos)-1) +1;
|
||||
endPos=slashPos(length(slashPos)) -1;
|
||||
expStr={xp(startPos:endPos)}
|
||||
|
||||
Exp(zoneSel).hOLname(traceN)=spotDescrip; %graphStr; %ghandles.Exp(zoneSel).hOLname(traceN)=graphStr;
|
||||
Exp(zoneSel).hOLexpNm(traceN)=expStr; %ghandles.Exp(expN).hOLexpNm(traceN)=expStr;
|
||||
Exp(zoneSel).hOLresDir(traceN)={Exp(zoneSel).Dexp(DexpN).resDir};
|
||||
%Exp(zoneSel).hOLplateNum(traceN)=plateNum;
|
||||
%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==2,set(ghandles.GeneOrfLoc2,'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==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end
|
||||
if zoneSel==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end
|
||||
|
||||
% 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
|
||||
set(ghandles.OLay1,'string', Exp(zoneSel).hOLname(traceN));
|
||||
if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp1,'FontSize',8);end
|
||||
set(ghandles.OLexp1,'string',Exp(zoneSel).hOLexpNm(traceN));
|
||||
end
|
||||
if zoneSel==2 %&& get(ghandles.rotPB2,'value') ~=1
|
||||
if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay2,'FontSize',8);end
|
||||
set(ghandles.OLay2,'string', Exp(zoneSel).hOLname(traceN));
|
||||
if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp2,'FontSize',8);end
|
||||
set(ghandles.OLexp2,'string',Exp(zoneSel).hOLexpNm(traceN));
|
||||
end
|
||||
if zoneSel==3 %&& get(ghandles.rotPB3,'value') ~=1
|
||||
if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay3,'FontSize',8);end
|
||||
set(ghandles.OLay3,'string', Exp(OLay).hOLname(traceN));
|
||||
if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp3,'FontSize',8);end
|
||||
set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(traceN));
|
||||
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
|
||||
Reference in New Issue
Block a user