global ghandles global Exp %datacursormode(gcf) %{ [output_txt]=datatipp(obj,event_obj); clkPos=getCursorInfo(datacursormode(gcf)); cpos=clkPos.Position; htargetAxes= clkPos.Target; %} %pause(1) curKey=get(gcf,'currentkey') htMapFg=0; if ghandles.Iaxes1==get(htargetAxes,'Parent'),expN=1; elseif ghandles.Iaxes2==get(htargetAxes,'Parent'),expN=2; elseif ghandles.Iaxes3==get(htargetAxes,'Parent'),expN=3; elseif ghandles.OLaxes1==get(htargetAxes,'Parent'),OLay=1; %zone=1; datacursormode off; elseif ghandles.OLaxes2==get(htargetAxes,'Parent'),OLay=2; %zone=2; datacursormode off; elseif ghandles.OLaxes3==get(htargetAxes,'Parent'),OLay=3; %zone=3; datacursormode off; elseif ghandles.HtMap1==get(htargetAxes,'Parent'),expN=1; htMapFg=1; elseif ghandles.HtMap2==get(htargetAxes,'Parent'),expN=2; htMapFg=1; elseif ghandles.HtMap3==get(htargetAxes,'Parent'),expN=3; htMapFg=1; else return end try ImageSel=expN<4 destPerMP= Exp(expN).Dexp(DexpN).destPerMP; %length(gS.DM1.drug); MPsel=Exp(expN).Dexp(DexpN).MPsel; %floor(get(handles.MPsldr1,'value')); pertSel=Exp(expN).Dexp(DexpN).pertSel; %floor(get(handles.DMsldr1,'value')); tPtSel=Exp(expN).Dexp(DexpN).tPtSel; %floor(get(handles.Tptsldr1,'value')); plateNum= Exp(expN).Dexp(DexpN).plateNum; %(MPsel1-1)*destPerMP1 + pertSel1; scan= Exp(expN).Dexp(DexpN).scan; MP=Exp(expN).Dexp(DexpN).MP; %x2ypos= [1400-cpos(2) cpos(1)] %for HorzRotatedImage ptrPos=[cpos(1),cpos(2)]; %for VerticleImage if htMapFg==0 try for m=1:24 for n=1:16 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(1)> coord(2) && ptrPos(1)',DMstr); xp=char(Exp(expN).Dexp(DexpN).resDir); if ispc, slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'\'); else slashPos=strfind(char(Exp(expN).Dexp(DexpN).resDir),'/'); end startPos=slashPos(length(slashPos)-1) +1; endPos=slashPos(length(slashPos)) -1 expStr= {xp(startPos:endPos)} Exp(expN).hOLname(traceN)= spotDescrip; %ZoneRelated %graphStr; %ghandles.Exp(expN).hOLname(traceN)= graphStr; Exp(expN).hOLexpNm(traceN)= expStr; %ghandles.Exp(expN).hOLexpNm(traceN)= expStr; Exp(expN).hOLresDir(traceN)= {Exp(expN).resDir}; Exp(expN).hOLplateNum(traceN)= plateNum; %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==2,set(ghandles.GeneOrfLoc2,'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==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end if expN==3,set(ghandles.graphStrLoc3,'string',spotDescrip);end %graphStr);end %************************* ********************* *************************** try 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 set(ghandles.OLay1,'string', Exp(expN).hOLname(traceN)); try if length(char(Exp(expN).hOLexpNm(traceN)))>40,set(ghandles.OLexp1,'FontSize',8);end, catch end set(ghandles.OLexp1,'string',Exp(expN).hOLexpNm(traceN)); end if expN==2 %&& get(ghandles.rotPB2,'value') ~=1 try if length(char(Exp(expN).hOLname(traceN)))>40,set(ghandles.OLay2,'FontSize',8);end, catch end set(ghandles.OLay2,'string', Exp(expN).hOLname(traceN)); try if length(char(Exp(expN).hOLexpNm(traceN)))>40,set(ghandles.OLexp2,'FontSize',8);end, catch end set(ghandles.OLexp2,'string',Exp(expN).hOLexpNm(traceN)); end if expN==3 %&& get(ghandles.rotPB3,'value') ~=1 try if length(char(Exp(expN).hOLname(traceN)))>40,set(ghandles.OLay3,'FontSize',8);end, catch end set(ghandles.OLay3,'string', Exp(expN).hOLname(traceN)); try if length(char(Exp(expN).hOLexpNm(traceN)))>40,set(ghandles.OLexp3,'FontSize',8);end, catch end set(ghandles.OLexp3,'string',Exp(expN).hOLexpNm(traceN)); end catch end %******************************************************* if expN==1 zonesel=1; set(ghandles.zoneRad1,'value',1) set(ghandles.zoneRad2,'value',0) set(ghandles.zoneRad3,'value',0) orfLstSel=get(ghandles.GeneOrfTog,'value'); if orfLstSel==1 set(ghandles.listboxGnOrf,'string',Exp(expN).Dexp(DexpN).srtOrfLst) else set(ghandles.listboxGnOrf,'string',Exp(expN).Dexp(DexpN).srtGnLst) end end if expN==2 zonesel=2; set(ghandles.zoneRad2,'value',1) set(ghandles.zoneRad1,'value',0) set(ghandles.zoneRad3,'value',0) orfLstSel=get(ghandles.GeneOrfTog,'value'); if orfLstSel==1 set(ghandles.listboxGnOrf,'string',Exp(2).srtOrfLst) else set(ghandles.listboxGnOrf,'string',Exp(2).srtGnLst) end end if expN==3 zonesel=3; set(ghandles.zoneRad3,'value',1) set(ghandles.zoneRad2,'value',0) set(ghandles.zoneRad1,'value',0) orfLstSel=get(ghandles.GeneOrfTog,'value'); if orfLstSel==1 set(ghandles.listboxGnOrf,'string',Exp(3).srtOrfLst) else set(ghandles.listboxGnOrf,'string',Exp(3).srtGnLst) end end %************************************************************** catch msg='NotImage' end % trycatch expN<4 datatip selection from Image (not from an OverLay Plot) %****************************************************************************************** %Write Selected Trace Info to OLAY header********************+++++++++++++++++************* try OLayTest=OLay<4 msg='OLay' %make all traces blue for i=1:length(Exp(OLay).hOL(:)) try set(Exp(OLay).hOL(i),'color',[0 0 1]), catch end end %if get(ghandles.rotPB1,'value')~=1, for i=1:length(Exp(OLay).hOL(:)) htargetAxes Exp(OLay).hOL(i) if htargetAxes==Exp(OLay).hOL(i) if OLay==1 && get(ghandles.rotPB1,'value')~=1, set(htargetAxes,'color',[1 0 0]) try if length(char(Exp(OLay).hOLname(i)))>40,set(ghandles.OLay1,'FontSize',8);end, catch, end set(ghandles.OLay1,'string', Exp(OLay).hOLname(i)); traceLab= char(Exp(OLay).hOLname(i)); try if length(char(Exp(OLay).hOLexpNm(i)))>40,set(ghandles.OLexp1,'FontSize',8);end, catch, end set(ghandles.OLexp1,'string',Exp(OLay).hOLexpNm(i)); OLresDir= Exp(OLay).hOLresDir(i); OLplateNum= Exp(OLay).hOLplateNum(i); seltraceN=i; end if OLay==2 && get(ghandles.rotPB2,'value') ~=1 set(htargetAxes,'color',[1 0 0]) try if length(char(Exp(OLay).hOLname(i)))>40,set(ghandles.OLay2,'FontSize',8);end, catch, end set(ghandles.OLay2,'string', Exp(OLay).hOLname(i)); traceLab= char(Exp(OLay).hOLname(i)); try if length(char(Exp(OLay).hOLexpNm(i)))>40,set(ghandles.OLexp2,'FontSize',8);end, catch, end set(ghandles.OLexp2,'string',Exp(OLay).hOLexpNm(i)); OLresDir= Exp(OLay).hOLresDir(i); OLplateNum= Exp(OLay).hOLplateNum(i); seltraceN=i; end if OLay==3 && get(ghandles.rotPB3,'value') ~=1 set(htargetAxes,'color',[1 0 0]) try if length(char(Exp(OLay).hOLname(i)))>40,set(ghandles.OLay3,'FontSize',8);end, catch, end set(ghandles.OLay3,'string', Exp(OLay).hOLname(i)); traceLab= char(Exp(OLay).hOLname(i)); try if length(char(Exp(OLay).hOLexpNm(i)))>40,set(ghandles.OLexp3,'FontSize',8);end, catch, end set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(i)); OLresDir= Exp(OLay).hOLresDir(i); OLplateNum= Exp(OLay).hOLplateNum(i); seltraceN=i; end Exp(OLay).seltraceN=seltraceN; else msg='Cant Find trace' end end % => for i=1:length(Exp(OLay).hOL(:)) %Extract row and col values from stored trace label for dest compare plots(EZdestComp) try tracename=char(Exp(OLay).hOLname(seltraceN)) pos_= strfind(tracename,'_') rxcy= tracename(pos_(2):pos_(3)) cindx= strfind(rxcy,'c') rindx= strfind(rxcy,'r') LBr= str2num(rxcy((rindx+1):cindx-1)) LBc= str2num(tracename((pos_(2)+cindx): pos_(3)-1)) indx=((LBr-1)*24) +LBc grfgenestr= tracename(1:pos_(3)-1) scan= Exp(OLay).scan; EZdatatip=2; catch end catch msg='Not in OLay frame-axis' end %=> try for Write Selected Trace Info to OLAY header****** %HIDE HIDE HIDE --------------------------------------------------- %HIDE selected plot trace****rotPBx used for 'Hide'**************** try OLayTest=OLay<4 msg='OLay' OLay if get(ghandles.rotPB1,'value') ==1 && OLay==1, %make all traces blue for i=1:length(Exp(OLay).hOL(:)) set(Exp(OLay).hOL(i),'color',[0 0 1]) end for i=1:length(Exp(OLay).hOL(:)) %htargetAxes %debug info %Exp(OLay).hOL(i) %debug info if htargetAxes==Exp(OLay).hOL(i) hidAx1traceN=i set(Exp(OLay).hOL(i),'Visible','off') set(Exp(OLay).hOLb(i),'Visible','off') for j=1:length(Exp(OLay).hOL(:)) if isequal(get(Exp(OLay).hOL(j),'Visible'),'on'), maxhN= j; end end end if htargetAxes==Exp(OLay).hOL(i), break;end end set(Exp(OLay).hOL(maxhN),'color',[1 0 0]) %Set latest trace red set(Exp(OLay).hOLb(maxhN),'color',[0 1 0]) if OLay==1 try if length(char(Exp(OLay).hOLname(maxhN)))>40,set(ghandles.OLay1,'FontSize',8);end, catch, end set(ghandles.OLay1,'string', Exp(OLay).hOLname(maxhN)); traceLab= char(Exp(OLay).hOLname(maxhN)); try if length(char(Exp(OLay).hOLexpNm(maxhN)))>40,set(ghandles.OLexp1,'FontSize',8);end, catch, end set(ghandles.OLexp1,'string',Exp(OLay).hOLexpNm(maxhN)); OLresDir= Exp(OLay).hOLresDir(maxhN); OLplateNum= Exp(OLay).hOLplateNum(maxhN); end end %------HIDE 22222222222222222----- if get(ghandles.rotPB2,'value')==1 && OLay==2, % for j=1:length(Exp(OLay).hOL(:)) %Set all traces blue try set(Exp(OLay).hOL(i),'color',[0 0 1]), catch, end end for i=1:length(Exp(OLay).hOL(:)) if htargetAxes==Exp(OLay).hOL(i) hidAx2traceN=i set(Exp(OLay).hOL(i),'Visible','off') set(Exp(OLay).hOLb(i),'Visible','off') for j=1:length(Exp(OLay).hOL(:)) try if isequal(get(Exp(OLay).hOL(j),'Visible'),'on'), maxhN= j; end, catch end end end if htargetAxes==Exp(OLay).hOL(i), break;end end set(Exp(OLay).hOL(maxhN),'color',[1 0 0]) %Set latest trace red set(Exp(OLay).hOLb(maxhN),'color',[0 1 0]) if OLay==2 try if length(char(Exp(OLay).hOLname(maxhN)))>40,set(ghandles.OLay2,'FontSize',8);end, catch, end set(ghandles.OLay2,'string', Exp(OLay).hOLname(maxhN)); traceLab= char(Exp(OLay).hOLname(maxhN)); try if length(char(Exp(OLay).hOLexpNm(maxhN)))>40,set(ghandles.OLexp2,'FontSize',8);end, catch, end set(ghandles.OLexp2,'string',Exp(OLay).hOLexpNm(maxhN)); OLresDir= Exp(OLay).hOLresDir(maxhN); OLplateNum= Exp(OLay).hOLplateNum(maxhN); end end %if rotPB2 ....==1 %------HIDE 33333333333333----- if get(ghandles.rotPB3,'value') ==1 && OLay==3, %make all traces blue for i=1:length(Exp(OLay).hOL(:)) try set(Exp(OLay).hOL(i),'color',[0 0 1]), catch, end end for i=1:length(Exp(OLay).hOL(:)) if htargetAxes==Exp(OLay).hOL(i) hidAx3traceN=i set(Exp(OLay).hOL(i),'Visible','off') set(Exp(OLay).hOLb(i),'Visible','off') for j=1:length(Exp(OLay).hOL(:)) try if isequal(get(Exp(OLay).hOL(j),'Visible'),'on'), maxhN= j; end, catch, end end end if htargetAxes==Exp(OLay).hOL(i), break;end end set(Exp(OLay).hOL(maxhN),'color',[1 0 0]) %Set latest trace red set(Exp(OLay).hOLb(maxhN),'color',[0 1 0]) if OLay==3 try if length(char(Exp(OLay).hOLname(maxhN)))>40,set(ghandles.OLay3,'FontSize',8);end, catch, end set(ghandles.OLay3,'string', Exp(OLay).hOLname(maxhN)); traceLab= char(Exp(OLay).hOLname(maxhN)); try if length(char(Exp(OLay).hOLexpNm(maxhN)))>40,set(ghandles.OLexp3,'FontSize',8);end, catch, end set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(maxhN)); OLresDir= Exp(OLay).hOLresDir(maxhN); OLplateNum= Exp(OLay).hOLplateNum(maxhN); end end destcompMsg= 'Olay'; catch msg='Not in OLay frame-axis' end %********************************************************************************** %prevExp=1 NoOLay=0; try OLay expN=OLay catch NoOLay=1; EZdatatip=1; end if get(ghandles.spotTog,'value')==1 && NoOLay OLresDir= Exp(expN).Dexp(DexpN).resDir; OLplateNum=plateNum; imLoc= [picLoc1(2), picLoc1(1)]; EZspotview(expN, imLoc,OLresDir,OLplateNum,NoOLay) end %*******************************GraphicDestinationPertibationComparison**15_821******************* %EZdatatip=1; EZdestComp %******************************** if get(ghandles.spotTog,'value')==1 && get(ghandles.rotPB1,'value') ~=1 && OLay<4 msg='OLay with SpotTog On and Hide off' pos_=strfind(traceLab,'_') rcStr=traceLab(pos_(2)+1:pos_(3)-1) cPos=findstr(rcStr,'c'); rUsr=str2num(rcStr(2:cPos-1)); cUsr=str2num(rcStr(cPos+1:end)); imLoc= [cUsr, (17-rUsr)]; %picLoc1 %transform horz user data to vert image for picLocation data OLresDir %=Exp(expN).hOLresDir(traceN); OLplateNum %=Exp(expN).hOLplateNum(traceN); EZspotview(expN, imLoc,OLresDir,OLplateNum,NoOLay) end [output_txt]=datatipp(obj,event_obj); %*********************HeatMap Text Field********************************* try ll=num2str(l); if length(ll)>5,htl= ll(1:5);else htl=ll;end catch htl=' '; end try n1= num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx)); if length(n1)>5,N1= n1(1:5);else N1=n1; end htN1=strcat('_N1=',N1); catch, htN1=' '; end try n2= num2str(Exp(expN).Dexp(DexpN).HtMpIntN2(indx)); if length(n2)>5,N2= n2(1:5);else N2=n2; end htN2=strcat('_N2=',N2); catch, htN2=' '; end try htmapStr=strcat('L= ',htl, htN1,htN2) if expN==1,set(ghandles.HtMapVals1,'string',htmapStr);end if expN==2,set(ghandles.HtMapVals2,'string',htmapStr);end if expN==3,set(ghandles.HtMapVals3,'string',htmapStr);end catch end %datacursormode(gcf) %**********************************************Test Area %{ if get(ghandles.rotPB3,'value') ==1 && OLay==3, for i=1:length(Exp(OLay).hOL(:)) for j=1:length(Exp(OLay).hOL(:)) %Set all traces blue set(Exp(OLay).hOL(i),'color',[0 0 1]) end if htargetAxes==Exp(OLay).hOL(i) set(Exp(OLay).hOL(i),'Visible','off') set(Exp(OLay).hOLb(i),'Visible','off') for j=1:length(Exp(OLay).hOL(:)) if isequal(get(Exp(OLay).hOL(j),'Visible'),'on'), maxhN= j; end end end if htargetAxes==Exp(OLay).hOL(i), break;end end set(Exp(OLay).hOL(maxhN),'color',[1 0 0]) %Set latest trace red set(Exp(OLay).hOLb(maxhN),'color',[0 1 0]) if OLay==3 try if length(char(Exp(OLay).hOLname(maxhN)))>40,set(ghandles.OLay3,'FontSize',8);end, catch, end set(ghandles.OLay3,'string', Exp(OLay).hOLname(maxhN)); traceLab= char(Exp(OLay).hOLname(maxhN)); try if length(char(Exp(OLay).hOLexpNm(maxhN)))>40,set(ghandles.OLexp3,'FontSize',8);end, catch, end set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(maxhN)); OLresDir= Exp(OLay).hOLresDir(maxhN); OLplateNum= Exp(OLay).hOLplateNum(maxhN); end end %if rotPB3...==1 %}