EZmDayTrend.m 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. % GraphicDestinationPertibationComparison**15_821
  2. % Called by EZlstBoxExt or EZvDatatip.m, Then calls EZRFs4DayComp
  3. CompositeTrendFlg=0;
  4. if expN==1 && get(ghandles.CompositeTog1,'value')==1 ...
  5. || expN==2 && get(ghandles.CompositeTog2,'value')==1 ...
  6. || expN==3 && get(ghandles.CompositeTog3,'value')==1
  7. CompositeTrendFlg=1;
  8. end
  9. % if (isequal(destcompMsg,'GoodDataTip')&&~isequal(destcompMsg, 'BadDataTip'))|| isequal(destcompMsg,'Olay')
  10. % hold off
  11. if expN==1,DexpN=(get(ghandles.DN1,'value')); end
  12. if expN==2,DexpN=(get(ghandles.DN2,'value')); end
  13. if expN==3,DexpN=(get(ghandles.DN3,'value')); end
  14. if expN==1,MPsel=floor(get(ghandles.MPsldr1,'value')); end
  15. if expN==2,MPsel=floor(get(ghandles.MPsldr2,'value')); end
  16. if expN==3,MPsel=floor(get(ghandles.MPsldr3,'value')); end
  17. if expN==1,pertSel=floor(get(ghandles.DMsldr1,'value')); end
  18. if expN==2,pertSel=floor(get(ghandles.DMsldr2,'value')); end
  19. if expN==3,pertSel=floor(get(ghandles.DMsldr3,'value')); end
  20. dmSel=pertSel;
  21. if EZdatatip==1 %adaptation for image spot selection
  22. %plNums=plateNum;
  23. destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
  24. plNums=(MPsel-1)*destPerMP + (1:destPerMP);
  25. zoneSel=expN;
  26. tracN=Exp(zoneSel).traceN;
  27. if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end
  28. if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end
  29. if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end
  30. if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end
  31. if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end
  32. if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end
  33. elseif EZdatatip==2 % adaption for Overlay plot selection
  34. destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
  35. MPlateN=ceil(OLplateNum/destPerMP);
  36. plNums=(MPlateN-1)*destPerMP + (1:destPerMP);
  37. zoneSel=expN;
  38. tracN=Exp(zoneSel).traceN;
  39. if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end
  40. if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end
  41. if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end
  42. if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222
  43. if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222
  44. if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222
  45. elseif EZdatatip==0
  46. if lstBoxCmpFlg~=1
  47. % destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
  48. plNums=(LBmp-1)*destPerMP + (1:destPerMP);
  49. tracN=Exp(zoneSel).traceN;
  50. if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222
  51. if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222
  52. if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222
  53. elseif lstBoxCmpFlg==1
  54. % DexpN=Exp(expN).DexpN;
  55. dmSel=pertSel;
  56. tracN=Exp(zoneSel).traceN;
  57. if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222
  58. if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222
  59. if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222
  60. end
  61. end
  62. if EZdatatip==2 % Response to Overlay click
  63. % seltraceN comes from EZvDatatip;
  64. % Exp(OLay).seltraceN iscaptured from EZvDatatip
  65. % if an OLay trace is selected
  66. % else it is captured below if EZdatatip is not equal to 2
  67. try
  68. set(Exp(zoneSel).hLRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','on');
  69. catch, end
  70. try
  71. set(Exp(zoneSel).hL(seltraceN),'visible','on'); set(Exp(zoneSel).hLb(seltraceN),'visible','on');
  72. catch, end
  73. % Plot new intL
  74. try
  75. set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on');
  76. catch, end
  77. try
  78. set(Exp(zoneSel).hintLadj(seltraceN),'visible','on'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','on');
  79. catch, end
  80. if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
  81. % K values
  82. for J=1:(tracN),
  83. try
  84. set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
  85. catch, end
  86. try
  87. set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off');
  88. catch, end
  89. end
  90. try
  91. set(Exp(zoneSel).hKRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hKRF2(seltraceN),'visible','on');
  92. catch, end
  93. try
  94. set(Exp(zoneSel).hK(seltraceN),'visible','on'); set(Exp(zoneSel).hKb(seltraceN),'visible','on');
  95. catch, end
  96. for J=1:(tracN)
  97. try
  98. set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
  99. catch, end
  100. try
  101. set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off');
  102. catch, end
  103. end
  104. try
  105. set(Exp(zoneSel).hrRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hrRF2(seltraceN),'visible','on');
  106. catch, end
  107. try
  108. set(Exp(zoneSel).hr(seltraceN),'visible','on'); set(Exp(zoneSel).hrb(seltraceN),'visible','on');
  109. catch, end
  110. else % if EZdatatip==1 or if EZdatatip==0
  111. % Attempt fix for overlaying L and intL from image datatip==1 18_0103
  112. try
  113. set(Exp(zoneSel).hLRF1(seltraceN),'visible','off'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','off');
  114. catch, end
  115. try
  116. set(Exp(zoneSel).hL(seltraceN),'visible','off'); set(Exp(zoneSel).hLb(seltraceN),'visible','off');
  117. catch, end
  118. % Plot new intL
  119. try
  120. set(Exp(zoneSel).hintL(seltraceN),'visible','off'); set(Exp(zoneSel).hintLb(seltraceN),'visible','off');
  121. catch, end
  122. try
  123. set(Exp(zoneSel).hintLadj(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','off');
  124. catch, end
  125. % Plot RFmd1 and RFmd2 indexes
  126. if lstBoxCmpFlg~=1 % If selection is a "normal" item with a location in the label
  127. days=Exp(expN).DexpLength;
  128. for nn=1:Exp(expN).DexpLength % length(Exp(zoneSel).Dexp)
  129. RFconfig=Exp(zoneSel).Dexp(DexpN).RFconfig;
  130. EZRFs4DayComp
  131. if lstBoxCmpFlg~=1
  132. Exp(zoneSel).seltraceN=tracN;
  133. seltraceN=tracN;
  134. end
  135. % Plot L K r for all Day pertibation(XdestinationX) Plates
  136. try RF1mdNums=(RF1mdPltN-1)*destPerMP + (pertSel); catch, end % RF1mdPltN
  137. try RF2mdNums=(RF2mdPltN-1)*destPerMP + (pertSel); catch, end % RF2mdPltN
  138. if CompositeTrendFlg==0 || EZdatatip==1
  139. lvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,5);
  140. if lvals(nn)==0, lvals(nn)=140; end
  141. kvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,3);
  142. rvals(nn)=Exp(zoneSel).Dexp(nn).scan(1,plNums(pertSel)).plate(1).CFout(indx,4);
  143. Exp(expN).Trace(traceN).dmSel=pertSel;
  144. Exp(expN).Trace(traceN).UsrGLB=selGnOrf; %usrGnSp;
  145. Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).UsrLvals=lvals(nn);
  146. Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).UsrKvals=kvals(nn);
  147. Exp(expN).Trace(tracN).Dexp(nn).DM(pertSel).Usrrvals=rvals(nn);
  148. elseif CompositeTrendFlg==1 && EZdatatip==0 % Gene-Specifics Composite from listBox
  149. days=Exp(expN).DexpLength;
  150. if iscell(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals)
  151. lvals(nn)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals));
  152. if lvals(nn)==0, lvals(nn)=140; end
  153. kvals(nn)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrKvals));
  154. rvals(nn)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).Usrrvals));
  155. else
  156. lvals(nn)=median(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals);
  157. if lvals(nn)==0, lvals(nn)=140; end
  158. kvals(nn)=median(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrKvals);
  159. rvals(nn)=median(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).Usrrvals);
  160. end
  161. end
  162. try
  163. % lvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx(nn),5);
  164. lvalsRF1md(nn)=RFmdVal(nn); %RFmdVal(nn) gets the above if 'F', or the global median if 'G' or the local median if 'L' selected
  165. if lvalsRF1md(nn)==0, lvalsRF1md(nn)=140; end
  166. kvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx,3);
  167. rvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx,4);
  168. catch
  169. end
  170. try
  171. lvalsRF2md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF2mdNums).plate(1).CFout(RF2mdIndx,5);
  172. if lvalsRF2md(nn)==0, lvalsRF2md(nn)=140; end
  173. kvalsRF2md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF2mdNums).plate(1).CFout(RF2mdIndx,3);
  174. rvalsRF2md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF2mdNums).plate(1).CFout(RF2mdIndx,4);
  175. catch
  176. end
  177. try
  178. if (~exist('lvalsRF1md','var')||~exist('lvalsRF2md','var'))&& exist('RFcmpGFlg','var') && RFcmpGFlg==1
  179. lvalsRF1md(nn)=Exp(expN).DexpN(nn).RFcmpGL.DM(dmSel);
  180. if lvalsRF2md(nn)==0, lvalsRF2md(nn)=140; end
  181. end
  182. lvalsRF1md(nn)=RFmdVal(nn); %RFmdVal(nn) gets the above if 'F', or the global median if 'G' or the local median if 'L' selected
  183. if lvalsRF1md(nn)==0, lvalsRF1md(nn)=140; end
  184. kvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx,3);
  185. rvalsRF1md(nn)=Exp(zoneSel).Dexp(nn).scan(1,RF1mdNums).plate(1).CFout(RF1mdIndx,4);
  186. catch
  187. end
  188. % Added for INTERACTION Calculating Utility 2016_0219
  189. try
  190. if CompositeTrendFlg==0 || EZdatatip==1 % 18_0103 Add || EZdatatip==1
  191. Xn(nn)=Exp(expN).Dexp(nn).scan(plNums(pertSel)).plate(1).CFout(indx,5);
  192. Xln(nn)=Exp(expN).Dexp(nn).scan(plNums(pertSel)).plate(1).CFout(indx,11);
  193. Xhn(nn)=Exp(expN).Dexp(nn).scan(plNums(pertSel)).plate(1).CFout(indx,12);
  194. elseif CompositeTrendFlg==1 && EZdatatip==0 % 18_0103 add && EZdatatip==0 Gene-Specifics Composite from listBox
  195. Xn(nn)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals));
  196. Xln(nn)=Xn(nn) - std(cell2mat(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals));
  197. Xhn(nn)=Xn(nn) + std(cell2mat(Exp(expN).Trace(tracN).Dexp(nn).DM(dmSel).UsrLvals));
  198. end
  199. if Xn(nn)==0, deltaXR(nn)=140; end
  200. if isnan(Xhn(nn))||isnan(Xln(nn))|| Xhn(nn)==0||Xln(nn)==0||isnan(Rs(nn))
  201. deltaXR(nn)=140;
  202. elseif Xn(nn) >=Rn(nn)
  203. deltaXR(nn)=Xln(nn)-(Rn(nn)+Rs(nn));
  204. else
  205. deltaXR(nn)=Xhn(nn)-(Rn(nn)-Rs(nn));
  206. end
  207. catch
  208. msg='No Refs! ->No Interaction Calculations!'
  209. end
  210. end
  211. elseif lstBoxCmpFlg==1 % determine values of RF1cmp or RFcmpG
  212. days=Exp(expN).DexpLength;
  213. if strcmp(Exp(expN).DexpType,'chrono'), DM=inDM; else DM=pertSel; end % else DM=dmSel;
  214. Exp(zoneSel).seltraceN=tracN; % added fix 2020_1103
  215. seltraceN=tracN; % added fix 2020_1103
  216. for nn=1:Exp(expN).DexpLength % length(Exp(zoneSel).Dexp)
  217. RFconfig=Exp(zoneSel).Dexp(DexpN).RFconfig;
  218. EZRFs4DayComp
  219. if RFcmpGFlg==0 % RF1cmp or RF2cmp clicked
  220. lvals(nn)=Exp(expN).Dexp(nn).RFcmpL(RFnum).dm(DM).med;
  221. if lvals(nn)==0, lvals(dm)=140; end
  222. kvals(nn)=Exp(expN).Dexp(nn).RFcmpK(RFnum).dm(DM).med;
  223. rvals(nn)=Exp(expN).Dexp(nn).RFcmpr(RFnum).dm(DM).med;
  224. elseif RFcmpGFlg==1
  225. lvals(nn)=Exp(expN).Dexp(nn).RFcmpGL.dm(DM).med; % Ls=num2str(l);
  226. if lvals(nn)==0, lvals(nn)=140; end
  227. kvals(nn)=Exp(expN).Dexp(nn).RFcmpGK.dm(DM).med; % Ks=num2str(K);
  228. rvals(nn)=Exp(expN).Dexp(nn).RFcmpGr.dm(DM).med; % rs=num2str(r);
  229. end
  230. % Added for INTERACTION Calculating Utility 2016_0219
  231. try
  232. Xn(nn)=lvals(nn);
  233. try
  234. Xln(nn)=lvals(nn)- Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(DM).std ;
  235. Xhn(nn)=lvals(nn)+ Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(DM).std;
  236. catch
  237. Xln(nn)=lvals(nn)- Exp(expN).Dexp(DexpN).RFcmpGL.dm(DM).std ;
  238. Xhn(nn)=lvals(nn)+ Exp(expN).Dexp(DexpN).RFcmpGL.dm(DM).std;
  239. end
  240. if Xn(nn)==0, deltaXR(nn)=140; end
  241. if isnan(Xhn(nn))||isnan(Xln(nn))|| Xhn(nn)==0||Xln(nn)==0||isnan(Rs(nn))
  242. deltaXR(nn)=140;
  243. elseif Xn(nn) >=Rn(nn)
  244. deltaXR(nn)=Xln(nn)-(Rn(nn)+Rs(nn));
  245. else
  246. deltaXR(nn)=Xhn(nn)-(Rn(nn)-Rs(nn));
  247. end
  248. catch
  249. msg='No Refs! ->No Interaction Calculations!'
  250. end
  251. end
  252. end
  253. %end
  254. % Interaction Plotting Utility 2016_0219
  255. try
  256. if Rn(1)==0 % If Ref mean is zero
  257. intL=0; proGrIntL=0; intLadj=0; proGrIntLadj=0;
  258. intNormL=6.66;intNormLadj=6.66; proGrIntNormL=6.66;proGrIntNormLadj=6.66;
  259. else
  260. % if Xn(pertSel)==0 || Xn(pertSel)==140,intL=140; else intL=(Xn-Rn); end
  261. intL=(Xn-Rn);
  262. intL(Xn==0)=140;
  263. intLadj=(deltaXR);
  264. Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL=intL;
  265. end
  266. catch
  267. FailMessage='Problem with Reference Rn value; Unable to produce Interaction values! Ln119 EZdestComp'
  268. end
  269. hidem(ghandles.Daxes1)
  270. if zoneSel==1,showm(ghandles.Dlaxes1);showm(ghandles.Dkaxes1);showm(ghandles.Draxes1);end
  271. if zoneSel==2,showm(ghandles.Dlaxes2);showm(ghandles.Dkaxes2);showm(ghandles.Draxes2);end
  272. if zoneSel==3,showm(ghandles.Dlaxes3);showm(ghandles.Dkaxes3);showm(ghandles.Draxes3);end
  273. set(Dlaxes,'NextPlot','add'); set(Dkaxes,'NextPlot','add'); set(Draxes,'NextPlot','add')
  274. if zoneSel==1,showm(ghandles.DNLaxes1); end
  275. if zoneSel==2,showm(ghandles.DNLaxes2); end
  276. if zoneSel==3,showm(ghandles.DNLaxes3); end
  277. set(DNLaxes,'NextPlot','add');
  278. % Make visible the current L plot and store it for retrieval by OLay code
  279. % Plot RF1 and/or RF2 OR if No RF1-RF2 Plot RFcmpGL
  280. try %Some experiments do not have ref. plates
  281. Exp(zoneSel).hLRF1(tracN)=plot(Dlaxes,lvalsRF1md,1:days,'y'); hold on
  282. catch1=0;
  283. catch
  284. catch1=1;
  285. end
  286. try
  287. Exp(zoneSel).hLRF2(tracN)=plot(Dlaxes,lvalsRF2md,1:days,'y'); hold on
  288. catch2=0;
  289. catch
  290. catch2=1;
  291. end
  292. try
  293. if catch1 && catch2&& RFcmpGFlg==1
  294. for nn=1:Exp(expN).DexpLength
  295. lvalsRF1md(nn)=Exp(1,expN).Dexp(1,nn).RFcmpGL.dm(1,dmSel).med;
  296. if lvalsRF1md(nn)==0, lvalsRF1md(nn)=140; end
  297. end
  298. end
  299. Exp(zoneSel).hLRF1(tracN)=plot(Dlaxes,lvalsRF1md,1:days,'y');
  300. catch
  301. end
  302. % Plot User Selection Data
  303. try
  304. Exp(zoneSel).hL(tracN)=plot(Dlaxes,lvals,1:days); Exp(zoneSel).hLb(tracN)=plot(Dlaxes,lvals,1:days,'rs');
  305. catch
  306. end
  307. if zoneSel==1,set(ghandles.Dlaxes1,'xlim',[0,140]); end
  308. if zoneSel==2,set(ghandles.Dlaxes2,'xlim',[0,140]); end
  309. if zoneSel==3,set(ghandles.Dlaxes3,'xlim',[0,140]); end
  310. % Make visible Plot for Interaction Data, Store and Hide unless a N (InteractionPBsel) set that plot on Top of the RawData Plots.
  311. % Plot new intL
  312. try
  313. % zeroCLn=zeros(1,days)
  314. % Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:days,'y');
  315. Exp(zoneSel).hintL(tracN)= plot(DNLaxes,intL,1:days); Exp(zoneSel).hintLb(tracN)=plot(DNLaxes,intL,1:days,'rs');
  316. Exp(zoneSel).hintLadj(tracN)= plot(DNLaxes,intLadj,1:days,'g'); Exp(zoneSel).hintLadjb(tracN)=plot(DNLaxes,intLadj,1:days,'gs');
  317. catch
  318. end
  319. if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
  320. if zoneSel==2,set(ghandles.DNLaxes2,'xlim',[-75,75]); end
  321. if zoneSel==3,set(ghandles.DNLaxes3,'xlim',[-75,75]); end
  322. % Hide all K plots
  323. for J=1:(tracN-1)
  324. try
  325. set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
  326. catch, end
  327. try
  328. set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off');
  329. catch, end
  330. end
  331. % Make visible the current L plot and store it for retrieval by OLay code
  332. try % Some experiments do not have ref. plates
  333. Exp(zoneSel).hKRF1(tracN)=plot(Dkaxes,kvalsRF1md,1:days,'y');
  334. Exp(zoneSel).hKRF2(tracN)=plot(Dkaxes,kvalsRF2md,1:days,'y');
  335. catch, end
  336. try
  337. Exp(zoneSel).hK(tracN)= plot(Dkaxes,kvals,1:days); Exp(zoneSel).hKb(tracN)=plot(Dkaxes,kvals,1:days,'rs');
  338. catch, end
  339. set(Dkaxes,'xlim',[0,200]) % max(kvals+20)
  340. set(Dkaxes,'ycolor',[.9,.9,1])
  341. % Hide all r plots
  342. for J=1:(tracN-1)
  343. try
  344. set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
  345. catch, end
  346. try
  347. set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off');
  348. catch, end
  349. end
  350. % Make visible the current r plot and store it for retrieval by OLay code
  351. try % Some experiments do not have ref. plates
  352. Exp(zoneSel).hrRF1(tracN)=plot(Draxes,rvalsRF1md,1:days,'y');
  353. Exp(zoneSel).hrRF2(tracN)=plot(Draxes,rvalsRF2md,1:days,'y');
  354. catch, end
  355. try
  356. Exp(zoneSel).hr(tracN)= plot(Draxes,rvals,1:days); Exp(zoneSel).hrb(tracN)=plot(Draxes,rvals,1:days,'rs');
  357. catch, end
  358. set(Draxes,'xlim',[0,1])
  359. set(Draxes,'ycolor',[.9,.9,1])
  360. end
  361. if CompositeTrendFlg==1 && EZdatatip~=0
  362. % lbLKr=strcat(gene,'_',spec,'_');
  363. drug=Exp(expN).Dexp(DexpN).DM.drug{dmSel};
  364. conc=Exp(expN).Dexp(DexpN).DM.conc{dmSel};
  365. media=Exp(expN).Dexp(DexpN).DM.media{dmSel};
  366. mod1=Exp(expN).Dexp(DexpN).DM.mod1{dmSel};
  367. conc1=Exp(expN).Dexp(DexpN).DM.conc1{dmSel};
  368. mod2=Exp(expN).Dexp(DexpN).DM.mod2{dmSel};
  369. conc2=Exp(expN).Dexp(DexpN).DM.conc2{dmSel};
  370. dmStr=strcat(drug,conc,'_',media,'_',mod1,conc1,mod2,conc2);
  371. grfgenestr=strcat(grfgenestr,dmStr);
  372. end
  373. if zoneSel==1, set(ghandles.geneOrfLKr1,'string', grfgenestr);end
  374. if zoneSel==2, set(ghandles.geneOrfLKr2,'string', grfgenestr);end
  375. if zoneSel==3, set(ghandles.geneOrfLKr3,'string', grfgenestr);end
  376. % Display Selection PlotFilter
  377. if lstBoxCmpFlg~=1,
  378. seltraceN=Exp(zoneSel).seltraceN
  379. end
  380. if EZdatatip==0, seltraceN=tracN; end
  381. if Exp(4).interacPBsel==0
  382. % replace ghandles.DNLaxes1 (Dlaxes2)etc. with a single
  383. % Exp(zoneSel).DNLaxes,....
  384. set(ghandles.Dlaxes1,'Visible','on')
  385. set(ghandles.Dlaxes2,'Visible','on')
  386. set(ghandles.Dlaxes3,'Visible','on')
  387. set(ghandles.DNLaxes1,'Visible','off')
  388. set(ghandles.DNLaxes2,'Visible','off')
  389. set(ghandles.DNLaxes3,'Visible','off')
  390. for n=1:Exp(zoneSel).traceN
  391. try
  392. set(Exp(zoneSel).hLRF1(n),'visible','off'); set(Exp(zoneSel).hLRF2(n),'visible','off');
  393. catch, end
  394. try
  395. set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off');
  396. catch, end
  397. try
  398. set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off');
  399. catch, end
  400. try
  401. set(Exp(zoneSel).hintLadj(n),'visible','off'); set(Exp(zoneSel).hintLadjb(n),'visible','off');
  402. catch, end
  403. end
  404. try
  405. set(Exp(zoneSel).hLRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','on');
  406. catch, end
  407. try
  408. set(Exp(zoneSel).hL(seltraceN),'visible','on'); set(Exp(zoneSel).hLb(seltraceN),'visible','on');
  409. catch, end
  410. for i=1:Exp(zoneSel).expLoadCnt,
  411. try set(Exp(zoneSel).hzeroCLn(i),'visible','off'); catch ME, end
  412. end
  413. elseif Exp(4).interacPBsel==1
  414. set(ghandles.DNLaxes1,'Visible','on')
  415. set(ghandles.DNLaxes2,'Visible','on')
  416. set(ghandles.DNLaxes3,'Visible','on')
  417. set(ghandles.Dlaxes1,'Visible','off')
  418. set(ghandles.Dlaxes2,'Visible','off')
  419. set(ghandles.Dlaxes3,'Visible','off')
  420. for n=1:Exp(zoneSel).traceN
  421. try set(Exp(zoneSel).hLRF1(n),'visible','off'); catch, end
  422. try set(Exp(zoneSel).hLRF2(n),'visible','off'); catch, end
  423. try set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off'); catch, end
  424. try set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off'); catch, end
  425. try set(Exp(zoneSel).hintLadj(n),'visible','off'); set(Exp(zoneSel).hintLadjb(n),'visible','off'); catch, end
  426. end
  427. try set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on'); catch, end
  428. try set(Exp(zoneSel).hintLadj(seltraceN),'visible','on'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','on'); catch, end
  429. for i=1:Exp(zoneSel).expLoadCnt
  430. try set(Exp(zoneSel).hzeroCLn(i),'visible','on'); catch ME, end
  431. end
  432. elseif Exp(4).interacPBsel==2
  433. end
  434. %{
  435. % Attempt fix for overlaying L and intL from image datatip==1 18_0103
  436. if Exp(4).interacPBsel==0 %0000
  437. try
  438. set(Exp(zoneSel).hLRF1(seltraceN),'visible','off'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','off');
  439. catch, end
  440. try
  441. set(Exp(zoneSel).hL(seltraceN),'visible','off'); set(Exp(zoneSel).hLb(seltraceN),'visible','off');
  442. catch, end
  443. end
  444. % Hide intL
  445. if Exp(4).interacPBsel==1 %1111
  446. try
  447. set(Exp(zoneSel).hintL(seltraceN),'visible','off'); set(Exp(zoneSel).hintLb(seltraceN),'visible','off');
  448. catch, end
  449. try
  450. set(Exp(zoneSel).hintLadj(seltraceN),'visible','off'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','off');
  451. catch, end
  452. end
  453. %}