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

@@ -1,137 +1,133 @@
%EZRFs4DayComp Called by EZmDayComp.m % EZRFs4DayComp Called by EZmDayComp.m
%For this multiDay Exp series the actual perturbation being studied is % For this multiDay Exp series the actual perturbation being studied is
%Aging as related in the time series experiment i.e.,(nn) or DexpN % Aging as related in the time series experiment i.e.,(nn) or DexpN
%That is holding the DrugMedia pert constant(at the DM slider number) and plotting % That is holding the DrugMedia pert constant(at the DM slider number) and plotting
RFconfig= Exp(zoneSel).Dexp(DexpN).RFconfig; 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 RFmdVal(nn)=Exp(zoneSel).Dexp(nn).RFmd1val(pertSel);
RFmdVal(nn)=Exp(zoneSel).Dexp(nn).RFmd1val(pertSel); catch, end
catch, end try
try RF2mdIndx(nn)=Exp(zoneSel).Dexp(nn).RFmd2indx(pertSel);
RF2mdIndx(nn)=Exp(zoneSel).Dexp(nn).RFmd2indx(pertSel); RF2mdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmd2pltN;
RF2mdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmd2pltN; % special case for 'RFmd2val' See Calc. at EZmDayComp ~ln139
%special case for 'RFmd2val' See Calc. at EZmDayComp ~ln139 catch, end
catch, end 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;
switch ctrlRF switch ctrlRF
case {'G','g'} case {'G','g'}
%Set to (nn) day as these median values are being plotted directly % Set to (nn) day as these median values are being plotted directly
RFmdIndx(nn)= Exp(zoneSel).Dexp(nn).RFmdGindx(pertSel); RFmdIndx(nn)=Exp(zoneSel).Dexp(nn).RFmdGindx(pertSel);
RFmdPltN(nn)= Exp(zoneSel).Dexp(nn).RFmdGpltN(pertSel); %G could have a different MP for each DM;At any rate it is stored for each DM regardless. RFmdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmdGpltN(pertSel); %G could have a different MP for each DM;At any rate it is stored for each DM regardless.
RFmdVal(nn)= Exp(zoneSel).Dexp(nn).RFmedianG(pertSel); RFmdVal(nn)=Exp(zoneSel).Dexp(nn).RFmedianG(pertSel);
%Set mean values to Day 1 as these are used in Interaction Calc. % Set mean values to Day 1 as these are used in Interaction Calc.
%as the first reference ctrlRF 'Aging Perturbation' % as the first reference ctrlRF 'Aging Perturbation'
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);
case {'L','l'} case {'L','l'}
%Set to (nn) day as these median values are being plotted directly % Set to (nn) day as these median values are being plotted directly
RFmdVal(nn)= Exp(zoneSel).Dexp(nn).RFmedianP(pertSel); RFmdVal(nn)=Exp(zoneSel).Dexp(nn).RFmedianP(pertSel);
%Set mean values to Day 1 as these are used in Interaction Calc. % Set mean values to Day 1 as these are used in Interaction Calc.
%as the first reference ctrlRF 'Aging Perturbation' % as the first reference ctrlRF 'Aging Perturbation'
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
end end
pertRF= RFsel{2}; %These results are only used for N2 future Interaction Calc. pertRF=RFsel{2}; % These results are only used for N2 future Interaction Calc.
%nn is ordered number of the selected chronological day Experiment % nn is ordered number of the selected chronological day Experiment
%In the chronological study, Age (day sequence results) is the % In the chronological study, Age (day sequence results) is the
%'Perturbation' of interest instead of DrugMedia concentration. % 'Perturbation' of interest instead of DrugMedia concentration.
switch pertRF switch pertRF
case {'G','g'} case {'G','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);
case {'L','l'} case {'L','l'}
j= pertSel; m= MPsel; j=pertSel; m=MPsel;
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};
switch ctrlRF switch ctrlRF
case {'F','f'} case {'F','f'}
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; RF1mdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmd1pltN;
RFmdVal(nn)=Exp(zoneSel).Dexp(nn).RFmd1val(pertSel); RFmdVal(nn)=Exp(zoneSel).Dexp(nn).RFmd1val(pertSel);
catch, end catch, end
try try
RF2mdIndx(nn)=Exp(zoneSel).Dexp(nn).RFmd2indx(pertSel); RF2mdIndx(nn)=Exp(zoneSel).Dexp(nn).RFmd2indx(pertSel);
RF2mdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmd2pltN(pertSel); RF2mdPltN(nn)=Exp(zoneSel).Dexp(nn).RFmd2pltN(pertSel);
%special case for 'RFmd2val' See Calc. at EZmDayComp ~ln139 %special case for 'RFmd2val' See Calc. at EZmDayComp ~ln139
catch, end catch, end
try Rn(nn)=Exp(expN).Dexp(nn).RFmean; catch, Rn(nn)=0; end try Rn(nn)=Exp(expN).Dexp(nn).RFmean; catch, Rn(nn)=0; end
try Rs(nn)=Exp(expN).Dexp(nn).RFstd; catch, Rs(nn)=0; end try Rs(nn)=Exp(expN).Dexp(nn).RFstd; catch, Rs(nn)=0; end
Rn(nn)= Exp(expN).Dexp(nn).RFmean(nn); Rn(nn)=Exp(expN).Dexp(nn).RFmean(nn);
Rs(nn)= Exp(expN).Dexp(nn).RFstd(nn); Rs(nn)=Exp(expN).Dexp(nn).RFstd(nn);
case {'G','g'} case {'G','g'}
Rn(nn)= Exp(expN).Dexp(nn).RFmeanG(nn); Rn(nn)=Exp(expN).Dexp(nn).RFmeanG(nn);
Rs(nn)= Exp(expN).Dexp(nn).RFstdG(nn); Rs(nn)=Exp(expN).Dexp(nn).RFstdG(nn);
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')
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);
elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'F') elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'F')
Rn(nn)= Exp(expN).Dexp(nn).RFmean(j); Rn(nn)=Exp(expN).Dexp(nn).RFmean(j);
Rs(nn)= Exp(expN).Dexp(nn).RFstd(j); Rs(nn)=Exp(expN).Dexp(nn).RFstd(j);
elseif Exp(expN).Dexp(nn).meanP(1,m)==0 && strcmpi(ctrlRF,'L') elseif Exp(expN).Dexp(nn).meanP(1,m)==0 && strcmpi(ctrlRF,'L')
Rn(nn)= Exp(expN).Dexp(nn).RFmeanG(1); Rn(nn)=Exp(expN).Dexp(nn).RFmeanG(1);
Rs(nn)= Exp(expN).Dexp(nn).RFstdG(1); Rs(nn)=Exp(expN).Dexp(nn).RFstdG(1);
end end
end end
pertRF= RFsel{2}; pertRF=RFsel{2};
switch pertRF switch pertRF
case {'F','f'} case {'F','f'}
Rn(nn)= Exp(expN).Dexp(nn).RFmean(pertSel); Rn(nn)=Exp(expN).Dexp(nn).RFmean(pertSel);
Rs(nn)= Exp(expN).Dexp(nn).RFstd(pertSel); Rs(nn)=Exp(expN).Dexp(nn).RFstd(pertSel);
case {'G','g'} case {'G','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);
case {'L','l'} case {'L','l'}
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')
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);
elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'F') elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'F')
Rn(nn)= Exp(expN).Dexp(nn).RFmean(j); Rn(nn)=Exp(expN).Dexp(nn).RFmean(j);
Rs(nn)= Exp(expN).Dexp(nn).RFstd(j); Rs(nn)=Exp(expN).Dexp(nn).RFstd(j);
elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'L') elseif Exp(expN).Dexp(nn).meanP(j,m)==0 && strcmpi(ctrlRF,'L')
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

View File

@@ -1,203 +1,187 @@
%ImageDisplay % ImageDisplay
global Exp global Exp
global ghandles global ghandles
global zonePB global zonePB
prntHt=0; prntHt=0;
%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)
try try
char((Exp(expN).Dexp(1).MP(mx).genename{1}(384))) char((Exp(expN).Dexp(1).MP(mx).genename{1}(384)))
MPnum=mx; MPnum=mx;
catch catch
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) tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3));
tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3)); 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) tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3));
tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3)); 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) tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3));
tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3)); set(handles.Tptsldr3,'min',1,'max',tPtsSize)
set(handles.Tptsldr3,'min',1,'max',tPtsSize)
end end
end end
ghandles=handles; ghandles=handles;
scan=Exp(expN).Dexp(DexpN).scan; scan=Exp(expN).Dexp(DexpN).scan;
destPerMP= length(Exp(expN).Dexp(DexpN).DM.drug); destPerMP=length(Exp(expN).Dexp(DexpN).DM.drug);
if expN==1,MPsel=floor(get(handles.MPsldr1,'value')); end if expN==1,MPsel=floor(get(handles.MPsldr1,'value')); end
if expN==2,MPsel=floor(get(handles.MPsldr2,'value')); end if expN==2,MPsel=floor(get(handles.MPsldr2,'value')); end
if expN==3,MPsel=floor(get(handles.MPsldr3,'value')); end if expN==3,MPsel=floor(get(handles.MPsldr3,'value')); end
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==2,tPtSel=floor(get(handles.Tptsldr2,'value')); end
if expN==1,tPtSel=floor(get(handles.Tptsldr1,'value')); end if expN==3,tPtSel=floor(get(handles.Tptsldr3,'value')); end
if expN==2,tPtSel=floor(get(handles.Tptsldr2,'value')); end plateNum=(MPsel-1)*destPerMP + pertSel;
if expN==3,tPtSel=floor(get(handles.Tptsldr3,'value')); end tPtsSize=[];
tPtsSize=length(Exp(expN).Dexp(DexpN).scan(plateNum).plate(1).tSeries(:))
plateNum= (MPsel-1)*destPerMP + pertSel;
tPtsSize=[];
tPtsSize= length(Exp(expN).Dexp(DexpN).scan(plateNum).plate(1).tSeries(:))
n=1; n=1;
for ii= 1:tPtsSize for ii=1:tPtsSize
if exist(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat((num2str(ii)),'.bmp'))) ==2; %the .bmp file exists if exist(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat((num2str(ii)),'.bmp'))) ==2; %the .bmp file exists
bmpLst(n)= ii bmpLst(n)=ii
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
if expN==1, if expN==1,
set(handles.Tptsldr1,'max',tPtsSize); set(handles.Tptsldr1,'max',tPtsSize);
set(ghandles.Tptsldr1,'max',tPtsSize); set(ghandles.Tptsldr1,'max',tPtsSize);
set(handles.Tpted1,'string', num2str(tPtSel)); set(handles.Tpted1,'string', num2str(tPtSel));
set(ghandles.Tpted1,'string', num2str(tPtSel)); set(ghandles.Tpted1,'string', num2str(tPtSel));
if tPtsSize<= tPtSel, if tPtsSize<=tPtSel,
set(handles.Tptsldr1,'value', tPtsSize) set(handles.Tptsldr1,'value', tPtsSize)
set(ghandles.Tptsldr1,'value', tPtsSize) set(ghandles.Tptsldr1,'value', tPtsSize)
tPtSel= tPtsSize tPtSel=tPtsSize
set(handles.Tpted1,'string', num2str(tPtsSize)) set(handles.Tpted1,'string', num2str(tPtsSize))
set(ghandles.Tpted1,'string', num2str(tPtsSize)) set(ghandles.Tpted1,'string', num2str(tPtsSize))
end end
end end
if expN==2 if expN==2
set(handles.Tptsldr2,'max',tPtsSize); set(handles.Tptsldr2,'max',tPtsSize);
set(ghandles.Tptsldr2,'max',tPtsSize); set(ghandles.Tptsldr2,'max',tPtsSize);
set(handles.Tpted2,'string', num2str(tPtSel)); set(handles.Tpted2,'string', num2str(tPtSel));
set(ghandles.Tpted2,'string', num2str(tPtSel)); set(ghandles.Tpted2,'string', num2str(tPtSel));
if tPtsSize<= tPtSel, if tPtsSize<=tPtSel,
set(handles.Tptsldr2,'value', tPtsSize) set(handles.Tptsldr2,'value', tPtsSize)
set(ghandles.Tptsldr2,'value', tPtsSize) set(ghandles.Tptsldr2,'value', tPtsSize)
tPtSel= tPtsSize tPtSel=tPtsSize
set(handles.Tpted2,'string', num2str(tPtsSize)) set(handles.Tpted2,'string', num2str(tPtsSize))
set(ghandles.Tpted2,'string', num2str(tPtsSize)) set(ghandles.Tpted2,'string', num2str(tPtsSize))
end end
end end
if expN==3 if expN==3
set(handles.Tptsldr3,'max',tPtsSize); set(handles.Tptsldr3,'max',tPtsSize);
set(ghandles.Tptsldr3,'max',tPtsSize); set(ghandles.Tptsldr3,'max',tPtsSize);
set(handles.Tpted3,'string', num2str(tPtSel)); set(handles.Tpted3,'string', num2str(tPtSel));
set(ghandles.Tpted3,'string', num2str(tPtSel)); set(ghandles.Tpted3,'string', num2str(tPtSel));
if tPtsSize<= tPtSel, if tPtsSize<=tPtSel,
set(handles.Tptsldr3,'value', tPtsSize) set(handles.Tptsldr3,'value', tPtsSize)
set(ghandles.Tptsldr3,'value', tPtsSize) set(ghandles.Tptsldr3,'value', tPtsSize)
tPtSel= tPtsSize tPtSel=tPtsSize
set(handles.Tpted3,'string', num2str(tPtsSize)) set(handles.Tpted3,'string', num2str(tPtsSize))
set(ghandles.Tpted3,'string', num2str(tPtsSize)) set(ghandles.Tpted3,'string', num2str(tPtsSize))
end end
end end
%---------------------------------------------------------
Exp(expN).Dexp(DexpN).MPsel=MPsel;
Exp(expN).Dexp(DexpN).destPerMP=destPerMP;
Exp(expN).Dexp(DexpN).pertSel=pertSel;
Exp(expN).Dexp(DexpN).tPtSel=tPtSel;
Exp(expN).Dexp(DexpN).plateNum=plateNum;
%try
I= imread(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat(num2str(tPtSel),'.bmp')));
%set(ghandles.Iaxes1,'CurrentAxes')
if expN==1, expAxes=ghandles.Iaxes1;end
if expN==2, expAxes=ghandles.Iaxes2;end
if expN==3, expAxes=ghandles.Iaxes3;end
axes(expAxes)
imshow(I)
set(expAxes,'xtick',[],'ytick',[])
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.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==2,set(handles.DM2,'string',DMstr); end
if expN==3,set(handles.DM3,'string',DMstr); end
tPtStr=strcat('T=', num2str(scan(1,plateNum).plate(1).t0Series(tPtSel)));
if expN==1,set(handles.tptTm1,'string',tPtStr); end
if expN==2,set(handles.tptTm2,'string',tPtStr); end
if expN==3,set(handles.tptTm3,'string',tPtStr); end
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)-2) +1;
endPos=(slashPos(length(slashPos)) -1);
expStrg= xp(startPos:end);
if expN==1,set(handles.expName1,'string',expStrg); end
if expN==2,set(handles.expName2,'string',expStrg); end
if expN==3,set(handles.expName3,'string',expStrg); end
%********************
try
htMapTogPBfg=0;
EZhtMap %
catch
end
%********************
%******************************************************************** Exp(expN).Dexp(DexpN).MPsel=MPsel;
%zonePB handle control from left graph spot side to communicate to right side 23_0818 Exp(expN).Dexp(DexpN).destPerMP=destPerMP;
%This section was based on the zoneRad Section for Radiobuttons which were Exp(expN).Dexp(DexpN).pertSel=pertSel;
%unusable with the new form of Radio Buttons in AppDesigner. Exp(expN).Dexp(DexpN).tPtSel=tPtSel;
%******************** Exp(expN).Dexp(DexpN).plateNum=plateNum;
%try
I=imread(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat(num2str(tPtSel),'.bmp')));
%set(ghandles.Iaxes1,'CurrentAxes')
if expN==1, expAxes=ghandles.Iaxes1;end
if expN==2, expAxes=ghandles.Iaxes2;end
if expN==3, expAxes=ghandles.Iaxes3;end
axes(expAxes)
imshow(I)
set(expAxes,'xtick',[],'ytick',[])
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.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==2,set(handles.DM2,'string',DMstr); end
if expN==3,set(handles.DM3,'string',DMstr); end
tPtStr=strcat('T=', num2str(scan(1,plateNum).plate(1).t0Series(tPtSel)));
if expN==1,set(handles.tptTm1,'string',tPtStr); end
if expN==2,set(handles.tptTm2,'string',tPtStr); end
if expN==3,set(handles.tptTm3,'string',tPtStr); end
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)-2) +1;
endPos=(slashPos(length(slashPos)) -1);
expStrg=xp(startPos:end);
if expN==1,set(handles.expName1,'string',expStrg); end
if expN==2,set(handles.expName2,'string',expStrg); end
if expN==3,set(handles.expName3,'string',expStrg); end
try
htMapTogPBfg=0;
EZhtMap
catch
end
% 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
% unusable with the new form of Radio Buttons in AppDesigner.
if expN==1 if expN==1
zonesel=1; zonesel=1;
zonePB= 1; zonePB=1;
set(handles. zonePB1,'value',1) set(handles. zonePB1,'value',1)
set(handles. zonePB2,'value',0) set(handles. zonePB2,'value',0)
set(handles. zonePB3,'value',0) set(handles. zonePB3,'value',0)
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)
else else
@@ -206,16 +190,15 @@ if expN==1
end end
if expN==2 if expN==2
zonesel=2; zonesel=2;
zonePB= 2; zonePB=2;
set(handles. zonePB2,'value',1) set(handles. zonePB2,'value',1)
set(handles. zonePB1,'value',0) set(handles. zonePB1,'value',0)
set(handles. zonePB3,'value',0) set(handles. zonePB3,'value',0)
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)
else else
@@ -224,16 +207,15 @@ if expN==2
end end
if expN==3 if expN==3
zonesel=3; zonesel=3;
zonePB= 3; zonePB=3;
set(handles. zonePB3,'value',1) set(handles. zonePB3,'value',1)
set(handles. zonePB2,'value',0) set(handles. zonePB2,'value',0)
set(handles. zonePB1,'value',0) set(handles. zonePB1,'value',0)
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)
else else

View File

@@ -2,128 +2,121 @@
global Exp global Exp
global ghandles global ghandles
if (Exp(expN).cTraceN>1 && length(Exp(expN).ll)<= (Exp(expN).cTraceIndx((Exp(expN).cTraceN)))) ||... if (Exp(expN).cTraceN>1 && length(Exp(expN).ll)<=(Exp(expN).cTraceIndx((Exp(expN).cTraceN)))) ||...
isempty(Exp(expN).ll) isempty(Exp(expN).ll)
return; return;
end end
Exp(expN).CompositPlot=1; Exp(expN).CompositPlot=1;
if expN==1, OLaxes=ghandles.OLaxes1; end if expN==1, OLaxes=ghandles.OLaxes1; end
if expN==2, OLaxes=ghandles.OLaxes2; end if expN==2, OLaxes=ghandles.OLaxes2; end
if expN==3, OLaxes=ghandles.OLaxes3; end if expN==3, OLaxes=ghandles.OLaxes3; end
cTraceN= mod(Exp(expN).cTraceN,10); cTraceN=mod(Exp(expN).cTraceN,10);
%cTraceN= Exp(expN).cTraceN; %cTraceN=Exp(expN).cTraceN;
if cTraceN==1, colour= 'b'; if cTraceN==1, colour='b';
elseif cTraceN==2, colour= 'g'; elseif cTraceN==2, colour='g';
elseif cTraceN==3, colour= 'r'; elseif cTraceN==3, colour='r';
elseif cTraceN==4, colour= 'c'; elseif cTraceN==4, colour='c';
elseif cTraceN==5, colour= 'm'; elseif cTraceN==5, colour='m';
elseif cTraceN==6, colour= 'b'; elseif cTraceN==6, colour='b';
elseif cTraceN==7, colour= 'g'; elseif cTraceN==7, colour='g';
elseif cTraceN==8, colour= 'r'; elseif cTraceN==8, colour='r';
elseif cTraceN==9, colour= 'c'; elseif cTraceN==9, colour='c';
elseif cTraceN==0, colour= 'm'; elseif cTraceN==0, colour='m';
end end
AddCplot=1; %Test need for user question dialog boxS AddCplot=1; %Test need for user question dialog boxS
if AddCplot==1, if AddCplot==1,
cTraceN= Exp(expN).cTraceN cTraceN=Exp(expN).cTraceN
cTraceIndx= Exp(expN).cTraceIndx(cTraceN) cTraceIndx=Exp(expN).cTraceIndx(cTraceN)
cTstart= cTraceIndx; cTstart=cTraceIndx;
cTend= length(Exp(expN).ll); cTend=length(Exp(expN).ll);
jj= 0; ii=0; RFcmpTraces=0; maxRFcmpLStd=0; maxRFcmpKStd=0; maxRFcmprStd= 0; jj=0; ii=0; RFcmpTraces=0; maxRFcmpLStd=0; maxRFcmpKStd=0; maxRFcmprStd=0;
for ic= cTstart:cTend for ic=cTstart:cTend
if strcmp(get(Exp(expN).hOL(ic),'visible'), 'on') if strcmp(get(Exp(expN).hOL(ic),'visible'), 'on')
jj= jj+1; jj=jj+1;
mlstL(jj)= Exp(expN).ll(ic); mlstR(jj)= Exp(expN).rr(ic); mlstK(jj)= Exp(expN).kk(ic); mlstL(jj)=Exp(expN).ll(ic); mlstR(jj)=Exp(expN).rr(ic); mlstK(jj)=Exp(expN).kk(ic);
LBcheck= char(Exp(expN).hOLname(ic)) LBcheck=char(Exp(expN).hOLname(ic))
if isequal(LBcheck(4:6),'cmp'), if isequal(LBcheck(4:6),'cmp'),
if Exp(expN).lstd(ic)> maxRFcmpLStd if Exp(expN).lstd(ic)> maxRFcmpLStd
maxRFcmpLStd= Exp(expN).lstd(ic); maxRFcmpLStd=Exp(expN).lstd(ic);
ii=ii+1; ii=ii+1;
lstds(ii)= Exp(expN).lstd(ic); lstds(ii)=Exp(expN).lstd(ic);
RFcmpTraces(ii)=ic; RFcmpTraces(ii)=ic;
end end
if Exp(expN).kstd(ic)> maxRFcmpKStd if Exp(expN).kstd(ic)> maxRFcmpKStd
maxRFcmpKStd= Exp(expN).kstd(ic); maxRFcmpKStd=Exp(expN).kstd(ic);
end end
if Exp(expN).rstd(ic)> maxRFcmprStd if Exp(expN).rstd(ic)> maxRFcmprStd
maxRFcmprStd= Exp(expN).rstd(ic); maxRFcmprStd=Exp(expN).rstd(ic);
end end
end
end
end
end end
%for n= 1:length(RFcmpTraces +1) end
%end end
maxLstd= max(std(mlstL), maxRFcmpLStd); end
maxKstd= max(std(mlstK), maxRFcmpKStd);
maxrstd= max(std(mlstR), maxRFcmprStd);
Exp(expN).cLmean(cTraceN)= mean(mlstL); Exp(expN).cLstd(cTraceN)= maxLstd;
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);
maxLstd=max(std(mlstL), maxRFcmpLStd);
maxKstd=max(std(mlstK), maxRFcmpKStd);
maxrstd=max(std(mlstR), maxRFcmprStd);
Exp(expN).cLmean(cTraceN)=mean(mlstL); Exp(expN).cLstd(cTraceN)=maxLstd;
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);
%******MEAN calculation Plot******************** % Mean calculation plot
%try l=Exp(expN).cLmean(cTraceN);
r=Exp(expN).cRmean(cTraceN);
l=Exp(expN).cLmean(cTraceN); K=Exp(expN).cKmean(cTraceN);
r=Exp(expN).cRmean(cTraceN); lslow=l + Exp(expN).cLstd(cTraceN); lfast=l - Exp(expN).cLstd(cTraceN);
K=Exp(expN).cKmean(cTraceN); rl=r - Exp(expN).cRstd(cTraceN); ru=r + Exp(expN).cRstd(cTraceN);
lslow=l + Exp(expN).cLstd(cTraceN); lfast= l - Exp(expN).cLstd(cTraceN); Kl=K - Exp(expN).cKstd(cTraceN); Ku=K + Exp(expN).cKstd(cTraceN);
rl=r - Exp(expN).cRstd(cTraceN); ru= r + Exp(expN).cRstd(cTraceN); clear g;
Kl=K - Exp(expN).cKstd(cTraceN); Ku= K + Exp(expN).cKstd(cTraceN); t=1:200;
clear g; g=K ./ (1 + exp(-r.* (t - l )));
t=1:200;
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));
Rstr=num2str(Exp(expN).cRmean(cTraceN)); Rsstr=num2str(Exp(expN).cRstd(cTraceN));
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Kstr=num2str(Exp(expN).cKmean(cTraceN)); Ksstr=num2str(Exp(expN).cKstd(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));
Kstr= num2str(Exp(expN).cKmean(cTraceN)); Ksstr= num2str(Exp(expN).cKstd(cTraceN));
try 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
if expN==2, set(ghandles.OLay2,'string', cPlotLB); end if expN==2, set(ghandles.OLay2,'string', cPlotLB); end
if expN==3, set(ghandles.OLay3,'string', cPlotLB); end 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)))
%Exp(expN).cName(cTraceN)={cPlotLB};
%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};

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
global Exp global Exp
try %Try the whole routine try % Try the whole routine
if strcmp(Exp(expN).DexpType,'multi') ||... if strcmp(Exp(expN).DexpType,'multi') ||...
strcmp(Exp(expN).DexpType,'chrono') strcmp(Exp(expN).DexpType,'chrono')

View File

@@ -1,4 +1,4 @@
%Diagnostic sheet called by EZvInitLoad.m, EZexpSel.m ?EZinteractDev_.m? % Diagnostic sheet called by EZvInitLoad.m, EZexpSel.m ?EZinteractDev_.m?
global Exp global Exp
intLfilename1=fullfile(Exp(expN).resDir,'PrintResults','!RFsDiagnostics.txt'); intLfilename1=fullfile(Exp(expN).resDir,'PrintResults','!RFsDiagnostics.txt');
@@ -7,8 +7,8 @@ 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');
fprintf(fid,'\n') fprintf(fid,'\n')
@@ -35,41 +35,29 @@ for d=1:DMnum
RFmeanGx= Exp(expN).RFmeanG(d); RFmeanGx= Exp(expN).RFmeanG(d);
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
RFmd1posD= Exp(expN).RFmdPindx(d,dMPs(mm)); RFmd1posD= Exp(expN).RFmdPindx(d,dMPs(mm));
dMP= Exp(expN).RFmdPpltN(d,dMPs(mm)); %This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also??? dMP= Exp(expN).RFmdPpltN(d,dMPs(mm)); % This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also???
rf1scNdisp= Exp(expN).RFmdPscanN(d,dMPs(mm)); rf1scNdisp= Exp(expN).RFmdPscanN(d,dMPs(mm));
mval1Disp= Exp(expN).RFmedianP(d,dMPs(mm)); mval1Disp= Exp(expN).RFmedianP(d,dMPs(mm));
std1Disp= Exp(expN).stdP(d,dMPs(mm)); std1Disp= Exp(expN).stdP(d,dMPs(mm));
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});
rf12mean(RFcombValList)= Exp(expN).RFmean(d+1); rf12mean(RFcombValList)= Exp(expN).RFmean(d+1);
std12(RFcombValList)= Exp(expN).RFstd(d+1); std12(RFcombValList)= Exp(expN).RFstd(d+1);
Exp(expN).RFmin(d+1)=min(RFcombValList); Exp(expN).RFmin(d+1)=min(RFcombValList);
Exp(expN).RFmax(d+1)=max(RFcombValList); Exp(expN).RFmax(d+1)=max(RFcombValList);
%} %}
fclose(fid) fclose(fid)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8,394 +8,370 @@ if isempty(adj), adj=1.5; flip='T'; end
load('MyColormap1','modJet1') load('MyColormap1','modJet1')
load('MyColormap2','modJet2') load('MyColormap2','modJet2')
%load('MyColormap2','modJet0') %load('MyColormap2','modJet0')
%adj= 1.5; %adj=1.5;
cleanPallet=zeros(24,16); cleanPallet=zeros(24,16);
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;
try try
if expN==1,MPsel=floor(get(ghandles.MPsldr1,'value')); end if expN==1,MPsel=floor(get(ghandles.MPsldr1,'value')); end
if expN==2,MPsel=floor(get(ghandles.MPsldr2,'value')); end if expN==2,MPsel=floor(get(ghandles.MPsldr2,'value')); end
if expN==3,MPsel=floor(get(ghandles.MPsldr3,'value')); end if expN==3,MPsel=floor(get(ghandles.MPsldr3,'value')); end
if expN==1,pertSel=floor(get(ghandles.DMsldr1,'value')); end if expN==1,pertSel=floor(get(ghandles.DMsldr1,'value')); end
if expN==2,pertSel=floor(get(ghandles.DMsldr2,'value')); end if expN==2,pertSel=floor(get(ghandles.DMsldr2,'value')); end
if expN==3,pertSel=floor(get(ghandles.DMsldr3,'value')); end if expN==3,pertSel=floor(get(ghandles.DMsldr3,'value')); end
catch catch
MPsel=1; MPsel=1;
pertSel=1; pertSel=1;
end end
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
if expN==3, expAxes=ghandles.Iaxes3;end if expN==3, expAxes=ghandles.Iaxes3;end
dmN= length(Exp(expN).Dexp(DexpN).DM.drug); dmN=length(Exp(expN).Dexp(DexpN).DM.drug);
mpSel= Exp(expN).Dexp(DexpN).MPsel; mpSel=Exp(expN).Dexp(DexpN).MPsel;
dmSel= Exp(expN).Dexp(DexpN).pertSel; dmSel=Exp(expN).Dexp(DexpN).pertSel;
scnN= dmSel + (dmN*(mpSel-1)); scnN=dmSel + (dmN*(mpSel-1));
if expN==1,htTog= Exp(1).htmapPBsel;end 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)
for i=1:size(L,1) % Data rescaling for Heatmap display (color range- mean+/std*adjustment)
for i=1:size(L,1)
for j=1:size(L,2) for j=1:size(L,2)
if L(i,j)>LpStd, if L(i,j)>LpStd,
L4hMap(i,j)= LpStd; L4hMap(i,j)=LpStd;
elseif L(i,j)<LnStd && L(i,j)~=0 elseif L(i,j)<LnStd && L(i,j)~=0
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
%L4hMap= 1-(L4hMap/(max(L4hMap(:))));
%---------------------------------------------------
if prntHt== 0
hTogHt= figure;
h=image(cleanPallet); %hTogHt=image(cleanPallet);
h=image(L4hMap); %hTogHt=image(L4hMap);
if isequal(char(flip) , 'T')
colormap(flipud(modJet1)) %(flipud(hot)) %(jet); % invert heat map for L so that fastgrowth is 'hotter' red
else
colormap(modJet2)
end
set(h,'CDataMapping','scale') %set(hTogHt,'CDataMapping','scale')
else
figure
h= image(cleanPallet); %hTogHt= image(cleanPallet);
h=image(L4hMap); %hTogHt=image(L4hMap);
if isequal(char(flip) , 'T')
colormap(flipud(modJet1)) %(flipud(hot)) %(jet); % invert heat map for L so that fastgrowth is 'hotter' red
else
colormap(modJet2)
end
set(h,'CDataMapping','scale')
end
%h=image(L);
%colormap(flipud(hot)) %(jet); % invert heat map for L so that fastgrowth is 'hotter' red
%set(h,'CDataMapping','scale')
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
if prntHt== 0
%if expN==1,cla(handles.HtMap1);copyobj(hTogHt,ghandles.HtMap1);end
%if expN==2,cla(handles.HtMap2);copyobj(hTogHt,ghandles.HtMap2);end
%if expN==3,cla(handles.HtMap3);copyobj(hTogHt,ghandles.HtMap3);end
close(hTogHt)
else %if clicking to produce a 'printable' save display
set(gca,'XDir','reverse')
set(gca,'XTickMode','manual')
%set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
%set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar
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},...
' ',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)})
end
colormap(modJet1) %Fix added 230814
%3333333333 KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
elseif htTog==1
colormap(modJet1);
K= Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,3);
K=reshape(K,24,16);
%Data rescaling for Heatmap display (color ranged mean+/std*multiplier)
pStd= mean(nonzeros(K(:)))+(adj*std(nonzeros(K(:))));
nStd= mean(nonzeros(K(:)))-(adj*std(nonzeros(K(:))));
for i=1:size(K,1)
for j=1:size(K,2)
if K(i,j)>pStd,
hMap(i,j)= pStd;
elseif K(i,j)<nStd && K(i,j)~=0
hMap(i,j)= nStd;
elseif K(i,j)== 0
hMap(i,j)= nStd-0.2*std(K(:));
else
hMap(i,j)= K(i,j);
end
end
end
%---------------------------------------------------
if prntHt== 0
hTogHt= figure;
h=image(cleanPallet);
else
figure
h= image(cleanPallet);
end
%h=image(cleanPallet);
h=image(hMap);
colormap(modJet1); % heat map
set(h,'CDataMapping','scale')
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
if prntHt== 0
close(hTogHt)
else
set(gca,'XDir','reverse')
set(gca,'XTickMode','manual')
%set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
%set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar
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},...
' ',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)})
end
%444444444 rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
elseif htTog==2
colormap(modJet1);
r= Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,4);
r=reshape(r,24,16);
%Data rescaling for Heatmap display (color ranged mean+/std*multiplier)
pStd= mean(nonzeros(r(:)))+(adj*std(nonzeros(r(:))));
nStd= mean(nonzeros(r(:)))-(adj*std(nonzeros(r(:))));
for i=1:size(r,1)
for j=1:size(r,2)
if r(i,j)>pStd,
hMap(i,j)= pStd;
elseif r(i,j)<nStd && r(i,j)~=0,
hMap(i,j)= nStd;
elseif r(i,j)== 0
hMap(i,j)= nStd-0.2*std(r(:));
else
hMap(i,j)= r(i,j);
end
end
end
%---------------------------------------------------
if prntHt== 0
hTogHt= figure;
h=image(cleanPallet);
else
figure
h= image(cleanPallet);
end
%h=image(cleanPallet);
h=image(hMap);
colormap(modJet1); % heat map
set(h,'CDataMapping','scale')
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
if prntHt== 0
close(hTogHt)
else
set(gca,'XDir','reverse')
set(gca,'XTickMode','manual')
%set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
%set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar
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},...
' ',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)})
end
%33333333333333333333333333333333333333333333333333333(1111111111111111111)
elseif htTog==3
RFconfig=Exp(expN).RFconfig; %ZoneRelated
if htMapTogPBfg==1
if RFconfig==2,
QctrlRF= 'Select Distributed Control RF option: (G)Global, (L)Local';
QpertRF= 'Select Distributed Perturbation RF option: (G)Global, (L)Local';
defaultanswer= {'G','L'}; %{'80','60','100','3,4,5','N','39','Y','G','L'};
try defaultanswer= Exp(expN).htmapRFanswer; catch, defaultanswer= {'G','L'};end %ZoneRelated
end end
if RFconfig==3, % L4hMap=1-(L4hMap/(max(L4hMap(:))));
QctrlRF= 'Select Control RF option: (F)FullPlate, (G)GlobalDistributed, (L)LocalDistributed';
QpertRF= 'Select Perturbation RF option: (F)FullPlate, (G)GlobalDistributed, (L)LocalDistributed'; if prntHt==0
defaultanswer={'F','L'}; %{'80','60','100','3,4,5','N','39','Y','F','L'}; hTogHt=figure;
try defaultanswer= Exp(expN).htmapRFanswer; catch, defaultanswer= {'F','L'}; end %ZoneRelated h=image(cleanPallet); % hTogHt=image(cleanPallet);
h=image(L4hMap); % hTogHt=image(L4hMap);
if isequal(char(flip) , 'T')
colormap(flipud(modJet1)) %(flipud(hot)) %(jet); % invert heat map for L so that fastgrowth is 'hotter' red
else
colormap(modJet2)
end
set(h,'CDataMapping','scale') %set(hTogHt,'CDataMapping','scale')
else
figure
h=image(cleanPallet); %hTogHt=image(cleanPallet);
h=image(L4hMap); %hTogHt=image(L4hMap);
if isequal(char(flip) , 'T')
colormap(flipud(modJet1)) %(flipud(hot)) %(jet); % invert heat map for L so that fastgrowth is 'hotter' red
else
colormap(modJet2)
end
set(h,'CDataMapping','scale')
end
% h=image(L);
% colormap(flipud(hot)) %(jet); % invert heat map for L so that fastgrowth is 'hotter' red
% set(h,'CDataMapping','scale')
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
if prntHt==0
%if expN==1,cla(handles.HtMap1);copyobj(hTogHt,ghandles.HtMap1);end
%if expN==2,cla(handles.HtMap2);copyobj(hTogHt,ghandles.HtMap2);end
%if expN==3,cla(handles.HtMap3);copyobj(hTogHt,ghandles.HtMap3);end
close(hTogHt)
else %if clicking to produce a 'printable' save display
set(gca,'XDir','reverse')
set(gca,'XTickMode','manual')
%set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
%set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar
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},' ',...
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)})
end
colormap(modJet1)
elseif htTog==1
colormap(modJet1);
K=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,3);
K=reshape(K,24,16);
%Data rescaling for Heatmap display (color ranged mean+/std*multiplier)
pStd=mean(nonzeros(K(:)))+(adj*std(nonzeros(K(:))));
nStd=mean(nonzeros(K(:)))-(adj*std(nonzeros(K(:))));
for i=1:size(K,1)
for j=1:size(K,2)
if K(i,j)>pStd,
hMap(i,j)=pStd;
elseif K(i,j)<nStd && K(i,j)~=0
hMap(i,j)=nStd;
elseif K(i,j)==0
hMap(i,j)=nStd-0.2*std(K(:));
else
hMap(i,j)=K(i,j);
end
end
end
if prntHt==0
hTogHt=figure;
h=image(cleanPallet);
else
figure
h=image(cleanPallet);
end end
% h=image(cleanPallet);
h=image(hMap);
colormap(modJet1); % heat map
set(h,'CDataMapping','scale')
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
if RFconfig~=1, if prntHt==0
prompt={ close(hTogHt)
QctrlRF,... else
QpertRF,... set(gca,'XDir','reverse')
}; set(gca,'XTickMode','manual')
name='Interaction User Input'; %set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
numlines=1; %set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
answer=inputdlg(prompt,name,numlines,defaultanswer); %set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
if RFconfig==2, colorbar
if ~ismember(answer{1},['g' 'G' 'l' 'L']), answer(1)=defaultanswer(1); end expLblHtmap=Exp(expN).Dexp.ExpFoldr;
if ~ismember(answer{2},['g' 'G' 'l' 'L']), answer(2)=defaultanswer(2); end 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},' ',...
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)})
end
elseif htTog==2
colormap(modJet1);
r=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(:,4);
r=reshape(r,24,16);
% Data rescaling for Heatmap display (color ranged mean+/std*multiplier)
pStd=mean(nonzeros(r(:)))+(adj*std(nonzeros(r(:))));
nStd=mean(nonzeros(r(:)))-(adj*std(nonzeros(r(:))));
for i=1:size(r,1)
for j=1:size(r,2)
if r(i,j)>pStd,
hMap(i,j)=pStd;
elseif r(i,j)<nStd && r(i,j)~=0,
hMap(i,j)=nStd;
elseif r(i,j)==0
hMap(i,j)=nStd-0.2*std(r(:));
else
hMap(i,j)=r(i,j);
end
end end
if RFconfig==3, end
if ~ismember(answer{1},['f' 'F' 'g' 'G' 'l' 'L']), answer(1)=defaultanswer(1); end if prntHt==0
if ~ismember(answer{2},['f' 'F' 'g' 'G' 'l' 'L']), answer(2)=defaultanswer(2); end hTogHt=figure;
h=image(cleanPallet);
else
figure
h=image(cleanPallet);
end
% h=image(cleanPallet);
h=image(hMap);
colormap(modJet1); % heat map
set(h,'CDataMapping','scale')
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
if prntHt==0
close(hTogHt)
else
set(gca,'XDir','reverse')
set(gca,'XTickMode','manual')
%set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
%set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar
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},' ',...
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)})
end
elseif htTog==3
RFconfig=Exp(expN).RFconfig; %ZoneRelated
if htMapTogPBfg==1
if RFconfig==2,
QctrlRF='Select Distributed Control RF option: (G)Global, (L)Local';
QpertRF='Select Distributed Perturbation RF option: (G)Global, (L)Local';
defaultanswer={'G','L'}; %{'80','60','100','3,4,5','N','39','Y','G','L'};
try defaultanswer=Exp(expN).htmapRFanswer; catch, defaultanswer={'G','L'};end %ZoneRelated
end end
answer(1)= strrep(answer(1),'f','F'); answer(1)= strrep(answer(1),'g','G'); answer(1)= strrep(answer(1),'l','L'); if RFconfig==3,
answer(2)= strrep(answer(2),'f','F'); answer(2)= strrep(answer(2),'g','G'); answer(2)= strrep(answer(2),'l','L'); QctrlRF='Select Control RF option: (F)FullPlate, (G)GlobalDistributed, (L)LocalDistributed';
Exp(expN).htmapRFanswer= answer; %ZoneRelated %store user last selections QpertRF='Select Perturbation RF option: (F)FullPlate, (G)GlobalDistributed, (L)LocalDistributed';
end defaultanswer={'F','L'}; %{'80','60','100','3,4,5','N','39','Y','F','L'};
end %if htMapTogPBfg==1 try defaultanswer=Exp(expN).htmapRFanswer; catch, defaultanswer={'F','L'}; end %ZoneRelated
end
if RFconfig~=1,
prompt={QctrlRF,QpertRF};
name='Interaction User Input';
numlines=1;
answer=inputdlg(prompt,name,numlines,defaultanswer);
if RFconfig==2,
if ~ismember(answer{1},['g' 'G' 'l' 'L']), answer(1)=defaultanswer(1); end
if ~ismember(answer{2},['g' 'G' 'l' 'L']), answer(2)=defaultanswer(2); end
end
if RFconfig==3,
if ~ismember(answer{1},['f' 'F' 'g' 'G' 'l' 'L']), answer(1)=defaultanswer(1); end
if ~ismember(answer{2},['f' 'F' 'g' 'G' 'l' 'L']), answer(2)=defaultanswer(2); end
end
answer(1)=strrep(answer(1),'f','F'); answer(1)=strrep(answer(1),'g','G'); answer(1)=strrep(answer(1),'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
end
end
htMapTogPBfg=0; htMapTogPBfg=0;
answer= Exp(expN).htmapRFanswer; %ZoneRelated answer=Exp(expN).htmapRFanswer; %ZoneRelated
%for j=1:1 %dmN % for j=1:1 %dmN
% for m=1:1 %mpN % for m=1:1 %mpN
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}= []; Xln{m,j,1}=[];
Xln{m,j,1}= []; Xhn{m,j,1}=[];
Xhn{m,j,1}= []; Xn{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,5);
Xn{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,5); Xln{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,11); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,11);
Xln{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,11); %Exp(expN).Dexp(DexpN).scan(DM{j}(m)).plate(1).CFout(:,11); 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;
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);
Xn{m,j,:}(Xn{m,j,:}==0)= 1.2*(max(Xn{m,j,:})); %to keep the colormap scale tighter %=140; 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);
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); %intL{m,j,:}=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1)));
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=((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1)));
Exp(expN).HtMpIntN2=intL; %ZoneRelated
%********************************************************* %{
%intL{m,j,:}= ((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1))); intL{m,j,:}(Xn{m,j,:}==1.2*(max(Xn{m,j,:})))=100;
intL= ((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1))); intL{m,j,:}(intL{m,j,:}==0)=-0.0001;
Exp(expN).HtMpIntN2=intL; %ZoneRelated %}
%{ percentRs=100;
intL{m,j,:}(Xn{m,j,:}==1.2*(max(Xn{m,j,:})))= 100; RsReduced(j)=percentRs/100* Rs(j);
intL{m,j,:}(intL{m,j,:}==0)=-0.0001; deltaRp(j)=(Rn(j)+RsReduced(j))-(Rn(1)+RsReduced(1));
%} deltaRn(j)=(Rn(j)-RsReduced(j))-(Rn(1)-RsReduced(1));
percentRs= 100; if deltaRp(j)==0, deltaRp(j)=0.0002; end
RsReduced(j)= percentRs/100* Rs(j); if deltaRn(j)==0, deltaRn(j)=0.0002; end
deltaYp=zeros(1,384); deltaYn=zeros(1,384);
deltaRp(j)= (Rn(j)+RsReduced(j))-(Rn(1)+RsReduced(1)); deltaXRp=zeros(1,384); deltaXRn=zeros(1,384);
deltaRn(j)=(Rn(j)-RsReduced(j))-(Rn(1)-RsReduced(1)); deltaXR{m,j}=zeros(1,384);
if deltaRp(j)==0, deltaRp(j)=0.0002; end for i=1:384
if deltaRn(j)==0, deltaRn(j)=0.0002; end % Select lower or upper boundary value based on Yn(1)
if Xn{m,j}(i) >=(Rn(j)+RsReduced(j));
deltaYp(i)= Xln{m,j}(i)-Xln{m,1}(i);
elseif Xn{m,j}(i) < (Rn(j)-RsReduced(j));
deltaYn(i)= Xhn{m,j}(i)-Xhn{m,1}(i);
% Insert else
end
% Calculate deltaXRp and deltaXRn for each plate based on growth relative to deltaRp or deltaRn
if deltaYp(i)>=deltaRp(j)
deltaXRp(i)=deltaYp(i)-deltaRp(j);
deltaXR{m,j}(i)=deltaXRp(i); %Consoludate into deltaXR{m,j}(i) cell array
elseif deltaYn(i) < deltaRn(j)
deltaXRn(i)=deltaYn(i)-deltaRn(j);
deltaXR{m,j}(i)=deltaXRn(i); %Consoludate into deltaXR{m,j}(i) cell array
if deltaYn(i)==0, deltaXR{m,j}(i)=0; end
end
% Ambiguous results that have delta gene values that are less than the variance of Reference+/-std
end
deltaXRl=deltaXR{m,j,:};
htMpN1Lzeros999=deltaXR{m,j,:};
deltaXRl(htmpCpyXn==0)=1.2*max(deltaXRl);
htMpN1Lzeros999(htmpCpyXn==0)=999;
Exp(expN).HtMpIntN1=htMpN1Lzeros999';
deltaYp= zeros(1,384); deltaYn= zeros(1,384); I=reshape(deltaXRl,24,16);
deltaXRp= zeros(1,384); deltaXRn= zeros(1,384); if prntHt==0
deltaXR{m,j}= zeros(1,384); hTogHt=figure;
for i=1:384 h=image(cleanPallet);
%Select lower or upper boundary value based on Yn(1) else
if Xn{m,j}(i) >= (Rn(j)+RsReduced(j)); figure
deltaYp(i)= Xln{m,j}(i)-Xln{m,1}(i); h=image(cleanPallet);
elseif Xn{m,j}(i) < (Rn(j)-RsReduced(j)); end
deltaYn(i)= Xhn{m,j}(i)-Xhn{m,1}(i); % h=figure;
% Insert else h=image(I);
end colormap(jet); % heat map
%Calculate deltaXRp and deltaXRn for each plate based on growth relative to deltaRp or deltaRn set(h,'CDataMapping','scale')
if deltaYp(i)>= deltaRp(j)
deltaXRp(i)= deltaYp(i)-deltaRp(j); if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end
deltaXR{m,j}(i)= deltaXRp(i); %Consoludate into deltaXR{m,j}(i) cell array if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end
elseif deltaYn(i) < deltaRn(j) if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end
deltaXRn(i)= deltaYn(i)-deltaRn(j);
deltaXR{m,j}(i)= deltaXRn(i); %Consoludate into deltaXR{m,j}(i) cell array
if deltaYn(i)==0, deltaXR{m,j}(i)=0; end
end
%Ambiguous results that have delta gene values that are less than the variance of Reference+/-std
end %for i=1:384
deltaXRl= deltaXR{m,j,:};
htMpN1Lzeros999= deltaXR{m,j,:};
deltaXRl(htmpCpyXn==0)=1.2*max(deltaXRl);
htMpN1Lzeros999(htmpCpyXn==0)=999;
Exp(expN).HtMpIntN1=htMpN1Lzeros999';
%**************************************************************************
I=reshape(deltaXRl,24,16);
if prntHt== 0 if prntHt==0
hTogHt= figure; close(hTogHt)
h=image(cleanPallet); else
else set(gca,'XDir','reverse')
figure set(gca,'XTickMode','manual')
h= image(cleanPallet); % set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
end % set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%h=figure; % set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
h=image(I); colorbar
colormap(jet); % heat map expLblHtmap=Exp(expN).Dexp.ExpFoldr;
set(h,'CDataMapping','scale') 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},' ',...
if expN==1,cla(handles.HtMap1);copyobj(h,ghandles.HtMap1);end Exp(expN).Dexp(DexpN).DM.mod1{pertSel},Exp(expN).Dexp(DexpN).DM.conc1{pertSel},' ',...
if expN==2,cla(handles.HtMap2);copyobj(h,ghandles.HtMap2);end Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}));
if expN==3,cla(handles.HtMap3);copyobj(h,ghandles.HtMap3);end title({strcat('N1 HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)})
end
if prntHt== 0
close(hTogHt)
else
set(gca,'XDir','reverse')
set(gca,'XTickMode','manual')
%set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
%set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%set(gca,'XTick',{0;2;4;6;8;10;12;14;16;18})
colorbar
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},...
' ',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)})
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];
%**************** EZintRFs % Call subroutine to interpret user RF inputs
anN= [1 2]; %* scnNdm1=1 + (dmN*(m-1))
EZintRFs %* Call subroutine to interpret user RF inputs scnN=j + (dmN*(m-1)) % 1,6,11..; 2,7,12 ..; 3,8,13..;
%**************** Xn{m,j,1}=[];
scnNdm1= 1 + (dmN*(m-1))
scnN= j + (dmN*(m-1)) % 1,6,11..; 2,7,12 ..; 3,8,13..;
Xn{m,j,1}= [];
Xn{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,5); Xn{m,1,:}=Exp(expN).Dexp(DexpN).scan(scnNdm1).plate(1).CFout(:,5);
Xn{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).plate(1).CFout(:,5); Xn{m,j,:}=Exp(expN).Dexp(DexpN).scan(scnN).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;
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
%h=figure %h=figure
h=image(I) h=image(I)
colormap(jet); % heat map colormap(jet); % heat map
@@ -404,24 +380,26 @@ 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
set(gca,'XDir','reverse') set(gca,'XDir','reverse')
set(gca,'XTickMode','manual') set(gca,'XTickMode','manual')
%set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'}) % set(gca,'XTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'})
%set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'}) % set(gca,'XTickLabel',{'16';'14';'12';'10';'8';'6';'4';'2'})
%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},' ',...
title({strcat('N2 HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)}) Exp(expN).Dexp(DexpN).DM.mod2{pertSel},Exp(expN).Dexp(DexpN).DM.conc2{pertSel}));
end title({strcat('N2 HeatMap for - ',expLblHtmap),strcat('MP=',num2str(mpSel),' ,DM=',num2str(dmSel),mediaLBhtmap)})
end
end %if htTog== end
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,82 +1,79 @@
%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);
k= Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(indx,3); k=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(indx,3);
r= Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(indx,4); r=Exp(expN).Dexp(DexpN).scan(scnN).plate.CFout(indx,4);
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
if ~isempty(htl), htl=strcat('_L=',htl);else htl=' ';end if ~isempty(htl), htl=strcat('_L=',htl);else htl=' ';end
catch catch
htl=' '; htl=' ';
end end
try try
kk=num2str(k); kk=num2str(k);
if length(kk)>5,htk= kk(1:5);else htk=kk;end if length(kk)>5,htk=kk(1:5);else htk=kk;end
if ~isempty(htk), htk=strcat('_K=',htk);else htk=' ';end if ~isempty(htk), htk=strcat('_K=',htk);else htk=' ';end
catch catch
htk=' '; htk=' ';
end end
try try
rr=num2str(r); rr=num2str(r);
if length(rr)>5,htr= rr(1:5);else htr=rr;end if length(rr)>5,htr=rr(1:5);else htr=rr;end
if ~isempty(htr), htr=strcat('_r=',htr);else htr=' ';end if ~isempty(htr), htr=strcat('_r=',htr);else htr=' ';end
catch catch
htr=' '; htr=' ';
end end
try
n1=num2str(Exp(expN).HtMpIntN1(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx));
try if length(n1)>5,N1=n1(1:5);else N1=n1; end
n1= num2str(Exp(expN).HtMpIntN1(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx)); if ~isempty(N1), htN1=strcat('_N1=',N1);else htN1=' ';end
if length(n1)>5,N1= n1(1:5);else N1=n1; end catch
if ~isempty(N1), htN1=strcat('_N1=',N1);else htN1=' ';end
catch
htN1=' '; htN1=' ';
end end
try try
n2= num2str(Exp(expN).HtMpIntN2(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN2(indx)); n2=num2str(Exp(expN).HtMpIntN2(indx)); %num2str(Exp(expN).Dexp(DexpN).HtMpIntN2(indx));
if length(n2)>5,N2= n2(1:5);else N2=n2; end if length(n2)>5,N2=n2(1:5);else N2=n2; end
if ~isempty(N2), htN2=strcat('_N2=',N2);else htN2=' ';end %htN2=strcat('_N2=',N2); if ~isempty(N2), htN2=strcat('_N2=',N2);else htN2=' ';end %htN2=strcat('_N2=',N2);
catch catch
htN2=' '; htN2=' ';
end end
try try
if htTog==0 || htTog> 2 if htTog==0 || htTog> 2
htmapStr=strcat(htl, htN1,htN2) htmapStr=strcat(htl, htN1,htN2)
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
end end
catch catch
end end
try try
if htTog==1 if htTog==1
htmapStr=htk %strcat(htl, htN1,htN2) htmapStr=htk %strcat(htl, htN1,htN2)
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
end end
catch catch
end end
try try
if htTog==2 if htTog==2
htmapStr=htr %strcat(htl, htN1,htN2) htmapStr=htr %strcat(htl, htN1,htN2)
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
end end
catch
end
catch catch
end msg='No spot selected (indx=Exp(expN).Dexp(DexpN).spotIndx)'
catch
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,11 +19,11 @@ 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),...
'; NumberOfHistogramBins:',answer(6),'; Subplots:',answer(7))); %answer(7) '; RFstdPercent:',answer(3),pertTypeLB,answer(4),'; RemoveNoGrowthInfLs:',answer(5),...
'; 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;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
@@ -41,28 +38,27 @@ for j=1:length(DMsel), fprintf(fid,'%s\t',strcat('IntLdm',num2str(DMsel(j)))); e
fprintf(fid,'Specifics\tReplicate\tStrain\tMP\tRow\tCol\tIndex'); fprintf(fid,'Specifics\tReplicate\tStrain\tMP\tRow\tCol\tIndex');
fprintf(fid, '\n'); fprintf(fid, '\n');
if ~isempty(InterslstPos{1}) if ~isempty(InterslstPos{1})
for i=1:size(selIntP,1) for i=1:size(selIntP,1)
ln=ln+1; ln=ln+1;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
fprintf(fid,'%s\t%s\t',cell2mat(IPorf(i)),cell2mat(IPgene(i))); fprintf(fid,'%s\t%s\t',cell2mat(IPorf(i)),cell2mat(IPgene(i)));
for j=1:length(DMsel) %'Scan\tPlate\tRow\tCol\t'); for j=1:length(DMsel) % 'Scan\tPlate\tRow\tCol\t');
fprintf(fid,'%.5f\t',IntersValsPos(i,j)) fprintf(fid,'%.5f\t',IntersValsPos(i,j))
end end
% 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(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;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
fprintf(fid,'%s\t','Empty Set, No interaction found within set range.'); fprintf(fid,'%s\t','Empty Set, No interaction found within set range.');
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;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
@@ -77,25 +73,23 @@ for j=1:length(DMsel), fprintf(fid,'%s\t',strcat('IntLdm',num2str(DMsel(j)))); e
fprintf(fid,'Specifics\tReplicate\tStrain\tMP\tRow\tCol\tIndex'); fprintf(fid,'Specifics\tReplicate\tStrain\tMP\tRow\tCol\tIndex');
fprintf(fid, '\n'); fprintf(fid, '\n');
if ~isempty(InterslstNeg{1}) if ~isempty(InterslstNeg{1})
for i=1:size(selIntN,1) for i=1:size(selIntN,1)
ln=ln+1; ln=ln+1;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
fprintf(fid,'%s\t%s\t',cell2mat(INorf(i)),cell2mat(INgene(i))); fprintf(fid,'%s\t%s\t',cell2mat(INorf(i)),cell2mat(INgene(i)));
for j=1:length(DMsel) %'Scan\tPlate\tRow\tCol\t'); for j=1:length(DMsel) % 'Scan\tPlate\tRow\tCol\t');
fprintf(fid,'%.5f\t',IntersValsNeg(i,j)) fprintf(fid,'%.5f\t',IntersValsNeg(i,j))
end end
% 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;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
@@ -106,28 +100,24 @@ ln=2;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
fprintf(fid, 'Orf\tGene\t'); fprintf(fid, 'Orf\tGene\t');
for j=1:length(DMsel), fprintf(fid,'%s\t',strcat('IntLdm',num2str(DMsel(j)))); end for j=1:length(DMsel), fprintf(fid,'%s\t',strcat('IntLdm',num2str(DMsel(j)))); end
%fprintf(fid, 'L\tLlower\tLupper\t') % fprintf(fid, 'L\tLlower\tLupper\t')
fprintf(fid,'Specifics\tReplicate\tStrain\tMP\tRow\tCol\tIndex'); fprintf(fid,'Specifics\tReplicate\tStrain\tMP\tRow\tCol\tIndex');
fprintf(fid, '\n'); fprintf(fid, '\n');
for i=1:size(selIntPAdj,1) for i=1:size(selIntPAdj,1)
ln=ln+1; ln=ln+1;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
fprintf(fid,'%s\t%s\t',cell2mat(IPorfAdj(i)),cell2mat(IPgeneAdj(i))); fprintf(fid,'%s\t%s\t',cell2mat(IPorfAdj(i)),cell2mat(IPgeneAdj(i)));
for j=1:length(DMsel) %'Scan\tPlate\tRow\tCol\t'); for j=1:length(DMsel) %'Scan\tPlate\tRow\tCol\t');
fprintf(fid,'%.5f\t',IntersValsPosAdj(i,j)) fprintf(fid,'%.5f\t',IntersValsPosAdj(i,j))
end end
% 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(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);
@@ -144,18 +134,16 @@ fprintf(fid,'Specifics\tReplicate\tStrain\tMP\tRow\tCol\tIndex');
fprintf(fid, '\n'); fprintf(fid, '\n');
for i=1:size(selIntNAdj,1) for i=1:size(selIntNAdj,1)
i i
ln=ln+1; ln=ln+1;
fprintf(fid,'%d\t',ln); fprintf(fid,'%d\t',ln);
fprintf(fid,'%s\t%s\t',cell2mat(INorfAdj(i)),cell2mat(INgeneAdj(i))); fprintf(fid,'%s\t%s\t',cell2mat(INorfAdj(i)),cell2mat(INgeneAdj(i)));
for j=1:length(DMsel) %'Scan\tPlate\tRow\tCol\t'); for j=1:length(DMsel) %'Scan\tPlate\tRow\tCol\t');
fprintf(fid,'%.5f\t',IntersValsNegAdj(i,j)) fprintf(fid,'%.5f\t',IntersValsNegAdj(i,j))
end end
% 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

@@ -1,87 +1,87 @@
if RFconfig==1 if RFconfig==1
Rn=Exp(expN).Dexp(DexpN).RFmean; Rs=Exp(expN).Dexp(DexpN).RFstd; Rn=Exp(expN).Dexp(DexpN).RFmean; Rs=Exp(expN).Dexp(DexpN).RFstd;
end end
if RFconfig==2 if RFconfig==2
ctrlRF= cell2mat(answer(anN(1))) ctrlRF=cell2mat(answer(anN(1)))
switch ctrlRF switch ctrlRF
case {'G','g'} case {'G','g'}
Rn(1)= Exp(expN).Dexp(DexpN).RFmeanG(DM0); Rn(1)=Exp(expN).Dexp(DexpN).RFmeanG(DM0);
Rs(1)= Exp(expN).Dexp(DexpN).RFstdG(DM0); Rs(1)=Exp(expN).Dexp(DexpN).RFstdG(DM0);
case {'L','l'} case {'L','l'}
if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0 if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0
Rn(1)= Exp(expN).Dexp(DexpN).meanP(DN0,m); Rn(1)=Exp(expN).Dexp(DexpN).meanP(DN0,m);
Rs(1)= Exp(expN).Dexp(DexpN).stdP(DM0,m); Rs(1)=Exp(expN).Dexp(DexpN).stdP(DM0,m);
elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0||isempty(Exp(expN).Dexp(DexpN).meanP(DMj,m)) &&... elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0||isempty(Exp(expN).Dexp(DexpN).meanP(DMj,m)) &&...
strcmpi(ctrlRF,'G') strcmpi(ctrlRF,'G')
Rn(1)= Exp(expN).Dexp(DexpN).RFmeanG(DM0); Rn(1)=Exp(expN).Dexp(DexpN).RFmeanG(DM0);
Rs(1)= Exp(expN).Dexp(DexpN).RFstdG(DM0); Rs(1)=Exp(expN).Dexp(DexpN).RFstdG(DM0);
end end
end end
pertRF= cell2mat(answer(anN(2))) pertRF=cell2mat(answer(anN(2)))
switch pertRF switch pertRF
case {'G','g'} case {'G','g'}
Rn(2:dmN)= Exp(expN).Dexp(DexpN).RFmeanG(2:end); Rn(2:dmN)=Exp(expN).Dexp(DexpN).RFmeanG(2:end);
Rs(2:dmN)= Exp(expN).Dexp(DexpN).RFstdG(2:end); Rs(2:dmN)=Exp(expN).Dexp(DexpN).RFstdG(2:end);
case {'L','l'} case {'L','l'}
if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0 if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0
Rn(j)= Exp(expN).Dexp(DexpN).meanP(DMj,m); Rn(j)=Exp(expN).Dexp(DexpN).meanP(DMj,m);
Rs(j)= Exp(expN).Dexp(DexpN).stdP(DMj,m); Rs(j)=Exp(expN).Dexp(DexpN).stdP(DMj,m);
elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0||isempty(Exp(expN).Dexp(DexpN).meanP(DMj,m)) &&... elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0||isempty(Exp(expN).Dexp(DexpN).meanP(DMj,m)) &&...
strcmpi(ctrlRF,'G') strcmpi(ctrlRF,'G')
Rn(j)= Exp(expN).Dexp(DexpN).RFmeanG(DMj); Rn(j)=Exp(expN).Dexp(DexpN).RFmeanG(DMj);
Rs(j)= Exp(expN).Dexp(DexpN).RFstdG(DMj); Rs(j)=Exp(expN).Dexp(DexpN).RFstdG(DMj);
end end
end end
end end
if RFconfig==3 if RFconfig==3
ctrlRF= cell2mat(answer(anN(1))) ctrlRF=cell2mat(answer(anN(1)))
switch ctrlRF switch ctrlRF
case {'F','f'} case {'F','f'}
Rn(1)= Exp(expN).Dexp(DexpN).RFmean(DM0); Rn(1)=Exp(expN).Dexp(DexpN).RFmean(DM0);
Rs(1)= Exp(expN).Dexp(DexpN).RFstd(DM0); Rs(1)=Exp(expN).Dexp(DexpN).RFstd(DM0);
case {'G','g'} case {'G','g'}
Rn(1)= Exp(expN).Dexp(DexpN).RFmeanG(DM0); Rn(1)=Exp(expN).Dexp(DexpN).RFmeanG(DM0);
Rs(1)= Exp(expN).Dexp(DexpN).RFstdG(DM0); Rs(1)=Exp(expN).Dexp(DexpN).RFstdG(DM0);
case {'L','l'} case {'L','l'}
Rn(1)= Exp(expN).Dexp(DexpN).meanP(DM0,m); Rn(1)=Exp(expN).Dexp(DexpN).meanP(DM0,m);
Rs(1)= Exp(expN).Dexp(DexpN).stdP(DM0,m); Rs(1)=Exp(expN).Dexp(DexpN).stdP(DM0,m);
if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0, if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0,
Rn(1)= Exp(expN).Dexp(DexpN).meanP(DM0,m); Rn(1)=Exp(expN).Dexp(DexpN).meanP(DM0,m);
Rs(1)= Exp(expN).Dexp(DexpN).stdP(DM0,m); Rs(1)=Exp(expN).Dexp(DexpN).stdP(DM0,m);
elseif Exp(expN).Dexp(DexpN).meanP(DM0,m)==0 && strcmpi(ctrlRF,'G') elseif Exp(expN).Dexp(DexpN).meanP(DM0,m)==0 && strcmpi(ctrlRF,'G')
Rn(1)= Exp(expN).Dexp(DexpN).RFmeanG(DM0); Rn(1)=Exp(expN).Dexp(DexpN).RFmeanG(DM0);
Rs(1)= Exp(expN).Dexp(DexpN).RFstdG(DMj); Rs(1)=Exp(expN).Dexp(DexpN).RFstdG(DMj);
elseif Exp(expN).Dexp(DexpN).meanP(DM0,m)==0 && strcmpi(ctrlRF,'F') elseif Exp(expN).Dexp(DexpN).meanP(DM0,m)==0 && strcmpi(ctrlRF,'F')
Rn(1)= Exp(expN).Dexp(DexpN).RFmean(DM0); Rn(1)=Exp(expN).Dexp(DexpN).RFmean(DM0);
Rs(1)= Exp(expN).Dexp(DexpN).RFstd(DM0); Rs(1)=Exp(expN).Dexp(DexpN).RFstd(DM0);
elseif Exp(expN).Dexp(DexpN).meanP(DM0,m)==0 && strcmpi(ctrlRF,'L') elseif Exp(expN).Dexp(DexpN).meanP(DM0,m)==0 && strcmpi(ctrlRF,'L')
Rn(1)= Exp(expN).Dexp(DexpN).RFmeanG(DM0); Rn(1)=Exp(expN).Dexp(DexpN).RFmeanG(DM0);
Rs(1)= Exp(expN).Dexp(DexpN).RFstdG(DM0); Rs(1)=Exp(expN).Dexp(DexpN).RFstdG(DM0);
end end
end end
pertRF= cell2mat(answer(anN(2))) pertRF=cell2mat(answer(anN(2)))
switch pertRF switch pertRF
case {'F','f'} case {'F','f'}
Rn(2:dmN)= Exp(expN).Dexp(DexpN).RFmean(2:end); Rn(2:dmN)=Exp(expN).Dexp(DexpN).RFmean(2:end);
Rs(2:dmN)= Exp(expN).Dexp(DexpN).RFstd(2:end); Rs(2:dmN)=Exp(expN).Dexp(DexpN).RFstd(2:end);
case {'G','g'} case {'G','g'}
Rn(2:dmN)= Exp(expN).Dexp(DexpN).RFmeanG(2:end); Rn(2:dmN)=Exp(expN).Dexp(DexpN).RFmeanG(2:end);
Rs(2:dmN)= Exp(expN).Dexp(DexpN).RFstdG(2:end); Rs(2:dmN)=Exp(expN).Dexp(DexpN).RFstdG(2:end);
case {'L','l'} case {'L','l'}
if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0, if Exp(expN).Dexp(DexpN).meanP(DMj,m)~=0,
Rn(j)= Exp(expN).Dexp(DexpN).meanP(DMj,m); Rn(j)=Exp(expN).Dexp(DexpN).meanP(DMj,m);
Rs(j)= Exp(expN).Dexp(DexpN).stdP(DMj,m); Rs(j)=Exp(expN).Dexp(DexpN).stdP(DMj,m);
elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0 && strcmpi(ctrlRF,'G') elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0 && strcmpi(ctrlRF,'G')
Rn(j)= Exp(expN).Dexp(DexpN).RFmeanG(DMj); Rn(j)=Exp(expN).Dexp(DexpN).RFmeanG(DMj);
Rs(j)= Exp(expN).Dexp(DexpN).RFstdG(DMj); Rs(j)=Exp(expN).Dexp(DexpN).RFstdG(DMj);
elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0 && strcmpi(ctrlRF,'F') elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0 && strcmpi(ctrlRF,'F')
Rn(j)= Exp(expN).Dexp(DexpN).RFmean(DMj); Rn(j)=Exp(expN).Dexp(DexpN).RFmean(DMj);
Rs(j)= Exp(expN).Dexp(DexpN).RFstd(DMj); Rs(j)=Exp(expN).Dexp(DexpN).RFstd(DMj);
elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0 && strcmpi(ctrlRF,'L') elseif Exp(expN).Dexp(DexpN).meanP(DMj,m)==0 && strcmpi(ctrlRF,'L')
Rn(j)= Exp(expN).Dexp(DexpN).RFmeanG(DMj); Rn(j)=Exp(expN).Dexp(DexpN).RFmeanG(DMj);
Rs(j)= Exp(expN).Dexp(DexpN).RFstdG(DMj); Rs(j)=Exp(expN).Dexp(DexpN).RFstdG(DMj);
end end
end end
end end

View File

@@ -3,236 +3,215 @@
%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;
if zoneSel==1,DexpN= (get(ghandles.DN1,'value')); end if zoneSel==1,DexpN=(get(ghandles.DN1,'value')); end
if zoneSel==2,DexpN= (get(ghandles.DN2,'value')); end if zoneSel==2,DexpN=(get(ghandles.DN2,'value')); end
if zoneSel==3,DexpN= (get(ghandles.DN3,'value')); end if zoneSel==3,DexpN=(get(ghandles.DN3,'value')); end
try try
p1=cell2mat(strfind(selGnOrf,'(')); p1=cell2mat(strfind(selGnOrf,'('));
p2= cell2mat(strfind(selGnOrf,')')); p2=cell2mat(strfind(selGnOrf,')'));
dmNum= str2num(selGnOrf{1}(p1+1:p2-1)); dmNum=str2num(selGnOrf{1}(p1+1:p2-1));
inDM= str2num(selGnOrf{1}(p1+1:p2-1)); inDM=str2num(selGnOrf{1}(p1+1:p2-1));
if (~isempty(dmNum)&& isnumeric(dmNum)),RFDMflg=1; end 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);
r= Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).med; rs= num2str(r); 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); l=Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).med; Ls=num2str(l);
Kl= K - Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std; Kl=K - Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
Ku= 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; rl=r - Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
ru= 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; lfast=l - Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
lslow= l + Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; lslow=l + Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
elseif RFcmpGFlg==1 elseif RFcmpGFlg==1
K= Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; Ks= num2str(K); K=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; Ks=num2str(K);
r= Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; rs= num2str(r); r=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; rs=num2str(r);
l= Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).med; Ls= num2str(l); l=Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).med; Ls=num2str(l);
Kl= K - Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std; Kl=K - Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std;
Ku= 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; rl=r - Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).std;
ru= 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; lfast=l - Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std;
lslow= l + Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std; lslow=l + Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std;
end end
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
t=1:200;
clear g;
t=1:200; %try
clear g; 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');
%try % Store L R and K valves for Composite [C] plots
g= K ./ (1 + exp(-r.* (t - l ))); Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K;
gSlow= Kl ./ (1 + exp(-rl.* (t - lslow ))); if RFcmpGFlg==0
gFast= Ku ./ (1 + exp(-ru.* (t - lfast ))); Exp(expN).lstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end Exp(expN).kstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
%tser=(scan(1,plateNum).plate(1).t0Series(:)); Exp(expN).rstd(traceN)=Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
%rawData= scan(1,plateNum).plate(1).intens(indx,:)/scan(1,plateNum).plate(1).Ag(indx); 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};
if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1; Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).UsrKvals={Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(dm).Kvals};
Dlaxes=ghandles.Dlaxes1;Dkaxes=ghandles.Dkaxes1;Draxes=ghandles.Draxes1; Exp(expN).Trace(traceN).Dexp(DexpN).DM(dm).Usrrvals={Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(dm).rvals};
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');
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
%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
%catch
%catchissue='Ln33 EZlstBoxCmpExt'
% 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 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 end
if zoneSel==2 %&& get(ghandles.rotPB2,'value') ~=1 Exp(expN).Trace(traceN).dmSel=inDM;
if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay2,'FontSize',8);end Exp(expN).Trace(traceN).DexpN=DexpN;
set(ghandles.OLay2,'string', Exp(zoneSel).hOLname(traceN)); Exp(expN).Trace(traceN).UsrGLB=selGnOrf;
if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp2,'FontSize',8);end elseif RFcmpGFlg==1
set(ghandles.OLexp2,'string',Exp(zoneSel).hOLexpNm(traceN)); 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 end
if zoneSel==3 %&& get(ghandles.rotPB3,'value') ~=1 Exp(expN).Trace(traceN).dmSel=inDM;
if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay3,'FontSize',8);end Exp(expN).Trace(traceN).DexpN=DexpN;
set(ghandles.OLay3,'string', Exp(OLay).hOLname(traceN)); Exp(expN).Trace(traceN).UsrGLB=selGnOrf;
if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp3,'FontSize',8);end end
set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(traceN));
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 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
end %if sgdInfoOnly==1 % 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)}
%***********************GraphicDestinationPerturbationComparison**15_0821************************************************ 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; lstBoxCmpFlg=1;
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')
%EZdatatip=2; %** EZmDayTrend
%************
EZmDayTrend %**
%************
end end
%***********************************************************************************************************************

View File

@@ -1,307 +1,277 @@
%EZlstBoxExt.m %EZlstBoxExt.m
%Calls either EZdestComp.m % Calls either EZdestComp.m
%or if 'Chrono' EZmDayPlotUCmp.m and EZmDayTrend.m and if ghandles.CompositeTog_,EZmDayPlotUcomposite % or if 'Chrono' EZmDayPlotUCmp.m and EZmDayTrend.m and if ghandles.CompositeTog_,EZmDayPlotUcomposite
%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
if zoneSel==2,DexpN= (get(handles.DN2,'value')); end if zoneSel==2,DexpN=(get(handles.DN2,'value')); end
if zoneSel==3,DexpN= (get(handles.DN3,'value')); end if zoneSel==3,DexpN=(get(handles.DN3,'value')); end
try try
p1=cell2mat(strfind(selGnOrf,'(')); p1=cell2mat(strfind(selGnOrf,'('));
p2= cell2mat(strfind(selGnOrf,')')); p2=cell2mat(strfind(selGnOrf,')'));
dmNum= str2num(selGnOrf{1}(p1+1:p2-1)); dmNum=str2num(selGnOrf{1}(p1+1:p2-1));
inDM= selGnOrf{1}(p1+1:p2-1); inDM=selGnOrf{1}(p1+1:p2-1);
if (~isempty(dmNum)&& isnumeric(dmNum)),RFDMflg=1; end 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
%*************** if zoneSel==1
else % Runs to end of EZlstBoxExt.m within this else condition Max=floor(get(handles.MPsldr1,'max'));
if zoneSel==1 Min=floor(get(handles.MPsldr1,'min'));
Max=floor(get(handles.MPsldr1,'max')); if str2num(inMP) >=Min && str2num(inMP) <=Max
Min=floor(get(handles.MPsldr1,'min')); set(handles.MPed1,'string',inMP)
if str2num(inMP) >= Min && str2num(inMP) <= Max set(handles.MPsldr1,'value',str2double(inMP));
set(handles.MPed1,'string',inMP) else
set(handles.MPsldr1,'value',str2double(inMP)); if str2num(inMP) >=Max, set(handles.MPsldr1,'value',Max); set(handles.MPed1,'string',num2str(Max));end
else if str2num(inMP) <=Min, set(handles.MPsldr1,'value',Min),set(handles.MPed1,'string',num2str(Min));end
if str2num(inMP) >= Max, set(handles.MPsldr1,'value',Max); set(handles.MPed1,'string',num2str(Max));end end
if str2num(inMP) <= Min, set(handles.MPsldr1,'value',Min),set(handles.MPed1,'string',num2str(Min));end end
end if zoneSel==2
end Max=floor(get(handles.MPsldr2,'max'));
if zoneSel==2 Min=floor(get(handles.MPsldr2,'min'));
Max=floor(get(handles.MPsldr2,'max')); if str2num(inMP) >=Min && str2num(inMP) <=Max
Min=floor(get(handles.MPsldr2,'min')); set(handles.MPed2,'string',inMP)
if str2num(inMP) >= Min && str2num(inMP) <= Max set(handles.MPsldr2,'value',str2double(inMP));
set(handles.MPed2,'string',inMP) else
set(handles.MPsldr2,'value',str2double(inMP)); if str2num(inMP) >=Max, set(handles.MPsldr2,'value',Max); set(handles.MPed2,'string',num2str(Max));end
else if str2num(inMP) <=Min, set(handles.MPsldr2,'value',Min),set(handles.MPed2,'string',num2str(Min));end
if str2num(inMP) >= Max, set(handles.MPsldr2,'value',Max); set(handles.MPed2,'string',num2str(Max));end end
if str2num(inMP) <= Min, set(handles.MPsldr2,'value',Min),set(handles.MPed2,'string',num2str(Min));end end
end if zoneSel==3
end Max=floor(get(handles.MPsldr3,'max'));
if zoneSel==3 Min=floor(get(handles.MPsldr3,'min'));
Max=floor(get(handles.MPsldr3,'max')); if str2num(inMP) >=Min && str2num(inMP) <=Max
Min=floor(get(handles.MPsldr3,'min')); set(handles.MPed3,'string',inMP)
if str2num(inMP) >= Min && str2num(inMP) <= Max set(handles.MPsldr3,'value',str2double(inMP));
set(handles.MPed3,'string',inMP) else
set(handles.MPsldr3,'value',str2double(inMP)); if str2num(inMP) >=Max, set(handles.MPsldr3,'value',Max); set(handles.MPed3,'string',num2str(Max));end
else if str2num(inMP) <=Min, set(handles.MPsldr3,'value',Min),set(handles.MPed3,'string',num2str(Min));end
if str2num(inMP) >= Max, set(handles.MPsldr3,'value',Max); set(handles.MPed3,'string',num2str(Max));end end
if str2num(inMP) <= Min, set(handles.MPsldr3,'value',Min),set(handles.MPed3,'string',num2str(Min));end end
end if RFDMflg
end if zoneSel==1
Max=floor(get(handles.DMsldr1,'max'));
Min=floor(get(handles.DMsldr1,'min'));
if str2num(inDM) >=Min && str2num(inDM) <=Max
set(handles.DMed1,'string',inDM)
set(handles.DMsldr1,'value',str2double(inDM));
else
if str2num(inDM) >=Max, set(handles.DMsldr1,'value',Max); set(handles.DMed1,'string',num2str(Max));end
if str2num(inDM) <=Min, set(handles.DMsldr1,'value',Min),set(handles.DMed1,'string',num2str(Min));end
end
end
if zoneSel==2
Max=floor(get(handles.DMsldr2,'max'));
Min=floor(get(handles.DMsldr2,'min'));
if str2num(inDM) >=Min && str2num(inDM) <=Max
set(handles.DMed2,'string',inDM)
set(handles.DMsldr2,'value',str2double(inDM));
else
if str2num(inDM) >=Max, set(handles.DMsldr2,'value',Max); set(handles.DMed2,'string',num2str(Max));end
if str2num(inDM) <=Min, set(handles.DMsldr2,'value',Min),set(handles.DMed2,'string',num2str(Min));end
end
end
if zoneSel==3
Max=floor(get(handles.DMsldr3,'max'));
Min=floor(get(handles.DMsldr3,'min'));
if str2num(inDM) >=Min && str2num(inDM) <=Max
set(handles.DMed3,'string',inDM)
set(handles.DMsldr3,'value',str2double(inDM));
else
if str2num(inDM) >=Max, set(handles.DMsldr3,'value',Max); set(handles.DMed3,'string',num2str(Max));end
if str2num(inDM) <=Min, set(handles.DMsldr3,'value',Min),set(handles.DMed3,'string',num2str(Min));end
end
end
end
if RFDMflg, EZVimDisplay
if zoneSel==1
Max=floor(get(handles.DMsldr1,'max'));
Min=floor(get(handles.DMsldr1,'min'));
if str2num(inDM) >= Min && str2num(inDM) <= Max
set(handles.DMed1,'string',inDM)
set(handles.DMsldr1,'value',str2double(inDM));
else
if str2num(inDM) >= Max, set(handles.DMsldr1,'value',Max); set(handles.DMed1,'string',num2str(Max));end
if str2num(inDM) <= Min, set(handles.DMsldr1,'value',Min),set(handles.DMed1,'string',num2str(Min));end
end
end
if zoneSel==2
Max=floor(get(handles.DMsldr2,'max'));
Min=floor(get(handles.DMsldr2,'min'));
if str2num(inDM) >= Min && str2num(inDM) <= Max
set(handles.DMed2,'string',inDM)
set(handles.DMsldr2,'value',str2double(inDM));
else
if str2num(inDM) >= Max, set(handles.DMsldr2,'value',Max); set(handles.DMed2,'string',num2str(Max));end
if str2num(inDM) <= Min, set(handles.DMsldr2,'value',Min),set(handles.DMed2,'string',num2str(Min));end
end
end
if zoneSel==3
Max=floor(get(handles.DMsldr3,'max'));
Min=floor(get(handles.DMsldr3,'min'));
if str2num(inDM) >= Min && str2num(inDM) <= Max
set(handles.DMed3,'string',inDM)
set(handles.DMsldr3,'value',str2double(inDM));
else
if str2num(inDM) >= Max, set(handles.DMsldr3,'value',Max); set(handles.DMed3,'string',num2str(Max));end
if str2num(inDM) <= Min, set(handles.DMsldr3,'value',Min),set(handles.DMed3,'string',num2str(Min));end
end
end
end
%**************************************************************************
EZVimDisplay %**
%**************************************************************************
%17_111 If CompositeTog_ set, Routine called to find all gene replicates and produce composite values
if CompositeTrendFlg==1
if strcmp(Exp(expN).DexpType, 'chrono')
%***********************
EZmDayPlotUcmp %*
%***********************
else
%***********************
EZplotUcmp %*
%***********************
end
%******************************************************************* % 17_111 If CompositeTog_ set, Routine called to find all gene replicates and produce composite values
%***********PLOT Selected Gene/Orf Spot ****************************************** if CompositeTrendFlg==1
% if non-Composite ("normal") then - ... if strcmp(Exp(expN).DexpType, 'chrono')
elseif CompositeTrendFlg~=1 EZmDayPlotUcmp
destPerMP= Exp(zoneSel).Dexp(DexpN).destPerMP; %length(gS.DM1.drug); else
pertSel=Exp(zoneSel).Dexp(DexpN).pertSel; %floor(get(handles.DMsldr1,'value')); EZplotUcmp
plateNum=(LBmp-1)*destPerMP + pertSel; end
indx=((LBr-1)*24) +LBc % Plot Selected Gene/Orf Spot
MP=Exp(zoneSel).Dexp(DexpN).MP; % if non-Composite ("normal") then - ...
elseif CompositeTrendFlg~=1
try destPerMP=Exp(zoneSel).Dexp(DexpN).destPerMP; %length(gS.DM1.drug);
K=scan(1,plateNum).plate(1).CFout(indx,3); Ks= num2str(K); pertSel=Exp(zoneSel).Dexp(DexpN).pertSel; %floor(get(handles.DMsldr1,'value'));
r=scan(1,plateNum).plate(1).CFout(indx,4); rs= num2str(r); plateNum=(LBmp-1)*destPerMP + pertSel;
l=scan(1,plateNum).plate(1).CFout(indx,5); Ls= num2str(l); indx=((LBr-1)*24) +LBc
try Kstr=Ks(1:5); catch, Kstr=Ks(1:length(Ks)); end MP=Exp(zoneSel).Dexp(DexpN).MP;
try rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end try
try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end K=scan(1,plateNum).plate(1).CFout(indx,3); Ks=num2str(K);
r=scan(1,plateNum).plate(1).CFout(indx,4); rs=num2str(r);
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 rstr=rs(1:5); catch, rstr=rs(1:length(rs)); end
try Lstr=Ls(1:5); catch, Lstr=Ls(1:length(Ls)); end
Kl=scan(1,plateNum).plate(1).CFout(indx,7);
Ku=scan(1,plateNum).plate(1).CFout(indx,8);
rl=scan(1,plateNum).plate(1).CFout(indx,9);
ru=scan(1,plateNum).plate(1).CFout(indx,10);
lfast=scan(1,plateNum).plate(1).CFout(indx,11);
lslow=scan(1,plateNum).plate(1).CFout(indx,12);
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;
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
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*');
catch
catchissue='Ln100 EZlstBoxExt'
end
Kl=scan(1,plateNum).plate(1).CFout(indx,7); % Get the DM agar description
Ku=scan(1,plateNum).plate(1).CFout(indx,8); if expN==1,DMstr=char(get(handles.DM1,'string'));end
rl=scan(1,plateNum).plate(1).CFout(indx,9); if expN==2,DMstr=char(get(handles.DM2,'string'));end
ru=scan(1,plateNum).plate(1).CFout(indx,10); if expN==3,DMstr=char(get(handles.DM3,'string'));end
lfast=scan(1,plateNum).plate(1).CFout(indx,11);
lslow=scan(1,plateNum).plate(1).CFout(indx,12);
t=1:200; if isequal(selGnOrf{1}(1:3),'RF1')
clear g; gene={selGnOrf{1}(1:p2)};
geneOrfstr=strcat(gene,'_','m',num2str(LBmp),'r',num2str(LBr),'c',num2str(LBc),'_',tPtStr);
grfgenestr=strcat(gene,'_','m',num2str(LBmp),'r',num2str(LBr),'c',num2str(LBc));
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);
try xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
g= K ./ (1 + exp(-r.* (t - l ))); if ispc,
gSlow= Kl ./ (1 + exp(-rl.* (t - lslow ))); slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\');
gFast= Ku ./ (1 + exp(-ru.* (t - lfast ))); else
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'/');
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');
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
%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).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
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*');
catch
catchissue='Ln100 EZlstBoxExt'
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')
gene= {selGnOrf{1}(1:p2)};
geneOrfstr= strcat(gene,'_','m',num2str(LBmp),'r',num2str(LBr),'c',num2str(LBc),'_',tPtStr);
grfgenestr= strcat(gene,'_','m',num2str(LBmp),'r',num2str(LBr),'c',num2str(LBc));
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; startPos=slashPos(length(slashPos)-1) +1;
endPos=slashPos(length(slashPos)) -1 endPos=slashPos(length(slashPos)) -1
expStr= {xp(startPos:endPos)} expStr={xp(startPos:endPos)}
Exp(zoneSel).hOLname(traceN)= spotDescrip; %graphStr; %ghandles.Exp(zoneSel).hOLname(traceN)= graphStr; 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).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
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 %if get(ghandles.CompositeTog1,'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
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
end
%*****************Highlight gene/orf select Spot on Image********* % Write Spot and Exp Info to OLay title areas
tPtSel=Exp(zoneSel).Dexp(DexpN).tPtSel; if zoneSel==1 %&& get(ghandles.rotPB1,'value')~=1
Rim= 16-(LBr-1); Cim =LBc; if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay1,'FontSize',8);end
spotCoor=Exp(zoneSel).Dexp(DexpN).FexpScanSpots{1,plateNum}{Cim,Rim,tPtSel}; set(ghandles.OLay1,'string', Exp(zoneSel).hOLname(traceN));
if zoneSel==1, expAxes=ghandles.Iaxes1;end if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp1,'FontSize',8);end
if zoneSel==2, expAxes=ghandles.Iaxes2;end set(ghandles.OLexp1,'string',Exp(zoneSel).hOLexpNm(traceN));
if zoneSel==3, expAxes=ghandles.Iaxes3;end end
%axes(ghandles.Iaxes1) if zoneSel==2 %&& get(ghandles.rotPB2,'value') ~=1
plot(expAxes,(spotCoor(2)+24),(spotCoor(1)+24),'.y') 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
%***********************GraphicDestinationPerturbationComparison**15_0821************************************************ set(ghandles.OLexp2,'string',Exp(zoneSel).hOLexpNm(traceN));
EZdatatip=0; %** end
if strcmp((Exp(expN).DexpType),'single')||... if zoneSel==3 %&& get(ghandles.rotPB3,'value') ~=1
strcmp((Exp(expN).DexpType),'multi') if length(char(Exp(zoneSel).hOLname(traceN)))>40,set(ghandles.OLay3,'FontSize',8);end
%**************** set(ghandles.OLay3,'string', Exp(OLay).hOLname(traceN));
EZdestComp %** if length(char(Exp(zoneSel).hOLexpNm(traceN)))>40,set(ghandles.OLexp3,'FontSize',8);end
%**************** set(ghandles.OLexp3,'string',Exp(OLay).hOLexpNm(traceN));
elseif strcmp((Exp(expN).DexpType),'chrono') end
%************
EZmDayTrend %** % Highlight gene/orf select Spot on Image
%************ tPtSel=Exp(zoneSel).Dexp(DexpN).tPtSel;
end Rim=16-(LBr-1); Cim =LBc;
%*********************************************************************************************************************** spotCoor=Exp(zoneSel).Dexp(DexpN).FexpScanSpots{1,plateNum}{Cim,Rim,tPtSel};
%*********************HeatMap Text Field********************************* if zoneSel==1, expAxes=ghandles.Iaxes1;end
try if zoneSel==2, expAxes=ghandles.Iaxes2;end
ll=num2str(l); if zoneSel==3, expAxes=ghandles.Iaxes3;end
if length(ll)>5,htl= ll(1:5);else htl=ll;end %axes(ghandles.Iaxes1)
catch plot(expAxes,(spotCoor(2)+24),(spotCoor(1)+24),'.y')
% GraphicDestinationPerturbationComparison**15_0821
EZdatatip=0; %**
if strcmp((Exp(expN).DexpType),'single') ...
|| strcmp((Exp(expN).DexpType),'multi')
EZdestComp
elseif strcmp((Exp(expN).DexpType),'chrono')
EZmDayTrend
end
% HeatMap Text Field
try
ll=num2str(l);
if length(ll)>5,htl=ll(1:5);else htl=ll;end
catch
htl=' '; htl=' ';
end end
try try
n1= num2str(Exp(expN).Dexp(DexpN).HtMpIntN1(indx)); n1=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
htN1=strcat('_N1=',N1); htN1=strcat('_N1=',N1);
catch, catch,
htN1=' '; htN1=' ';
end end
try try
htmapStr=strcat('L= ',htl, htN1) htmapStr=strcat('L=',htl, htN1)
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
catch catch
end end
end
end %if sgdInfoOnly==1

View File

@@ -1,292 +1,251 @@
%***********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)
if strcmpi(selStrNm(1:3),'RF-') if strcmpi(selStrNm(1:3),'RF-')
usrGene= selStrNm(4:(patrndash(2)-1)); usrGene=selStrNm(4:(patrndash(2)-1));
else 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')
if strcmpi(usrSpec,'None'), usrGnSp= {strcat(usrGene,'-')}; 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});
else else
trimUspec= usrSpec; trimUspec=usrSpec;
usrGnSp= strcat(usrGene,',',{trimUspec}); usrGnSp=strcat(usrGene,',',{trimUspec});
end
for n=1:Exp(expN).DexpLength %LOOP Thru DayExps
MPnum=length(Exp(expN).Dexp(n).MP);
DMnum= length(Exp(expN).Dexp(n).DM.drug);
%Extract expDay from ExpName string
dayNpos= max(strfind(Exp(expN).Dexp(n).ExpFoldr, '_D'))
dayLbl= Exp(expN).Dexp(n).ExpFoldr(dayNpos+1:end);
%*********************************
dRF1indx=0;
usrSp= usrSpec; %user entry of Specifics for Ref selection
%*******************************************************
for mp=1:length(Exp(expN).Dexp(n).MP)
for ind384=1:384
try %
%Insert test for numeric in genename and orf if isnumeric
%Correct common EXCEL problem of converting OCT1 into a date numeric
if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991,
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={'OCT1_'};
elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '};
end
%*****************************************************************
%DISPersed REFerence capture and find Medians
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).genename{1}(ind384)),usrGene) && ...
strcmpi(usrSp,'None'))) ),
dRF1indx=dRF1indx+1;
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,2)={mp}; drfMP(dRF1indx,mp)= mp;
drf(dRF1indx,3)={ind384}; drfPindx(dRF1indx,mp)= 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'))...
%*******************************************************************************
catch
msgBadGeneName= strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end
end %end associated with for ind384=1:384
mp
end %end associated with for mp=1:length(Exp(expN).Dexp(n).MP)
%*****************************************************
%************************************************************************************************
vvL=[]; %Initialize to cover case where all spot are Zero NoGrowth See NIGrowthflg==0
if exist('drf','var')
%Det. index of change from one MP to the next
i=2;
clear chgIndx
chgIndx(1)=1;
for j=1:length(drf(:,3))
if j>1
if cell2mat(drf(j,2))~= cell2mat(drf((j-1),2)), chgIndx(i)=j; i=i+1; end
end
end end
chgIndx(length(chgIndx)+1)= size(drf,1) +1; %length(drf)+1;
vvL= zeros(size(drf,1),1 ); %length(drf)+1; for n=1:Exp(expN).DexpLength % LOOP Thru DayExps
%************************************
dMPs= unique(cell2mat(drf(:,2)));
%*****************************************
for mm=1:length(dMPs) % length(chgIndx)
usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel);
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);
%For Global Ref Composite 17_1009 %**************************************************************************
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);
%*****************************************************************************************************
end %for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES****************************************************************** MPnum=length(Exp(expN).Dexp(n).MP);
DMnum=length(Exp(expN).Dexp(n).DM.drug);
%Extract expDay from ExpName string
dayNpos=max(strfind(Exp(expN).Dexp(n).ExpFoldr, '_D'))
dayLbl=Exp(expN).Dexp(n).ExpFoldr(dayNpos+1:end);
dRF1indx=0;
usrSp=usrSpec; %user entry of Specifics for Ref selection
for d=dmSel:dmSel for mp=1:length(Exp(expN).Dexp(n).MP)
NZusrIndxG=[]; for ind384=1:384
NZusrIndxG= find(vvL); try
% Insert test for numeric in genename and orf if isnumeric
if isempty(nonzeros(vvL)), nonZeroCntD=0; % Correct common EXCEL problem of converting OCT1 into a date numeric
else nonZeroCntD= length(nonzeros(vvL)); if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991,
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={'OCT1_'};
elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '};
end
% DISPersed REFerence capture and find Medians
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).genename{1}(ind384)),usrGene) ...
&& strcmpi(usrSp,'None'))) )
dRF1indx=dRF1indx+1;
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,2)={mp}; drfMP(dRF1indx,mp)=mp;
drf(dRF1indx,3)={ind384}; drfPindx(dRF1indx,mp)=ind384;
%drf(dRF1indx,7)=(Exp(expN).Dexp(n).MP(mp).specifics{1}(ind384));
end
catch
msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end
end % end associated with for ind384=1:384
mp
end end
%Calc. of median value for composite doesn't require and odd number of Indx items
NZusrIndxG= NZusrIndxG(:);
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); vvL=[]; %Initialize to cover case where all spot are Zero NoGrowth See NIGrowthflg==0
UsrKvals{n}= vvK(NZusrIndxG); if exist('drf','var')
Usrrvals{n}= vvr(NZusrIndxG); % Det. index of change from one MP to the next
end i=2;
end clear chgIndx
chgIndx(1)=1;
for j=1:length(drf(:,3))
if j>1
if cell2mat(drf(j,2))~=cell2mat(drf((j-1),2)), chgIndx(i)=j; i=i+1; end
end
end
chgIndx(length(chgIndx)+1)=size(drf,1) +1; %length(drf)+1;
vvL=zeros(size(drf,1),1 ); %length(drf)+1;
dMPs=unique(cell2mat(drf(:,2)));
for mm=1:length(dMPs) % length(chgIndx)
usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel);
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);
% For Global Ref Composite 17_1009
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);
end
end % if exist('drf','var') % Calc. Global Mean, Std, And Median For Distributed References
for d=dmSel:dmSel
NZusrIndxG=[];
NZusrIndxG=find(vvL);
if isempty(nonzeros(vvL))
nonZeroCntD=0;
else
nonZeroCntD=length(nonzeros(vvL));
end
% Calc. of median value for composite doesn't require and odd number of Indx items
NZusrIndxG=NZusrIndxG(:);
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);
UsrKvals{n}=vvK(NZusrIndxG);
Usrrvals{n}=vvr(NZusrIndxG);
end
end
end
end
%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;
end end
NoGrowthflg=0; NoGrowthflg=0;
if isempty(vvL), if isempty(vvL),
warndlg('No Growth condition found for Gene-Specifics combination. . ','No Growth warning'); warndlg('No Growth condition found for Gene-Specifics combination. . ','No Growth warning');
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);
r= median(cell2mat((Usrrvals(DexpN)))); rs= num2str(r); rstd= std(cell2mat((Usrrvals(DexpN)))); rstdStr= num2str(rstd); r=median(cell2mat((Usrrvals(DexpN)))); rs=num2str(r); rstd=std(cell2mat((Usrrvals(DexpN)))); rstdStr=num2str(rstd);
l= median(cell2mat((UsrLvals(DexpN)))); Ls= num2str(l); Lstd= std(cell2mat((UsrLvals(DexpN)))); LstdStr= num2str(Lstd); l=median(cell2mat((UsrLvals(DexpN)))); Ls=num2str(l); Lstd=std(cell2mat((UsrLvals(DexpN)))); LstdStr=num2str(Lstd);
Kl= K - Kstd; %std(UsrKvals(DexpN)); Kl=K - Kstd; %std(UsrKvals(DexpN));
Ku= K + Kstd; %std(UsrKvals(DexpN)); Ku=K + Kstd; %std(UsrKvals(DexpN));
rl= r - rstd; %std(Usrrvals(DexpN)); rl=r - rstd; %std(Usrrvals(DexpN));
ru= r + rstd; %std(UsrKvals(DexpN)); ru=r + rstd; %std(UsrKvals(DexpN));
lfast= l - Lstd; lfast=l - Lstd;
lslow= l + Lstd; lslow=l + Lstd;
elseif NoGrowth==1 %if all data is zero (NoGrowth) elseif NoGrowth==1 %if all data is zero (NoGrowth)
smpSz= size(NZusrIndxG,1); smpSz=size(NZusrIndxG,1);
K= 0; Ks= num2str(K); Kstd= 0; KstdStr= num2str(0); K=0; Ks=num2str(K); Kstd=0; KstdStr=num2str(0);
r= 0; rs= num2str(r); rstd= 0; rstdStr= num2str(0); r=0; rs=num2str(r); rstd=0; rstdStr=num2str(0);
l= 0; Ls= num2str(l); Lstd= 0; LstdStr= num2str(0); l=0; Ls=num2str(l); Lstd=0; LstdStr=num2str(0);
Kl= K - Kstd; Kl=K - Kstd;
Ku= K + Kstd; Ku=K + Kstd;
rl= r - rstd; rl=r - rstd;
ru= r + rstd; ru=r + rstd;
lfast= l - Lstd; lfast=l - Lstd;
lslow= l + Lstd; lslow=l + Lstd;
end end
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
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;
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
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,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off');
Exp(expN).Trace(traceN).UsrGLB=usrGnSp;
Exp(expN).Trace(traceN).dmSel=dmSel;
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).UsrKvals=UsrKvals(n);
Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).Usrrvals=Usrrvals(n);
end
t=1:200; % Store L R and K valves for manual selected Composite [C] plots
clear g; 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;
try try for i=1:length(Exp(zoneSel).hOL(:)),set(Exp(zoneSel).hOL(i),'color',[0 0 1]); end, catch; end
g= K ./ (1 + exp(-r.* (t - l ))); Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
gSlow= Kl ./ (1 + exp(-rl.* (t - lslow ))); set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
gFast= Ku ./ (1 + exp(-ru.* (t - lfast ))); catch
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;
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,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off');
Exp(expN).Trace(traceN).UsrGLB= usrGnSp;
Exp(expN).Trace(traceN).dmSel= dmSel;
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).UsrKvals= UsrKvals(n);
Exp(expN).Trace(traceN).Dexp(n).DM(dmSel).Usrrvals= Usrrvals(n);
end
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
%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).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
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
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);
geneOrfstr=strcat(gene,'_',orf,'_');
grfgenestr=strcat(gene,'_',orf,'_');
graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr);
spotDescrip=strcat(graphStr,'->',DMstr);
xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
if ispc,
gene= usrGnSp; orf= '' %MP(1,LBmp).orf{1,1}(indx);
geneOrfstr= strcat(gene,'_',orf,'_');
grfgenestr= strcat(gene,'_',orf,'_');
graphStr= strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr);
spotDescrip=strcat(graphStr,'->',DMstr);
xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
if ispc,
slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\'); slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\');
else else
slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'/'); slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'/');
end end
startPos=slashPos(length(slashPos)-1) +1; startPos=slashPos(length(slashPos)-1) +1;
endPos=slashPos(length(slashPos)) -1; endPos=slashPos(length(slashPos)) -1;
expStr= {xp(startPos:endPos)}; expStr={xp(startPos:endPos)};
Exp(zoneSel).hOLname(traceN)= spotDescrip; Exp(zoneSel).hOLname(traceN)=spotDescrip;
Exp(zoneSel).hOLexpNm(traceN)= expStr; 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==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end
if zoneSel==1,set(ghandles.GeneOrfLoc1,'string',geneOrfstr);end % Displays the value. if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end
if zoneSel==2,set(ghandles.GeneOrfLoc2,'string',geneOrfstr);end if zoneSel==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end %graphStr);end % Displays the value.
if zoneSel==3,set(ghandles.GeneOrfLoc3,'string',geneOrfstr);end if zoneSel==2,set(ghandles.graphStrLoc2,'string',spotDescrip);end %graphStr);end
if zoneSel==1,set(ghandles.graphStrLoc1,'string',spotDescrip);end %graphStr);end % Displays the value. if zoneSel==3,set(ghandles.graphStrLoc3,'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
catch catch
catchissue='Ln141 EZlstBoxExt' msg='Error'
msg='Error' end
end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot)

View File

@@ -1,377 +1,290 @@
%***********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 '}
dlg_title='User Specifics Term for Refinement Composite';
prompt={'Enter Specifics Term if used to futher specify selection '} num_lines=1;
dlg_title='User Specifics Term for Refinement Composite'; def={'None'};
num_lines=1; answer=inputdlg(prompt,dlg_title,num_lines,def);
def={'None'}; % usrGene=cell2mat(answer(1));
answer=inputdlg(prompt,dlg_title,num_lines,def); usrSpec=answer(1);
%usrGene= cell2mat(answer(1)); usrGnSp=strcat(usrGene,usrSpec);
usrSpec= answer(1); if strcmpi(usrSpec,'None'), usrGnSp={strcat(usrGene,'-')}; end
usrGnSp= strcat(usrGene,usrSpec);
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).UsrminG=[];
Exp(expN).Dexp(n).UsrMedianG= []; Exp(expN).Dexp(n).UsrmaxG=[];
Exp(expN).Dexp(n).UsrminG= []; Exp(expN).Dexp(n).UsrstdG=[];
Exp(expN).Dexp(n).UsrmaxG= []; Exp(expN).Dexp(n).UsrmeanG=[];
Exp(expN).Dexp(n).UsrstdG= []; Exp(expN).Dexp(n).UsrCmpGL=[]; % For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrmeanG= []; Exp(expN).Dexp(n).UsrCmpGK=[]; % For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGL= []; %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGr=[]; % For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGK= []; %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrGLB={};
Exp(expN).Dexp(n).UsrCmpGr= []; %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrGLB= {}; for n=1:Exp(expN).DexpLength % Loop Thru Dayexps
MPnum=length(Exp(expN).Dexp(n).MP);
for n=1:Exp(expN).DexpLength %LOOP Thru DayExps DMnum=length(Exp(expN).Dexp(n).DM.drug);
tPtsSize=size(Exp(expN).Dexp(n).FexpScanBMtp{1,1},(3));
% lstindx=size(aa,1);
% lstindxOrf=size(bb,1);
spN=0;
rfcnt=0;
dRF1indx=0;
% usrGene=cell2mat(usrGene); %user entry of Specifics for Ref selection
usrSp=cell2mat(usrSpec); %user entry of Specifics for Ref selection
MPnum=length(Exp(expN).Dexp(n).MP); for mp=1:length(Exp(expN).Dexp(n).MP)
DMnum= length(Exp(expN).Dexp(n).DM.drug); % RF1fullPlate=0;
tPtsSize= size(Exp(expN).Dexp(n).FexpScanBMtp{1,1},(3)); for ind384=1:384
%*********************************
%lstindx= size(aa,1);
%lstindxOrf= size(bb,1);
spN=0;
rfcnt=0;
dRF1indx=0;
%usrGene= cell2mat(usrGene); %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)
%RF1fullPlate=0;
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
% Correct common EXCEL problem of converting OCT1 into a date numeric
%Insert test for numeric in genename and orf if isnumeric if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991
%Correct common EXCEL problem of converting OCT1 into a date numeric Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={'OCT1_'};
if cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))==38991, elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={'OCT1_'}; Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '};
elseif isnumeric(cell2mat(Exp(expN).Dexp(n).MP(mp).genename{1}(ind384))) end
Exp(expN).Dexp(n).MP(mp).genename{1}(ind384)={' '};
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)={strcat(':',num2str(mp),':',num2str(r),':',num2str(c))};
drf(dRF1indx,2)= {strcat(':',num2str(mp),':',num2str(r),':',num2str(c))}; drf(dRF1indx,3)={mp}; drfMP(dRF1indx,mp)=mp;
drf(dRF1indx,3)={mp}; drfMP(dRF1indx,mp)= 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; %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)
%*****************************************************
%************************************************************************************************
%Exp(expN).Dexp(n).UsrmdPindx=[];
%Exp(expN).Dexp(n).UsrmdPpltN=[];
if exist('drf','var')
%Det. index of change from one MP to the next
i=2;
clear chgIndx
chgIndx(1)=1;
for j=1:length(drf(:,3))
if j>1
if cell2mat(drf(j,3))~= cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end
end
chgIndx(length(chgIndx)+1)= length(drf)+1;
uu=zeros(size(drf,1),4);
uu(:,1:4)= cell2mat(drf(:,3:6));
vv= zeros(length(drf),1 ); %DMnum);
%************************************
dMPs= unique(cell2mat(drf(:,3)));
%*****************************************
for mm=1:length(dMPs) % length(chgIndx)
usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel);
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);
%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);
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)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES******************************************************************
uu= horzcat(uu,vv);
for d=dmSel:dmSel
medianIndxG=[];
NZusrIndxG=[];
minG=min(nonzeros(vv(:,d)));
maxG=max(nonzeros(vv(:,d)));
usrmeanG= mean(nonzeros(vv(:,d)));
usrStdG= std(nonzeros(vv(:,d)));
NZusrIndxG= find(vv(:,d));
if isempty(usrmeanG), nonZeroCntD=0, %medianIndxDisp= RFmeanG(d);
else nonZeroCntD= length(nonzeros(vv(:,d)));
end end
%Calc. of median value for composite doesn't require and odd number of Indx items
medianIndxG= NZusrIndxG(:);
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).UsrmdPindx=[];
Exp(expN).Dexp(n).UsrLvals= vv(medianIndxG); % Exp(expN).Dexp(n).UsrmdPpltN=[];
Exp(expN).Dexp(n).UsrKvals= vvK(medianIndxG); if exist('drf','var')
Exp(expN).Dexp(n).Usrrvals= vvr(medianIndxG); % Det. index of change from one MP to the next
end i=2;
end clear chgIndx
chgIndx(1)=1;
for j=1:length(drf(:,3))
if j>1
if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end
end
chgIndx(length(chgIndx)+1)=length(drf)+1;
uu=zeros(size(drf,1),4);
uu(:,1:4)=cell2mat(drf(:,3:6));
vv=zeros(length(drf),1 ); % DMnum);
dMPs=unique(cell2mat(drf(:,3)));
end % if exist('drf','var') for mm=1:length(dMPs) % length(chgIndx)
%END OF DISPERSE REFERENCE PLATAES CALCULATIONS AND LIST ADDITIONS usrScNdisp=((dMPs(mm)-1)*DMnum)+(dmSel);
%********************************************************************* 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);
end %for n=1:Exp(expN).DexpLength %Loop thru Dayexps % For Global Ref Composite 17_1009
Exp(expN).UgeneCnt= Exp(expN).UgeneCnt +1; vvK(chgIndx(mm):(chgIndx(mm+1)-1),dmSel)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3);
Exp(expN).UgeneSpLst(Exp(expN).UgeneCnt)= usrGnSp; 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)
% Calc. Global Mean, Std, And Median For Distributed References
uu=horzcat(uu,vv);
for d=dmSel:dmSel
medianIndxG=[];
NZusrIndxG=[];
minG=min(nonzeros(vv(:,d)));
maxG=max(nonzeros(vv(:,d)));
usrmeanG=mean(nonzeros(vv(:,d)));
usrStdG=std(nonzeros(vv(:,d)));
NZusrIndxG=find(vv(:,d));
if isempty(usrmeanG)
nonZeroCntD=0 % medianIndxDisp=RFmeanG(d);
else
nonZeroCntD=length(nonzeros(vv(:,d)));
end
% Calc. of median value for composite doesn't require and odd number of Indx items
medianIndxG=NZusrIndxG(:);
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).UsrLvals=vv(medianIndxG);
Exp(expN).Dexp(n).UsrKvals=vvK(medianIndxG);
Exp(expN).Dexp(n).Usrrvals=vvr(medianIndxG);
end
end
end
end
Exp(expN).UgeneCnt=Exp(expN).UgeneCnt +1;
Exp(expN).UgeneSpLst(Exp(expN).UgeneCnt)=usrGnSp;
%***********PLOT Values Selected Gene-Specifics Composite ******************************************try % PLOT Values Selected Gene-Specifics Composite
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);
l= median(vv(medianIndxG,dmSel)); Ls= num2str(l); Lstd= std(vv(medianIndxG,dmSel)); LstdStr= num2str(Lstd); l=median(vv(medianIndxG,dmSel)); Ls=num2str(l); Lstd=std(vv(medianIndxG,dmSel)); LstdStr=num2str(Lstd);
Kl= K - std(vvK(medianIndxG,dmSel)); %K - Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std; Kl=K - std(vvK(medianIndxG,dmSel)); %K - Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
Ku= K + std(vvK(medianIndxG,dmSel)); %K + Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std; Ku=K + std(vvK(medianIndxG,dmSel)); %K + Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
rl= r - std(vvr(medianIndxG,dmSel)); %r - Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std; rl=r - std(vvr(medianIndxG,dmSel)); %r - Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
ru= r + std(vvr(medianIndxG,dmSel)); %r + Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std; ru=r + std(vvr(medianIndxG,dmSel)); %r + Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
lfast= l - std(vv(medianIndxG,dmSel)); %l - Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; lfast=l - std(vv(medianIndxG,dmSel)); %l - Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
lslow= l + std(vv(medianIndxG,dmSel)); %l + Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; lslow=l + std(vv(medianIndxG,dmSel)); %l + Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
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
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;
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
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,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;
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
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
catch
catchissue='Ln100 EZlstBoxExt'
end
t=1:200; % Get the DM agar description
clear g; 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
gene=usrGnSp; orf='' % MP(1,LBmp).orf{1,1}(indx);
geneOrfstr=strcat(gene,'_',orf,'_');
grfgenestr=strcat(gene,'_',orf,'_');
try % spec=MP(1,LBmp).specifics{1,1}(indx); %orfrep=MP(1,plateNum).orfRep{1,1}(indx);
g= K ./ (1 + exp(-r.* (t - l ))); % tPtStr=strcat('T=', num2str(scan(1,plateNum).plate(1).t0Series(tPtSel)));
gSlow= Kl ./ (1 + exp(-rl.* (t - lslow ))); % graphStr=strcat(grfgenestr,'_','L=',Lstr,'_','r=',rstr,'_','K=',Kstr);
gFast= Ku ./ (1 + exp(-ru.* (t - lfast ))); graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr);
if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end spotDescrip=strcat(graphStr,'->',DMstr);
xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
if zoneSel==1, plotAxes=ghandles.Paxes1; OLaxes=ghandles.OLaxes1; if ispc,
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,t,gSlow,'y');plot(plotAxes,t,gFast,'r');hold (plotAxes,'off');
%************CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC**************************************
%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).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
Exp(zoneSel).hOL(traceN)=plot(OLaxes,t,g);hold on;
set(Exp(zoneSel).hOL(traceN),'color',[1 0 0])
catch
catchissue='Ln100 EZlstBoxExt'
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
gene= usrGnSp; orf= '' %MP(1,LBmp).orf{1,1}(indx);
geneOrfstr= strcat(gene,'_',orf,'_');
grfgenestr= strcat(gene,'_',orf,'_');
%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);
graphStr= strcat(usrGnSp,'_','L=',Lstr,'_','Ls=',LstdStr,'_','r=',rstr,'_','rs=',rstdStr,'_','K=',Kstr,'Ks=',KstdStr);
spotDescrip=strcat(graphStr,'->',DMstr);
xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
if ispc,
slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\'); slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'\');
else else
slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'/'); slashPos=strfind(char(Exp(zoneSel).Dexp(DexpN).resDir),'/');
end end
startPos=slashPos(length(slashPos)-1) +1; startPos=slashPos(length(slashPos)-1) +1;
endPos=slashPos(length(slashPos)) -1 endPos=slashPos(length(slashPos)) -1
expStr= {xp(startPos:endPos)} expStr={xp(startPos:endPos)}
Exp(zoneSel).hOLname(traceN)= spotDescrip; %graphStr; %ghandles.Exp(zoneSel).hOLname(traceN)= graphStr; 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).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 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
if ~isempty(NZusrIndxG) && mod(nonZeroCntD,2)==0, medianIndxOdd= NZusrIndxG(1:(size(NZusrIndxG,1)-1)); end if ~isempty(NZusrIndxG) && mod(nonZeroCntD,2)==0, medianIndxOdd= NZusrIndxG(1:(size(NZusrIndxG,1)-1)); end
if ~isempty(NZusrIndxG) && mod(nonZeroCntD,2)~=0, medianIndxOdd= NZusrIndxG(:); end if ~isempty(NZusrIndxG) && mod(nonZeroCntD,2)~=0, medianIndxOdd=NZusrIndxG(:); end
mvalsDG= median(vv(medianIndxOdd,d)); %(nonzeros(vv(:,d))); mvalsDG=median(vv(medianIndxOdd,d)); %(nonzeros(vv(:,d)));
nzPosIndxDG=find(mvalsDG==vv(:,d)); nzPosIndxDG=find(mvalsDG==vv(:,d));
Exp(expN).Dexp(n).UsrMedianG(d)= mvalsDG; Exp(expN).Dexp(n).UsrMedianG(d)=mvalsDG;
Exp(expN).Dexp(n).UsrminG(d)= minG; Exp(expN).Dexp(n).UsrminG(d)=minG;
Exp(expN).Dexp(n).UsrmaxG(d)= maxG; Exp(expN).Dexp(n).UsrmaxG(d)=maxG;
Exp(expN).Dexp(n).UsrstdG(d)= usrStdG; Exp(expN).Dexp(n).UsrstdG(d)=usrStdG;
Exp(expN).Dexp(n).UsrmeanG(d)= usrmeanG; Exp(expN).Dexp(n).UsrmeanG(d)=usrmeanG;
%} %}
%{ %{
Exp(expN).Dexp(n).UsrCmpGL.dm(d).med= median(vv(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGL.dm(d).med=median(vv(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGL.dm(d).mean= mean(vv(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGL.dm(d).mean=mean(vv(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGL.dm(d).std= std(vv(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGL.dm(d).std=std(vv(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGL.dm(d).min= min(vv(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGL.dm(d).min=min(vv(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGL.dm(d).max= max(vv(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGL.dm(d).max=max(vv(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGK.dm(d).med= median(vvK(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGK.dm(d).med=median(vvK(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGK.dm(d).mean= mean(vvK(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGK.dm(d).mean=mean(vvK(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGK.dm(d).std= std(vvK(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGK.dm(d).std=std(vvK(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGK.dm(d).min= min(vvK(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGK.dm(d).min=min(vvK(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGK.dm(d).max= max(vvK(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGK.dm(d).max=max(vvK(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGr.dm(d).med= median(vvr(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGr.dm(d).med=median(vvr(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGr.dm(d).mean= mean(vvr(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGr.dm(d).mean=mean(vvr(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGr.dm(d).std= std(vvr(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGr.dm(d).std=std(vvr(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGr.dm(d).min= min(vvr(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGr.dm(d).min=min(vvr(medianIndxP,d)); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpGr.dm(d).max= max(vvr(medianIndxP,d)); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpGr.dm(d).max=max(vvr(medianIndxP,d)); %For Ref Composite 17_1026
%} %}
%{ %{
for mm=1:length(dMPs) % length(chgIndx) for mm=1:length(dMPs) % length(chgIndx)
for d= selDM:selDM %1:(DMnum) for d=selDM:selDM %1:(DMnum)
medianIndxDisp=[]; medianIndxDisp=[];
NZrefIndxP=[]; NZrefIndxP=[];
nonZeroValsP=[]; nonZeroValsP=[];
@@ -379,56 +292,56 @@ Exp(expN).Dexp(n).UsrCmpGr.dm(d).max= max(vvr(medianIndxP,d)); %For Ref Composit
usrScNdisp=((dMPs(mm)-1)*DMnum)+(d); usrScNdisp=((dMPs(mm)-1)*DMnum)+(d);
try % Determine the dispersed User Gene median mean and std if such exist try % Determine the dispersed User Gene median mean and std if such exist
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),d)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,5); vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=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),d)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3); vvK(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3);
vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4); vvr(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4);
%***************************************************************************************************** %*****************************************************************************************************
%{ %{
nonZeroValsP= nonzeros(Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,5)); nonZeroValsP=nonzeros(Exp(expN).Dexp(n).scan(usrScNdisp).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(usrScNdisp).plate(1).CFout(NZrefIndxP,5); drfVals=Exp(expN).Dexp(n).scan(usrScNdisp).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(usrScNdisp).plate(1).CFout(NZrefIndxP,5)); %NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,5));
if isempty(NZrefIndxP), nonZeroCntDisp=0, medianIndxDisp= NZrefIndxP; if isempty(NZrefIndxP), nonZeroCntDisp=0, medianIndxDisp=NZrefIndxP;
else nonZeroCntDisp=length(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) > 0 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZrefIndxP) && length(medianIndxDisp) > 0 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero
medValLstDisp= Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(medianIndxDisp,5); medValLstDisp=Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(medianIndxDisp,5);
mval1Disp=median(medValLstDisp); mval1Disp=median(medValLstDisp);
nzMedPosIndx=find(mval1Disp==nonZeroValsP); nzMedPosIndx=find(mval1Disp==nonZeroValsP);
medianIndxP= NZrefIndxP(nzMedPosIndx); medianIndxP=NZrefIndxP(nzMedPosIndx);
%UsrmdlocP(1)= ceil(medianIndxP/24); %calc r value %UsrmdlocP(1)=ceil(medianIndxP/24); %calc r value
%UsrmdlocP(2)= medianIndxP - ((UsrmdlocP(1)-1)*24); %calc c value %UsrmdlocP(2)=medianIndxP - ((UsrmdlocP(1)-1)*24); %calc c value
meanKval= mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); meanKval=mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3))));
meanrval= mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); meanrval=mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4))));
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
medianCalcFailedD= 'To Few nonZero spots for valid median RF1 selection' medianCalcFailedD='To Few nonZero spots for valid median RF1 selection'
firstZeroDindx= find(((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,5))==0),1,'first'); firstZeroDindx=find(((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,5))==0),1,'first');
firstZeroD= drfPindx((firstZeroDindx),dMPs(mm)); firstZeroD=drfPindx((firstZeroDindx),dMPs(mm));
%Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))=firstZeroD; %Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))=firstZeroD;
%Exp(expN).Dexp(n).UsrmdPpltN(d,dMPs(mm))= dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number??? %Exp(expN).Dexp(n).UsrmdPpltN(d,dMPs(mm))=dMPs(mm); %RF1mp; %Is this supposed to be the MP number or the ScanPlate number???
end %~isempty(NZrefIndxP) && length(medianIndxPisp) > 3 ln584 end %~isempty(NZrefIndxP) && length(medianIndxPisp) > 3 ln584
catch %try ln565 catch %try ln565
medianCalcTryFailed1D= 'Failed! Failed! {Dispersed RF1s}' medianCalcTryFailed1D='Failed! Failed! {Dispersed RF1s}'
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);
catch catch
end end
end %try ~ln565 end %try ~ln565
@@ -440,16 +353,16 @@ catch %try ln565
%Code Template taken from EZlstBoxCmpExt.m %Code Template taken from EZlstBoxCmpExt.m
try try
%if RFcmpGFlg==0 %if RFcmpGFlg==0
smpSz= size(medianIndxP,1); smpSz=size(medianIndxP,1);
K= median(vvK(medianIndxP,dmSel)); Ks= num2str(K); Kstd= std(vvK(medianIndxP,dmSel)); KstdStr= num2str(Kstd); K=median(vvK(medianIndxP,dmSel)); Ks=num2str(K); Kstd=std(vvK(medianIndxP,dmSel)); KstdStr=num2str(Kstd);
r= median(vvr(medianIndxP,dmSel)); rs= num2str(r); rstd= std(vvr(medianIndxP,dmSel)); rstdStr= num2str(rstd); r=median(vvr(medianIndxP,dmSel)); rs=num2str(r); rstd=std(vvr(medianIndxP,dmSel)); rstdStr=num2str(rstd);
l= median(vv(medianIndxP,dmSel)); Ls= num2str(l); Lstd= std(vv(medianIndxP,dmSel)); LstdStr= num2str(Lstd); l=median(vv(medianIndxP,dmSel)); Ls=num2str(l); Lstd=std(vv(medianIndxP,dmSel)); LstdStr=num2str(Lstd);
Kl= K - std(vvK(medianIndxP,dmSel)); %K - Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std; Kl=K - std(vvK(medianIndxP,dmSel)); %K - Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
Ku= K + std(vvK(medianIndxP,dmSel)); %K + Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std; Ku=K + std(vvK(medianIndxP,dmSel)); %K + Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
rl= r - std(vvr(medianIndxP,dmSel)); %r - Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std; rl=r - std(vvr(medianIndxP,dmSel)); %r - Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
ru= r + std(vvr(medianIndxP,dmSel)); %r + Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std; ru=r + std(vvr(medianIndxP,dmSel)); %r + Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
lfast= l - std(vv(medianIndxP,dmSel)); %l - Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; lfast=l - std(vv(medianIndxP,dmSel)); %l - Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
lslow= l + std(vv(medianIndxP,dmSel)); %l + Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; lslow=l + std(vv(medianIndxP,dmSel)); %l + Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
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
@@ -460,12 +373,12 @@ 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;
@@ -486,16 +399,16 @@ 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************************************** %************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).lstd(traceN)= std(vv(medianIndxP,dmSel)); %Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std; Exp(expN).lstd(traceN)=std(vv(medianIndxP,dmSel)); %Exp(expN).Dexp(DexpN).RFcmpL(RFnum).dm(inDM).std;
Exp(expN).kstd(traceN)= std(vvK(medianIndxP,dmSel)); %Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std; Exp(expN).kstd(traceN)=std(vvK(medianIndxP,dmSel)); %Exp(expN).Dexp(DexpN).RFcmpK(RFnum).dm(inDM).std;
Exp(expN).rstd(traceN)= std(vvr(medianIndxP,dmSel)); %Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std; Exp(expN).rstd(traceN)=std(vvr(medianIndxP,dmSel)); %Exp(expN).Dexp(DexpN).RFcmpr(RFnum).dm(inDM).std;
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).Ku(traceN)= ru; Exp(expN).lrl(traceN)=rl; Exp(expN).Ku(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;
@@ -509,12 +422,12 @@ end %trycatch
%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
DMstr= num2str(dmSel); DMstr=num2str(dmSel);
%spec=MP(1,LBmp).specifics{1,1}(indx); %orfrep=MP(1,plateNum).orfRep{1,1}(indx); %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))); %tPtStr=strcat('T=', num2str(scan(1,plateNum).plate(1).t0Series(tPtSel)));
%graphStr= strcat(usrGnSp,'_','L=',Lstr,'_','Lstd=',LstdStr,'_','r=',rstr,'_','rstd=',rstdStr,'_','K=',Kstr,'Kstd=',KstdStr); %graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Lstd=',LstdStr,'_','r=',rstr,'_','rstd=',rstdStr,'_','K=',Kstr,'Kstd=',KstdStr);
graphStr= strcat(usrGnSp,'_','L=',Lstr,'_','Lstd=',LstdStr,'_','r=',rstr,'_','rstd=',rstdStr,'_','K=',Kstr,'Kstd=',KstdStr); graphStr=strcat(usrGnSp,'_','L=',Lstr,'_','Lstd=',LstdStr,'_','r=',rstr,'_','rstd=',rstdStr,'_','K=',Kstr,'Kstd=',KstdStr);
spotDescrip=strcat(graphStr,'DMS->',DMstr); spotDescrip=strcat(graphStr,'DMS->',DMstr);
xp=char(Exp(zoneSel).Dexp(DexpN).resDir); xp=char(Exp(zoneSel).Dexp(DexpN).resDir);
@@ -526,14 +439,14 @@ end
startPos=slashPos(length(slashPos)-1) +1; startPos=slashPos(length(slashPos)-1) +1;
endPos=slashPos(length(slashPos)) -1 endPos=slashPos(length(slashPos)) -1
expStr= {xp(startPos:endPos)} expStr={xp(startPos:endPos)}
Exp(zoneSel).hOLname(traceN)= usrGnSp; %spotDescrip; %graphStr; %ghandles.Exp(zoneSel).hOLname(traceN)= graphStr; Exp(zoneSel).hOLname(traceN)=usrGnSp; %spotDescrip; %graphStr; %ghandles.Exp(zoneSel).hOLname(traceN)=graphStr;
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
@@ -570,106 +483,106 @@ end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot
%{ %{
%elseif RFcmpGFlg==1 %elseif RFcmpGFlg==1
K= Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; Ks= num2str(K); K=Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).med; Ks=num2str(K);
r= Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; rs= num2str(r); r=Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).med; rs=num2str(r);
l= Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).med; Ls= num2str(l); l=Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).med; Ls=num2str(l);
Kl= K - Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std; Kl=K - Exp(expN).Dexp(DexpN).RFcmpGK.dm(inDM).std;
Ku= 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; rl=r - Exp(expN).Dexp(DexpN).RFcmpGr.dm(inDM).std;
ru= 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; lfast=l - Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std;
lslow= l + Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std; lslow=l + Exp(expN).Dexp(DexpN).RFcmpGL.dm(inDM).std;
end end
%} %}
%Exp(expN).Dexp(n).UsrmdPindx= []; %Exp(expN).Dexp(n).UsrmdPindx=[];
%Exp(expN).Dexp(n).UsrmdPpltN= []; %Exp(expN).Dexp(n).UsrmdPpltN=[];
%Exp(expN).Dexp(n).UsrmdPscanN= []; %Exp(expN).Dexp(n).UsrmdPscanN=[];
%Exp(expN).Dexp(n).UsrMedianP= []; %Exp(expN).Dexp(n).UsrMedianP=[];
%Exp(expN).Dexp(n).stdP= []; %Exp(expN).Dexp(n).stdP=[];
%Exp(expN).Dexp(n).meanP= []; %Exp(expN).Dexp(n).meanP=[];
%Exp(expN).Dexp(n).minP= []; %Exp(expN).Dexp(n).minP=[];
%Exp(expN).Dexp(n).maxP= []; %Exp(expN).Dexp(n).maxP=[];
%Exp(expN).Dexp(n).RFmdGLB= {[]}; %Exp(expN).Dexp(n).RFmdGLB={[]};
%Exp(expN).Dexp(n).RFmdGindx= []; %Exp(expN).Dexp(n).RFmdGindx=[];
%Exp(expN).Dexp(n).RFmdGpltN= []; %Exp(expN).Dexp(n).RFmdGpltN=[];
%Exp(expN).Dexp(n).RFmdGscanN= []; %Exp(expN).Dexp(n).RFmdGscanN=[];
%UsrmdDGloc(d,1)= uu(nzPosIndxDG,1); %MP of distributedGlobal Median value %UsrmdDGloc(d,1)=uu(nzPosIndxDG,1); %MP of distributedGlobal Median value
%UsrmdDGloc(d,2)= uu(nzPosIndxDG,2); %calc r value %UsrmdDGloc(d,2)=uu(nzPosIndxDG,2); %calc r value
%UsrmdDGloc(d,3)= uu(nzPosIndxDG,3); %calc c value %UsrmdDGloc(d,3)=uu(nzPosIndxDG,3); %calc c value
%lstindx=lstindx+1; %lstindx=lstindx+1;
%lstindxOrf= lstindxOrf+1; %lstindxOrf=lstindxOrf+1;
%{ %{
usrGLbl= strcat(usrGnSp,'UmdG('); %accomodate User Ref Selection usrGLbl=strcat(usrGnSp,'UmdG('); %accomodate User Ref Selection
aa(lstindx,1)= strcat(usrGLbl,num2str(d),')'); %remove string2cell brackets {...} aa(lstindx,1)=strcat(usrGLbl,num2str(d),')'); %remove string2cell brackets {...}
aa(lstindx,2)= {strcat(':',num2str(UsrmdDGloc(d,1)),':',num2str(UsrmdDGloc(d,2)),':',num2str(UsrmdDGloc(d,3)))}; %,'std_',num2str(std2))}; aa(lstindx,2)={strcat(':',num2str(UsrmdDGloc(d,1)),':',num2str(UsrmdDGloc(d,2)),':',num2str(UsrmdDGloc(d,3)))}; %,'std_',num2str(std2))};
bb(lstindxOrf,1)= strcat(usrGLbl,num2str(d),')'); %remove string2cell brackets {...} bb(lstindxOrf,1)=strcat(usrGLbl,num2str(d),')'); %remove string2cell brackets {...}
bb(lstindxOrf,2)= {strcat(':',num2str(UsrmdDGloc(d,1)),':',num2str(UsrmdDGloc(d,2)),':',num2str(UsrmdDGloc(d,3)))}; %,'std_',num2str(std2))}; bb(lstindxOrf,2)={strcat(':',num2str(UsrmdDGloc(d,1)),':',num2str(UsrmdDGloc(d,2)),':',num2str(UsrmdDGloc(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(usrGnSp,'UcmpG(',num2str(d),')'); aa(lstindx,1)=strcat(usrGnSp,'UcmpG(',num2str(d),')');
aa(lstindx,2)={''}; aa(lstindx,2)={''};
bb(lstindxOrf,1)= strcat(usrGnSp,'UcmpG(',num2str(d),')'); bb(lstindxOrf,1)=strcat(usrGnSp,'UcmpG(',num2str(d),')');
bb(lstindxOrf,2)={''}; bb(lstindxOrf,2)={''};
%***************************************************** %*****************************************************
%} %}
%{ %{
lstindx=lstindx+1; lstindx=lstindx+1;
lstindxOrf= lstindxOrf+1; lstindxOrf=lstindxOrf+1;
usrPLbl= strcat(usrGnSp,'UmdP('); %accomodate User Ref Selection usrPLbl=strcat(usrGnSp,'UmdP('); %accomodate User Ref Selection
aa(lstindx,1)= strcat(usrPLbl,num2str(d),')'); aa(lstindx,1)=strcat(usrPLbl,num2str(d),')');
aa(lstindx,2)= {strcat(':',num2str(dMPs(mm)),':',num2str(UsrmdlocP(1)),':',num2str(UsrmdlocP(2)))}; aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(UsrmdlocP(1)),':',num2str(UsrmdlocP(2)))};
bb(lstindxOrf,1)= strcat(usrPLbl,num2str(d),')'); %remove string2cell brackets {...} bb(lstindxOrf,1)=strcat(usrPLbl,num2str(d),')'); %remove string2cell brackets {...}
bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(UsrmdlocP(1)),':',num2str(UsrmdlocP(2)))}; bb(lstindxOrf,2)={strcat(':',num2str(dMPs(mm)),':',num2str(UsrmdlocP(1)),':',num2str(UsrmdlocP(2)))};
Exp(expN).Dexp(n).UsrmdPLB(d,dMPs(mm))= strcat(aa(lstindx,1),aa(lstindx,2)); Exp(expN).Dexp(n).UsrmdPLB(d,dMPs(mm))=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))= medianIndxP; Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))=medianIndxP;
Exp(expN).Dexp(n).UsrmdPpltN(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).UsrmdPpltN(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).UsrmdPscanN(d,dMPs(mm))=usrScNdisp; Exp(expN).Dexp(n).UsrmdPscanN(d,dMPs(mm))=usrScNdisp;
Exp(expN).Dexp(n).UsrMedianP(d,dMPs(mm))= mval1Disp; Exp(expN).Dexp(n).UsrMedianP(d,dMPs(mm))=mval1Disp;
Exp(expN).Dexp(n).stdP(d,dMPs(mm))= std1Disp; Exp(expN).Dexp(n).stdP(d,dMPs(mm))=std1Disp;
Exp(expN).Dexp(n).meanP(d,dMPs(mm))= mean1Disp; Exp(expN).Dexp(n).meanP(d,dMPs(mm))=mean1Disp;
Exp(expN).Dexp(n).minP(d,dMPs(mm))= minDisp; Exp(expN).Dexp(n).minP(d,dMPs(mm))=minDisp;
Exp(expN).Dexp(n).maxP(d,dMPs(mm))= maxDisp; Exp(expN).Dexp(n).maxP(d,dMPs(mm))=maxDisp;
Exp(expN).Dexp(n).UsrCmpPL.dm(d).med= mval1Disp; %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPL.dm(d).med=mval1Disp; %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPL.dm(d).mean= mean1Disp; %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPL.dm(d).mean=mean1Disp; %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPL.dm(d).std= std1Disp; %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPL.dm(d).std=std1Disp; %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPL.dm(d).min= minDisp; %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPL.dm(d).min=minDisp; %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPL.dm(d).max= maxDisp; %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPL.dm(d).max=maxDisp; %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPK.dm(d).med= median(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPK.dm(d).med=median(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPK.dm(d).mean= mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPK.dm(d).mean=mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPK.dm(d).std= std(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPK.dm(d).std=std(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPK.dm(d).min= min(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPK.dm(d).min=min(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPK.dm(d).max= max(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPK.dm(d).max=max(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,3)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPr.dm(d).med= median(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPr.dm(d).med=median(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPr.dm(d).mean= mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPr.dm(d).mean=mean(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPr.dm(d).std= std(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPr.dm(d).std=std(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPr.dm(d).min= min(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPr.dm(d).min=min(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026
Exp(expN).Dexp(n).UsrCmpPr.dm(d).max= max(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026 Exp(expN).Dexp(n).UsrCmpPr.dm(d).max=max(nonzeros((Exp(expN).Dexp(n).scan(usrScNdisp).plate(1).CFout(NZrefIndxP,4)))); %For Ref Composite 17_1026
%} %}
%Exp(expN).Dexp(n).UsrmdGindx(d)= nzPosIndxDG; %Exp(expN).Dexp(n).UsrmdGindx(d)=nzPosIndxDG;
%Exp(expN).Dexp(n).UsrmdGpltN(d)= UsrmdDGloc(d,1); %Exp(expN).Dexp(n).UsrmdGpltN(d)=UsrmdDGloc(d,1);
%Exp(expN).Dexp(n).UsrmdGscanN(d)= uu(nzPosIndxDG,4); %Exp(expN).Dexp(n).UsrmdGscanN(d)=uu(nzPosIndxDG,4);
%{ %{
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).UsrmdPpltN(d,dMPs(mm))= dMPs(mm); %Exp(expN).Dexp(n).UsrmdPpltN(d,dMPs(mm))=dMPs(mm);
%Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))=firstZeroPindx; %Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))=firstZeroPindx;
catch catch
catchissue='try at Ln565' catchissue='try at Ln565'
%Exp(expN).Dexp(n).UsrmdPpltN(d,dMPs(mm))= dMPs(mm); %Exp(expN).Dexp(n).UsrmdPpltN(d,dMPs(mm))=dMPs(mm);
%Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))=384; %if crapout,Then use spot384 as default to keep going %Exp(expN).Dexp(n).UsrmdPindx(d,dMPs(mm))=384; %if crapout,Then use spot384 as default to keep going
end end
try try
% Exp(expN).Dexp(n).UsrmdPpltN= dMPs(mm); % Exp(expN).Dexp(n).UsrmdPpltN=dMPs(mm);
catch catch
catchissue='Ln619' catchissue='Ln619'
%Exp(expN).Dexp(n).UsrmdPpltN= 1; %This might keep from breaking BUT ??? %Exp(expN).Dexp(n).UsrmdPpltN=1; %This might keep from breaking BUT ???
end end
error='EZexpSel lineAfter 565' error='EZexpSel lineAfter 565'
end %try ~ln565 end %try ~ln565

File diff suppressed because it is too large Load Diff

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
@@ -17,7 +17,7 @@ end
clear matFile clear matFile
ii=0; ii=0;
for m= 1:size(expDlst,2) for m=1:size(expDlst,2)
exD=fullfile(exFolder,cell2mat(expDlst(m))) exD=fullfile(exFolder,cell2mat(expDlst(m)))
dirLst=dir(exD); dirLst=dir(exD);
clear matFlst clear matFlst
@@ -31,7 +31,7 @@ for m= 1:size(expDlst,2)
matFlst=dir(resMatF) matFlst=dir(resMatF)
for o=1:size(matFlst,1) for o=1:size(matFlst,1)
if sum(ismember('.mat', matFlst(o).name))==4 if sum(ismember('.mat', matFlst(o).name))==4
ii= ii+1; ii=ii+1;
resDir{ii}=fullfile(exFolder,cell2mat(expDlst(m)),resF) resDir{ii}=fullfile(exFolder,cell2mat(expDlst(m)),resF)
matFile(m)=cellstr(fullfile(resMatF,matFlst(o).name)) matFile(m)=cellstr(fullfile(resMatF,matFlst(o).name))
end end
@@ -40,6 +40,6 @@ for m= 1:size(expDlst,2)
end end
end end
Exp(expN).DexpLength= size(matFile,2); Exp(expN).DexpLength=size(matFile,2);
Exp(expN).DexpN= size(matFile,2); Exp(expN).DexpN=size(matFile,2);

View File

@@ -1,67 +1,61 @@
% Is the callback supposed to be nested?
function EZmultiDayGui function EZmultiDayGui
%global Exp %global Exp
global exDlst global exDlst
xPos=0.05; xPos=0.05;
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
exDirs=dir(exFolder)
exFs={exDirs.name}
f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' );
hListbox=uicontrol(...
'Style', 'listbox',...
'String',sort(exFs),...
'value',[],...
'max',1000,...
'min',1,...
'Units','normalized',...
'Position', [.70 .40 .6 .60],...
'callback',{@load_listbox}); % 'uiresume(gcbf)'); 'Position', [5 100 60 20])
%==================================== function load_listbox(source,eventdata)
exFolder=uigetdir % global CSrchRng
exDirs=dir(exFolder) % global CSrearchRange
exFs= {exDirs.name} userIndx=(get(source,'value'))
userStr=(get(source,'string'))
% scLstIndx=str2num(char(strrep(userStr(userIndx), 'Scan', '')))
user_entry=userStr(userIndx)
exDlst=user_entry
end
exFs
btnNumber=10;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' ); hedit8=uicontrol(...
hListbox=uicontrol(... 'Style', 'pushbutton',...
'Style', 'listbox',... 'String',{'Continue'},...
'String',sort(exFs),... 'Units','normalized',...
'value',[],... 'Position', btnPos,...
'max',1000,... 'callback','uiresume(gcbf)');
'min',1,...
'Units','normalized',...
'Position', [.70 .40 .6 .60],...
'callback',{@load_listbox}); %'uiresume(gcbf)'); 'Position', [5 100 60 20])
function load_listbox(source,eventdata)
%global CSrchRng
%global CSrearchRange
userIndx=(get(source,'value'))
userStr=(get(source,'string'))
%scLstIndx= str2num(char(strrep(userStr(userIndx), 'Scan', '')))
user_entry=userStr(userIndx) uiwait(gcf);
exDlst= user_entry
end
exFs
btnNumber=10;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
hedit8=uicontrol(... close(f)
'Style', 'pushbutton',...
'String',{'Continue'},...
'Units','normalized',...
'Position', btnPos,...
'callback','uiresume(gcbf)');
uiwait(gcf);
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
@@ -42,7 +42,7 @@ function EZmultiDayGui
j=1; j=1;
for i=1:size(CC,1) for i=1:size(CC,1)
j=CC(i,2); j=CC(i,2);
ExpOrderByExp(i)= expDayFs(j); %exFs(j) ExpOrderByExp(i)=expDayFs(j); %exFs(j)
end end
else else
ExpOrderByExp=sort(exFs); ExpOrderByExp=sort(exFs);

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
@@ -9,330 +10,308 @@ global exDlst
global exFolder global exFolder
% Load .mat file % Load .mat file
expN=zonePB; % added to accomodate AppDesigner limitations 230821 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
if expN==2
orfLstSel=get(handles.GeneOrfTog,'value');
end
if expN==3
orfLstSel=get(handles.GeneOrfTog,'value');
end
Exp(expN).Dexp(n).srtGnLst={('CheckMP/MPDMfile')};
Exp(expN).Dexp(n).srtOrfLst={('CheckMP/MPDMfile')};
set(handles.listboxGnOrf,'value',1) %Fix accomodation for bug in App Designer .. .wlapp converter 230918
set(handles.listboxGnOrf,'string',cellstr([{'Failed To Load'}; {' '}]));
% try
ExpOutmat=matFile(n) %fullfile(scansDir,openExpfile);
load(char(ExpOutmat));
%cd(scansDir)
%cd ..;
%resDir=pwd;
Exp(expN).Dexp(n).resDir=cell2mat(resDir(n));
cd(Exp(expN).Dexp(n).resDir)
cd ..;
ExpPath=pwd;
Exp(expN).Dexp(n).ExpFoldr=ExpPath;
cd(w)
% Experiment LOADs
load(fullfile(Exp(expN).Dexp(n).ExpFoldr,'MasterPlateFiles','MPDMmat.mat'))
load(fullfile(Exp(expN).Dexp(n).resDir,'Fotos','Coordinates'))
load(fullfile(Exp(expN).Dexp(n).resDir,'Fotos','anlZones'))
load(fullfile(Exp(expN).Dexp(n).resDir,'Fotos','BGatTpts'))
load(fullfile(Exp(expN).Dexp(n).resDir,'PTmats','NImParameters'))
% Backup for cond. sothat failure to load is recovered back prev. ExpJob data
% test in temp
Exp(expN).Dexp(n).temp.DM=DM;
Exp(expN).Dexp(n).temp.MP=MP;
Exp(expN).Dexp(n).temp.scan=scan;
Exp(expN).Dexp(n).temp.FexpScanSpots=FexpScanSpots;
Exp(expN).Dexp(n).temp.FexpScanBMtp=FexpScanBMtp;
Exp(expN).Dexp(n).temp.anlZoneRefs=anlZoneRefs;
Exp(expN).Dexp(n).temp.ImParMat=ImParMat;
Exp(expN).Dexp(n).DM=Exp(expN).Dexp(n).temp.DM;
Exp(expN).Dexp(n).MP=Exp(expN).Dexp(n).temp.MP;
Exp(expN).Dexp(n).scan=Exp(expN).Dexp(n).temp.scan;
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).anlZoneRefs=Exp(expN).Dexp(n).temp.anlZoneRefs;
Exp(expN).Dexp(n).ImParMat=Exp(expN).Dexp(n).temp.ImParMat;
Exp(expN).Dexp((Exp(expN).DexpLength+1):end)=[];
Exp(expN).Dexp(n).temp=[];
end end
if expN==2 % Load First new ExpJOb
orfLstSel=get(handles.GeneOrfTog,'value'); if expN==1
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3);
set(handles.MPsldr1,'max',MPnum); %length(MP)
set(handles.DMsldr1,'max',length(DM.drug));
set(handles.Tptsldr1,'max',tPtsSize);
% MPnum=length(Exp(expN).Dexp(1).MP);
set(handles.MPsldr1,'min',1,'max',MPnum)
DMnum=length(Exp(expN).Dexp(1).DM.drug);
set(handles.DMsldr1,'min',1,'max',DMnum)
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
set(handles.Tptsldr1,'min',1,'max',tPtsSize)
set(handles.MPsldr1,'value',1)
set(handles.DMsldr1,'value',1)
set(handles.Tptsldr1,'value',1)
set(handles.MPed1,'string','1')
set(handles.DMed1,'string','1')
set(handles.Tpted1,'string','1')
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.Tptsldr1,'SliderStep',[1/tPtsSize 1/tPtsSize]);
set(handles.DN1,'value',1)
set(handles.DN1,'string',1)
end
if expN==2,
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); % size(FexpScanBMtp{1,1},3);
set(handles.MPsldr2,'max',MPnum);
set(handles.DMsldr2,'max',length(DM.drug));
set(handles.Tptsldr2,'max',tPtsSize);
% MPnum=length(Exp(expN).Dexp(1).MP);
set(handles.MPsldr2,'min',1,'max',MPnum) % length(MP))
DMnum=length(Exp(expN).Dexp(n).DM.drug);
set(handles.DMsldr2,'min',1,'max',DMnum)
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
set(handles.Tptsldr2,'min',1,'max',tPtsSize)
set(handles.MPsldr2,'value',1)
set(handles.DMsldr2,'value',1)
set(handles.Tptsldr2,'value',1)
set(handles.MPed2,'string','1')
set(handles.DMed2,'string','1')
set(handles.Tpted2,'string','1')
set(handles.MPsldr2,'SliderStep',[1/MPnum 1/MPnum]); %1/length(MP) 1/length(MP)])
set(handles.DMsldr2,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]);
set(handles.Tptsldr2,'SliderStep',[1/tPtsSize 1/tPtsSize]);
set(handles.DN2,'value',1)
set(handles.DN2,'string',1)
end end
if expN==3 if expN==3
orfLstSel=get(handles.GeneOrfTog,'value'); % Exp(3).traceN=0;
end tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); % size(FexpScanBMtp{1,1},3);
Exp(expN).Dexp(n).srtGnLst={('CheckMP/MPDMfile')}; set(handles.MPsldr3,'max',MPnum);
Exp(expN).Dexp(n).srtOrfLst={('CheckMP/MPDMfile')}; set(handles.DMsldr3,'max',length(DM.drug));
set(handles.listboxGnOrf,'value',1) %Fix accomodation for bug in App Designer .. .wlapp converter 230918 set(handles.Tptsldr3,'max',tPtsSize);
set(handles.listboxGnOrf,'string',cellstr([{'Failed To Load'}; {' '}])); % MPnum=length(Exp(expN).Dexp(1).MP);
%try set(handles.MPsldr3,'min',1,'max',MPnum)
ExpOutmat= matFile(n) %fullfile(scansDir,openExpfile); DMnum=length(Exp(expN).Dexp(1).DM.drug);
load(char(ExpOutmat)); set(handles.DMsldr3,'min',1,'max',DMnum)
%cd(scansDir) tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
%cd ..; set(handles.Tptsldr3,'min',1,'max',tPtsSize)
%resDir=pwd; set(handles.MPsldr3,'value',1)
Exp(expN).Dexp(n).resDir= cell2mat(resDir(n)); set(handles.DMsldr3,'value',1)
cd(Exp(expN).Dexp(n).resDir) set(handles.Tptsldr3,'value',1)
cd ..; set(handles.MPed3,'string','1')
ExpPath=pwd; set(handles.DMed3,'string','1')
Exp(expN).Dexp(n).ExpFoldr= ExpPath; set(handles.Tpted3,'string','1')
cd(w) set(handles.MPsldr3,'SliderStep',[1/MPnum 1/MPnum]); % 1/length(MP) 1/length(MP)])
%Experiment LOADs set(handles.DMsldr3,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]);
load(fullfile(Exp(expN).Dexp(n).ExpFoldr,'MasterPlateFiles','MPDMmat.mat')) set(handles.Tptsldr3,'SliderStep',[1/tPtsSize 1/tPtsSize]);
load(fullfile(Exp(expN).Dexp(n).resDir,'Fotos','Coordinates')) set(handles.DN3,'value',1)
load(fullfile(Exp(expN).Dexp(n).resDir,'Fotos','anlZones')) set(handles.DN3,'string',1)
load(fullfile(Exp(expN).Dexp(n).resDir,'Fotos','BGatTpts'))
load(fullfile(Exp(expN).Dexp(n).resDir,'PTmats','NImParameters'))
%Backup for cond. sothat failure to load is recovered back prev. ExpJob data
%test in temp
Exp(expN).Dexp(n).temp.DM=DM;
Exp(expN).Dexp(n).temp.MP=MP;
Exp(expN).Dexp(n).temp.scan=scan;
Exp(expN).Dexp(n).temp.FexpScanSpots=FexpScanSpots;
Exp(expN).Dexp(n).temp.FexpScanBMtp=FexpScanBMtp;
Exp(expN).Dexp(n).temp.anlZoneRefs=anlZoneRefs;
Exp(expN).Dexp(n).temp.ImParMat=ImParMat;
Exp(expN).Dexp(n).DM=Exp(expN).Dexp(n).temp.DM;
Exp(expN).Dexp(n).MP= Exp(expN).Dexp(n).temp.MP;
Exp(expN).Dexp(n).scan= Exp(expN).Dexp(n).temp.scan;
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).anlZoneRefs=Exp(expN).Dexp(n).temp.anlZoneRefs;
Exp(expN).Dexp(n).ImParMat=Exp(expN).Dexp(n).temp.ImParMat;
Exp(expN).Dexp((Exp(expN).DexpLength+1):end)= [];
Exp(expN).Dexp(n).temp= [];
end %for n=1:size(matFile,2)
%Load First new ExpJOb*****************
if expN==1,
tPtsSize= size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3);
set(handles.MPsldr1,'max',MPnum); %length(MP)
set(handles.DMsldr1,'max',length(DM.drug));
set(handles.Tptsldr1,'max',tPtsSize);
%MPnum=length(Exp(expN).Dexp(1).MP);
set(handles.MPsldr1,'min',1,'max',MPnum)
DMnum= length(Exp(expN).Dexp(1).DM.drug);
set(handles.DMsldr1,'min',1,'max',DMnum)
tPtsSize= size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
set(handles.Tptsldr1,'min',1,'max',tPtsSize)
set(handles.MPsldr1,'value',1)
set(handles.DMsldr1,'value',1)
set(handles.Tptsldr1,'value',1)
set(handles.MPed1,'string','1')
set(handles.DMed1,'string','1')
set(handles.Tpted1,'string','1')
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.Tptsldr1,'SliderStep',[1/tPtsSize 1/tPtsSize]);
set(handles.DN1,'value',1)
set(handles.DN1,'string',1)
end
if expN==2,
tPtsSize= size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3);
set(handles.MPsldr2,'max',MPnum);
set(handles.DMsldr2,'max',length(DM.drug));
set(handles.Tptsldr2,'max',tPtsSize);
%MPnum=length(Exp(expN).Dexp(1).MP);
set(handles.MPsldr2,'min',1,'max',MPnum) %length(MP))
DMnum= length(Exp(expN).Dexp(n).DM.drug);
set(handles.DMsldr2,'min',1,'max',DMnum)
tPtsSize= size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
set(handles.Tptsldr2,'min',1,'max',tPtsSize)
set(handles.MPsldr2,'value',1)
set(handles.DMsldr2,'value',1)
set(handles.Tptsldr2,'value',1)
set(handles.MPed2,'string','1')
set(handles.DMed2,'string','1')
set(handles.Tpted2,'string','1')
set(handles.MPsldr2,'SliderStep',[1/MPnum 1/MPnum]); %1/length(MP) 1/length(MP)])
set(handles.DMsldr2,'SliderStep',[1/length(DM.drug) 1/length(DM.drug)]);
set(handles.Tptsldr2,'SliderStep',[1/tPtsSize 1/tPtsSize]);
set(handles.DN2,'value',1)
set(handles.DN2,'string',1)
end end
if expN==3, if expN==1
%Exp(3).traceN=0; set(handles.GeneOrfLoc1,'string',{''});
tPtsSize= size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3)); %size(FexpScanBMtp{1,1},3); set(handles.graphStrLoc1,'string',{''});
set(handles.MPsldr3,'max',MPnum); cla(handles.Paxes1)
set(handles.DMsldr3,'max',length(DM.drug));
set(handles.Tptsldr3,'max',tPtsSize);
%MPnum=length(Exp(expN).Dexp(1).MP);
set(handles.MPsldr3,'min',1,'max',MPnum)
DMnum= length(Exp(expN).Dexp(1).DM.drug);
set(handles.DMsldr3,'min',1,'max',DMnum)
tPtsSize=size(Exp(expN).Dexp(1).FexpScanBMtp{1,1},(3));
set(handles.Tptsldr3,'min',1,'max',tPtsSize)
set(handles.MPsldr3,'value',1)
set(handles.DMsldr3,'value',1)
set(handles.Tptsldr3,'value',1)
set(handles.MPed3,'string','1')
set(handles.DMed3,'string','1')
set(handles.Tpted3,'string','1')
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.Tptsldr3,'SliderStep',[1/tPtsSize 1/tPtsSize]);
set(handles.DN3,'value',1)
set(handles.DN3,'string',1)
end
if expN==1,set(handles.GeneOrfLoc1,'string',{''});
set(handles.graphStrLoc1,'string',{''});
cla(handles.Paxes1)
end end
if expN==2,set(handles.GeneOrfLoc2,'string',{''}); if expN==2
set(handles.graphStrLoc2,'string',{''}); set(handles.GeneOrfLoc2,'string',{''});
cla(handles.Paxes2) set(handles.graphStrLoc2,'string',{''});
cla(handles.Paxes2)
end end
if expN==3,set(handles.GeneOrfLoc3,'string',{''}); if expN==3
set(handles.graphStrLoc3,'string',{''}) set(handles.GeneOrfLoc3,'string',{''});
cla(handles.Paxes3) set(handles.graphStrLoc3,'string',{''})
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
%********************* usrRefFg=0;
EZVimDisplay %* prompt={'Enter GeneName to use as Reference:',...
%********************* 'Enter Specifics Term if used to futher specify Reference '}
dlg_title='User Reference Input';
usrRefFg=0; num_lines=1;
prompt={'Enter GeneName to use as Reference:',... def={'RF1','None'};
'Enter Specifics Term if used to futher specify Reference '} answer=inputdlg(prompt,dlg_title,num_lines,def);
dlg_title='User Reference Input'; if iscell(answer(1))
num_lines=1; rfGene=cell2mat(answer(1));
def={'RF1','None'}; else
answer=inputdlg(prompt,dlg_title,num_lines,def); rfGene=answer(1);
if iscell(answer(1)) end
rfGene= cell2mat(answer(1));
else
rfGene= answer(1);
end
if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end
rfSpec= answer(2); %if strcmpi(answer(2),'None'), rfSpec= ''; end
rfGnSp= strcat(rfGene,rfSpec);
if strcmpi(rfSpec,'None'), rfGnSp= {strcat(rfGene,'-')}; end
%Added 17-1023 For User Addition of Gene Composites to ListBox if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end
Expaa{expN,1}= []; Expbb{expN,1}= []; rfSpec=answer(2); % if strcmpi(answer(2),'None'), rfSpec=''; end
rfGnSp=strcat(rfGene,rfSpec);
if strcmpi(rfSpec,'None'), rfGnSp={strcat(rfGene,'-')}; end
% Added 17-1023 For User Addition of Gene Composites to ListBox
Expaa{expN,1}=[]
Expbb{expN,1}=[];
for n=1:size(matFile,2) for n=1:size(matFile,2)
try
%********************************************************************* EZmultiGeneRFsLst
try catch
EZmultiGeneRFsLst %**
catch
msg='EZmultiGeneRFLst failed possibly Too Few non-zero Median spots' msg='EZmultiGeneRFLst failed possibly Too Few non-zero Median spots'
end
%*********************************************************
EZdiagRFsSheet %**
%********************
Exp(expN).Dexp(n).RFrnames=rnames;
Exp(expN).Dexp(n).RFdata= data;
%*********************************************************
RFconfig=0;
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&...
~isempty(Exp(expN).Dexp(n).RFmean)&&...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&...
isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=1;
end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))==0 ||...
isempty(Exp(expN).Dexp(n).RFmean)&&...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&...
~isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=2;
end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&...
~isempty(Exp(expN).Dexp(n).RFmean)&&...
sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG'))&&...
~isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=3;
end
Exp(expN).RFconfig= RFconfig;
Exp(expN).Dexp(n).RFconfig= RFconfig;
%**********************************************
try msgBadGeneName, catch, end
try
Exp(expN).Dexp(n).resetHtmpTg =5; %Exp(expN).resetHtmpTg =5;
if RFconfig==0,
RFconfigMsg= 'No RF1 references in this Experiment Job'
Exp(expN).Dexp(n).resetHtmpTg =3; %Exp(expN).resetHtmpTg =3;
end
catch
end
%***************************
%*********************************************************************
end
%###############################################################################
%********Auto select Zone and load listboxGnOrf data**********
DexpN=1;
zeroCLn= zeros(1,DMnum);
Exp(expN).expLoadCnt= Exp(expN).expLoadCnt+1; expLdCnt= Exp(expN).expLoadCnt;
if expN==1 %Adapted to accomodate AppDesigner 230821
set(handles.zonePB1,'value',1)
set(handles.zonePB2,'value',0)
set(handles.zonePB3,'value',0)
set(handles.zonePB1,'BackgroundColor',[1.0 0.6 0.6])
set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0])
set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0])
orfLstSel=get(handles.GeneOrfTog,'value')
if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtOrfLst)
else
set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtGnLst)
end end
DNLaxes1= handles.DNLaxes1; EZdiagRFsSheet
Exp(expN).Dexp(n).RFrnames=rnames;
Exp(expN).Dexp(n).RFdata=data;
RFconfig=0;
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean')) ...
&& ~isempty(Exp(expN).Dexp(n).RFmean) ...
&& sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
&& isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=1;
end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))==0 ...
|| isempty(Exp(expN).Dexp(n).RFmean) ...
&& sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
&& ~isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=2;
end
if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean')) ...
&& ~isempty(Exp(expN).Dexp(n).RFmean) ...
&& sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmeanG')) ...
&& ~isempty(Exp(expN).Dexp(n).RFmeanG)
RFconfig=3;
end
Exp(expN).RFconfig=RFconfig;
Exp(expN).Dexp(n).RFconfig=RFconfig;
try msgBadGeneName
catch, end
try
Exp(expN).Dexp(n).resetHtmpTg =5; %Exp(expN).resetHtmpTg =5;
if RFconfig==0
RFconfigMsg='No RF1 references in this Experiment Job'
Exp(expN).Dexp(n).resetHtmpTg =3; %Exp(expN).resetHtmpTg =3;
end
catch
end
end
% Auto Select Zone And Load Listboxgnorf Data
DexpN=1;
zeroCLn=zeros(1,DMnum);
Exp(expN).expLoadCnt=Exp(expN).expLoadCnt+1; expLdCnt=Exp(expN).expLoadCnt;
if expN==1 % Adapted to accomodate AppDesigner 230821
set(handles.zonePB1,'value',1)
set(handles.zonePB2,'value',0)
set(handles.zonePB3,'value',0)
set(handles.zonePB1,'BackgroundColor',[1.0 0.6 0.6])
set(handles.zonePB2,'BackgroundColor',[1.0 1.0 1.0])
set(handles.zonePB3,'BackgroundColor',[1.0 1.0 1.0])
orfLstSel=get(handles.GeneOrfTog,'value')
if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtOrfLst)
else
set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtGnLst)
end
DNLaxes1=handles.DNLaxes1;
Exp(1).hzeroCLn(expLdCnt)=plot(DNLaxes1,zeroCLn,1:DMnum,'y'); Exp(1).hzeroCLn(expLdCnt)=plot(DNLaxes1,zeroCLn,1:DMnum,'y');
end end
if expN==2 %Adapted to accomodate AppDesigner 230821 if expN==2 % Adapted to accomodate AppDesigner 230821
set(handles.zonePB1,'value',0) set(handles.zonePB1,'value',0)
set(handles.zonePB3,'value',0) set(handles.zonePB3,'value',0)
set(handles.zonePB2,'value',1) set(handles.zonePB2,'value',1)
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(1).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtOrfLst)
else else
set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtGnLst)
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
set(handles.zonePB1,'value',0) set(handles.zonePB1,'value',0)
set(handles.zonePB2,'value',0) set(handles.zonePB2,'value',0)
set(handles.zonePB3,'value',1) set(handles.zonePB3,'value',1)
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(1).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtOrfLst)
else else
set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtGnLst)
end end
DNLaxes3= handles.DNLaxes3; DNLaxes3=handles.DNLaxes3;
Exp(3).hzeroCLn(expLdCnt)=plot(DNLaxes3,zeroCLn,1:DMnum,'y'); Exp(3).hzeroCLn(expLdCnt)=plot(DNLaxes3,zeroCLn,1:DMnum,'y');
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='Ln521' 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,
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;
%*******************************************************************

File diff suppressed because it is too large Load Diff

View File

@@ -1,43 +1,37 @@
%EZsingleExUserRF % EZsingleExUserRF
global exp global exp
usrRefFg=0;
prompt={'Enter GeneName to use as Reference:',...
'Enter Specifics Term if used to futher specify Reference '}
dlg_title='User Reference Input';
num_lines=1;
def={'RF1','None'};
answer=inputdlg(prompt,dlg_title,num_lines,def);
rfGene=cell2mat(answer(1));
if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end
rfSpec=answer(2); %if strcmpi(answer(2),'None'), rfSpec=''; end
rfGnSp=strcat(rfGene,rfSpec);
if strcmpi(rfSpec,'None'), rfGnSp=strcat(rfGene,'-'); end
usrRefFg=0; % for n=1:size(matFile,2)
prompt={'Enter GeneName to use as Reference:',...
'Enter Specifics Term if used to futher specify Reference '}
dlg_title='User Reference Input';
num_lines=1;
def={'RF1','None'};
answer=inputdlg(prompt,dlg_title,num_lines,def);
rfGene= cell2mat(answer(1));
if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end
rfSpec= answer(2); %if strcmpi(answer(2),'None'), rfSpec= ''; end
rfGnSp= strcat(rfGene,rfSpec);
if strcmpi(rfSpec,'None'), rfGnSp= strcat(rfGene,'-'); end
%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'))&&...
~isempty(Exp(expN).Dexp(n).RFmean)&&... ~isempty(Exp(expN).Dexp(n).RFmean)&&...
@@ -45,88 +39,76 @@ if sum(ismember(fieldnames(Exp(expN).Dexp(n)),'RFmean'))&&...
~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, 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;
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
%***************************
%********************************************************************* % 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;
if expN==1 if expN==1
set(handles.zoneRad1,'value',1) set(handles.zoneRad1,'value',1)
set(handles.zoneRad2,'value',0) set(handles.zoneRad2,'value',0)
set(handles.zoneRad3,'value',0) set(handles.zoneRad3,'value',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)
else else
set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtGnLst)
end end
DNLaxes1= handles.DNLaxes1; DNLaxes1=handles.DNLaxes1;
Exp(1).hzeroCLn(expLdCnt)=plot(DNLaxes1,zeroCLn,1:DMnum,'y'); Exp(1).hzeroCLn(expLdCnt)=plot(DNLaxes1,zeroCLn,1:DMnum,'y');
end end
if expN==2 if expN==2
set(handles.zoneRad1,'value',0) set(handles.zoneRad1,'value',0)
set(handles.zoneRad3,'value',0) set(handles.zoneRad3,'value',0)
set(handles.zoneRad2,'value',1) set(handles.zoneRad2,'value',1)
orfLstSel= get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
if orfLstSel==1 if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtOrfLst)
else else
set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtGnLst)
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
set(handles.zoneRad1,'value',0) set(handles.zoneRad1,'value',0)
set(handles.zoneRad2,'value',0) set(handles.zoneRad2,'value',0)
set(handles.zoneRad3,'value',1) set(handles.zoneRad3,'value',1)
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
if orfLstSel==1 if orfLstSel==1
set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtOrfLst)
else else
set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtGnLst)
end end
DNLaxes3= handles.DNLaxes3; DNLaxes3=handles.DNLaxes3;
Exp(3).hzeroCLn(expLdCnt)=plot(DNLaxes3,zeroCLn,1:DMnum,'y'); Exp(3).hzeroCLn(expLdCnt)=plot(DNLaxes3,zeroCLn,1:DMnum,'y');
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 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,
Exp(1).htmapPBsel=0; Exp(1).htmapPBsel=0;
set(handles.HtMapTog1,'string','L') set(handles.HtMapTog1,'string','L')
@@ -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 ghandles
datacursormode(gcf)
global Exp w=pwd;
global ghandles aCnt=0;
w=pwd; prevExp=0;
aCnt=0; if NoOLay==0
prevExp=0;
if NoOLay==0
cd(fullfile(char(OLresDir))) cd(fullfile(char(OLresDir)))
cd .. cd ..
expDir=pwd; expDir=pwd;
@@ -16,230 +14,207 @@ if NoOLay==0
%expDir=fullfile(char(OLresDir),'..'); %expDir=fullfile(char(OLresDir),'..');
if ~isequal(expDir, char(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr))) if ~isequal(expDir, char(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr)))
prevExp=1; prevExp=1;
end end
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
expDir=Exp(expN).Dexp(DexpN).ExpFoldr expDir=Exp(expN).Dexp(DexpN).ExpFoldr
end end
%ExpHmDir= char(Exp(expN).Dexp(DexpN).resDir); %ExpHmDir=char(Exp(expN).Dexp(DexpN).resDir);
try close(ghandles.hfstrip), catch, end %hfIm
%*************CIRCLE related*************************
doCircle=1;
radius=14;
diaExt=2*(radius+1);
%>>>>>>>>>>>>>>>>>>>>>>
EZvNIcircle
%<<<<<<<<<<<<<<<<<<<<<<<
rIm= imLoc(1); %use the "picture/Image' r and c not the plate annotation r c) try close(ghandles.hfstrip), catch, end % hfIm
cIm= imLoc(2); % CIRCLE related
plateNum= Exp(expN).Dexp(DexpN).plateNum; doCircle=1;
%***************************************** radius=14;
if prevExp==0 diaExt=2*(radius+1);
FexpScanSpots=Exp(expN).Dexp(DexpN).FexpScanSpots; EZvNIcircle
FexpScanBMtp=Exp(expN).Dexp(DexpN).FexpScanBMtp; rIm=imLoc(1); % use the "picture/Image' r and c not the plate annotation r c)
anlZoneRefs=Exp(expN).Dexp(DexpN).anlZoneRefs; cIm=imLoc(2);
ImParMat=Exp(expN).Dexp(DexpN).ImParMat; plateNum=Exp(expN).Dexp(DexpN).plateNum;
if prevExp==0
else FexpScanSpots=Exp(expN).Dexp(DexpN).FexpScanSpots;
%check if the request expJob is already loaded in one of the other zones FexpScanBMtp=Exp(expN).Dexp(DexpN).FexpScanBMtp;
anlZoneRefs=Exp(expN).Dexp(DexpN).anlZoneRefs;
ImParMat=Exp(expN).Dexp(DexpN).ImParMat;
else
% check if the request expJob is already loaded in one of the other zones
matchfound=0; matchfound=0;
for j=1:3 for j=1:3
if isequal(expDir, char(fullfile(Exp(j).ExpFoldr))) if isequal(expDir, char(fullfile(Exp(j).ExpFoldr)))
FexpScanSpots=Exp(j).FexpScanSpots; FexpScanSpots=Exp(j).FexpScanSpots;
FexpScanBMtp=Exp(j).FexpScanBMtp; FexpScanBMtp=Exp(j).FexpScanBMtp;
anlZoneRefs=Exp(j).anlZoneRefs; anlZoneRefs=Exp(j).anlZoneRefs;
ImParMat=Exp(j).ImParMat; ImParMat=Exp(j).ImParMat;
matchfound=1; matchfound=1;
break break
end end
end end
if matchfound==0 if matchfound==0
%if not, load data for previous experiment again. % if not, load data for previous experiment again.
load(fullfile(char(OLresDir),'Fotos','Coordinates')) load(fullfile(char(OLresDir),'Fotos','Coordinates'))
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
width=ImParMat(5);
widthEx=width-1; %width extention from reference point
%**************Parameter Entry****************** % Start Spot selection and Manipulation section
width=ImParMat(5); Fcutsc=[];
widthEx=width-1; %width extention from reference point Fstrip=[];
%{
cd(fullfile(char(OLresDir)))
cd ..
expDir=pwd;
cd(w)
%}
%================================================================= % tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3));
%================================================================= tPtsSize=size(FexpScanBMtp{1,plateNum},(3)); % tPtsSize=size(FexpScanBMtp{1,1},(3)); 20160110
%++++Start Spot selection and Manipulation section+++++++++++ %bmpFileLst=dirfullfile(char(OLresDir),num2str(plateNum),'*.bmp')); %(fullfile(expDir, char(ScLst(ScLstCnt)), '*.bmp'));
Fcutsc=[]; hsafety=figure;
Fstrip=[]; dc=get(datacursormode)
%{ imInterval=1;
cd(fullfile(char(OLresDir))) try,imInterval=str2double(Exp(4).SpotVintervPar),catch,end
cd .. try
expDir=pwd; for tPt=1:imInterval:tPtsSize %tPtLength
cd(w) coord=[];
%} try
% 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'));
Fimg=imread(FtifFile);
% For Visualization Purposes
Fram=ones(2075,1400); %(size(Empsc,1),size(Empsc,2));
% FRAME ANALYSIS AREA
if size(FexpScanSpots,2)>1
coord=FexpScanSpots{plateNum}{rIm,cIm,tPt};
else
coord=FexpScanSpots{plateNum,1,1}{rIm,cIm,tPt};
end
if size(anlZoneRefs,2)>1
xyLoc=anlZoneRefs{plateNum}{rIm,cIm,tPt}; %F_Snum
else
xyLoc=anlZoneRefs{F_Snum,1,1}{rIm,cIm,tPt};
end
xLoc=xyLoc(2);
yLoc=xyLoc(1);
%tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3)); % CIRCLE related
tPtsSize=size(FexpScanBMtp{1,plateNum},(3)); %tPtsSize=size(FexpScanBMtp{1,1},(3)); 20160110 doCircle=1; % temp test value insertion to get square images
%bmpFileLst=dirfullfile(char(OLresDir),num2str(plateNum),'*.bmp')); %(fullfile(expDir, char(ScLst(ScLstCnt)), '*.bmp')); if doCircle==1
hsafety=figure; Fram=FoptCirMask;
dc= get(datacursormode) else
imInterval=1; % 1->2 across rt 1, 2-4
try, imInterval= str2double(Exp(4).SpotVintervPar),catch,end Fram(yLoc,xLoc:(xLoc+widthEx))=0.8;
try % 1->4 down lf 1-3, 2
for tPt=1:imInterval:tPtsSize %tPtLength Fram((yLoc+1):(yLoc+1+widthEx),xLoc)=0.8;
coord=[]; % 2->3 down rt 1-3, 4
try Fram(yLoc:(yLoc+widthEx),(xLoc+1+widthEx))=0.8;
%FtifFile= fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum),strcat(num2str(tPt),'.bmp')); %char(tifFileLst(tPt)); % 4->3 Bot Across rt 1, 2-4
FtifFile= fullfile(char(expDir),num2str(plateNum),strcat(num2str(tPt),'.bmp')); Fram((yLoc+1+widthEx),(xLoc+1):(xLoc+1+widthEx))=0.8;
Fram=Fram(coord(1):coord(3),coord(2):coord(4));
end
% Cut Spot Out Of Image
% Fbg=FexpScanBMtp{selScan,1}(rIm,cIm,tPt);
Fbg=FexpScanBMtp{plateNum}(rIm,cIm,tPt); %{selScan,1}
% Fimg=imread(FtifFile); %,'PixelRegion', {[coord(1),coord(3)],[coord(2),coord(4)]});
Fcutsc=Fimg(coord(1):coord(3),coord(2):coord(4));
if doCircle==1
%varExt=size(Fcutsc)-size(Fram);
varExtPre=[((yLoc-0)-coord(1)) ((xLoc-0)-coord(2))];
varExtPost=[(coord(3)-(yLoc+diaExt+1)) (coord(4)-(xLoc+diaExt+1))];
% Fram=padarray(Fram,[expansion expansion],1,'pre');
Fram=padarray(Fram,[varExtPre],1,'pre');
Fram=padarray(Fram,[varExtPost],1,'post');
% Fram=padarray(Fram,rem(varExt,2),1,'post');
%Fram=padarray(Fram,floor((varExt-2)./2),1);
end
% Invert Image
Fcutsc=double(Fcutsc) .* Fram;
%Fcutsc=Fcutsc .* uint8(Fram);
Fcutsc=uint8(Fcutsc);
%Fcutsc=255 - (Fcutsc-Fbg);
Fcutsc=(Fcutsc-Fbg);
%Time series annotation**************************
tmPtTx=[];
tenths=(round(10*(Exp(expN).Dexp(DexpN).scan(plateNum).plate(1).tSeries(tPt)))) ./10;
tmPtTx=strcat(num2str(tenths),'h');
Fimg= imread(FtifFile); % imwrite(Fcutsc,(fullfile(resDir,'Fotos',strcat('FScan',num2str(selScan),'_timePt-',num2str(tPt),'.jpg'))),'jpg');
% For Visualization Purposes *********************** aCnt=aCnt+1;
Fram= ones(2075,1400); %(size(Empsc,1),size(Empsc,2)); if aCnt==1 %||tPt==1
%FRAME ANALYSIS AREA******************************************************* EZvapendLabel
if size(FexpScanSpots,2)>1 Fstrip=vertcat(Fcutsc,Bspace);
coord=FexpScanSpots{plateNum}{rIm,cIm,tPt}; Hspace=zeros(size(Fstrip,1),4)+1200; %+255
else Fstrip=horzcat(Fstrip,Hspace);
coord=FexpScanSpots{plateNum,1,1}{rIm,cIm,tPt}; end
end makeVis=1;
if size(anlZoneRefs,2)>1 if aCnt>1
xyLoc=anlZoneRefs{plateNum}{rIm,cIm,tPt}; %F_Snum EZvapendLabel
else vcat=vertcat(Fcutsc,Bspace);
xyLoc=anlZoneRefs{F_Snum,1,1}{rIm,cIm,tPt}; %Hspace=zeros(size(Fstrip,1),4)+255;
end Fstrip=horzcat(Fstrip,vcat,Hspace);
xLoc= xyLoc(2); end
yLoc= xyLoc(1);
%*************CIRCLE related************************* % For Visualization Purposes only
if makeVis==1
doCircle=1; %Temp test value insertion to get square images % if aCnt==1,figure;end
if doCircle==1, % resIm=uint8((double(BGsc) + OptmapOnesDbl) .* double(fullsc));
Fram= FoptCirMask; % clear('OptmapOnesDbl')
hfstrip=imagesc(Fcutsc); colormap(gray); %hfstrip=imshow(Fcutsc); colormap(gray); %hfscanIm=imagesc(Fcutsc); colormap(gray);
else ghandles.hfstrip=gcf;
%1->2 across rt 1, 2-4 haxis=gca;
Fram(yLoc,xLoc:(xLoc+widthEx))=0.8; title(strcat('Scan',num2str(plateNum),'->timePt-',num2str(tPt)));
%1->4 down lf 1-3, 2 clf(hfstrip,'reset'); colormap(gray); %clf(hfscanIm,'reset'); colormap(gray);
Fram((yLoc+1):(yLoc+1+widthEx),xLoc)=0.8; set(ghandles.hfstrip,'NumberTitle','off')
%2->3 down rt 1-3, 4 end
Fram(yLoc:(yLoc+widthEx),(xLoc+1+widthEx))=0.8; expLabel=strcat('->',char(fullfile(char(OLresDir),num2str(OLplateNum))))
%4->3 Bot Across rt 1, 2-4 % catch
Fram((yLoc+1+widthEx),(xLoc+1):(xLoc+1+widthEx))=0.8; % expLabel=strcat('->',char(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum))))
Fram= Fram(coord(1):coord(3),coord(2):coord(4)); if expN==1
end set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay1,'string')),expLabel)) %ghandles.hfIm %{'ExpOutmat'} %strcat('EASYconsole- ',char(resDir)))
%CUT SPOT OUT OF IMAGE***************************************************** elseif expN==2
set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay2,'string')),expLabel))
%Fbg= FexpScanBMtp{selScan,1}(rIm,cIm,tPt); elseif expN==3
Fbg= FexpScanBMtp{plateNum}(rIm,cIm,tPt); %{selScan,1} set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay3,'string')),expLabel))
%Fimg= imread(FtifFile); %,'PixelRegion', {[coord(1),coord(3)],[coord(2),coord(4)]}); end
Fcutsc= Fimg(coord(1):coord(3),coord(2):coord(4)); %hgsave(fullfile(resDir,'Fotos',strcat('FScan',num2str(selScan),'_timePt-',num2str(tPt))));
if doCircle==1 catch
%varExt=size(Fcutsc)-size(Fram);
varExtPre= [((yLoc-0)-coord(1)) ((xLoc-0)-coord(2))];
varExtPost= [(coord(3)-(yLoc+diaExt+1)) (coord(4)-(xLoc+diaExt+1))];
% Fram=padarray(Fram,[expansion expansion],1,'pre');
Fram=padarray(Fram,[varExtPre],1,'pre');
Fram=padarray(Fram,[varExtPost],1,'post');
%Fram=padarray(Fram,rem(varExt,2),1,'post');
%Fram=padarray(Fram,floor((varExt-2)./2),1);
end
%INVERT IMGAGE
Fcutsc=double(Fcutsc) .* Fram;
%Fcutsc= Fcutsc .* uint8(Fram);
Fcutsc=uint8(Fcutsc);
%Fcutsc=255 - (Fcutsc-Fbg);
Fcutsc=(Fcutsc-Fbg);
%Time series annotation**************************
tmPtTx=[];
tenths=(round(10*(Exp(expN).Dexp(DexpN).scan(plateNum).plate(1).tSeries(tPt)))) ./10;
tmPtTx= strcat(num2str(tenths),'h');
%imwrite(Fcutsc,(fullfile(resDir,'Fotos',strcat('FScan',num2str(selScan),'_timePt-',num2str(tPt),'.jpg'))),'jpg');
aCnt=aCnt+1;
if aCnt==1 %||tPt==1
EZvapendLabel
Fstrip= vertcat(Fcutsc,Bspace);
Hspace= zeros(size(Fstrip,1),4)+1200; %+255
Fstrip= horzcat(Fstrip,Hspace);
end
makeVis=1;
if aCnt>1
EZvapendLabel
vcat= vertcat(Fcutsc,Bspace);
%Hspace= zeros(size(Fstrip,1),4)+255;
Fstrip= horzcat(Fstrip,vcat,Hspace);
end
% For Visualization Purposes only
if makeVis==1
%if aCnt==1,figure;end
%resIm= uint8((double(BGsc) + OptmapOnesDbl) .* double(fullsc));
%clear('OptmapOnesDbl')
hfstrip=imagesc(Fcutsc); colormap(gray); %hfstrip=imshow(Fcutsc); colormap(gray); %hfscanIm=imagesc(Fcutsc); colormap(gray);
ghandles.hfstrip=gcf;
haxis=gca;
title(strcat('Scan',num2str(plateNum),'->timePt-',num2str(tPt)));
clf(hfstrip,'reset'); colormap(gray); %clf(hfscanIm,'reset'); colormap(gray);
set(ghandles.hfstrip,'NumberTitle','off')
end
expLabel=strcat('->',char(fullfile(char(OLresDir),num2str(OLplateNum))))
%catch
% expLabel=strcat('->',char(fullfile(Exp(expN).Dexp(DexpN).ExpFoldr,num2str(plateNum))))
if expN==1
set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay1,'string')),expLabel)) %ghandles.hfIm %{'ExpOutmat'} %strcat('EASYconsole- ',char(resDir)))
elseif expN==2
set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay2,'string')),expLabel))
elseif expN==3
set(ghandles.hfstrip,'Name', strcat(char(get(ghandles.OLay3,'string')),expLabel))
end end
end
%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 %figure(ghandles.hFstrip)
catch imshow(Fstrip);
end %{
%figure(ghandles.hFstrip) %if tPt==tPtLength %length(tifFileLst)
imshow(Fstrip); %imwrite(Fstrip,(fullfile(resDir,'Fotos',strcat('Fstrip','S',num2str(selScan),'P',num2str(F_Pnum),'r',num2str(F_Rusrnum),'c',num2str(F_Cusrnum),'.jpg'))),'jpg');
%{ F_name=strcat(fnamemod,'_Fstrip','.jpg');
%if tPt==tPtLength %length(tifFileLst)
%imwrite(Fstrip,(fullfile(resDir,'Fotos',strcat('Fstrip','S',num2str(selScan),'P',num2str(F_Pnum),'r',num2str(F_Rusrnum),'c',num2str(F_Cusrnum),'.jpg'))),'jpg');
F_name= strcat(fnamemod,'_Fstrip','.jpg');
%dfname=(fullfile(resDir,'Fotos',char(F_name)));
%delete(dfname); % imwrite nolonger overwrites ??why 14_0729
imwrite(Fstrip,(fullfile(resDir,'Fotos',char(F_name))),'jpg','Quality',100);
F_name= strcat(fnamemod,'_Fstrip','.tif');
%dfname=(fullfile(resDir,'Fotos',char(F_name))); %dfname=(fullfile(resDir,'Fotos',char(F_name)));
%delete(dfname); % imwrite nolonger overwrites ??why %delete(dfname); % imwrite nolonger overwrites ??why 14_0729
imwrite(Fstrip,(fullfile(resDir,'Fotos',char(F_name))),'tif'); imwrite(Fstrip,(fullfile(resDir,'Fotos',char(F_name))),'jpg','Quality',100);
%end F_name=strcat(fnamemod,'_Fstrip','.tif');
%} %dfname=(fullfile(resDir,'Fotos',char(F_name)));
%[output_txt]=datatipp(obj,event_obj); %delete(dfname); % imwrite nolonger overwrites ??why
%datacursormode off; imwrite(Fstrip,(fullfile(resDir,'Fotos',char(F_name))),'tif');
%datacursormode on; %end
%close(figure(hsafety)) %}
end %function end %[output_txt]=datatipp(obj,event_obj);
%datacursormode off;
%datacursormode on;
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX %close(figure(hsafety))
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

View File

@@ -1,223 +1,199 @@
%EZusrSelRef %EZusrSelRef
%User Select Reference Diaglog Box % User Select Reference Diaglog Box
try try
if n==1 && ~exist('RF1scanN','var') && ~exist('RF2scanN','var') %change || && if n==1 && ~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:',...
'Enter GeneName of Your Reference:'}; 'Enter GeneName of Your Reference:'};
rfMPstr= cell2mat(answer(1)); rfMPstr=cell2mat(answer(1));
rfMPcomas=strfind((cell2mat(answer(1))),','); rfMPcomas=strfind((cell2mat(answer(1))),',');
n=0; n=0;
if isempty(rfMPcomas)|| max(rfMPcomas)== length(rfMPstr) if isempty(rfMPcomas)|| max(rfMPcomas)==length(rfMPstr)
usrMPs= rfMPstr usrMPs=rfMPstr
else else
for i= rfMPcomas, for i=rfMPcomas,
n=n+1 n=n+1
usrMPs(n)= str2double(rfMPstr(i-1:i)) usrMPs(n)=str2double(rfMPstr(i-1:i))
if i== max(rfMPcomas) if i==max(rfMPcomas)
usrMPs(n+1)= str2double(rfMPstr(i:end)) usrMPs(n+1)=str2double(rfMPstr(i:end))
end end
end end
end end
usrMPs= answer(1); usrMPs=answer(1);
refGene= answer(2); refGene=answer(2);
%} %}
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 '}
dlg_title='User Reference Input'; dlg_title='User Reference Input';
num_lines=1; num_lines=1;
def={'None','Specifics Term'}; def={'None','Specifics Term'};
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
for mp=1:length(Exp(expN).Dexp(DexpN).MP)
%try for ind384=1:384
for mp=1:length(Exp(expN).Dexp(DexpN).MP)
for ind384=1:384
spN=spN+1; spN=spN+1;
end
%catch
%end %try for user selected Reference routine
end
%***********DISPERSE REFERENCE PLATES
Exp(expN).Dexp(DexpN).RFmdPindx=[];
Exp(expN).Dexp(DexpN).RFmdPpltN=[];
if exist('drf','var') %('RF1scanN','var')
%Det. index of change from one MP to the next
i=2;
chgIndx(1)=1;
for j=1:length(drf(:,3))
if j>1
if cell2mat(drf(j,3))~= cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
end
end
chgIndx(length(chgIndx)+1)= length(drf)+1;
uu=zeros(size(drf,1),4);
uu(:,1:4)= cell2mat(drf(:,3:6))
vv= zeros(length(drf),DMnum);
%************************************
dMPs= unique(cell2mat(drf(:,3)));
%*****************************************
%{
for mm=1:MPnum
nonZrfIndx.mp{mm,:}=drfPindx((find(drfPindx(:,mm))),mm);
end
%}
%nzValsG= zeros(DMnum,size(drf,1));
%nzValsAcc= zeros(DMnum,384);
for mm=1:length(dMPs) % length(chgIndx)
for d=1:(DMnum)
medianIndxDisp=[];
NZrefIndxP=[];
nonZeroValsP=[];
medValLstDisp=[];
rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d);
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));
%vv= Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
nonZeroValsP= nonzeros(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
std1Disp= std(nonZeroValsP);
mean1Disp= mean(nonZeroValsP);
minDisp= min(nonZeroValsP);
maxDisp= max(nonZeroValsP);
drfVals=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
%nzValsAcc(mm).DM(d,:)= nonZeroValsP;
%MEDIAN Determination for PLATES with Dispersed RFs
%NZrefIndxP= NZrefIndxP %find(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
if isempty(NZrefIndxP), nonZeroCntDisp=0, medianIndxDisp= NZrefIndxP;
else nonZeroCntDisp=length(NZrefIndxP);
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) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero
medValLstDisp= Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(medianIndxDisp,5);
%medValList1Disp{d}= medValLstDisp;
mval1Disp=median(medValLstDisp); %mval1=median(Exp(expN).Dexp(DexpN).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5));
nonZeroMedPosIndx=find(mval1Disp==nonZeroValsP); %(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5))); %(nonZeroIndxDisp,5))); %((nonZrfIndx.mp{dMPs(mm),:}),5)));
RFmd1posD= NZrefIndxP(nonZeroMedPosIndx); %drfPindx((RFmd1posIndx),dMPs(mm));
RFmd1locD(1)= ceil(RFmd1posD/24); %calc r value
RFmd1locD(2)= RFmd1posD - ((RFmd1locD(1)-1)*24); %calc c value
lstindx=lstindx+1;
lstindxOrf= lstindxOrf+1;
aa(lstindx,1)= {strcat('RF1mdP(',num2str(d),')')};
aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))};
bb(lstindxOrf,1)= {strcat('RF1mdP(',num2str(d),')')};
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).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).RFmdPscanN(d,dMPs(mm))=rf1scNdisp;
Exp(expN).Dexp(DexpN).RFmedianP(d,dMPs(mm))= mval1Disp;
Exp(expN).Dexp(DexpN).stdP(d,dMPs(mm))= std1Disp;
Exp(expN).Dexp(DexpN).meanP(d,dMPs(mm))= mean1Disp;
Exp(expN).Dexp(DexpN).minP(d,dMPs(mm))= minDisp;
Exp(expN).Dexp(DexpN).maxP(d,dMPs(mm))= maxDisp;
else
% 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
medianCalcFailedD= 'To Few nonZero spots for valid median RF1 selection'
firstZeroDindx= find(((Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5))==0),1,'first');
firstZeroD= drfPindx((firstZeroDindx),dMPs(mm));
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???
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!'
try
firstZeroindxD= find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first');
firstZeroPindx= uu(firstZeroindxD,4);
Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))= dMPs(mm);
Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=firstZeroPindx;
catch
catchissue='try at Ln565'
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
end end
try %catch
Exp(expN).Dexp(DexpN).RFmdPpltN= dMPs(mm); %end %try for user selected Reference routine
catch
catchissue='Ln619'
Exp(expN).Dexp(DexpN).RFmdPpltN= 1; %This might keep from breaking BUT ???
end
error='EZexpSel lineAfter 565'
end %try ~ln565
end %for d=0:DMnum
end %for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES******************************************************************
uu= horzcat(uu,vv);
for d=1:DMnum
medianIndxG=[];
NZrfIndxG=[];
minG=min(nonzeros(vv(:,d)));
maxG=max(nonzeros(vv(:,d)));
RFmeanG= mean(nonzeros(vv(:,d)));
RFstdG= std(nonzeros(vv(:,d)));
NZrfIndxG= find(nonzeros(vv(:,d)));
if isempty(RFmeanG), nonZeroCntD=0, %medianIndxDisp= RFmeanG(d);
else nonZeroCntD= length(nonzeros(vv(:,d)));
end end
%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(:); end
if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero % Disperse Reference Plates
Exp(expN).Dexp(DexpN).RFmdPindx=[];
mvalsDG= median(vv(medianIndxD,d)); %(nonzeros(vv(:,d))); Exp(expN).Dexp(DexpN).RFmdPpltN=[];
nzPosIndxDG=find(mvalsDG==vv(:,d)); if exist('drf','var') % ('RF1scanN','var')
RFmdDGloc(d,1)= uu(nzPosIndxDG,1); %MP of distributedGlobal Median value %Det. index of change from one MP to the next
RFmdDGloc(d,2)= uu(nzPosIndxDG,2); %calc r value i=2;
RFmdDGloc(d,3)= uu(nzPosIndxDG,3); %calc c value chgIndx(1)=1;
lstindx=lstindx+1; for j=1:length(drf(:,3))
lstindxOrf= lstindxOrf+1; if j>1
aa(lstindx,1)= {strcat('RF1mdG(',num2str(d),')')}; if cell2mat(drf(j,3))~=cell2mat(drf((j-1),3)), chgIndx(i)=j; i=i+1; end
aa(lstindx,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; end
bb(lstindxOrf,1)= {strcat('RF1mdG(',num2str(d),')')}; end
bb(lstindxOrf,2)={strcat(':',num2str(RFmdDGloc(d,1)),':',num2str(RFmdDGloc(d,2)),':',num2str(RFmdDGloc(d,3)))}; %,'std_',num2str(std2))}; chgIndx(length(chgIndx)+1)=length(drf)+1;
uu=zeros(size(drf,1),4);
uu(:,1:4)=cell2mat(drf(:,3:6))
vv=zeros(length(drf),DMnum);
dMPs=unique(cell2mat(drf(:,3)));
%{
for mm=1:MPnum
nonZrfIndx.mp{mm,:}=drfPindx((find(drfPindx(:,mm))),mm);
end
%}
% nzValsG=zeros(DMnum,size(drf,1));
% nzValsAcc=zeros(DMnum,384);
for mm=1:length(dMPs) % length(chgIndx)
for d=1:(DMnum)
medianIndxDisp=[];
NZrefIndxP=[];
nonZeroValsP=[];
medValLstDisp=[];
rf1scNdisp=((dMPs(mm)-1)*DMnum)+(d);
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));
% vv=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
vv(chgIndx(mm):(chgIndx(mm+1)-1),d)=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
nonZeroValsP=nonzeros(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
std1Disp=std(nonZeroValsP);
mean1Disp=mean(nonZeroValsP);
minDisp=min(nonZeroValsP);
maxDisp=max(nonZeroValsP);
drfVals=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5);
%nzValsAcc(mm).DM(d,:)=nonZeroValsP;
%MEDIAN Determination for PLATES with Dispersed RFs
%NZrefIndxP=NZrefIndxP %find(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5));
if isempty(NZrefIndxP)
nonZeroCntDisp=0
medianIndxDisp=NZrefIndxP;
else
nonZeroCntDisp=length(NZrefIndxP);
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) && length(medianIndxDisp) > 3 %(.15*384) %To calc. a median, more than 15% of spots must be nonZero
medValLstDisp=Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(medianIndxDisp,5);
%medValList1Disp{d}=medValLstDisp;
mval1Disp=median(medValLstDisp); %mval1=median(Exp(expN).Dexp(DexpN).scan(RF1mps).plate(1).CFout(1:384,5)); %CFout(1:383,5));
nonZeroMedPosIndx=find(mval1Disp==nonZeroValsP); %(Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5))); %(nonZeroIndxDisp,5))); %((nonZrfIndx.mp{dMPs(mm),:}),5)));
RFmd1posD=NZrefIndxP(nonZeroMedPosIndx); %drfPindx((RFmd1posIndx),dMPs(mm));
RFmd1locD(1)=ceil(RFmd1posD/24); %calc r value
RFmd1locD(2)=RFmd1posD - ((RFmd1locD(1)-1)*24); %calc c value
lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1;
aa(lstindx,1)={strcat('RF1mdP(',num2str(d),')')};
aa(lstindx,2)={strcat(':',num2str(dMPs(mm)),':',num2str(RFmd1locD(1)),':',num2str(RFmd1locD(2)))};
bb(lstindxOrf,1)={strcat('RF1mdP(',num2str(d),')')};
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).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).RFmdPscanN(d,dMPs(mm))=rf1scNdisp;
Exp(expN).Dexp(DexpN).RFmedianP(d,dMPs(mm))=mval1Disp;
Exp(expN).Dexp(DexpN).stdP(d,dMPs(mm))=std1Disp;
Exp(expN).Dexp(DexpN).meanP(d,dMPs(mm))=mean1Disp;
Exp(expN).Dexp(DexpN).minP(d,dMPs(mm))=minDisp;
Exp(expN).Dexp(DexpN).maxP(d,dMPs(mm))=maxDisp;
else
% 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
medianCalcFailedD='To Few nonZero spots for valid median RF1 selection'
firstZeroDindx=find(((Exp(expN).Dexp(DexpN).scan(rf1scNdisp).plate(1).CFout(NZrefIndxP,5))==0),1,'first');
firstZeroD=drfPindx((firstZeroDindx),dMPs(mm));
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???
end
catch
medianCalcTryFailed1D='Failed! Failed! Ln565 {Dispersed RF1s} "try" But process continued with bogus Plate spot value!'
try
firstZeroindxD=find(vv((chgIndx(d):chgIndx(d+1)-1),5)==0,1,'first');
firstZeroPindx=uu(firstZeroindxD,4);
Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm))=dMPs(mm);
Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm))=firstZeroPindx;
catch
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
end
try
Exp(expN).Dexp(DexpN).RFmdPpltN=dMPs(mm);
catch
Exp(expN).Dexp(DexpN).RFmdPpltN=1; %This might keep from breaking BUT ???
end
end
end % for d=0:DMnum
end % for mm=1:length(dMPs)
Exp(expN).Dexp(DexpN).RFmdGLB(d)= strcat(aa(lstindx,1),aa(lstindx,2)); % Calc. Global Mean, Std, And Median For Distributed References
Exp(expN).Dexp(DexpN).RFmdGindx(d)= nzPosIndxDG; uu=horzcat(uu,vv);
Exp(expN).Dexp(DexpN).RFmdGpltN(d)= RFmdDGloc(d,1); for d=1:DMnum
Exp(expN).Dexp(DexpN).RFmdGscanN(d)= uu(nzPosIndxDG,4); medianIndxG=[];
Exp(expN).Dexp(DexpN).RFmedianG(d)= mvalsDG; NZrfIndxG=[];
Exp(expN).Dexp(DexpN).RFminG(d)= minG; minG=min(nonzeros(vv(:,d)));
Exp(expN).Dexp(DexpN).RFmaxG(d)= maxG; maxG=max(nonzeros(vv(:,d)));
Exp(expN).Dexp(DexpN).RFstdG(d)= RFstdG; RFmeanG=mean(nonzeros(vv(:,d)));
Exp(expN).Dexp(DexpN).RFmeanG(d)= RFmeanG; RFstdG=std(nonzeros(vv(:,d)));
NZrfIndxG=find(nonzeros(vv(:,d)));
if isempty(RFmeanG)
nonZeroCntD=0
% medianIndxDisp=RFmeanG(d);
else
nonZeroCntD=length(nonzeros(vv(:,d)));
end
end % Calc. of median requires an odd number of indx items
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
end % if exist('drf','var') if ~isempty(NZrfIndxG) && length(medianIndxD) > (.15*size(drf,1)) % To calc. a median, more than 15% of spots must be nonZero
%END OF DISPERSE REFERENCE PLATAES CALCULATIONS AND LIST ADDITIONS mvalsDG=median(vv(medianIndxD,d)); % (nonzeros(vv(:,d)));
%********************************************************************* nzPosIndxDG=find(mvalsDG==vv(:,d));
RFmdDGloc(d,1)=uu(nzPosIndxDG,1); % MP of distributedGlobal Median value
RFmdDGloc(d,2)=uu(nzPosIndxDG,2); % calc r value
RFmdDGloc(d,3)=uu(nzPosIndxDG,3); % calc c value
lstindx=lstindx+1;
lstindxOrf=lstindxOrf+1;
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))};
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))};
Exp(expN).Dexp(DexpN).RFmdGLB(d)=strcat(aa(lstindx,1),aa(lstindx,2));
Exp(expN).Dexp(DexpN).RFmdGindx(d)=nzPosIndxDG;
Exp(expN).Dexp(DexpN).RFmdGpltN(d)=RFmdDGloc(d,1);
Exp(expN).Dexp(DexpN).RFmdGscanN(d)=uu(nzPosIndxDG,4);
Exp(expN).Dexp(DexpN).RFmedianG(d)=mvalsDG;
Exp(expN).Dexp(DexpN).RFminG(d)=minG;
Exp(expN).Dexp(DexpN).RFmaxG(d)=maxG;
Exp(expN).Dexp(DexpN).RFstdG(d)=RFstdG;
Exp(expN).Dexp(DexpN).RFmeanG(d)=RFmeanG;
end
end
end
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

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +1,23 @@
%EZvFigPrint.m Called by [P} button to produce S curves for publication % EZvFigPrint.m Called by [P} button to produce S curves for publication
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})
legFontSz= str2num(Exp(4).plotPars{3}) legFontSz=str2num(Exp(4).plotPars{3})
markerSz= str2num(Exp(4).plotPars{4}) markerSz=str2num(Exp(4).plotPars{4})
catch catch
lnwidth=4; lnwidth=4;
axisFontSz=36; axisFontSz=36;
legFontSz= 10; legFontSz=10;
markerSz=5; markerSz=5;
end end
if get(ghandles.printOL1,'Value')==1,zone= 1; end if get(ghandles.printOL1,'Value')==1,zone=1; end
if get(ghandles.printOL2,'Value')==1,zone= 2; end if get(ghandles.printOL2,'Value')==1,zone=2; end
if get(ghandles.printOL3,'Value')==1,zone= 3; end if get(ghandles.printOL3,'Value')==1,zone=3; end
semiLog=0; semiLog=0;
if isequal(get(ghandles.OLaxes1,'YScale'),'log'), semiLog=1;end if isequal(get(ghandles.OLaxes1,'YScale'),'log'), semiLog=1;end
@@ -29,136 +27,121 @@ clear legName tmp
figure figure
set(gcf,'OuterPosition',(get(0,'screensize'))) set(gcf,'OuterPosition',(get(0,'screensize')))
hn=0; hn=0;
if isequal(get(Exp(zone).hOL(1),'Visible'),'on') if isequal(get(Exp(zone).hOL(1),'Visible'),'on')
disphOLX(1)= {get(Exp(zone).hOL(1),'XData')} disphOLX(1)={get(Exp(zone).hOL(1),'XData')}
disphOLY(1)= {get(Exp(zone).hOL(1),'YData')} disphOLY(1)={get(Exp(zone).hOL(1),'YData')}
tmp(1)=strrep(Exp(zone).hOLname(1),'_','-') tmp(1)=strrep(Exp(zone).hOLname(1),'_','-')
try try
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)
if isequal(Exp(zone).hOLname(hN), Exp(zone).hOLname(j))%&& ... if isequal(Exp(zone).hOLname(hN), Exp(zone).hOLname(j))%&& ...
%isequal(get(Exp(zone).hOL(hN),'Visible'),'on') % isequal(get(Exp(zone).hOL(hN),'Visible'),'on')
notDup=0; notDup=0;
break break
else else
notDup=1; notDup=1;
end
end
if notDup==1
if isequal(get(Exp(zone).hOL(hN),'Visible'),'on')
hn=hn+1
try
disphOLX(hn)={get(Exp(zone).hOL(hN),'XData')};
disphOLY(hn)={get(Exp(zone).hOL(hN),'YData')};
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
try
disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')};
disphOLbY(hn)={get(Exp(zone).hOLb(hN),'YData')};
catch
end
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
catch ME
disp(ME)
display('error leading to line 59 catch')
end end
end end
if notDup==1
if isequal(get(Exp(zone).hOL(hN),'Visible'),'on')
hn=hn+1
try
disphOLX(hn)= {get(Exp(zone).hOL(hN),'XData')};
disphOLY(hn)= {get(Exp(zone).hOL(hN),'YData')};
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
try
disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')};
disphOLbY(hn)= {get(Exp(zone).hOLb(hN),'YData')};
catch end
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
catch ME
disp(ME)
display('error leading to line 59 catch')
end
end
end
end
for i=1:hn
if semiLog==0
hprint=plot(cell2mat(disphOLX(i)),cell2mat(disphOLY(i)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')};
else
hprint=semilogy(cell2mat(disphOLX(i)),cell2mat(disphOLY(i)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')};
end
hold all
end end
end
if Exp(zone).CompositPlot~=1 %Standard plot, Not a Composite Plot for i=1:hn
legName= tmp if semiLog==0
hleg=legend((legName),'location','NEO') hprint=plot(cell2mat(disphOLX(i)),cell2mat(disphOLY(i)))
set(hleg,'fontsize',legFontSz) set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')};
else
hprint=semilogy(cell2mat(disphOLX(i)),cell2mat(disphOLY(i)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(i)={get(hprint,'color')};
end
hold all
end
try if Exp(zone).CompositPlot~=1 % Standard plot, Not a Composite Plot
legName=tmp
hleg=legend((legName),'location','NEO')
set(hleg,'fontsize',legFontSz)
try
for i=1:hn for i=1:hn
if semiLog==0 if semiLog==0
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')
else else
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
% End of Standard Overlay Plot
else % if Composite Plot
for hcN=1:(Exp(zone).cTraceN -1)
disphOLX(hcN)={get(Exp(zone).hCmean(hcN),'XData')};
disphOLY(hcN)={get(Exp(zone).hCmean(hcN),'YData')};
disphOLbX(hcN)={get(Exp(zone).hBound1(hcN),'XData')};
disphOLbY(hcN)={get(Exp(zone).hBound1(hcN),'YData')};
disphOLcX(hcN)={get(Exp(zone).hBound2(hcN),'XData')};
disphOLcY(hcN)={get(Exp(zone).hBound2(hcN),'YData')};
tmp(hcN)=(Exp(zone).cName(hcN))
if semiLog==0
hprint=plot(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')};
else
hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')};
end
hold all
legName=tmp
hleg=legend((legName),'location','NEO')
set(hleg,'fontsize',legFontSz)
%{
for i=1:hn
hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none')
end
%}
end
for i=1:(Exp(zone).cTraceN -1)
hold off hBprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)))
%*******End of Standard Overlay Plot*********************** set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6
else %if Composite Plot set(hBprint,'color',linecolor{i})
for hcN=1:(Exp(zone).cTraceN -1) hCprint=plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i)))
disphOLX(hcN)= {get(Exp(zone).hCmean(hcN),'XData')}; set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6
disphOLY(hcN)= {get(Exp(zone).hCmean(hcN),'YData')}; set(hBprint,'color',linecolor{i})
disphOLbX(hcN)={get(Exp(zone).hBound1(hcN),'XData')}; end
disphOLbY(hcN)= {get(Exp(zone).hBound1(hcN),'YData')}; hold off
disphOLcX(hcN)={get(Exp(zone).hBound2(hcN),'XData')}; end
disphOLcY(hcN)= {get(Exp(zone).hBound2(hcN),'YData')};
tmp(hcN)=(Exp(zone).cName(hcN))
if semiLog==0
hprint=plot(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')};
else
hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')};
end
hold all
legName= tmp
hleg=legend((legName),'location','NEO')
set(hleg,'fontsize',legFontSz)
%{
for i=1:hn
hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none')
end
%}
end
for i=1:(Exp(zone).cTraceN -1)
hBprint= plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)))
set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6
set(hBprint,'color',linecolor{i})
hCprint= plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i)))
set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6
set(hBprint,'color',linecolor{i})
end
hold off
end

View File

@@ -1,24 +1,23 @@
%EZvImagesOnly % EZvImagesOnly
asd=12 asd=12
dirLst=dir(ExpPath) 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
end end
tptLength=length(tptImLst); tptLength=length(tptImLst);
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)
set(expAxes,'xtick',[],'ytick',[]) set(expAxes,'xtick',[],'ytick',[])
@@ -29,4 +28,3 @@ expAxes=handles.Iaxes3;
imshow(I) imshow(I)
set(expAxes,'xtick',[],'ytick',[]) set(expAxes,'xtick',[],'ytick',[])

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
%Disk Image % Disk Image
%{ %{
%Imaging ToolBox method %Imaging ToolBox method
r=14; r=14;
A=zeros(70,70); %(fIntsc(refPtR:(refPtRExt),refPtC:(refPtCExt))) A=zeros(70,70); %(fIntsc(refPtR:(refPtRExt),refPtC:(refPtCExt)))
m= {40,40}; m={40,40};
A(m{:})=1; A(m{:})=1;
B= imdilate(A,strel('disk',r,0) ); B=imdilate(A,strel('disk',r,0) );
imshow(B) imshow(B)
area=pi*r^2 area=pi*r^2
@@ -18,45 +18,39 @@ clear all
%A=zeros(70,70); %A=zeros(70,70);
%A=zeros(r,r); %A=zeros(r,r);
%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);
center= [radius+2, radius+2]; center=[radius+2, radius+2];
[m n ]=size(circBoxA); [m n ]=size(circBoxA);
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));
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);
optCirMask=double(cirMask);
optCirMask(optCirMask==0)=0.8;
cirPixA= nnz(cirMask); % Foto Circle Fram(e)
optCirMask= double(cirMask);
optCirMask(optCirMask==0)= 0.8;
%+++++++++++Foto Circle Fram(e)+++++++++++++++++++++
expansion=2; expansion=2;
radExpan= radius+expansion; radExpan=radius+expansion;
FdiaExt=2*(radExpan); FdiaExt=2*(radExpan);
circBoxA=zeros(FdiaExt,FdiaExt); circBoxA=zeros(FdiaExt,FdiaExt);
center= [radExpan+1, radExpan+1]; center=[radExpan+1, radExpan+1];
[m n ]=size(circBoxA); [m n ]=size(circBoxA);
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,158 +3,144 @@
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})
legFontSz= str2num(Exp(4).plotPars{3}) legFontSz=str2num(Exp(4).plotPars{3})
markerSz= str2num(Exp(4).plotPars{4}) markerSz=str2num(Exp(4).plotPars{4})
catch catch
lnwidth=4; lnwidth=4;
axisFontSz=36; axisFontSz=36;
legFontSz= 10; legFontSz=10;
markerSz=5; markerSz=5;
end end
if get(ghandles.printOL1,'Value')==1,zone= 1; end if get(ghandles.printOL1,'Value')==1,zone=1; end
if get(ghandles.printOL2,'Value')==1,zone= 2; end if get(ghandles.printOL2,'Value')==1,zone=2; end
if get(ghandles.printOL3,'Value')==1,zone= 3; end if get(ghandles.printOL3,'Value')==1,zone=3; end
clear legName tmp clear legName tmp
figure figure
set(gcf,'OuterPosition',(get(0,'screensize'))) set(gcf,'OuterPosition',(get(0,'screensize')))
hn=0; hn=0;
if isequal(get(Exp(zone).hOL(1),'Visible'),'on') if isequal(get(Exp(zone).hOL(1),'Visible'),'on')
disphOLX(1)= {get(Exp(zone).hOL(1),'XData')} disphOLX(1)={get(Exp(zone).hOL(1),'XData')}
disphOLY(1)= {get(Exp(zone).hOL(1),'YData')} disphOLY(1)={get(Exp(zone).hOL(1),'YData')}
tmp(1)=strrep(Exp(zone).hOLname(1),'_','-') tmp(1)=strrep(Exp(zone).hOLname(1),'_','-')
try try
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)
if isequal(Exp(zone).hOLname(hN), Exp(zone).hOLname(j))%&& ... if isequal(Exp(zone).hOLname(hN), Exp(zone).hOLname(j)) %&& ...
%isequal(get(Exp(zone).hOL(hN),'Visible'),'on') % isequal(get(Exp(zone).hOL(hN),'Visible'),'on')
notDup=0; notDup=0;
break break
else else
notDup=1; notDup=1;
end end
end end
if notDup==1 if notDup==1
if isequal(get(Exp(zone).hOL(hN),'Visible'),'on') if isequal(get(Exp(zone).hOL(hN),'Visible'),'on')
hn=hn+1 hn=hn+1
try
disphOLX(hn)={get(Exp(zone).hOL(hN),'XData')};
disphOLY(hn)={get(Exp(zone).hOL(hN),'YData')};
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
try try
disphOLX(hn)= {get(Exp(zone).hOL(hN),'XData')}; disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')};
disphOLY(hn)= {get(Exp(zone).hOL(hN),'YData')}; disphOLbY(hn)={get(Exp(zone).hOLb(hN),'YData')};
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-') catch
try
disphOLbX(hn)={get(Exp(zone).hOLb(hN),'XData')};
disphOLbY(hn)= {get(Exp(zone).hOLb(hN),'YData')};
catch end
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
catch ME
disp(ME)
display('error leading to line 59 catch')
end end
tmp(hn)=strrep(Exp(zone).hOLname(hN),'_','-')
catch ME
disp(ME)
display('error leading to line 59 catch')
end end
end end
end end
end
for i=1:hn for i=1:hn
if semiLog==0 if semiLog==0
hprint=plot(cell2mat(disphOLX(i)),cell2mat(disphOLY(i))) hprint=plot(cell2mat(disphOLX(i)),cell2mat(disphOLY(i)))
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
if Exp(zone).CompositPlot~=1 %Standard plot, Not a Composite Plot if Exp(zone).CompositPlot~=1 % Standard plot, Not a Composite Plot
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
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')
else else
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
% End of Standard Overlay Plot
else %if Composite Plot
for hcN=1:(Exp(zone).cTraceN -1)
disphOLX(hcN)={get(Exp(zone).hCmean(hcN),'XData')};
disphOLY(hcN)={get(Exp(zone).hCmean(hcN),'YData')};
disphOLbX(hcN)={get(Exp(zone).hBound1(hcN),'XData')};
disphOLbY(hcN)={get(Exp(zone).hBound1(hcN),'YData')};
disphOLcX(hcN)={get(Exp(zone).hBound2(hcN),'XData')};
disphOLcY(hcN)={get(Exp(zone).hBound2(hcN),'YData')};
tmp(hcN)=(Exp(zone).cName(hcN))
hold off if semiLog==0
%*******End of Standard Overlay Plot*********************** hprint=plot(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
else %if Composite Plot set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
for hcN=1:(Exp(zone).cTraceN -1) set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
disphOLX(hcN)= {get(Exp(zone).hCmean(hcN),'XData')}; linecolor(hcN)={get(hprint,'color')};
disphOLY(hcN)= {get(Exp(zone).hCmean(hcN),'YData')}; else
disphOLbX(hcN)={get(Exp(zone).hBound1(hcN),'XData')}; hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
disphOLbY(hcN)= {get(Exp(zone).hBound1(hcN),'YData')}; set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
disphOLcX(hcN)={get(Exp(zone).hBound2(hcN),'XData')}; set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
disphOLcY(hcN)= {get(Exp(zone).hBound2(hcN),'YData')}; linecolor(hcN)={get(hprint,'color')};
tmp(hcN)=(Exp(zone).cName(hcN)) end
if semiLog==0
hprint=plot(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 6
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')};
else
hprint=semilogy(cell2mat(disphOLX(hcN)),cell2mat(disphOLY(hcN)))
set(hprint,'linewidth',lnwidth) %0.5 then 1.5 now 4.0
set(gca,'fontsize',axisFontSz) % 8 to 15 to 21
linecolor(hcN)={get(hprint,'color')};
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
hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none')
end
%{ %}
for i=1:hn end
hprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)),'marker','+','markerEdgeColor',cell2mat(linecolor(i)),'markerSize',markerSz, 'linestyle','none') for i=1:(Exp(zone).cTraceN -1)
end hBprint=plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i)))
%} set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6
end set(hBprint,'color',linecolor{i})
hCprint=plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i)))
for i=1:(Exp(zone).cTraceN -1) set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6
hBprint= plot(cell2mat(disphOLbX(i)),cell2mat(disphOLbY(i))) set(hBprint,'color',linecolor{i})
set(hBprint,'linewidth',.5) %lnwidth) %0.5 then 1.5 now 6 end
set(hBprint,'color',linecolor{i}) hold off
end
hCprint= plot(cell2mat(disphOLcX(i)),cell2mat(disphOLcY(i)))
set(hCprint,'linewidth',0.5) %lnwidth) %0.5 then 1.5 now 6
set(hBprint,'color',linecolor{i})
end
hold off
end

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

@@ -155,10 +155,10 @@ function [output_txt]=myupdatefcn(obj,event_obj)
global Exp global Exp
[output_txt]=datatipp(obj,event_obj); % datatipp is a Matlab function [output_txt]=datatipp(obj,event_obj); % datatipp is a Matlab function
gcf= Exp(4).guiFig; % gcf= ghandles.figure1 Mathworks Provided this line for Apple issue gcf=Exp(4).guiFig; % gcf=ghandles.figure1 Mathworks Provided this line for Apple issue
clkPos=getCursorInfo(datacursormode(gcf)); clkPos=getCursorInfo(datacursormode(gcf));
cpos=clkPos.Position; cpos=clkPos.Position;
htargetAxes= clkPos.Target; htargetAxes=clkPos.Target;
% datacursormode(gcf) % datacursormode(gcf)
if ghandles.Iaxes1==get(htargetAxes,'Parent')||... if ghandles.Iaxes1==get(htargetAxes,'Parent')||...
ghandles.Iaxes2==get(htargetAxes,'Parent')||... ghandles.Iaxes2==get(htargetAxes,'Parent')||...
@@ -212,12 +212,12 @@ function MPed1_Callback(hObject, eventdata, handles)
input=get(hObject,'String'); input=get(hObject,'String');
Max=floor(get(handles.MPsldr1,'max')); Max=floor(get(handles.MPsldr1,'max'));
Min=floor(get(handles.MPsldr1,'min')); Min=floor(get(handles.MPsldr1,'min'));
if str2num(input) >= Min && str2num(input) <= Max if str2num(input) >=Min && str2num(input) <=Max
display(input) display(input)
set(handles.MPsldr1,'value',str2double(input)); set(handles.MPsldr1,'value',str2double(input));
else else
if str2double(input) >= Max, set(handles.MPsldr1,'value',Max); set(handles.MPed1,'string',num2str(Max));end if str2double(input) >=Max, set(handles.MPsldr1,'value',Max); set(handles.MPed1,'string',num2str(Max));end
if str2double(input) <= Min, set(handles.MPsldr1,'value',Min),set(handles.MPed1,'string',num2str(Min));end if str2double(input) <=Min, set(handles.MPsldr1,'value',Min),set(handles.MPed1,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
@@ -232,7 +232,7 @@ function MPed1_Callback(hObject, eventdata, handles)
function MPed1_CreateFcn(hObject, eventdata, handles) function MPed1_CreateFcn(hObject, eventdata, handles)
global ghandles global ghandles
global Exp global Exp
ghandles.guiFig= gcf; ghandles.guiFig=gcf;
Exp(4).guiFig=gcf; Exp(4).guiFig=gcf;
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
@@ -271,12 +271,12 @@ function DMed1_Callback(hObject, eventdata, handles)
Max=floor(get(handles.DMsldr1,'max')); Max=floor(get(handles.DMsldr1,'max'));
Min=floor(get(handles.DMsldr1,'min')); Min=floor(get(handles.DMsldr1,'min'));
input=get(hObject,'String') input=get(hObject,'String')
if str2num(input) >= Min && str2num(input) <= Max if str2num(input) >=Min && str2num(input) <=Max
display(input) display(input)
set(handles.DMsldr1,'value',str2double(input)) set(handles.DMsldr1,'value',str2double(input))
else else
if str2num(input) >= Max, set(handles.DMsldr1,'value',Max); set(handles.DMed1,'string',num2str(Max));end if str2num(input) >=Max, set(handles.DMsldr1,'value',Max); set(handles.DMed1,'string',num2str(Max));end
if str2num(input) <= Min, set(handles.DMsldr1,'value',Min),set(handles.DMed1,'string',num2str(Min));end if str2num(input) <=Min, set(handles.DMsldr1,'value',Min),set(handles.DMed1,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -298,7 +298,7 @@ function Tptsldr1_Callback(hObject, eventdata, handles)
input=floor(get(hObject,'value')); input=floor(get(hObject,'value'));
display(input) display(input)
set(handles.Tpted1,'string',num2str(floor(input))) set(handles.Tpted1,'string',num2str(floor(input)))
prntHt= 0; prntHt=0;
EZVimDisplay EZVimDisplay
% Executes during object creation, after setting all properties. % Executes during object creation, after setting all properties.
@@ -319,12 +319,12 @@ function Tpted1_Callback(hObject, eventdata, handles)
input=get(hObject,'String') input=get(hObject,'String')
Max=floor(get(handles.Tptsldr1,'max')); Max=floor(get(handles.Tptsldr1,'max'));
Min=floor(get(handles.Tptsldr1,'min')); Min=floor(get(handles.Tptsldr1,'min'));
if str2double(input) >= Min && str2double(input) <= Max if str2double(input) >=Min && str2double(input) <=Max
display(input) display(input)
set(handles.Tptsldr1,'value',str2double(input)) set(handles.Tptsldr1,'value',str2double(input))
else else
if str2num(input) >= Max, set(handles.Tptsldr1,'value',Max); set(handles.Tpted1,'string',num2str(Max));end if str2num(input) >=Max, set(handles.Tptsldr1,'value',Max); set(handles.Tpted1,'string',num2str(Max));end
if str2num(input) <= Min, set(handles.Tptsldr1,'value',Min),set(handles.Tpted1,'string',num2str(Min));end if str2num(input) <=Min, set(handles.Tptsldr1,'value',Min),set(handles.Tpted1,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -365,12 +365,12 @@ function clrOlay1_Callback(hObject, eventdata, handles)
set(ghandles.OLay1,'string',{' '}) set(ghandles.OLay1,'string',{' '})
set(ghandles.OLexp1,'string',{''}) set(ghandles.OLexp1,'string',{''})
cla(ghandles.OLaxes1) cla(ghandles.OLaxes1)
Exp(1).traceN= 0; Exp(1).traceN=0;
%Exp(1).cTraceN= 0; %Exp(1).cTraceN=0;
Exp(1).hOL =[]; Exp(1).hOLb=[]; Exp(1).hOL=[]; Exp(1).hOLb=[];
Exp(1).hOLname={}; Exp(1).hOLexpNm={}; Exp(1).hOLresDir={}; Exp(1).hOLname={}; Exp(1).hOLexpNm={}; Exp(1).hOLresDir={};
Exp(1).hOLplateNum=[]; Exp(1).hOLplateNum=[];
Exp(1).hOLresDir= {}; Exp(1).hOLresDir={};
cla(ghandles.Dlaxes1); cla(ghandles.Dkaxes1); cla(ghandles.Draxes1); cla(ghandles.Dlaxes1); cla(ghandles.Dkaxes1); cla(ghandles.Draxes1);
cla(ghandles.DNLaxes1); cla(ghandles.DNLaxes1);
Exp(1).hL =[]; Exp(1).hLb=[]; Exp(1).hL =[]; Exp(1).hLb=[];
@@ -383,15 +383,15 @@ function clrOlay1_Callback(hObject, eventdata, handles)
Exp(1).hintLadj =[]; Exp(1).hintLadjb=[]; % 2016_0222 Exp(1).hintLadj =[]; Exp(1).hintLadjb=[]; % 2016_0222
% reset Composite Overlay plot to initialization values % reset Composite Overlay plot to initialization values
Exp(1).cTraceN= 1; Exp(1).cTraceN=1;
Exp(1).ll= []; Exp(1).rr= []; Exp(1).kk= []; Exp(1).ll=[]; Exp(1).rr=[]; Exp(1).kk=[];
Exp(1).cLmean= []; Exp(1).cRmean= []; Exp(1).cKmean= []; Exp(1).cLmean=[]; Exp(1).cRmean=[]; Exp(1).cKmean=[];
Exp(1).cTraceIndx= 1; Exp(1).cTraceIndx=1;
Exp(1).hCmean=[]; Exp(1).hCmean=[];
Exp(1).hBound1= []; Exp(1).hBound1=[];
Exp(1).hBound2= []; Exp(1).hBound2=[];
Exp(1).CompositPlot=0; Exp(1).CompositPlot=0;
Exp(1).Trace= []; %added for Trend BoxPlot data 17_1114 Exp(1).Trace=[]; %added for Trend BoxPlot data 17_1114
end end
% Executes on slider movement. % Executes on slider movement.
@@ -427,15 +427,15 @@ function MPed2_Callback(hObject, eventdata, handles)
input=get(hObject,'String'); input=get(hObject,'String');
Max=floor(get(handles.MPsldr2,'max')); Max=floor(get(handles.MPsldr2,'max'));
Min=floor(get(handles.MPsldr2,'min')); Min=floor(get(handles.MPsldr2,'min'));
if str2num(input) >= Min && str2num(input) <= Max if str2num(input) >=Min && str2num(input) <=Max
display(input) display(input)
set(handles.MPsldr2,'value',str2double(input)); set(handles.MPsldr2,'value',str2double(input));
else else
if str2num(input) >= Max, set(handles.MPsldr2,'value',Max); set(handles.MPed2,'string',num2str(Max));end if str2num(input) >=Max, set(handles.MPsldr2,'value',Max); set(handles.MPed2,'string',num2str(Max));end
if str2num(input) <= Min, set(handles.MPsldr2,'value',Min),set(handles.MPed2,'string',num2str(Min));end if str2num(input) <=Min, set(handles.MPsldr2,'value',Min),set(handles.MPed2,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
ghandles.guiFig= gcf; ghandles.guiFig=gcf;
Exp(4).guiFig=gcf; Exp(4).guiFig=gcf;
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
@@ -449,7 +449,7 @@ function MPed2_CreateFcn(hObject, eventdata, handles)
% hObject handle to MPed2 (see GCBO) % hObject handle to MPed2 (see GCBO)
global ghandles global ghandles
global Exp global Exp
ghandles.guiFig= gcf; ghandles.guiFig=gcf;
Exp(4).guiFig=gcf; Exp(4).guiFig=gcf;
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
@@ -488,12 +488,12 @@ function DMed2_Callback(hObject, eventdata, handles)
Max=floor(get(handles.DMsldr2,'max')); Max=floor(get(handles.DMsldr2,'max'));
Min=floor(get(handles.DMsldr2,'min')); Min=floor(get(handles.DMsldr2,'min'));
input=get(hObject,'String') input=get(hObject,'String')
if str2double(input) >= Min && str2double(input) <= Max if str2double(input) >=Min && str2double(input) <=Max
display(input) display(input)
set(handles.DMsldr2,'value',str2double(input)) set(handles.DMsldr2,'value',str2double(input))
else else
if str2double(input) >= Max, set(handles.DMsldr2,'value',Max); set(handles.DMed2,'string',num2str(Max));end if str2double(input) >=Max, set(handles.DMsldr2,'value',Max); set(handles.DMed2,'string',num2str(Max));end
if str2double(input) <= Min, set(handles.DMsldr2,'value',Min),set(handles.DMed2,'string',num2str(Min));end if str2double(input) <=Min, set(handles.DMsldr2,'value',Min),set(handles.DMed2,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -518,7 +518,7 @@ function Tptsldr2_Callback(hObject, eventdata, handles)
input=floor(get(hObject,'value')); input=floor(get(hObject,'value'));
display(input) display(input)
set(handles.Tpted2,'string',num2str(floor(input))) set(handles.Tpted2,'string',num2str(floor(input)))
prntHt= 0; prntHt=0;
EZVimDisplay EZVimDisplay
end end
@@ -539,12 +539,12 @@ function Tpted2_Callback(hObject, eventdata, handles)
input=get(hObject,'String') input=get(hObject,'String')
Max=floor(get(handles.Tptsldr2,'max')); Max=floor(get(handles.Tptsldr2,'max'));
Min=floor(get(handles.Tptsldr2,'min')); Min=floor(get(handles.Tptsldr2,'min'));
if str2double(input) >= Min && str2double(input) <= Max if str2double(input) >=Min && str2double(input) <=Max
display(input) display(input)
set(handles.Tptsldr2,'value',str2double(input)) set(handles.Tptsldr2,'value',str2double(input))
else else
if str2num(input) >= Max, set(handles.Tptsldr2,'value',Max); set(handles.Tpted2,'string',num2str(Max));end if str2num(input) >=Max, set(handles.Tptsldr2,'value',Max); set(handles.Tpted2,'string',num2str(Max));end
if str2num(input) <= Min, set(handles.Tptsldr2,'value',Min),set(handles.Tpted2,'string',num2str(Min));end if str2num(input) <=Min, set(handles.Tptsldr2,'value',Min),set(handles.Tpted2,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -562,7 +562,7 @@ function expSelPB2_Callback(hObject, eventdata, handles)
% hObject handle to expSelPB2 (see GCBO) % hObject handle to expSelPB2 (see GCBO)
global Exp global Exp
expN=2; expN=2;
prntHt= 0; prntHt=0;
EZexpSel EZexpSel
end end
@@ -583,13 +583,13 @@ function clrOlay2_Callback(hObject, eventdata, handles)
set(ghandles.OLay2,'string',{''}) set(ghandles.OLay2,'string',{''})
set(ghandles.OLexp2,'string',{''}) set(ghandles.OLexp2,'string',{''})
cla(ghandles.OLaxes2) cla(ghandles.OLaxes2)
Exp(2).traceN= 0; Exp(2).traceN=0;
%Exp(2).cTraceN= 0; %Exp(2).cTraceN=0;
Exp(2).hOL =[]; Exp(2).hOLb=[]; Exp(2).hOL =[]; Exp(2).hOLb=[];
Exp(2).hOLname={}; Exp(2).hOLexpNm={}; Exp(2).hOLresDir={} Exp(2).hOLname={}; Exp(2).hOLexpNm={}; Exp(2).hOLresDir={}
Exp(2).hOLplateNum=[]; Exp(2).hOLplateNum=[];
Exp(2).hOLresDir= {}; Exp(2).hOLresDir={};
cla(ghandles.Dlaxes2); cla(ghandles.Dkaxes2); cla(ghandles.Draxes2); cla(ghandles.Dlaxes2); cla(ghandles.Dkaxes2); cla(ghandles.Draxes2);
cla(ghandles.DNLaxes2); % 2016_0222 cla(ghandles.DNLaxes2); % 2016_0222
@@ -601,15 +601,15 @@ function clrOlay2_Callback(hObject, eventdata, handles)
Exp(2).rRF1=[]; Exp(2).hrRF2=[]; Exp(2).rRF1=[]; Exp(2).hrRF2=[];
%reset Composite Overlay plot to initialization values %reset Composite Overlay plot to initialization values
Exp(2).cTraceN= 1; Exp(2).cTraceN=1;
Exp(2).ll= []; Exp(2).rr= []; Exp(2).kk= []; Exp(2).ll=[]; Exp(2).rr=[]; Exp(2).kk=[];
Exp(2).cLmean= []; Exp(2).cRmean= []; Exp(2).cKmean= []; Exp(2).cLmean=[]; Exp(2).cRmean=[]; Exp(2).cKmean=[];
Exp(2).cTraceIndx= 1; Exp(2).cTraceIndx=1;
Exp(2).hCmean=[]; Exp(2).hCmean=[];
Exp(2).hBound1= []; Exp(2).hBound1=[];
Exp(2).hBound2= []; Exp(2).hBound2=[];
Exp(2).CompositPlot=0; Exp(2).CompositPlot=0;
Exp(2).Trace= []; %added for Trend BoxPlot data 17_1114 Exp(2).Trace=[]; %added for Trend BoxPlot data 17_1114
end end
@@ -646,15 +646,15 @@ function MPed3_Callback(hObject, eventdata, handles)
input=get(hObject,'String'); input=get(hObject,'String');
Max=floor(get(handles.MPsldr3,'max')); Max=floor(get(handles.MPsldr3,'max'));
Min=floor(get(handles.MPsldr3,'min')); Min=floor(get(handles.MPsldr3,'min'));
if str2num(input) >= Min && str2num(input) <= Max if str2num(input) >=Min && str2num(input) <=Max
display(input) display(input)
set(handles.MPsldr3,'value',str2double(input)); set(handles.MPsldr3,'value',str2double(input));
else else
if str2num(input) >= Max, set(handles.MPsldr3,'value',Max); set(handles.MPed3,'string',num2str(Max));end if str2num(input) >=Max, set(handles.MPsldr3,'value',Max); set(handles.MPed3,'string',num2str(Max));end
if str2num(input) <= Min, set(handles.MPsldr3,'value',Min),set(handles.MPed3,'string',num2str(Min));end if str2num(input) <=Min, set(handles.MPsldr3,'value',Min),set(handles.MPed3,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
ghandles.guiFig= gcf; ghandles.guiFig=gcf;
Exp(4).guiFig=gcf; Exp(4).guiFig=gcf;
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
@@ -666,7 +666,7 @@ end
function MPed3_CreateFcn(hObject, eventdata, handles) function MPed3_CreateFcn(hObject, eventdata, handles)
global ghandles global ghandles
global Exp global Exp
ghandles.guiFig= gcf; ghandles.guiFig=gcf;
Exp(4).guiFig=gcf; Exp(4).guiFig=gcf;
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
@@ -704,12 +704,12 @@ function DMed3_Callback(hObject, eventdata, handles)
Max=floor(get(handles.DMsldr3,'max')); Max=floor(get(handles.DMsldr3,'max'));
Min=floor(get(handles.DMsldr3,'min')); Min=floor(get(handles.DMsldr3,'min'));
input=get(hObject,'String') input=get(hObject,'String')
if str2num(input) >= Min && str2num(input) <= Max if str2num(input) >=Min && str2num(input) <=Max
display(input) display(input)
set(handles.DMsldr3,'value',str2double(input)) set(handles.DMsldr3,'value',str2double(input))
else else
if str2num(input) >= Max, set(handles.DMsldr3,'value',Max); set(handles.DMed3,'string',num2str(Max));end if str2num(input) >=Max, set(handles.DMsldr3,'value',Max); set(handles.DMed3,'string',num2str(Max));end
if str2num(input) <= Min, set(handles.DMsldr3,'value',Min),set(handles.DMed3,'string',num2str(Min));end if str2num(input) <=Min, set(handles.DMsldr3,'value',Min),set(handles.DMed3,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -732,7 +732,7 @@ function Tptsldr3_Callback(hObject, eventdata, handles)
input=floor(get(hObject,'value')); input=floor(get(hObject,'value'));
display(input) display(input)
set(handles.Tpted3,'string',num2str(floor(input))) set(handles.Tpted3,'string',num2str(floor(input)))
prntHt= 0; prntHt=0;
EZVimDisplay EZVimDisplay
end end
@@ -753,12 +753,12 @@ function Tpted3_Callback(hObject, eventdata, handles)
input=get(hObject,'String') input=get(hObject,'String')
Max=floor(get(handles.Tptsldr3,'max')); Max=floor(get(handles.Tptsldr3,'max'));
Min=floor(get(handles.Tptsldr3,'min')); Min=floor(get(handles.Tptsldr3,'min'));
if str2double(input) >= Min && str2double(input) <= Max if str2double(input) >=Min && str2double(input) <=Max
display(input) display(input)
set(handles.Tptsldr3,'value',str2double(input)) set(handles.Tptsldr3,'value',str2double(input))
else else
if str2num(input) >= Max, set(handles.Tptsldr3,'value',Max); set(handles.Tpted3,'string',num2str(Max));end if str2num(input) >=Max, set(handles.Tptsldr3,'value',Max); set(handles.Tpted3,'string',num2str(Max));end
if str2num(input) <= Min, set(handles.Tptsldr3,'value',Min),set(handles.Tpted3,'string',num2str(Min));end if str2num(input) <=Min, set(handles.Tptsldr3,'value',Min),set(handles.Tpted3,'string',num2str(Min));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -797,13 +797,13 @@ function clrOlay3_Callback(hObject, eventdata, handles)
set(ghandles.OLay3,'string',{''}) set(ghandles.OLay3,'string',{''})
set(ghandles.OLexp3,'string',{''}) set(ghandles.OLexp3,'string',{''})
cla(ghandles.OLaxes3); cla(ghandles.OLaxes3);
Exp(3).traceN= 0; Exp(3).traceN=0;
%Exp(3).cTraceN= 0; %Exp(3).cTraceN=0;
Exp(3).hOL =[]; Exp(3).hOLb=[]; Exp(3).hOL =[]; Exp(3).hOLb=[];
Exp(3).hOLname={}; Exp(3).hOLexpNm={}; Exp(3).hOLresDir={} Exp(3).hOLname={}; Exp(3).hOLexpNm={}; Exp(3).hOLresDir={}
Exp(3).hOLplateNum=[]; Exp(3).hOLplateNum=[];
Exp(3).hOLresDir= {}; Exp(3).hOLresDir={};
cla(ghandles.Dlaxes3); cla(ghandles.Dkaxes3); cla(ghandles.Draxes3); cla(ghandles.Dlaxes3); cla(ghandles.Dkaxes3); cla(ghandles.Draxes3);
cla(ghandles.DNLaxes3);% 2016_0222 cla(ghandles.DNLaxes3);% 2016_0222
@@ -815,15 +815,15 @@ function clrOlay3_Callback(hObject, eventdata, handles)
Exp(3).rRF1=[]; Exp(3).hrRF2=[]; Exp(3).rRF1=[]; Exp(3).hrRF2=[];
% Reset Composite Overlay plot to initialization values % Reset Composite Overlay plot to initialization values
Exp(3).cTraceN= 1; Exp(3).cTraceN=1;
Exp(3).ll= []; Exp(3).rr= []; Exp(3).kk= []; Exp(3).ll=[]; Exp(3).rr=[]; Exp(3).kk=[];
Exp(3).cLmean= []; Exp(3).cRmean= []; Exp(3).cKmean= []; Exp(3).cLmean=[]; Exp(3).cRmean=[]; Exp(3).cKmean=[];
Exp(3).cTraceIndx= 1; Exp(3).cTraceIndx=1;
Exp(3).hCmean=[]; Exp(3).hCmean=[];
Exp(3).hBound1= []; Exp(3).hBound1=[];
Exp(3).hBound2= []; Exp(3).hBound2=[];
Exp(3).CompositPlot=0; Exp(3).CompositPlot=0;
Exp(3).Trace= []; % added for Trend BoxPlot data 17_1114 Exp(3).Trace=[]; % added for Trend BoxPlot data 17_1114
% set(handles.expName3,'string',char(Exp(expN).resDir)); % set(handles.expName3,'string',char(Exp(expN).resDir));
end end
@@ -850,7 +850,7 @@ function listboxGnOrf_Callback(hObject, eventdata, handles)
zoneSel=3; zoneSel=3;
end end
%} %}
zoneSel= zonePB zoneSel=zonePB
orfLstSel=get(handles.GeneOrfTog,'value') orfLstSel=get(handles.GeneOrfTog,'value')
% zoneSel=get(handles.zonePB1,'value') % zoneSel=get(handles.zonePB1,'value')
expN=zoneSel; expN=zoneSel;
@@ -861,7 +861,7 @@ function listboxGnOrf_Callback(hObject, eventdata, handles)
% selGnOrf=Exp(zoneSel).Dexp(DexpN).srtGnLst(usrInxSel); %selGnOrf=Exp(zoneSel).srtGnLst(usrInxSel); % selGnOrf=Exp(zoneSel).Dexp(DexpN).srtGnLst(usrInxSel); %selGnOrf=Exp(zoneSel).srtGnLst(usrInxSel);
listboxGnOrf=get(handles.listboxGnOrf,'string'); listboxGnOrf=get(handles.listboxGnOrf,'string');
selGnOrf=listboxGnOrf(usrInxSel); selGnOrf=listboxGnOrf(usrInxSel);
tempLB= str2mat(selGnOrf) tempLB=str2mat(selGnOrf)
if isequal(tempLB(4:6),'cmp')||isequal(tempLB(3:6),'cmpG') if isequal(tempLB(4:6),'cmp')||isequal(tempLB(3:6),'cmpG')
lstBoxCmpFlg=1; lstBoxCmpFlg=1;
EZlstBoxCmpExt %Added for RF composite behavior 17_1010 EZlstBoxCmpExt %Added for RF composite behavior 17_1010
@@ -903,9 +903,9 @@ function GeneOrfTog_Callback(hObject, eventdata, handles)
orfLstSel=get(handles.GeneOrfTog,'value'); orfLstSel=get(handles.GeneOrfTog,'value');
%zoneSel=get(handles.zonePB1,'value') %zoneSel=get(handles.zonePB1,'value')
expN=zoneSel; expN=zoneSel;
if zoneSel==1,DexpN= (get(handles.DN1,'value')); cmpTog= get(handles.CompositeTog1,'value'); end if zoneSel==1,DexpN=(get(handles.DN1,'value')); cmpTog=get(handles.CompositeTog1,'value'); end
if zoneSel==2,DexpN= (get(handles.DN2,'value')); cmpTog= get(handles.CompositeTog2,'value'); end if zoneSel==2,DexpN=(get(handles.DN2,'value')); cmpTog=get(handles.CompositeTog2,'value'); end
if zoneSel==3,DexpN= (get(handles.DN3,'value')); cmpTog= get(handles.CompositeTog3,'value'); end if zoneSel==3,DexpN=(get(handles.DN3,'value')); cmpTog=get(handles.CompositeTog3,'value'); end
if orfLstSel==1 && cmpTog~=1 if orfLstSel==1 && cmpTog~=1
set(handles.listboxGnOrf,'value',1) set(handles.listboxGnOrf,'value',1)
set(handles.listboxGnOrf,'string',Exp(zoneSel).Dexp(DexpN).srtOrfLst) %set(handles.listboxGnOrf,'string',Exp(zoneSel).srtOrfLst) set(handles.listboxGnOrf,'string',Exp(zoneSel).Dexp(DexpN).srtOrfLst) %set(handles.listboxGnOrf,'string',Exp(zoneSel).srtOrfLst)
@@ -983,7 +983,7 @@ function printOL1_Callback(hObject, eventdata, handles)
% hObject handle to printOL1 (see GCBO) % hObject handle to printOL1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) % handles structure with handles and user data (see GUIDATA)
% If Enable == 'on', executes on mouse press in 5 pixel border. % If Enable =='on', executes on mouse press in 5 pixel border.
% Otherwise, executes on mouse press in 5 pixel border or over printol1. % Otherwise, executes on mouse press in 5 pixel border or over printol1.
global Exp global Exp
global ghandles global ghandles
@@ -1035,7 +1035,7 @@ end
% Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed
% handles structure with handles and user data (see GUIDATA) % handles structure with handles and user data (see GUIDATA)
% --- If Enable == 'on', executes on mouse press in 5 pixel border. % --- If Enable =='on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over printOL2. % --- Otherwise, executes on mouse press in 5 pixel border or over printOL2.
ads2=1 ads2=1
end end
@@ -1072,7 +1072,7 @@ end
% Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed
% handles structure with handles and user data (see GUIDATA) % handles structure with handles and user data (see GUIDATA)
% --- If Enable == 'on', executes on mouse press in 5 pixel border. % --- If Enable =='on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over printOL3. % --- Otherwise, executes on mouse press in 5 pixel border or over printOL3.
ads3=1 ads3=1
end end
@@ -1144,7 +1144,7 @@ function PrintFont_Callback(hObject, eventdata, handles)
try try
if ~isempty(Exp(4).plotPars) if ~isempty(Exp(4).plotPars)
default= Exp(4).plotPars; default=Exp(4).plotPars;
else else
default={'4','36','10','5'}; default={'4','36','10','5'};
end end
@@ -1159,7 +1159,7 @@ function PrintFont_Callback(hObject, eventdata, handles)
%{ %{
else else
default={'4','36','10','5'}; default={'4','36','10','5'};
Exp(4).plotPars= default; Exp(4).plotPars=default;
%} %}
end end
end end
@@ -1193,9 +1193,9 @@ function rawNorm_Callback(hObject, eventdata, handles)
traceN1=Exp(1).traceN; traceN1=Exp(1).traceN;
traceN2=Exp(2).traceN; traceN2=Exp(2).traceN;
traceN3=Exp(3).traceN; traceN3=Exp(3).traceN;
selTrace1= Exp(1).seltraceN; selTrace1=Exp(1).seltraceN;
selTrace2= Exp(2).seltraceN; selTrace2=Exp(2).seltraceN;
selTrace3= Exp(3).seltraceN; selTrace3=Exp(3).seltraceN;
dispAlg=get(handles.rawNorm,'value') dispAlg=get(handles.rawNorm,'value')
@@ -1484,7 +1484,7 @@ function HtMapTog3_Callback(hObject, eventdata, handles)
prntHt=0; prntHt=0;
expN=3; expN=3;
DexpN=Exp(3).DexpN; DexpN=Exp(3).DexpN;
resetTg= Exp(3).Dexp(DexpN).resetHtmpTg; resetTg=Exp(3).Dexp(DexpN).resetHtmpTg;
Exp(3).htmapPBsel=Exp(3).htmapPBsel+1; Exp(3).htmapPBsel=Exp(3).htmapPBsel+1;
if Exp(3).htmapPBsel==resetTg, Exp(3).htmapPBsel=0; end if Exp(3).htmapPBsel==resetTg, Exp(3).htmapPBsel=0; end
if Exp(3).htmapPBsel==3, set(handles.HtMapTog3,'string','N1') if Exp(3).htmapPBsel==3, set(handles.HtMapTog3,'string','N1')
@@ -1536,7 +1536,7 @@ Exp(1).traceN=0;
Exp(1).hOL =[]; Exp(1).hOLb=[]; Exp(1).hOL =[]; Exp(1).hOLb=[];
Exp(1).hOLname={}; Exp(1).hOLexpNm={}; Exp(1).hOLresDir={} Exp(1).hOLname={}; Exp(1).hOLexpNm={}; Exp(1).hOLresDir={}
Exp(1).hOLplateNum=[]; Exp(1).hOLplateNum=[];
Exp(1).hOLresDir= {}; Exp(1).hOLresDir={};
set(ghandles.OLay2,'string',{''}) set(ghandles.OLay2,'string',{''})
set(ghandles.OLexp2,'string',{''}) set(ghandles.OLexp2,'string',{''})
@@ -1545,7 +1545,7 @@ Exp(2).traceN=0;
Exp(2).hOL =[]; Exp(2).hOLb=[]; Exp(2).hOL =[]; Exp(2).hOLb=[];
Exp(2).hOLname={}; Exp(2).hOLexpNm={}; Exp(2).hOLresDir={} Exp(2).hOLname={}; Exp(2).hOLexpNm={}; Exp(2).hOLresDir={}
Exp(2).hOLplateNum=[]; Exp(2).hOLplateNum=[];
Exp(2).hOLresDir= {}; Exp(2).hOLresDir={};
set(ghandles.OLay3,'string',{''}) set(ghandles.OLay3,'string',{''})
set(ghandles.OLexp3,'string',{''}) set(ghandles.OLexp3,'string',{''})
@@ -1554,7 +1554,7 @@ Exp(3).traceN=0;
Exp(3).hOL =[]; Exp(3).hOLb=[]; Exp(3).hOL =[]; Exp(3).hOLb=[];
Exp(3).hOLname={}; Exp(3).hOLexpNm={}; Exp(3).hOLresDir={} Exp(3).hOLname={}; Exp(3).hOLexpNm={}; Exp(3).hOLresDir={}
Exp(3).hOLplateNum=[]; Exp(3).hOLplateNum=[];
Exp(3).hOLresDir= {}; Exp(3).hOLresDir={};
%} %}
% hObject handle to quickView (see GCBO) % hObject handle to quickView (see GCBO)
@@ -1583,7 +1583,7 @@ function RFtable3_Callback(hObject, eventdata, handles)
global Exp global Exp
global ghandles global ghandles
expN=3; expN=3;
DexpN= get(handles.DN3,'value'); DexpN=get(handles.DN3,'value');
EZtableRFdiag EZtableRFdiag
end end
@@ -1595,14 +1595,14 @@ function DN1_Callback(hObject, eventdata, handles)
global Exp global Exp
expN=1; expN=1;
input=get(hObject,'String'); input=get(hObject,'String');
Max= Exp(expN).DexpLength; Max=Exp(expN).DexpLength;
Min= 0; %(get(handles.DN1,'min')); Min=0; %(get(handles.DN1,'min'));
if str2num(input) > Min && str2num(input) <= Max if str2num(input) > Min && str2num(input) <=Max
display(input) display(input)
set(handles.DN1,'value',str2double(input)); set(handles.DN1,'value',str2double(input));
else else
if str2double(input) >= Max, set(handles.DN1,'value',Max); set(handles.DN1,'string',num2str(Max));end if str2double(input) >=Max, set(handles.DN1,'value',Max); set(handles.DN1,'string',num2str(Max));end
if str2double(input) <= Min, set(handles.DN1,'value',Min),set(handles.DN1,'string',num2str(1));end if str2double(input) <=Min, set(handles.DN1,'value',Min),set(handles.DN1,'string',num2str(1));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -1621,12 +1621,12 @@ function DN2_Callback(hObject, eventdata, handles)
input=get(hObject,'String'); input=get(hObject,'String');
Max=Exp(expN).DexpLength; Max=Exp(expN).DexpLength;
Min=0; %(get(handles.DN1,'min')); Min=0; %(get(handles.DN1,'min'));
if str2num(input) > Min && str2num(input) <= Max if str2num(input) > Min && str2num(input) <=Max
display(input) display(input)
set(handles.DN2,'value',str2double(input)); set(handles.DN2,'value',str2double(input));
else else
if str2double(input) >= Max, set(handles.DN2,'value',Max); set(handles.DN2,'string',num2str(Max));end if str2double(input) >=Max, set(handles.DN2,'value',Max); set(handles.DN2,'string',num2str(Max));end
if str2double(input) <= Min, set(handles.DN2,'value',Min),set(handles.DN2,'string',num2str(1));end if str2double(input) <=Min, set(handles.DN2,'value',Min),set(handles.DN2,'string',num2str(1));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -1644,12 +1644,12 @@ function DN3_Callback(hObject, eventdata, handles)
input=get(hObject,'String'); input=get(hObject,'String');
Max=Exp(expN).DexpLength; Max=Exp(expN).DexpLength;
Min=0; % (get(handles.DN1,'min')); Min=0; % (get(handles.DN1,'min'));
if str2num(input) > Min && str2num(input) <= Max if str2num(input) > Min && str2num(input) <=Max
display(input) display(input)
set(handles.DN3,'value',str2double(input)); set(handles.DN3,'value',str2double(input));
else else
if str2double(input) >= Max, set(handles.DN3,'value',Max); set(handles.DN3,'string',num2str(Max));end if str2double(input) >=Max, set(handles.DN3,'value',Max); set(handles.DN3,'string',num2str(Max));end
if str2double(input) <= Min, set(handles.DN3,'value',Min),set(handles.DN3,'string',num2str(1));end if str2double(input) <=Min, set(handles.DN3,'value',Min),set(handles.DN3,'string',num2str(1));end
end end
EZVimDisplay EZVimDisplay
end end
@@ -1666,7 +1666,7 @@ function CompositePB1_Callback(hObject, eventdata, handles)
global Exp global Exp
global ghandles global ghandles
expN=1; expN=1;
DexpN= get(handles.DN1,'value'); DexpN=get(handles.DN1,'value');
EZcompositePlot EZcompositePlot
end end
@@ -1702,7 +1702,7 @@ function SpotViewInterval_Callback(hObject, eventdata, handles)
try try
if ~isempty(Exp(4).SpotVIntervPar) if ~isempty(Exp(4).SpotVIntervPar)
default= Exp(4).SpotVIntervPar; default=Exp(4).SpotVIntervPar;
else else
default={'1'}; default={'1'};
end end
@@ -1772,7 +1772,7 @@ function CompositeTog3_Callback(hObject, eventdata, handles)
ghandles=handles; ghandles=handles;
expN=3; expN=3;
DexpN= (get(handles.DN3,'value')); DexpN=(get(handles.DN3,'value'));
%set(handles.zonePB1,'value',0) %set(handles.zonePB1,'value',0)
%set(handles.zonePB2,'value',0) %set(handles.zonePB2,'value',0)
%set(handles.zonePB3,'value',1) %set(handles.zonePB3,'value',1)
@@ -1791,17 +1791,17 @@ end
function TrendsBoxPlot_Callback(hObject, eventdata, handles) function TrendsBoxPlot_Callback(hObject, eventdata, handles)
global userPars global userPars
userPars.boxplotFlg= 1; userPars.boxplotFlg=1;
prompt={... prompt={...
'Set "Outliers" On/Off:', ... 'Set "Outliers" On/Off:', ...
'Set "Notch" On/Off:', ... 'Set "Notch" On/Off:', ...
'Enter "LabelShift" value[default= 0.5]:', ... 'Enter "LabelShift" value[default=0.5]:', ...
'Enter "Font Size [default=8:' ... 'Enter "Font Size [default=8:' ...
'Enter "Label Angle" [default=45]' ... 'Enter "Label Angle" [default=45]' ...
'Enter Upper K Limit value[typical= 155]:'}; 'Enter Upper K Limit value[typical=155]:'};
name='Box Plot Parameters'; name='Box Plot Parameters';
numlines=1; numlines=1;
%defaultanswer= {'on','on','0.3','8','45'}; %defaultanswer={'on','on','0.3','8','45'};
defaultanswer=userPars.BPdefault; defaultanswer=userPars.BPdefault;
answer=inputdlg(prompt,name,numlines,defaultanswer); answer=inputdlg(prompt,name,numlines,defaultanswer);
userPars.BPoutliers=answer(1); userPars.BPoutliers=answer(1);
@@ -1819,22 +1819,22 @@ function TrendsOverlay_Callback(hObject, eventdata, handles)
global userPars global userPars
userPars.boxplotFlg=0; userPars.boxplotFlg=0;
prompt={'Enter Upper K Limit value[typical= 155]:'}; prompt={'Enter Upper K Limit value[typical=155]:'};
name='Box Plot Parameters'; name='Box Plot Parameters';
numlines=1; numlines=1;
% defaultanswer= {'1000'}; % defaultanswer={'1000'};
% if ~exist('userPars.Trenddefault','var'), userPars.Trenddefault= {'1000'}; end % if ~exist('userPars.Trenddefault','var'), userPars.Trenddefault={'1000'}; end
defaultanswer=userPars.BPdefault(6) defaultanswer=userPars.BPdefault(6)
% try % try
% defaultanswer=userPars.Trenddefault; % defaultanswer=userPars.Trenddefault;
% catch % catch
% userPars.Trenddefault= {'1000'} % userPars.Trenddefault={'1000'}
% defaultanswer= userPars.Trenddefault; % defaultanswer=userPars.Trenddefault;
% end % end
answer=inputdlg(prompt,name,numlines,defaultanswer); answer=inputdlg(prompt,name,numlines,defaultanswer);
userPars.kfiltLim= str2double(cell2mat(answer(1))); userPars.kfiltLim=str2double(cell2mat(answer(1)));
%userPars.Trenddefault= answer(1); %userPars.Trenddefault=answer(1);
userPars.BPdefault(6)= answer(1); userPars.BPdefault(6)=answer(1);
end end
% Executes on button press in printHt1. % Executes on button press in printHt1.
@@ -1844,7 +1844,7 @@ function printHt1_Callback(hObject, eventdata, handles)
DexpN=Exp(1).DexpN; DexpN=Exp(1).DexpN;
expN=1; expN=1;
prntHt=1; prntHt=1;
htMapTogPBfg= 1; htMapTogPBfg=1;
EZhtMap EZhtMap
prntHt=0; prntHt=0;
end end
@@ -1880,16 +1880,16 @@ function HMapRange_Callback(hObject, eventdata, handles)
global adj global adj
global flip global flip
prompt={'Enter Standard Deviation Multiplier value[typical= 2.0]:'}; prompt={'Enter Standard Deviation Multiplier value[typical=2.0]:'};
% prompt={'Enter Standard Deviation Multiplier value[typical= 3.0]:','Colormap Flip[Typical=T]'}; % prompt={'Enter Standard Deviation Multiplier value[typical=3.0]:','Colormap Flip[Typical=T]'};
name='Heatmap Adjustment range'; name='Heatmap Adjustment range';
numlines=1; numlines=1;
defaultanswer= {'2.0'}; defaultanswer={'2.0'};
% defaultanswer= {'3.0','T'}; % defaultanswer={'3.0','T'};
answer=inputdlg(prompt,name,numlines,defaultanswer); answer=inputdlg(prompt,name,numlines,defaultanswer);
adj= str2double(answer(1)); adj=str2double(answer(1));
flip= 'T'; flip='T';
% flip= upper(answer(2)); % flip=upper(answer(2));
end end
function SetExpJobsFolder_Callback(hObject, eventdata, handles) function SetExpJobsFolder_Callback(hObject, eventdata, handles)
@@ -1949,7 +1949,7 @@ function zonePB2_Callback(hObject, eventdata, handles)
zonePB=2 zonePB=2
%if get(handles.zonePB2,'value')==0, set(handles.zonePB2,'value',1); end %if get(handles.zonePB2,'value')==0, set(handles.zonePB2,'value',1); end
set(handles.zonePB2,'value',1); set(handles.zonePB2,'value',1);
DexpN= get(handles.DN2,'value') DexpN=get(handles.DN2,'value')
set(handles.zonePB1,'value',0); set(handles.zonePB1,'value',0);
set(handles.zonePB3,'value',0); set(handles.zonePB3,'value',0);
set(ghandles.zonePB2,'value',1); set(ghandles.zonePB2,'value',1);
@@ -1990,7 +1990,7 @@ function zonePB3_Callback(hObject, eventdata, handles)
global ghandles global ghandles
global zonePB global zonePB
zonePB= 3 zonePB=3
%if get(handles.zonePB3,'value')==0, set(handles.zonePB3,'value',1); end %if get(handles.zonePB3,'value')==0, set(handles.zonePB3,'value',1); end
set(handles.zonePB3,'value',1); set(handles.zonePB3,'value',1);
DexpN=get(handles.DN3,'value'); DexpN=get(handles.DN3,'value');
@@ -2035,7 +2035,7 @@ function zoneRad1_Callback(hObject, eventdata, handles)
global Exp global Exp
if get(handles.zoneRad1,'value')==0, set(handles.zoneRad1,'value',1); end if get(handles.zoneRad1,'value')==0, set(handles.zoneRad1,'value',1); end
DexpN= get(handles.DN1,'value') DexpN=get(handles.DN1,'value')
set(handles.zoneRad2,'value',0) set(handles.zoneRad2,'value',0)
set(handles.zoneRad3,'value',0) set(handles.zoneRad3,'value',0)
orfLstSel=get(handles.GeneOrfTog,'value') orfLstSel=get(handles.GeneOrfTog,'value')
@@ -2061,7 +2061,7 @@ function zoneRad2_Callback(hObject, eventdata, handles)
global Exp global Exp
if get(handles.zoneRad2,'value')==0, set(handles.zoneRad2,'value',1); end if get(handles.zoneRad2,'value')==0, set(handles.zoneRad2,'value',1); end
DexpN= get(handles.DN2,'value') DexpN=get(handles.DN2,'value')
set(handles.zoneRad1,'value',0) set(handles.zoneRad1,'value',0)
set(handles.zoneRad3,'value',0) set(handles.zoneRad3,'value',0)
@@ -2089,7 +2089,7 @@ function zoneRad3_Callback(hObject, eventdata, handles)
global Exp global Exp
if get(handles.zoneRad3,'value')==0, set(handles.zoneRad3,'value',1); end if get(handles.zoneRad3,'value')==0, set(handles.zoneRad3,'value',1); end
DexpN= get(handles.DN3,'value') DexpN=get(handles.DN3,'value')
set(handles.zoneRad1,'value',0) set(handles.zoneRad1,'value',0)
set(handles.zoneRad2,'value',0) set(handles.zoneRad2,'value',0)
orfLstSel=get(handles.GeneOrfTog,'value') orfLstSel=get(handles.GeneOrfTog,'value')
@@ -2120,7 +2120,7 @@ end
% handles structure with handles and user data (see GUIDATA) % handles structure with handles and user data (see GUIDATA)
% --- If Enable == 'on', executes on mouse press in 5 pixel border. % --- If Enable =='on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over printOL1. % --- Otherwise, executes on mouse press in 5 pixel border or over printOL1.
function printOL1_ButtonDownFcn(hObject, eventdata, handles) function printOL1_ButtonDownFcn(hObject, eventdata, handles)
% hObject handle to printOL1 (see GCBO) % hObject handle to printOL1 (see GCBO)

View File

@@ -5,11 +5,11 @@
%load 'EZsgdInfo' %load 'EZsgdInfo'
%} %}
text=Exp(4).SGDtext; text=Exp(4).SGDtext;
destPerMP= Exp(zoneSel).Dexp(DexpN).destPerMP; %length(gS.DM1.drug); destPerMP= Exp(zoneSel).Dexp(DexpN).destPerMP; %length(gS.DM1.drug);
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;
a=[]; a=[];
if get(handles.GeneOrfTog,'value')==0 if get(handles.GeneOrfTog,'value')==0
gene=MP(1,LBmp).genename{1,1}(indx); gene=MP(1,LBmp).genename{1,1}(indx);
@@ -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));
@@ -41,25 +40,26 @@ elseif get(handles.GeneOrfTog,'value')==1
end end
end end
if isempty(a) 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,:));
proc=char(text(a,18,:)); proc=char(text(a,18,:));
func=char(text(a,19,:)); func=char(text(a,19,:));
loc=char(text(a,20,:)); loc=char(text(a,20,:));
name=strcat(char(gene),'->',char(orf)); name=strcat(char(gene),'->',char(orf));
elseif get(handles.listboxGnOrf,'value') && ~isempty(a) elseif get(handles.listboxGnOrf,'value') && ~isempty(a)
desc=char(text(b,32,:)); desc=char(text(b,32,:));
proc=char(text(b,18,:)); proc=char(text(b,18,:));
func=char(text(b,19,:)); func=char(text(b,19,:));
loc=char(text(b,20,:)); loc=char(text(b,20,:));
name=strcat(char(gene),'->',char(orf)); name=strcat(char(gene),'->',char(orf));
elseif isempty(b) elseif isempty(b)
name='Not Found'; name='Not Found';
desc=[]; proc=[]; func=[]; loc=[]; desc=[]; proc=[]; func=[]; loc=[];
end end
%} %}
hh=msgbox(sprintf('%s\n%s\n%s%s\n%s%s\n%s%s\n',name,desc,'P->',proc,'F->',func,'C->',loc),'SGD Ontology Info','replace') hh=msgbox(sprintf('%s\n%s\n%s%s\n%s%s\n%s%s\n',name,desc,'P->',proc,'F->',func,'C->',loc),'SGD Ontology Info','replace')

View File

@@ -1,5 +1,5 @@
function ButtonName=questdlg(Question,Title,Btn1,Btn2,Btn3,Default) function ButtonName=questdlg(Question,Title,Btn1,Btn2,Btn3,Default)
%QUESTDLG Question dialog box. % QUESTDLG Question dialog box.
% ButtonName=QUESTDLG(Question) creates a modal dialog box that % ButtonName=QUESTDLG(Question) creates a modal dialog box that
% automatically wraps the cell array or string (vector or matrix) % automatically wraps the cell array or string (vector or matrix)
% Question to fit an appropriately sized window. The name of the % Question to fit an appropriately sized window. The name of the
@@ -60,212 +60,181 @@ 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
error('MATLAB:questdlg:TooFewArguments', 'Too few arguments for QUESTDLG');
end
Interpreter='none';
Question=dialogCellstrHelper(Question);
if nargin<1 % General Information
error('MATLAB:questdlg:TooFewArguments', 'Too few arguments for QUESTDLG'); Black =[0 0 0 ]/255;
end % LightGray =[192 192 192 ]/255;
% LightGray2 =[160 160 164 ]/255;
% MediumGray =[128 128 128 ]/255;
% White =[255 255 255 ]/255;
Interpreter='none'; % Nargin Check
Question=dialogCellstrHelper(Question); if nargout>1
error('MATLAB:questdlg:WrongNumberOutputs', 'Wrong number of output arguments for QUESTDLG');
end
if nargin==1,Title=' ';end
if nargin<=2, Default='Yes';end
if nargin==3, Default=Btn1 ;end
if nargin<=3, Btn1='Yes'; Btn2='No'; Btn3='Cancel';NumButtons=3;end
if nargin==4, Default=Btn2;Btn2=[];Btn3=[];NumButtons=1;end
if nargin==5, Default=Btn3;Btn3=[];NumButtons=2;end
if nargin==6, NumButtons=3;end
if nargin>6
error('MATLAB:questdlg:TooManyInputs', 'Too many input arguments');NumButtons=3; %#ok
end
%%%%%%%%%%%%%%%%%%%%% if isstruct(Default),
%%% General Info. %%% Interpreter=Default.Interpreter;
%%%%%%%%%%%%%%%%%%%%% Default=Default.Default;
Black =[0 0 0 ]/255; end
% LightGray =[192 192 192 ]/255;
% LightGray2 =[160 160 164 ]/255;
% MediumGray =[128 128 128 ]/255;
% White =[255 255 255 ]/255;
%%%%%%%%%%%%%%%%%%%% % Create QuestFig
%%% Nargin Check %%% FigPos=get(0,'DefaultFigurePosition');
%%%%%%%%%%%%%%%%%%%% FigPos(3)=267;
if nargout>1 FigPos(4)=70;
error('MATLAB:questdlg:WrongNumberOutputs', 'Wrong number of output arguments for QUESTDLG'); FigPos=getnicedialoglocation(FigPos, get(0,'DefaultFigureUnits'));
end
if nargin==1,Title=' ';end
if nargin<=2, Default='Yes';end
if nargin==3, Default=Btn1 ;end
if nargin<=3, Btn1='Yes'; Btn2='No'; Btn3='Cancel';NumButtons=3;end
if nargin==4, Default=Btn2;Btn2=[];Btn3=[];NumButtons=1;end
if nargin==5, Default=Btn3;Btn3=[];NumButtons=2;end
if nargin==6, NumButtons=3;end
if nargin>6
error('MATLAB:questdlg:TooManyInputs', 'Too many input arguments');NumButtons=3; %#ok
end
if isstruct(Default), QuestFig=dialog(...
Interpreter=Default.Interpreter; 'Visible' ,'off', ...
Default=Default.Default; 'Name' ,Title, ...
end 'Pointer' ,'arrow', ...
'Position' ,FigPos, ...
'KeyPressFcn' ,@doFigureKeyPress, ...
%%%%%%%%%%%%%%%%%%%%%%% 'IntegerHandle' ,'off', ...
%%% Create QuestFig %%% 'WindowStyle' ,'normal', ...
%%%%%%%%%%%%%%%%%%%%%%% 'HandleVisibility','callback', ...
FigPos =get(0,'DefaultFigurePosition'); 'CloseRequestFcn' ,@doDelete, ...
FigPos(3)=267; 'Tag' ,Title ...
FigPos(4)= 70;
FigPos =getnicedialoglocation(FigPos, get(0,'DefaultFigureUnits'));
QuestFig=dialog( ...
'Visible' ,'off' , ...
'Name' ,Title , ...
'Pointer' ,'arrow' , ...
'Position' ,FigPos , ...
'KeyPressFcn' ,@doFigureKeyPress , ...
'IntegerHandle' ,'off' , ...
'WindowStyle' ,'normal' , ...
'HandleVisibility','callback' , ...
'CloseRequestFcn' ,@doDelete , ...
'Tag' ,Title ...
); );
%%%%%%%%%%%%%%%%%%%%% % Set Positions
%%% Set Positions %%% DefOffset =10;
%%%%%%%%%%%%%%%%%%%%% IconWidth =54;
DefOffset =10; IconHeight =54;
IconXOffset=DefOffset;
IconWidth =54; IconYOffset=FigPos(4)-DefOffset-IconHeight; %#ok
IconHeight =54; IconCMap=[Black;get(QuestFig,'Color')]; %#ok
IconXOffset=DefOffset; DefBtnWidth =56;
IconYOffset=FigPos(4)-DefOffset-IconHeight; %#ok BtnHeight =22;
IconCMap=[Black;get(QuestFig,'Color')]; %#ok BtnYOffset=DefOffset;
BtnWidth=DefBtnWidth;
DefBtnWidth =56; ExtControl=uicontrol(...
BtnHeight =22; QuestFig , ...
'Style' ,'pushbutton', ...
BtnYOffset=DefOffset; 'String' ,' ' ...
BtnWidth=DefBtnWidth;
ExtControl=uicontrol(QuestFig , ...
'Style' ,'pushbutton', ...
'String' ,' ' ...
); );
btnMargin=1.4;
btnMargin=1.4; set(ExtControl,'String',Btn1);
set(ExtControl,'String',Btn1);
BtnExtent=get(ExtControl,'Extent');
BtnWidth=max(BtnWidth,BtnExtent(3)+8);
if NumButtons > 1
set(ExtControl,'String',Btn2);
BtnExtent=get(ExtControl,'Extent'); BtnExtent=get(ExtControl,'Extent');
BtnWidth=max(BtnWidth,BtnExtent(3)+8); BtnWidth=max(BtnWidth,BtnExtent(3)+8);
if NumButtons > 2 if NumButtons > 1
set(ExtControl,'String',Btn3); set(ExtControl,'String',Btn2);
BtnExtent=get(ExtControl,'Extent'); BtnExtent=get(ExtControl,'Extent');
BtnWidth=max(BtnWidth,BtnExtent(3)*btnMargin); BtnWidth=max(BtnWidth,BtnExtent(3)+8);
if NumButtons > 2
set(ExtControl,'String',Btn3);
BtnExtent=get(ExtControl,'Extent');
BtnWidth=max(BtnWidth,BtnExtent(3)*btnMargin);
end
end end
end BtnHeight=max(BtnHeight,BtnExtent(4)*btnMargin);
BtnHeight=max(BtnHeight,BtnExtent(4)*btnMargin); delete(ExtControl);
MsgTxtXOffset=IconXOffset+IconWidth;
delete(ExtControl); FigPos(3)=max(FigPos(3),MsgTxtXOffset+NumButtons*(BtnWidth+2*DefOffset));
set(QuestFig,'Position',FigPos);
MsgTxtXOffset=IconXOffset+IconWidth; BtnXOffset=zeros(NumButtons,1);
if NumButtons==1,
FigPos(3)=max(FigPos(3),MsgTxtXOffset+NumButtons*(BtnWidth+2*DefOffset)); BtnXOffset=(FigPos(3)-BtnWidth)/2;
set(QuestFig,'Position',FigPos); elseif NumButtons==2,
BtnXOffset=[MsgTxtXOffset FigPos(3)-DefOffset-BtnWidth];
BtnXOffset=zeros(NumButtons,1); elseif NumButtons==3,
BtnXOffset=[MsgTxtXOffset 0 FigPos(3)-DefOffset-BtnWidth];
if NumButtons==1, BtnXOffset(2)=(BtnXOffset(1)+BtnXOffset(3))/2;
BtnXOffset=(FigPos(3)-BtnWidth)/2;
elseif NumButtons==2,
BtnXOffset=[MsgTxtXOffset
FigPos(3)-DefOffset-BtnWidth];
elseif NumButtons==3,
BtnXOffset=[MsgTxtXOffset
0
FigPos(3)-DefOffset-BtnWidth];
BtnXOffset(2)=(BtnXOffset(1)+BtnXOffset(3))/2;
end
MsgTxtYOffset=DefOffset+BtnYOffset+BtnHeight;
% Calculate current msg text width and height. If negative,
% clamp it to 1 since its going to be recalculated/corrected later
% based on the actual msg string
MsgTxtWidth=max(1, FigPos(3)-DefOffset-MsgTxtXOffset-IconWidth);
MsgTxtHeight=max(1, FigPos(4)-DefOffset-MsgTxtYOffset);
MsgTxtForeClr=Black;
MsgTxtBackClr=get(QuestFig,'Color');
CBString='uiresume(gcbf)';
DefaultValid=false;
DefaultWasPressed=false;
BtnHandle=cell(NumButtons, 1);
DefaultButton=0;
% Check to see if the Default string passed does match one of the
% strings on the buttons in the dialog. If not, throw a warning.
for i=1:NumButtons
switch i
case 1
ButtonString=Btn1;
ButtonTag='Btn1';
if strcmp(ButtonString, Default)
DefaultValid=true;
DefaultButton=1;
end
case 2
ButtonString=Btn2;
ButtonTag='Btn2';
if strcmp(ButtonString, Default)
DefaultValid=true;
DefaultButton=2;
end
case 3
ButtonString=Btn3;
ButtonTag='Btn3';
if strcmp(ButtonString, Default)
DefaultValid=true;
DefaultButton=3;
end
end end
MsgTxtYOffset=DefOffset+BtnYOffset+BtnHeight;
BtnHandle{i}=uicontrol(QuestFig , ... % Calculate current msg text width and height. If negative,
'Style' ,'pushbutton', ... % clamp it to 1 since its going to be recalculated/corrected later
'Position' ,[ BtnXOffset(1) BtnYOffset BtnWidth BtnHeight ] , ... % based on the actual msg string
'KeyPressFcn' ,@doControlKeyPress , ... MsgTxtWidth=max(1, FigPos(3)-DefOffset-MsgTxtXOffset-IconWidth);
'Callback' ,CBString , ... MsgTxtHeight=max(1, FigPos(4)-DefOffset-MsgTxtYOffset);
'String' ,ButtonString, ... MsgTxtForeClr=Black;
'HorizontalAlignment','center' , ... MsgTxtBackClr=get(QuestFig,'Color');
'Tag' ,ButtonTag ... CBString='uiresume(gcbf)';
DefaultValid=false;
DefaultWasPressed=false;
BtnHandle=cell(NumButtons, 1);
DefaultButton=0;
% Check to see if the Default string passed does match one of the
% strings on the buttons in the dialog. If not, throw a warning.
for i=1:NumButtons
switch i
case 1
ButtonString=Btn1;
ButtonTag='Btn1';
if strcmp(ButtonString, Default)
DefaultValid=true;
DefaultButton=1;
end
case 2
ButtonString=Btn2;
ButtonTag='Btn2';
if strcmp(ButtonString, Default)
DefaultValid=true;
DefaultButton=2;
end
case 3
ButtonString=Btn3;
ButtonTag='Btn3';
if strcmp(ButtonString, Default)
DefaultValid=true;
DefaultButton=3;
end
end
BtnHandle{i}=uicontrol(QuestFig, ...
'Style' ,'pushbutton', ...
'Position' ,[ BtnXOffset(1) BtnYOffset BtnWidth BtnHeight ], ...
'KeyPressFcn' ,@doControlKeyPress, ...
'Callback' ,CBString, ...
'String' ,ButtonString, ...
'HorizontalAlignment','center', ...
'Tag' ,ButtonTag...
); );
end end
if ~DefaultValid if ~DefaultValid
warnstate=warning('backtrace','off'); warnstate=warning('backtrace','off');
warning('MATLAB:QUESTDLG:stringMismatch','Default string does not match any button string name.'); warning('MATLAB:QUESTDLG:stringMismatch','Default string does not match any button string name.');
warning(warnstate); warning(warnstate);
end end
MsgHandle=uicontrol(QuestFig , ... MsgHandle=uicontrol(QuestFig, ...
'Style' ,'text' , ... 'Style' ,'text', ...
'Position' ,[MsgTxtXOffset MsgTxtYOffset 0.95*MsgTxtWidth MsgTxtHeight ] , ... 'Position' ,[MsgTxtXOffset MsgTxtYOffset 0.95*MsgTxtWidth MsgTxtHeight ], ...
'String' ,{' '} , ... 'String' ,{' '}, ...
'Tag' ,'Question' , ... 'Tag' ,'Question', ...
'HorizontalAlignment','left' , ... 'HorizontalAlignment','left', ...
'FontWeight' ,'bold' , ... 'FontWeight' ,'bold', ...
'BackgroundColor' ,MsgTxtBackClr , ... 'BackgroundColor' ,MsgTxtBackClr, ...
'ForegroundColor' ,MsgTxtForeClr ... 'ForegroundColor' ,MsgTxtForeClr ...
); );
[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');
texthandle=text( ...
AxesHandle=axes('Parent',QuestFig,'Position',[0 0 1 1],'Visible','off');
texthandle=text( ...
'Parent' ,AxesHandle , ... 'Parent' ,AxesHandle , ...
'Units' ,'pixels' , ... 'Units' ,'pixels' , ...
'Color' ,get(BtnHandle{1},'ForegroundColor') , ... 'Color' ,get(BtnHandle{1},'ForegroundColor') , ...
@@ -276,120 +245,102 @@ texthandle=text( ...
'String' ,WrapString , ... 'String' ,WrapString , ...
'Interpreter' ,Interpreter , ... 'Interpreter' ,Interpreter , ...
'Tag' ,'Question' ... 'Tag' ,'Question' ...
);
textExtent=get(texthandle, 'Extent');
% (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.
MsgTxtWidth=max([MsgTxtWidth NewMsgTxtPos(3)+2 textExtent(3)]);
MsgTxtHeight=max([MsgTxtHeight NewMsgTxtPos(4)+2 textExtent(4)]);
MsgTxtXOffset=IconXOffset+IconWidth+DefOffset;
FigPos(3)=max(NumButtons*(BtnWidth+DefOffset)+DefOffset, ...
MsgTxtXOffset+MsgTxtWidth+DefOffset);
% Center Vertically around icon
if IconHeight>MsgTxtHeight,
IconYOffset=BtnYOffset+BtnHeight+DefOffset;
MsgTxtYOffset=IconYOffset+(IconHeight-MsgTxtHeight)/2;
FigPos(4)=IconYOffset+IconHeight+DefOffset;
% center around text
else
MsgTxtYOffset=BtnYOffset+BtnHeight+DefOffset;
IconYOffset=MsgTxtYOffset+(MsgTxtHeight-IconHeight)/2;
FigPos(4)=MsgTxtYOffset+MsgTxtHeight+DefOffset;
end
if NumButtons==1,
BtnXOffset=(FigPos(3)-BtnWidth)/2;
elseif NumButtons==2,
BtnXOffset=[(FigPos(3)-DefOffset)/2-BtnWidth
(FigPos(3)+DefOffset)/2
];
elseif NumButtons==3,
BtnXOffset(2)=(FigPos(3)-BtnWidth)/2;
BtnXOffset=[BtnXOffset(2)-DefOffset-BtnWidth
BtnXOffset(2)
BtnXOffset(2)+BtnWidth+DefOffset
];
end
set(QuestFig ,'Position',getnicedialoglocation(FigPos, get(QuestFig,'Units')));
assert(iscell(BtnHandle));
BtnPos=cellfun(@(bh)get(bh,'Position'), BtnHandle, 'UniformOutput', false);
BtnPos=cat(1,BtnPos{:});
BtnPos(:,1)=BtnXOffset;
BtnPos=num2cell(BtnPos,2);
assert(iscell(BtnPos));
cellfun(@(bh,pos)set(bh, 'Position', pos), BtnHandle, BtnPos, 'UniformOutput', false);
if DefaultValid
setdefaultbutton(QuestFig, BtnHandle{DefaultButton});
end
delete(MsgHandle);
set(texthandle, 'Position',[MsgTxtXOffset MsgTxtYOffset 0]);
IconAxes=axes( ...
'Parent' ,QuestFig , ...
'Units' ,'Pixels' , ...
'Position' ,[IconXOffset IconYOffset IconWidth IconHeight], ...
'NextPlot' ,'replace' , ...
'Tag' ,'IconAxes' ...
); );
set(QuestFig ,'NextPlot','add'); textExtent=get(texthandle, 'Extent');
% (g357851)textExtent and extent from uicontrol are not the same. For window, extent from uicontrol is larger
load dialogicons.mat questIconData questIconMap; % than textExtent. But on Mac, it is reverse. Pick the max value.
IconData=questIconData; MsgTxtWidth=max([MsgTxtWidth NewMsgTxtPos(3)+2 textExtent(3)]);
questIconMap(256,:)=get(QuestFig,'Color'); MsgTxtHeight=max([MsgTxtHeight NewMsgTxtPos(4)+2 textExtent(4)]);
IconCMap=questIconMap; MsgTxtXOffset=IconXOffset+IconWidth+DefOffset;
FigPos(3)=max(NumButtons*(BtnWidth+DefOffset)+DefOffset, ...
Img=image('CData',IconData,'Parent',IconAxes); MsgTxtXOffset+MsgTxtWidth+DefOffset);
set(QuestFig, 'Colormap', IconCMap); % Center Vertically around icon
set(IconAxes, ... if IconHeight>MsgTxtHeight,
'Visible','off' , ... IconYOffset=BtnYOffset+BtnHeight+DefOffset;
'YDir' ,'reverse' , ... MsgTxtYOffset=IconYOffset+(IconHeight-MsgTxtHeight)/2;
'XLim' ,get(Img,'XData'), ... FigPos(4)=IconYOffset+IconHeight+DefOffset;
'YLim' ,get(Img,'YData') ... % Center around text
);
% make sure we are on screen
movegui(QuestFig)
set(QuestFig ,'WindowStyle','modal','Visible','on');
drawnow;
if DefaultButton ~= 0
uicontrol(BtnHandle{DefaultButton});
end
if ishghandle(QuestFig)
% Go into uiwait if the figure handle is still valid.
% This is mostly the case during regular use.
uiwait(QuestFig);
end
% Check handle validity again since we may be out of uiwait because the
% figure was deleted.
if ishghandle(QuestFig)
if DefaultWasPressed
ButtonName=Default;
else else
ButtonName=get(get(QuestFig,'CurrentObject'),'String'); MsgTxtYOffset=BtnYOffset+BtnHeight+DefOffset;
IconYOffset=MsgTxtYOffset+(MsgTxtHeight-IconHeight)/2;
FigPos(4)=MsgTxtYOffset+MsgTxtHeight+DefOffset;
end
if NumButtons==1
BtnXOffset=(FigPos(3)-BtnWidth)/2;
elseif NumButtons==2
BtnXOffset=[(FigPos(3)-DefOffset)/2-BtnWidth (FigPos(3)+DefOffset)/2];
elseif NumButtons==3
BtnXOffset(2)=(FigPos(3)-BtnWidth)/2;
BtnXOffset=[BtnXOffset(2)-DefOffset-BtnWidth BtnXOffset(2) BtnXOffset(2)+BtnWidth+DefOffset];
end
set(QuestFig ,'Position',getnicedialoglocation(FigPos, get(QuestFig,'Units')));
assert(iscell(BtnHandle));
BtnPos=cellfun(@(bh)get(bh,'Position'), BtnHandle, 'UniformOutput', false);
BtnPos=cat(1,BtnPos{:});
BtnPos(:,1)=BtnXOffset;
BtnPos=num2cell(BtnPos,2);
assert(iscell(BtnPos));
cellfun(@(bh,pos)set(bh, 'Position', pos), BtnHandle, BtnPos, 'UniformOutput', false);
if DefaultValid
setdefaultbutton(QuestFig, BtnHandle{DefaultButton});
end
delete(MsgHandle);
set(texthandle, 'Position',[MsgTxtXOffset MsgTxtYOffset 0]);
IconAxes=axes(...
'Parent' ,QuestFig , ...
'Units' ,'Pixels' , ...
'Position' ,[IconXOffset IconYOffset IconWidth IconHeight], ...
'NextPlot' ,'replace' , ...
'Tag' ,'IconAxes' ...
);
set(QuestFig ,'NextPlot','add');
load dialogicons.mat questIconData questIconMap;
IconData=questIconData;
questIconMap(256,:)=get(QuestFig,'Color');
IconCMap=questIconMap;
Img=image('CData',IconData,'Parent',IconAxes);
set(QuestFig, 'Colormap', IconCMap);
set(IconAxes, ...
'Visible','off' , ...
'YDir' ,'reverse' , ...
'XLim' ,get(Img,'XData'), ...
'YLim' ,get(Img,'YData') ...
);
% Make sure we are on screen
movegui(QuestFig)
set(QuestFig ,'WindowStyle','modal','Visible','on');
drawnow;
if DefaultButton ~=0
uicontrol(BtnHandle{DefaultButton});
end
if ishghandle(QuestFig)
% Go into uiwait if the figure handle is still valid.
% This is mostly the case during regular use.
uiwait(QuestFig);
end
% Check handle validity again since we may be out of uiwait because the
% figure was deleted.
if ishghandle(QuestFig)
if DefaultWasPressed
ButtonName=Default;
else
ButtonName=get(get(QuestFig,'CurrentObject'),'String');
end
doDelete;
else
ButtonName='';
end end
doDelete;
else
ButtonName='';
end
function doFigureKeyPress(obj, evd) %#ok function doFigureKeyPress(obj, evd) %#ok
switch(evd.Key) switch(evd.Key)