EZdestComp.m 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. %EZdestConp.m GraphicDestinationPertibationComparison**15_821
  2. %Produces Trend plots across perturbation (DrugMedia) plates
  3. %Called by EZvDatatip.m and EZlstBoxExt.m
  4. %Provides Trace data storage for use by EZfigTrendOL.m
  5. if lstBoxCmpFlg==1
  6. Exp(zoneSel).seltraceN=traceN;
  7. seltraceN=traceN;
  8. end
  9. if expN==1 && get(ghandles.CompositeTog1,'value')==1 ||...
  10. expN==2 && get(ghandles.CompositeTog2,'value')==1 ||...
  11. expN==3 && get(ghandles.CompositeTog3,'value')==1
  12. CompositeTrendFlg=1; else CompositeTrendFlg=0;
  13. end
  14. destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
  15. if EZdatatip==1 %adaptation for image spot selection
  16. % plNums=plateNum;
  17. % destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
  18. plNums=(MPsel-1)*destPerMP + (1:destPerMP)
  19. zoneSel=expN;
  20. tracN=Exp(zoneSel).traceN;
  21. if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end
  22. if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end
  23. if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end
  24. if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end
  25. if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end
  26. if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end
  27. elseif EZdatatip==2 % adaption for Overlay plot selection
  28. % destPerMP=Exp(expN).Dexp(DexpN).destPerMP;
  29. MPlateN=ceil(OLplateNum/destPerMP);
  30. plNums=(MPlateN-1)*destPerMP + (1:destPerMP);
  31. zoneSel=expN;
  32. tracN=Exp(zoneSel).traceN;
  33. if zoneSel==1,Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; end
  34. if zoneSel==2,Dlaxes=ghandles.Dlaxes2;Dkaxes=ghandles.Dkaxes2;Draxes=ghandles.Draxes2; end
  35. if zoneSel==3,Dlaxes=ghandles.Dlaxes3;Dkaxes=ghandles.Dkaxes3;Draxes=ghandles.Draxes3; end
  36. if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222
  37. if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222
  38. if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222
  39. elseif EZdatatip==0
  40. if lstBoxCmpFlg~=1
  41. DexpN=Exp(expN).DexpN;
  42. plNums=(LBmp-1)*destPerMP + (1:destPerMP);
  43. tracN=Exp(zoneSel).traceN;
  44. Exp(expN).Trace(traceN).DexpN=DexpN;
  45. elseif lstBoxCmpFlg==1
  46. DexpN=Exp(expN).DexpN;
  47. tracN=Exp(zoneSel).traceN;
  48. end
  49. % determin if selection is a User chosen RF-****-mdG or RF-****-mdP
  50. Lbl=cell2mat(selGnOrf);
  51. if ~isempty(strfind(Lbl,'RF')) && ~isempty(strfind(Lbl,'md'))
  52. strLoc=strfind(Lbl,'md');
  53. MPloc=strfind(Lbl,':');
  54. dMP=str2double(Lbl((MPloc(1)+1):(MPloc(2)-1)));
  55. if strcmp(Lbl(strLoc:strLoc+3),'-mdG(');
  56. RFmdFlg='mdG';
  57. elseif strcmp(Lbl(strLoc:strLoc+3),'-mdP(')
  58. RFmdFlg='mdP';
  59. elseif strcmp(Lbl(strLoc:strLoc+2),'md(')
  60. RFmdFlg='md';
  61. end
  62. end
  63. if zoneSel==1,DNLaxes=ghandles.DNLaxes1;end %2016_0222
  64. if zoneSel==2,DNLaxes=ghandles.DNLaxes2;end %2016_0222
  65. if zoneSel==3,DNLaxes=ghandles.DNLaxes3;end %2016_0222
  66. end % if EZdatatip==1 %adaptation for image spot selection
  67. if EZdatatip==2 % Response to Overlay click
  68. % seltraceN comes from EZvDatatip;
  69. % Exp(OLay).seltraceN iscaptured from EZvDatatip
  70. % if an OLay trace is selected
  71. % else it is captured below if EZdatatip is not equal to 2
  72. try
  73. set(Exp(zoneSel).hLRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','on');
  74. catch, end
  75. try
  76. set(Exp(zoneSel).hL(seltraceN),'visible','on'); set(Exp(zoneSel).hLb(seltraceN),'visible','on');
  77. catch, end
  78. % Plot new intL
  79. try
  80. set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on');
  81. catch, end
  82. try
  83. set(Exp(zoneSel).hintLadj(seltraceN),'visible','on'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','on');
  84. catch, end
  85. if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
  86. for J=1:(tracN)
  87. try
  88. set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
  89. catch, end
  90. try
  91. set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off');
  92. catch, end
  93. end
  94. try
  95. set(Exp(zoneSel).hKRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hKRF2(seltraceN),'visible','on');
  96. catch, end
  97. try
  98. set(Exp(zoneSel).hK(seltraceN),'visible','on'); set(Exp(zoneSel).hKb(seltraceN),'visible','on');
  99. catch, end
  100. for J=1:(tracN),
  101. try
  102. set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
  103. catch, end
  104. try
  105. set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off');
  106. catch, end
  107. end
  108. try
  109. set(Exp(zoneSel).hrRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hrRF2(seltraceN),'visible','on');
  110. catch, end
  111. try
  112. set(Exp(zoneSel).hr(seltraceN),'visible','on'); set(Exp(zoneSel).hrb(seltraceN),'visible','on');
  113. catch, end
  114. else
  115. % Plot RFmd1 and RFmd2 indexes
  116. if EZdatatip==0
  117. end
  118. %if ~exist(RFmdFlg)
  119. RF1mdIndx=Exp(zoneSel).Dexp(DexpN).RFmd1indx;
  120. RF1mdPltN=Exp(zoneSel).Dexp(DexpN).RFmd1pltN;
  121. RF2mdIndx=Exp(zoneSel).Dexp(DexpN).RFmd2indx;
  122. RF2mdPltN=Exp(zoneSel).Dexp(DexpN).RFmd2pltN;
  123. try Rn=Exp(expN).Dexp(DexpN).RFmean; catch, Rn=0; end
  124. try Rs=Exp(expN).Dexp(DexpN).RFstd; catch, Rs=0; end
  125. if isempty(RF1mdIndx)
  126. try Rn=Exp(expN).Dexp(DexpN).RFmeanG; catch, Rn=0; end
  127. try Rs=Exp(expN).Dexp(DexpN).RFstdG; catch, Rs=0; end
  128. end
  129. if lstBoxCmpFlg~=1
  130. Exp(zoneSel).seltraceN=tracN;
  131. seltraceN=tracN;
  132. end
  133. % Plot L K r for all pertibation(destination) Plates
  134. if lstBoxCmpFlg~=1 % If selection is a "normal" item with a location in the label
  135. try RF1mdNums=(RF1mdPltN-1)*destPerMP + (1:destPerMP); catch, end %RF1mdPltN %
  136. try RF2mdNums=(RF2mdPltN-1)*destPerMP + (1:destPerMP); catch, end %RF2mdPltN %
  137. for I=1:length(plNums),
  138. if CompositeTrendFlg==0 || EZdatatip==1 %'Normal' gene/orf spot image or listbox item with location data
  139. Exp(expN).Trace(traceN).dmSel=pertSel;
  140. Exp(expN).Trace(traceN).DexpN=DexpN;
  141. Exp(expN).Trace(traceN).UsrGLB=selGnOrf; %usrGnSp;
  142. if ~exist('RFmdFlg')
  143. lvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,5);
  144. if lvals(I)==0, lvals(I)=140; end
  145. kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3);
  146. rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4);
  147. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
  148. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
  149. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
  150. elseif strcmp(RFmdFlg,'mdG')
  151. lvals(I)=Exp(expN).Dexp(DexpN).RFcmpGL.dm(I).med;
  152. if lvals(I)==0, lvals(I)=140; end
  153. kvals(I)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(I).med;
  154. rvals(I)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(I).med;
  155. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
  156. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
  157. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
  158. elseif strcmp(RFmdFlg,'mdP')
  159. lvals(I)=Exp(expN).Dexp(DexpN).RFmedianP(I,dMP);
  160. if lvals(I)==0, lvals(I)=140; end
  161. kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3); %No P med.Kvals /dms currently avail.
  162. rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4); %No P med.rvals /dms currently avail.
  163. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
  164. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
  165. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
  166. elseif strcmp(RFmdFlg,'md')
  167. lvals(I)=Exp(expN).Dexp(DexpN).RFmean(I);
  168. if lvals(I)==0, lvals(I)=140; end
  169. kvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,3); %No P med.Kvals /dms currently avail.
  170. rvals(I)=scan(1,plNums(I)).plate(1).CFout(indx,4); %No P med.rvals /dms currently avail.
  171. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals=lvals(I);
  172. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals=kvals(I);
  173. Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals=rvals(I);
  174. end
  175. elseif CompositeTrendFlg==1 && EZdatatip==0 %Gene-Specifics Composite from listBox
  176. lvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals));
  177. if lvals(I)==0, lvals(I)=140; end
  178. kvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrKvals));
  179. rvals(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).Usrrvals));
  180. end
  181. try
  182. if ~isempty(RF1mdIndx)
  183. lvalsRF1md(I)=scan(1,RF1mdNums(I)).plate(1).CFout(RF1mdIndx(I),5);
  184. if lvalsRF1md(I)==0, lvalsRF1md(I)=140; end
  185. kvalsRF1md(I)=scan(1,RF1mdNums(I)).plate(1).CFout(RF1mdIndx(I),3);
  186. rvalsRF1md(I)=scan(1,RF1mdNums(I)).plate(1).CFout(RF1mdIndx(I),4);
  187. elseif ~isempty(Exp(expN).Dexp(DexpN).RFcmpGL.dm(I).med)
  188. lvalsRF1md(I)=Exp(expN).Dexp(DexpN).RFcmpGL.dm(I).med;
  189. if lvalsRF1md(I)==0, lvalsRF1md(I)=140; end
  190. kvalsRF1md(I)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(I).med;
  191. rvalsRF1md(I)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(I).med;
  192. end
  193. catch
  194. end
  195. try
  196. lvalsRF2md(I)=scan(1,RF2mdNums(I)).plate(1).CFout(RF2mdIndx(I),5);
  197. if lvalsRF2md(I)==0, lvalsRF2md(I)=140; end
  198. kvalsRF2md(I)=scan(1,RF2mdNums(I)).plate(1).CFout(RF2mdIndx(I),3);
  199. rvalsRF2md(I)=scan(1,RF2mdNums(I)).plate(1).CFout(RF2mdIndx(I),4);
  200. catch
  201. end
  202. % Added for INTERACTION Calculating Utility 2016_0219
  203. try
  204. if CompositeTrendFlg==0 || EZdatatip==1
  205. Xn(I)=Exp(expN).Dexp(DexpN).scan(plNums(I)).plate(1).CFout(indx,5);
  206. Xln(I)=Exp(expN).Dexp(DexpN).scan(plNums(I)).plate(1).CFout(indx,11);
  207. Xhn(I)=Exp(expN).Dexp(DexpN).scan(plNums(I)).plate(1).CFout(indx,12);
  208. elseif CompositeTrendFlg==1 && EZdatatip~=1
  209. Xn(I)=median(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals));
  210. Xln(I)=Xn(I) - std(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals));
  211. Xhn(I)=Xn(I) + std(cell2mat(Exp(expN).Trace(tracN).Dexp(DexpN).DM(I).UsrLvals));
  212. end
  213. if Xn(I)==0, deltaXR(I)=140; end
  214. if isnan(Xhn(I))||isnan(Xln(I))|| Xhn(I)==0||Xln(I)==0||isnan(Rs(I))
  215. deltaXR(I)=140;
  216. elseif Xn(I) >=Rn(I)
  217. deltaXR(I)=Xln(I)-(Rn(I)+Rs(I));
  218. else
  219. deltaXR(I)=Xhn(I)-(Rn(I)-Rs(I));
  220. end
  221. catch
  222. msg='No Refs! ->No Interaction Calculations!'
  223. end
  224. end
  225. elseif lstBoxCmpFlg==1 %Determine values of RF1cmp or RFcmpG or RFcmpP composites
  226. for dm=1:destPerMP
  227. if RFcmpGFlg==0 %RF1cmp or RF2cmp clicked
  228. lvals(dm)=Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(dm).med;
  229. if lvals(dm)==0, lvals(dm)=140; end
  230. kvals(dm)=Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(dm).med;
  231. rvals(dm)=Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(dm).med;
  232. elseif RFcmpGFlg==1
  233. lvals(dm)=Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).med;% Ls=num2str(l);
  234. if lvals(dm)==0, lvals(dm)=140; end
  235. kvals(dm)=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; %Ks=num2str(K);
  236. rvals(dm)=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; %rs=num2str(r);
  237. end
  238. % Added for INTERACTION Calculating Utility 2016_0219
  239. try
  240. Xn(dm)=lvals(dm);
  241. Xln(dm)=lvals(dm)- Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std ;
  242. Xhn(dm)=lvals(dm)+ Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
  243. if Xn(dm)==0, deltaXR(dm)=140; end
  244. if isnan(Xhn(dm))||isnan(Xln(dm))|| Xhn(dm)==0||Xln(dm)==0||isnan(Rs(dm))
  245. deltaXR(dm)=140;
  246. elseif Xn(dm) >=Rn(dm)
  247. deltaXR(dm)=Xln(dm)-(Rn(dm)+Rs(dm));
  248. else
  249. deltaXR(dm)=Xhn(dm)-(Rn(dm)-Rs(dm));
  250. end
  251. catch
  252. msg='No Refs! ->No Interaction Calculations!'
  253. end
  254. end % for dm=1:destPerMP
  255. Exp(expN).Trace(traceN).UsrGLB=selGnOrf; %Added 18_0118 for tickLabelStr issue in EZfigTrendOL.m assoc'd with RFcmpG(-)
  256. end
  257. % INTERACTION Plotting Utility 2016_021
  258. try
  259. if Rn(1)==0 % if Ref mean is zero
  260. intL=0; proGrIntL=0; intLadj=0; proGrIntLadj=0;
  261. intNormL=6.66;intNormLadj=6.66; proGrIntNormL=6.66;proGrIntNormLadj=6.66;
  262. else
  263. % if Xn(I)==0 || Xn(I)==140,intL =140; else intL=(Xn-Rn); end
  264. intL=(Xn-Rn);
  265. intL(Xn==0)=140;
  266. intLadj=(deltaXR);
  267. Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL=intL;
  268. %{
  269. intNormL=(intL) ./ Rn(1)
  270. intNormLadj=((deltaXR)./ Rn(1))
  271. proGrIntL=-(intL)
  272. proGrIntLadj=-(deltaXR)
  273. proGrIntNormL=-(intL ./ Rn(1))
  274. proGrIntNormLadj=-((deltaXR)./ Rn(1))
  275. %find where Xn(j)==0 and set interactL to a fixed Max interaction value
  276. intNormL(find(Xn==0))=2
  277. intNormLadj(find(Xn==0))=2
  278. proGrIntLadj(find(Xn==0))=-2
  279. proGrIntNormLadj(find(Xn==0))=-2
  280. %}
  281. end
  282. catch
  283. FailMessage='Problem with Reference Rn value; Unable to produce Interaction values! Ln119 EZdestComp'
  284. end
  285. hidem(ghandles.Daxes1)
  286. if zoneSel==1,showm(ghandles.Dlaxes1);showm(ghandles.Dkaxes1);showm(ghandles.Draxes1);end
  287. if zoneSel==2,showm(ghandles.Dlaxes2);showm(ghandles.Dkaxes2);showm(ghandles.Draxes2);end
  288. if zoneSel==3,showm(ghandles.Dlaxes3);showm(ghandles.Dkaxes3);showm(ghandles.Draxes3);end
  289. set(Dlaxes,'NextPlot','add'); set(Dkaxes,'NextPlot','add'); set(Draxes,'NextPlot','add')
  290. if zoneSel==1,showm(ghandles.DNLaxes1); end
  291. if zoneSel==2,showm(ghandles.DNLaxes2); end
  292. if zoneSel==3,showm(ghandles.DNLaxes3); end
  293. set(DNLaxes,'NextPlot','add');
  294. % Make visible the current L plot and store it for retrieval by OLay code
  295. if verLessThan('matlab','8.4')
  296. else % accomodate new matlab changes after 2014a fix 23_0807
  297. tempFig2=figure;
  298. end
  299. try % some experiments do not have ref. plates
  300. Exp(zoneSel).hLRF1(tracN)=plot(Dlaxes,lvalsRF1md,1:destPerMP,'b'); hold on
  301. catch
  302. end
  303. try
  304. Exp(zoneSel).hLRF2(tracN)=plot(Dlaxes,lvalsRF2md,1:destPerMP,'c'); hold on
  305. catch
  306. end
  307. try
  308. Exp(zoneSel).hL(tracN)=plot(Dlaxes,lvals,1:destPerMP); Exp(zoneSel).hLb(tracN)=plot(Dlaxes,lvals,1:destPerMP,'rs');
  309. catch
  310. end
  311. if zoneSel==1,set(ghandles.Dlaxes1,'xlim',[0,140]); end
  312. if zoneSel==2,set(ghandles.Dlaxes2,'xlim',[0,140]); end
  313. if zoneSel==3,set(ghandles.Dlaxes3,'xlim',[0,140]); end
  314. % Make visible Plot for Interaction Data, Store and Hide unless a N (InteractionPBsel) set that plot on Top of the RawData Plots.
  315. % Plot new intL
  316. try
  317. % zeroCLn=zeros(1,destPerMP)
  318. % Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:destPerMP,'y');
  319. Exp(zoneSel).hintL(tracN)=plot(DNLaxes,intL,1:destPerMP); Exp(zoneSel).hintLb(tracN)=plot(DNLaxes,intL,1:destPerMP,'rs');
  320. Exp(zoneSel).hintLadj(tracN)=plot(DNLaxes,intLadj,1:destPerMP,'g'); Exp(zoneSel).hintLadjb(tracN)=plot(DNLaxes,intLadj,1:destPerMP,'gs');
  321. catch
  322. end
  323. if zoneSel==1,set(ghandles.DNLaxes1,'xlim',[-75,75]); end
  324. if zoneSel==2,set(ghandles.DNLaxes2,'xlim',[-75,75]); end
  325. if zoneSel==3,set(ghandles.DNLaxes3,'xlim',[-75,75]); end
  326. % intNormL
  327. % intNormLadj
  328. % ProGrIntLadj Plot
  329. % ProGrintLadj Plot
  330. % ProGrintNormL
  331. % proGrintNormLadj
  332. % Hide all K plots
  333. for J=1:(tracN-1),
  334. try
  335. set(Exp(zoneSel).hKRF1(J),'visible','off'); set(Exp(zoneSel).hKRF2(J),'visible','off');
  336. catch
  337. end
  338. try
  339. set(Exp(zoneSel).hK(J),'visible','off'); set(Exp(zoneSel).hKb(J),'visible','off');
  340. catch
  341. end
  342. end
  343. % Make visible the current L plot and store it for retrieval by OLay code
  344. try % some experiments do not have ref. plates
  345. Exp(zoneSel).hKRF1(tracN)=plot(Dkaxes,kvalsRF1md,1:destPerMP,'b');
  346. Exp(zoneSel).hKRF2(tracN)=plot(Dkaxes,kvalsRF2md,1:destPerMP,'c');
  347. catch
  348. end
  349. try
  350. Exp(zoneSel).hK(tracN)=plot(Dkaxes,kvals,1:destPerMP,'b'); Exp(zoneSel).hKb(tracN)=plot(Dkaxes,kvals,1:destPerMP,'rs');
  351. catch
  352. end
  353. set(Dkaxes,'xlim',[0,200]) % max(kvals+20)
  354. set(Dkaxes,'ycolor',[.9,.9,1])
  355. % Hide all r plots
  356. for J=1:(tracN-1),
  357. try
  358. set(Exp(zoneSel).hrRF1(J),'visible','off'); set(Exp(zoneSel).hrRF2(J),'visible','off');
  359. catch, end
  360. try
  361. set(Exp(zoneSel).hr(J),'visible','off'); set(Exp(zoneSel).hrb(J),'visible','off');
  362. catch, end
  363. end
  364. % Make visible the current r plot and store it for retrieval by OLay code
  365. try %Some experiments do not have ref. plates
  366. Exp(zoneSel).hrRF1(tracN)=plot(Draxes,rvalsRF1md,1:destPerMP,'b');
  367. Exp(zoneSel).hrRF2(tracN)=plot(Draxes,rvalsRF2md,1:destPerMP,'c');
  368. catch, end
  369. try
  370. Exp(zoneSel).hr(tracN)=plot(Draxes,rvals,1:destPerMP,'b'); Exp(zoneSel).hrb(tracN)=plot(Draxes,rvals,1:destPerMP,'rs');
  371. catch, end
  372. set(Draxes,'xlim',[0,1])
  373. set(Draxes,'ycolor',[.9,.9,1])
  374. end
  375. if zoneSel==1, set(ghandles.geneOrfLKr1,'string', grfgenestr);end
  376. if zoneSel==2, set(ghandles.geneOrfLKr2,'string', grfgenestr);end
  377. if zoneSel==3, set(ghandles.geneOrfLKr3,'string', grfgenestr);end
  378. % Display Selection PlotFilter
  379. if Exp(4).interacPBsel==0
  380. % replace ghandles.DNLaxes1 (Dlaxes2)etc. with a single
  381. % Exp(zoneSel).DNLaxes,....
  382. set(ghandles.Dlaxes1,'Visible','on')
  383. set(ghandles.Dlaxes2,'Visible','on')
  384. set(ghandles.Dlaxes3,'Visible','on')
  385. set(ghandles.DNLaxes1,'Visible','off')
  386. set(ghandles.DNLaxes2,'Visible','off')
  387. set(ghandles.DNLaxes3,'Visible','off')
  388. for n=1:Exp(zoneSel).traceN
  389. try
  390. set(Exp(zoneSel).hLRF1(n),'visible','off'); set(Exp(zoneSel).hLRF2(n),'visible','off');
  391. catch, end
  392. try
  393. set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off');
  394. catch, end
  395. try
  396. set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off');
  397. catch, end
  398. try
  399. set(Exp(zoneSel).hintLadj(n),'visible','off'); set(Exp(zoneSel).hintLadjb(n),'visible','off');
  400. catch, end
  401. end
  402. try
  403. set(Exp(zoneSel).hLRF1(seltraceN),'visible','on'); set(Exp(zoneSel).hLRF2(seltraceN),'visible','on');
  404. catch, end
  405. try
  406. set(Exp(zoneSel).hL(seltraceN),'visible','on'); set(Exp(zoneSel).hLb(seltraceN),'visible','on');
  407. catch, end
  408. for i=1:Exp(zoneSel).expLoadCnt,
  409. try set(Exp(zoneSel).hzeroCLn(i),'visible','off'); catch ME, end
  410. end
  411. elseif Exp(4).interacPBsel==1
  412. set(ghandles.DNLaxes1,'Visible','on')
  413. set(ghandles.DNLaxes2,'Visible','on')
  414. set(ghandles.DNLaxes3,'Visible','on')
  415. set(ghandles.Dlaxes1,'Visible','off')
  416. set(ghandles.Dlaxes2,'Visible','off')
  417. set(ghandles.Dlaxes3,'Visible','off')
  418. for n=1:Exp(zoneSel).traceN
  419. try set(Exp(zoneSel).hLRF1(n),'visible','off'); catch, end
  420. try set(Exp(zoneSel).hLRF2(n),'visible','off'); catch, end
  421. try set(Exp(zoneSel).hL(n),'visible','off'); set(Exp(zoneSel).hLb(n),'visible','off'); catch, end
  422. try set(Exp(zoneSel).hintL(n),'visible','off'); set(Exp(zoneSel).hintLb(n),'visible','off'); catch, end
  423. try set(Exp(zoneSel).hintLadj(n),'visible','off'); set(Exp(zoneSel).hintLadjb(n),'visible','off'); catch, end
  424. end
  425. try set(Exp(zoneSel).hintL(seltraceN),'visible','on'); set(Exp(zoneSel).hintLb(seltraceN),'visible','on'); catch, end
  426. try set(Exp(zoneSel).hintLadj(seltraceN),'visible','on'); set(Exp(zoneSel).hintLadjb(seltraceN),'visible','on'); catch, end
  427. for i=1:Exp(zoneSel).expLoadCnt,
  428. try set(Exp(zoneSel).hzeroCLn(i),'visible','on'); catch ME, end
  429. end
  430. elseif Exp(4).interacPBsel==2
  431. end
  432. if verLessThan('matlab','8.4')
  433. else % accomodate new matlab changes after 2014a fix update 23_0807
  434. close(tempFig2)
  435. end
  436. % Deprecated functions
  437. %{
  438. for J=1:(tracN),
  439. try
  440. set(Exp(zoneSel).hintL(J),'visible','off'); set(Exp(zoneSel).hintLb(J),'visible','off');
  441. catch, end
  442. try
  443. set(Exp(zoneSel).hintLadj(J),'visible','off'); set(Exp(zoneSel).hintLadjb(J),'visible','off');
  444. catch, end
  445. end
  446. %}
  447. %{
  448. for J=1:(tracN),
  449. try
  450. set(Exp(zoneSel).hLRF1(J),'visible','off'); set(Exp(zoneSel).hLRF2(J),'visible','off');
  451. catch, end
  452. try
  453. set(Exp(zoneSel).hL(J),'visible','off'); set(Exp(zoneSel).hLb(J),'visible','off');
  454. catch, end
  455. end
  456. %}
  457. %Hide all L plots
  458. %{
  459. for J=1:(tracN-1),
  460. try
  461. set(Exp(zoneSel).hLRF1(J),'visible','off'); set(Exp(zoneSel).hLRF2(J),'visible','off');
  462. catch, end
  463. try
  464. set(Exp(zoneSel).hL(J),'visible','off'); set(Exp(zoneSel).hLb(J),'visible','off');
  465. catch, end
  466. end
  467. %}
  468. %Hide all intL plots
  469. %{
  470. for J=1:(tracN),
  471. try
  472. set(Exp(zoneSel).hintL(J),'visible','off'); set(Exp(zoneSel).hintLb(J),'visible','off');
  473. catch, end
  474. try
  475. set(Exp(zoneSel).hintLadj(J),'visible','off'); set(Exp(zoneSel).hintLadjb(J),'visible','off');
  476. catch, end
  477. end
  478. %}
  479. % set(Dlaxes,'xlim',[0,max(lvals+20)])
  480. % catch
  481. % set(Dlaxes,'NextPlot','add');
  482. % Exp(zoneSel).hL(tracN)=plot(Dlaxes,lvals,1:destPerMP);
  483. % Exp(zoneSel).hLb(tracN)=plot(Dlaxes,lvals,1:destPerMP,'rs');
  484. %hDaxL=plot(Dlaxes,lvals,1:destPerMP);hold(Dlaxes); plot(Dlaxes,lvals,1:destPerMP,'rs');...
  485. % hold(Dlaxes);
  486. %{
  487. if max(lvals)>90
  488. set(Dlaxes,'xlim',[0,max(lvals+20)])
  489. else
  490. set(Dlaxes,'xlim',[0,90])
  491. end
  492. %}
  493. %end
  494. %{
  495. try
  496. hDaxK=plot(Dkaxes,kvalsRF1md,1:destPerMP,'y'); hold(Dkaxes); plot(Dkaxes,kvalsRF2md,1:destPerMP,'y');...
  497. plot(Dkaxes,kvals,1:destPerMP); plot(Dkaxes,kvals,1:destPerMP,'rs');...
  498. hold(Dkaxes);
  499. set(Dkaxes,'xlim',[0,200]) %max(kvals+20)
  500. set(Dkaxes,'ycolor',[.9,.9,1])
  501. catch
  502. set(Dkaxes,'NextPlot','replace');
  503. hDaxK=plot(Dkaxes,kvals,1:destPerMP); hold(Dkaxes); plot(Dkaxes,kvals,1:destPerMP,'rs');...
  504. hold(Dkaxes);
  505. set(Dkaxes,'xlim',[0,200]) %max(kvals+20)
  506. set(Dkaxes,'ycolor',[.9,.9,1])
  507. end
  508. %}
  509. %{
  510. try
  511. hDaxR=plot(Draxes,rvalsRF1md,1:destPerMP,'y'); hold(Draxes); plot(Draxes,rvalsRF2md,1:destPerMP,'y');...
  512. plot(Draxes,rvals,1:destPerMP); plot(Draxes,rvals,1:destPerMP,'rs');...
  513. hold(Draxes);
  514. set(Draxes,'xlim',[0,1])
  515. set(Draxes,'ycolor',[.9,.9,1])
  516. catch
  517. set(Draxes,'NextPlot','replace')
  518. hDaxR=plot(Draxes,rvals,1:destPerMP); hold(Draxes); plot(Draxes,rvals,1:destPerMP,'rs');...
  519. hold(Draxes);
  520. set(Draxes,'xlim',[0,1])
  521. set(Draxes,'ycolor',[.9,.9,1])
  522. end
  523. %}