Who even knows at this point

This commit is contained in:
2024-07-30 13:42:48 -04:00
parent fe9b338324
commit 79e3676ed3
38 changed files with 465 additions and 746 deletions

View File

@@ -129,7 +129,7 @@ try
% MP(numb).specifics2=' '; % MP(numb).specifics2=' ';
% end % end
excLnNum=excLnNum+385; excLnNum=excLnNum+385;
msg=strcat('NumberOfMP = ',num2str(numb), ' lastLineNo. = ',num2str(excLnNum)); msg=strcat('NumberOfMP=',num2str(numb), ' lastLineNo.=',num2str(excLnNum));
end end
else else
excLnNum=1; excLnNum=1;
@@ -157,7 +157,7 @@ try
MP(numb).specifics= ' '; MP(numb).specifics= ' ';
end end
excLnNum=excLnNum+385; excLnNum=excLnNum+385;
msg=strcat('NumberOfMP = ',num2str(numb), 'lastLineNo. = ',num2str(excLnNum)); msg=strcat('NumberOfMP=',num2str(numb), 'lastLineNo.=',num2str(excLnNum));
end end
end end
catch ME catch ME
@@ -261,7 +261,7 @@ if isequal(Linked,1) % Drugs and Media are linked 1 to 1; else they are combinat
DM.mod2(numb)={raw(excLnNum,7)}; DM.mod2(numb)={raw(excLnNum,7)};
DM.conc2(numb)={raw(excLnNum,8)}; DM.conc2(numb)={raw(excLnNum,8)};
excLnNum=excLnNum+1; excLnNum=excLnNum+1;
msg=strcat('NumberOf1:1DrugMediaPlates = ',num2str(numb), ' lastLineNo. = ',num2str(excLnNum)); msg=strcat('NumberOf1:1DrugMediaPlates=',num2str(numb), ' lastLineNo.=',num2str(excLnNum));
end end
else else
clear DM clear DM
@@ -283,7 +283,7 @@ if isequal(Linked,1) % Drugs and Media are linked 1 to 1; else they are combinat
DM.conc2(numb)={DMtbl(excLnNum,8)}; DM.conc2(numb)={DMtbl(excLnNum,8)};
DM.conc2(numb)=table2cell(DM.conc2{numb}); DM.conc2(numb)=table2cell(DM.conc2{numb});
excLnNum=excLnNum+1; excLnNum=excLnNum+1;
msg=strcat('NumberOf1:1DrugMediaPlates = ',num2str(numb), ' lastLineNo. = ',num2str(excLnNum)); msg=strcat('NumberOf1:1DrugMediaPlates=',num2str(numb), ' lastLineNo.=',num2str(excLnNum));
end end
end end
end end
@@ -321,7 +321,7 @@ if isequal(Linked,0) % 0 indicates Drugs and Media are combinatorial
excLnNum=excLnNum+1; excLnNum=excLnNum+1;
end end
end end
msg=strcat('NumberOfDrugs = ',num2str(drgCnt), ' NumberOfMedias = ',num2str(medCnt) ); msg=strcat('NumberOfDrugs=',num2str(drgCnt), ' NumberOfMedias=',num2str(medCnt) );
end end
save(mpdmFile, 'fields','MP','DM','Linked'); save(mpdmFile, 'fields','MP','DM','Linked');

View File

@@ -281,7 +281,7 @@ for s=1:size(scan,2)
outIntens=[]; outIntens=[];
outIntens=zeros(384,dataLength); outIntens=zeros(384,dataLength);
intensBlob=''; intensBlob='';
tmBlob =''; tmBlob='';
for j=1:dataLength %size(RawIntens,2) %size(outTseries,1) for j=1:dataLength %size(RawIntens,2) %size(outTseries,1)
if Ag(n)==0,Ag(n)=scan(s).Awindow;end if Ag(n)==0,Ag(n)=scan(s).Awindow;end
@@ -565,7 +565,7 @@ try
outIntens=[]; outIntens=[];
outIntens=zeros(384,dataLength); outIntens=zeros(384,dataLength);
intensBlob=''; intensBlob='';
tmBlob =''; tmBlob='';
for j=1:dataLength %size(RawIntens,2) %size(outTseries,1) for j=1:dataLength %size(RawIntens,2) %size(outTseries,1)
if Ag(n)==0,Ag(n)=scan(s).Awindow;end if Ag(n)==0,Ag(n)=scan(s).Awindow;end

View File

@@ -293,7 +293,7 @@ function NewExpDat_Callback(~, ~, ~)
% create supporting dirs % create supporting dirs
% this is also in the workflow script but here for standalone mode % this is also in the workflow script but here for standalone mode
dirs={'PrintResults', 'CFfigs', 'Fotos', 'Fotos/BkUp'}; dirs={'PrintResults', 'CFfigs', 'Fotos'};
for i=1:length(dirs) for i=1:length(dirs)
d=dirs{i}; d=dirs{i};
if ~exist(fullfile(easyResultsDir, d), 'dir') if ~exist(fullfile(easyResultsDir, d), 'dir')
@@ -335,7 +335,7 @@ function LoadDatFile_Callback(~, ~, ~)
global fhconsole global fhconsole
try try
questdlg('Load results .mat from ../ExpJobs/YourJob/Results/matResults/','File Creation','OK', struct('Default','OK','Interpreter','tex')); questdlg('Load results .mat from ../out/project/','File Creation','OK', struct('Default','OK','Interpreter','tex'));
[inputFile,inputPath]=uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off'); [inputFile,inputPath]=uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off');
matDir=fullfile(inputPath); matDir=fullfile(inputPath);
matFile=fullfile(inputPath,inputFile); matFile=fullfile(inputPath,inputFile);
@@ -370,11 +370,6 @@ function LoadDatFile_Callback(~, ~, ~)
disp('WARNING: cannot find project scans'); disp('WARNING: cannot find project scans');
end end
bkupDir=fullfile(matDir,'BkUp');
if ~exist(bkupDir, 'dir')
mkkdir(bkupDir);
end
% Create supporting dirs % Create supporting dirs
dirs={'PrintResults', 'figs', 'CFfigs', 'PTmats', 'Fotos'}; dirs={'PrintResults', 'figs', 'CFfigs', 'PTmats', 'Fotos'};
for i=1:length(dirs) for i=1:length(dirs)

View File

@@ -48,7 +48,7 @@ end
% EASYconsole % EASYconsole
if exist(matFile, 'file') if exist(matFile, 'file')
bkUpMatFile=fullfile(matDir,'BkUp',matFile); bkUpMatFile=fullfile(matFile, '.bk');
copyfile(matFile,bkUpMatFile); copyfile(matFile,bkUpMatFile);
end end
@@ -67,7 +67,7 @@ catch
load(fullfile(pointMapsResultsDir,'Nbdg')); %Left in to accomodate loads of work before 20_0819 load(fullfile(pointMapsResultsDir,'Nbdg')); %Left in to accomodate loads of work before 20_0819
end end
% Load Fotos stored data % Load Fotos stored data
fotosToLoad = {'Coordinates', 'BGatTpts', 'anlZones', 'NCFparms'}; fotosToLoad={'Coordinates', 'BGatTpts', 'anlZones', 'NCFparms'};
for i=1:length(fotosToLoad) for i=1:length(fotosToLoad)
try try
load(fullfile(fotosResultsDir, fotosToLoad{i})); load(fullfile(fotosResultsDir, fotosToLoad{i}));

View File

@@ -1,6 +1,6 @@
close all close all
figure('units','pix','pos',[200 200 850 750]) figure('units','pix','pos',[200 200 850 750])
ax = axes; ax=axes;
plot((1:10).^2) plot((1:10).^2)
set(ax,'units','pix') set(ax,'units','pix')
legend('x^2') legend('x^2')
@@ -10,11 +10,11 @@ title('Title','fontsize',24)
drawnow drawnow
% Now capture the axes and labels. % Now capture the axes and labels.
P = get(ax,'pos'); P=get(ax,'pos');
T = get(ax,'tightinset'); T=get(ax,'tightinset');
h = [P(1)-T(1)-5 P(2)-T(2)-5 P(3)+P(1)/2+T(3)+15 P(4)+P(2)/2+T(4)+10]; h=[P(1)-T(1)-5 P(2)-T(2)-5 P(3)+P(1)/2+T(3)+15 P(4)+P(2)/2+T(4)+10];
F = getframe(gcf,h); F=getframe(gcf,h);
[X,Map] = frame2im(F); [X,Map]=frame2im(F);
% I put the funny background color so the captured area stands out. % I put the funny background color so the captured area stands out.
figure('color',[.6 .2 .2],'units','pix','pos',[26 33 1184 925]) figure('color',[.6 .2 .2],'units','pix','pos',[26 33 1184 925])
image(X) image(X)

View File

@@ -69,17 +69,17 @@ if AddCplot==1,
%******MEAN calculation Plot******************** %******MEAN calculation Plot********************
%try %try
l= Exp(expN).cLmean(cTraceN); l=Exp(expN).cLmean(cTraceN);
r= Exp(expN).cRmean(cTraceN); r=Exp(expN).cRmean(cTraceN);
K= Exp(expN).cKmean(cTraceN); K=Exp(expN).cKmean(cTraceN);
lslow= l + Exp(expN).cLstd(cTraceN); lfast= l - Exp(expN).cLstd(cTraceN); lslow=l + Exp(expN).cLstd(cTraceN); lfast= l - Exp(expN).cLstd(cTraceN);
rl= r - Exp(expN).cRstd(cTraceN); ru= r + Exp(expN).cRstd(cTraceN); rl=r - Exp(expN).cRstd(cTraceN); ru= r + Exp(expN).cRstd(cTraceN);
Kl= K - Exp(expN).cKstd(cTraceN); Ku= K + Exp(expN).cKstd(cTraceN); Kl=K - Exp(expN).cKstd(cTraceN); Ku= K + Exp(expN).cKstd(cTraceN);
clear g; clear g;
t=1:200; t=1:200;
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
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

View File

@@ -309,11 +309,11 @@ intLadj=(deltaXR);
Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL= intL; Exp(expN).Trace(tracN).Dexp(DexpN).UsrIntL= intL;
%{ %{
intNormL = (intL) ./ Rn(1) intNormL=(intL) ./ Rn(1)
intNormLadj= ((deltaXR)./ Rn(1)) intNormLadj= ((deltaXR)./ Rn(1))
proGrIntL = -(intL) proGrIntL=-(intL)
proGrIntLadj = -(deltaXR) proGrIntLadj=-(deltaXR)
proGrIntNormL = -(intL ./ Rn(1)) proGrIntNormL=-(intL ./ Rn(1))
proGrIntNormLadj= -((deltaXR)./ Rn(1)) proGrIntNormLadj= -((deltaXR)./ Rn(1))
%find where Xn(j)==0 and set interactL to a fixed Max interaction value %find where Xn(j)==0 and set interactL to a fixed Max interaction value
intNormL(find(Xn==0))=2 intNormL(find(Xn==0))=2
@@ -365,7 +365,7 @@ end
%Plot new intL %Plot new intL
try try
% zeroCLn= zeros(1,destPerMP) % zeroCLn= zeros(1,destPerMP)
% Exp(zoneSel).hzeroCLn = plot(DNLaxes,zeroCLn,1:destPerMP,'y'); % Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:destPerMP,'y');
Exp(zoneSel).hintL(tracN)= plot(DNLaxes,intL,1:destPerMP); Exp(zoneSel).hintLb(tracN)= plot(DNLaxes,intL,1:destPerMP,'rs'); Exp(zoneSel).hintL(tracN)= plot(DNLaxes,intL,1:destPerMP); Exp(zoneSel).hintLb(tracN)= plot(DNLaxes,intL,1:destPerMP,'rs');
Exp(zoneSel).hintLadj(tracN)= plot(DNLaxes,intLadj,1:destPerMP,'g'); Exp(zoneSel).hintLadjb(tracN)= plot(DNLaxes,intLadj,1:destPerMP,'gs'); Exp(zoneSel).hintLadj(tracN)= plot(DNLaxes,intLadj,1:destPerMP,'g'); Exp(zoneSel).hintLadjb(tracN)= plot(DNLaxes,intLadj,1:destPerMP,'gs');
catch, catch,

View File

@@ -11,7 +11,7 @@ try %Try the whole routine
cnames={'RF Name','Median','Mean','STD','Minimum','Maximum'}; cnames={'RF Name','Median','Mean','STD','Minimum','Maximum'};
rCnt=0; rCnt=0;
RFfilename= fullfile(Exp(expN).Dexp(DexpN).resDir,'PrintResults','!RFsDiagnostics.txt'); RFfilename= fullfile(Exp(expN).Dexp(DexpN).resDir,'PrintResults','!RFsDiagnostics.txt');
fid = fopen(RFfilename,'w'); %('RFdiagnostic.txt','w'); fid=fopen(RFfilename,'w'); %('RFdiagnostic.txt','w');
ftitle= strcat(ExpPath,':::Reference Diagnostic Values'); ftitle= strcat(ExpPath,':::Reference Diagnostic Values');
try try
fprintf(fid,'%s\n',ftitle); fprintf(fid,'%s\n',ftitle);

View File

@@ -1,8 +1,8 @@
%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');
fid = fopen(RFdiagnostic,'w'); fid=fopen(RFdiagnostic,'w');
ln=1; 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');

View File

@@ -570,7 +570,7 @@ else
Exp(expN).Dexp(1).RFmd1pltN= RF1mp; Exp(expN).Dexp(1).RFmd1pltN= RF1mp;
try medValList1{d+1}= Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; try medValList1{d+1}= Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt;
catch, catcherror = 'Ln356', catch, catcherror='Ln356',
end end
end %~isempty(nonZeroIndx) && length(medianIndx) > (.15*384) end %~isempty(nonZeroIndx) && length(medianIndx) > (.15*384)
@@ -853,8 +853,8 @@ uu= horzcat(uu,vv);
for d=1:DMnum for d=1:DMnum
medianIndxG=[]; medianIndxG=[];
NZrfIndxG=[]; NZrfIndxG=[];
minG = min(nonzeros(vv(:,d))); minG=min(nonzeros(vv(:,d)));
maxG = max(nonzeros(vv(:,d))); maxG=max(nonzeros(vv(:,d)));
RFmeanG= mean(nonzeros(vv(:,d))); RFmeanG= mean(nonzeros(vv(:,d)));
RFstdG= std(nonzeros(vv(:,d))); RFstdG= std(nonzeros(vv(:,d)));
NZrfIndxG= find(vv(:,d)); %find(nonzeros(vv(:,d))); WWRONG FOR A WHILE! NZrfIndxG= find(vv(:,d)); %find(nonzeros(vv(:,d))); WWRONG FOR A WHILE!
@@ -976,7 +976,7 @@ if expN==1
set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(1).Dexp(1).srtGnLst)
end end
DNLaxes1= handles.DNLaxes1; %ZoneRelated DNLaxes1= handles.DNLaxes1; %ZoneRelated
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
@@ -993,7 +993,7 @@ if expN==2
set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(2).Dexp(1).srtGnLst)
end end
DNLaxes2= handles.DNLaxes2; %ZoneRelated DNLaxes2= handles.DNLaxes2; %ZoneRelated
Exp(2).hzeroCLn(expLdCnt) = plot(DNLaxes2,zeroCLn,1:DMnum,'y'); Exp(2).hzeroCLn(expLdCnt)=plot(DNLaxes2,zeroCLn,1:DMnum,'y');
end end
@@ -1011,7 +1011,7 @@ if expN==3
set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtGnLst) set(handles.listboxGnOrf,'string',Exp(3).Dexp(1).srtGnLst)
end end
DNLaxes3= handles.DNLaxes3; %ZoneRelated DNLaxes3= handles.DNLaxes3; %ZoneRelated
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
@@ -1126,11 +1126,11 @@ elseif expType==2 %Multiple Experiment from in one Folder extraction
%************************************************* %*************************************************
ww=pwd; ww=pwd;
try EZmultiDayGui; catch ME try EZmultiDayGui; catch ME
msg = ME.message, cd(ww); end %* %* msg=ME.message, cd(ww); end %* %*
try EZmultiDay; catch ME try EZmultiDay; catch ME
msg = ME.message, cd(ww); end %* msg=ME.message, cd(ww); end %*
try EZmultiExLoad; catch ME try EZmultiExLoad; catch ME
msg = ME.message, cd(ww); end %* msg=ME.message, cd(ww); end %*
%********************* %*********************
elseif expType==3 elseif expType==3
Exp(expN).DexpType= 'multi'; Exp(expN).DexpType= 'multi';
@@ -1148,11 +1148,11 @@ elseif expType==3
%************************************************* %*************************************************
ww=pwd; ww=pwd;
try EZmultiDayGui; catch ME try EZmultiDayGui; catch ME
msg = ME.message,cd(ww); end %* %* msg=ME.message,cd(ww); end %* %*
try EZmultiDay; catch ME try EZmultiDay; catch ME
msg = ME.message, cd(ww); end %* msg=ME.message, cd(ww); end %*
try EZmultiExLoad; catch ME try EZmultiExLoad; catch ME
msg = ME.message, cd(ww); end %* msg=ME.message, cd(ww); end %*
%********************* %*********************
else else
disp('Cancel Load Exp') disp('Cancel Load Exp')
@@ -1205,12 +1205,12 @@ end
%User Reference Input Dialog Box used in the multiExperiment Chrono setup %User Reference Input Dialog Box used in the multiExperiment Chrono setup
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 = {'RF1','None'}; def={'RF1','None'};
answer = inputdlg(prompt,dlg_title,num_lines,def); answer=inputdlg(prompt,dlg_title,num_lines,def);
rfGene= cell2mat(answer(1)); rfGene= cell2mat(answer(1));
if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end
rfSpec= answer(2); %if strcmpi(answer(2),'None'), rfSpec= ''; end rfSpec= answer(2); %if strcmpi(answer(2),'None'), rfSpec= ''; end
@@ -1220,12 +1220,12 @@ end
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%First user input prototype code %First user input prototype code
if ~exist('RF1scanN','var') && ~exist('RF2scanN','var') %change || && if ~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:'};
dlg_title = 'User Reference Input'; dlg_title='User Reference Input';
num_lines = 1; num_lines=1;
def = {'Ref MP(s)','USRrefGeneName'}; def={'Ref MP(s)','USRrefGeneName'};
answer = inputdlg(prompt,dlg_title,num_lines,def); answer=inputdlg(prompt,dlg_title,num_lines,def);
rfMPstr= cell2mat(answer(1)); rfMPstr= cell2mat(answer(1));
rfMPcomas=strfind((cell2mat(answer(1))),','); rfMPcomas=strfind((cell2mat(answer(1))),',');
n=0; n=0;

View File

@@ -206,19 +206,19 @@ sh= userPars.BPlblShft;
fontSize= userPars.BPfontSz; fontSize= userPars.BPfontSz;
rotation= userPars.BProt; rotation= userPars.BProt;
%fontSize = 8; %fontSize=8;
%tickLabelStr = {'Label alpha','Label beta','Label chi','Label delta',... %tickLabelStr={'Label alpha','Label beta','Label chi','Label delta',...
% 'Label epsilon','Label fish','Label gamma','Label hallo','Label ingo'} % 'Label epsilon','Label fish','Label gamma','Label hallo','Label ingo'}
% generate data % generate data
if size(BPvals,1)==1, BPvals(2,1:maxCols)= nan; end if size(BPvals,1)==1, BPvals(2,1:maxCols)= nan; end
final_res = BPvals; %10*randn(300,9)+10; final_res=BPvals; %10*randn(300,9)+10;
% group boxes % group boxes
%sh = 0.3; %sh is shift value %sh=0.3; %sh is shift value
width = .5*sh; width=.5*sh;
%pos = [1+sh 2-sh 3+sh 4-sh 5+sh 6-sh 7+sh 8-sh 9+sh]; %pos=[1+sh 2-sh 3+sh 4-sh 5+sh 6-sh 7+sh 8-sh 9+sh];
bpn=1; bpn=1;
if strcmp(Exp(expN).DexpType, 'chrono') if strcmp(Exp(expN).DexpType, 'chrono')
ticDim= length(Exp(expN).Dexp); ticDim= length(Exp(expN).Dexp);
@@ -235,7 +235,7 @@ rotation= userPars.BProt;
end end
end end
end end
wid = width * ones(1,length(pos)); wid=width * ones(1,length(pos));
% boxplot % boxplot
figure figure
@@ -257,10 +257,10 @@ rotation= userPars.BProt;
ylabel('L in Hours', 'FontSize', fontSize) ylabel('L in Hours', 'FontSize', fontSize)
%x-labels %x-labels
text_h = findobj(gca, 'Type', 'text'); text_h=findobj(gca, 'Type', 'text');
%rotation = 45; %rotation=45;
for cnt = 1:length(text_h) for cnt=1:length(text_h)
set(text_h(cnt), 'FontSize', fontSize,... set(text_h(cnt), 'FontSize', fontSize,...
'Rotation', rotation, ... 'Rotation', rotation, ...
'String', tickLabelStr{length(tickLabelStr)-cnt+1}, ... 'String', tickLabelStr{length(tickLabelStr)-cnt+1}, ...
@@ -270,16 +270,16 @@ rotation= userPars.BProt;
% 'VerticalAlignment', 'cap', ... % 'VerticalAlignment', 'cap', ...
% smaller box for axes, in order to un-hide the labels % smaller box for axes, in order to un-hide the labels
squeeze = 0.2; squeeze=0.2;
left = 0.02; left=0.02;
right = 1; right=1;
bottom = squeeze; bottom=squeeze;
top = 1-squeeze; top=1-squeeze;
set(gca, 'OuterPosition', [left bottom right top]) set(gca, 'OuterPosition', [left bottom right top])
% remove outliers % remove outliers
hout = findobj(gca,'tag','Outliers'); hout=findobj(gca,'tag','Outliers');
for out_cnt = 1 : length(hout) for out_cnt=1 : length(hout)
if strcmpi(BPoutliers,'on'), if strcmpi(BPoutliers,'on'),
set(hout(out_cnt), 'Visible', 'on') set(hout(out_cnt), 'Visible', 'on')
elseif strcmpi(BPnotch,'off'), elseif strcmpi(BPnotch,'off'),

View File

@@ -284,7 +284,7 @@ elseif htTog==3
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); 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{m,j,:} = ((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1))); %intL{m,j,:}= ((Xn{m,j,:} - Xn{m,1,:}) - (Rn(j)-Rn(1)));
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
%{ %{

View File

@@ -27,7 +27,7 @@ userInputs=cell2mat(strcat( 'ExpZone:',num2str(expN), '; LeftPercent',answer(1),
%********************11111111111111111111111111111111111111111**************************************************************************************************************** %********************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);
fprintf(fid,'%s\userInputs',strcat('AggrevatingInteractionResults for User Input: ',userInputs)); fprintf(fid,'%s\userInputs',strcat('AggrevatingInteractionResults for User Input: ',userInputs));
@@ -63,7 +63,7 @@ end
fclose(fid) fclose(fid)
%********************222222222222222222222222222222222222222222222**************************************************************************************************************** %********************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);
fprintf(fid,'%s\userInputs',strcat('AlleviatingInteractionResults for User Input: ',userInputs)); %fprintf(fid,'%s\userInputs',userInputs); fprintf(fid,'%s\userInputs',strcat('AlleviatingInteractionResults for User Input: ',userInputs)); %fprintf(fid,'%s\userInputs',userInputs);
@@ -96,7 +96,7 @@ end
fclose(fid) fclose(fid)
%********************3333333333333333333333333333333333333333333333**************************************************************************************************************** %********************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);
fprintf(fid,'%s\userInputs',strcat('Adjusted AggrevatingInteractionResults for User Input: ',userInputs)); fprintf(fid,'%s\userInputs',strcat('Adjusted AggrevatingInteractionResults for User Input: ',userInputs));
@@ -128,7 +128,7 @@ fclose(fid)
%********************44444444444444444444444444444444444444444444****************************************************************************************************************%Interaction Printout for Negative (shorter L interaction values) Non-Adjusted for Ref std and curve fit boundaries %********************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);
fprintf(fid,'%s\userInputs',strcat('AlleviatingInteractionResults for User Input: ',userInputs)); %fprintf(fid,'%s\userInputs',userInputs); fprintf(fid,'%s\userInputs',strcat('AlleviatingInteractionResults for User Input: ',userInputs)); %fprintf(fid,'%s\userInputs',userInputs);

View File

@@ -54,16 +54,16 @@ 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; 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

View File

@@ -132,9 +132,9 @@ try
K=scan(1,plateNum).plate(1).CFout(indx,3); Ks= num2str(K); K=scan(1,plateNum).plate(1).CFout(indx,3); Ks= num2str(K);
r=scan(1,plateNum).plate(1).CFout(indx,4); rs= num2str(r); r=scan(1,plateNum).plate(1).CFout(indx,4); rs= num2str(r);
l=scan(1,plateNum).plate(1).CFout(indx,5); Ls= num2str(l); 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 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
Kl=scan(1,plateNum).plate(1).CFout(indx,7); Kl=scan(1,plateNum).plate(1).CFout(indx,7);
Ku=scan(1,plateNum).plate(1).CFout(indx,8); Ku=scan(1,plateNum).plate(1).CFout(indx,8);
@@ -147,7 +147,7 @@ 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

View File

@@ -23,11 +23,11 @@ else
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'), usrGnSp= {strcat(usrGene,'-')}; if strcmpi(usrSpec,'None'), usrGnSp= {strcat(usrGene,'-')};
elseif length(usrSpec)> 8, elseif length(usrSpec)> 8,
@@ -190,9 +190,9 @@ 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'));
@@ -205,7 +205,7 @@ 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

View File

@@ -18,11 +18,11 @@ 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 '} 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);
%usrGene= cell2mat(answer(1)); %usrGene= cell2mat(answer(1));
usrSpec= answer(1); usrSpec= answer(1);
usrGnSp= strcat(usrGene,usrSpec); usrGnSp= strcat(usrGene,usrSpec);
@@ -150,8 +150,8 @@ uu= horzcat(uu,vv);
for d=dmSel:dmSel for d=dmSel:dmSel
medianIndxG=[]; medianIndxG=[];
NZusrIndxG=[]; NZusrIndxG=[];
minG = min(nonzeros(vv(:,d))); minG=min(nonzeros(vv(:,d)));
maxG = max(nonzeros(vv(:,d))); maxG=max(nonzeros(vv(:,d)));
usrmeanG= mean(nonzeros(vv(:,d))); usrmeanG= mean(nonzeros(vv(:,d)));
usrStdG= std(nonzeros(vv(:,d))); usrStdG= std(nonzeros(vv(:,d)));
NZusrIndxG= find(vv(:,d)); NZusrIndxG= find(vv(:,d));
@@ -192,9 +192,9 @@ ru= r + std(vvr(medianIndxG,dmSel)); %r + Exp(expN).Dexp(DexpN).RFcmpr(RFnum).
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'));
@@ -208,7 +208,7 @@ 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
@@ -451,16 +451,16 @@ ru= r + std(vvr(medianIndxP,dmSel)); %r + Exp(expN).Dexp(DexpN).RFcmpr(RFnum).
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
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; 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

View File

@@ -373,7 +373,7 @@ end
%Plot new intL %Plot new intL
try try
% zeroCLn= zeros(1,days) % zeroCLn= zeros(1,days)
% Exp(zoneSel).hzeroCLn = plot(DNLaxes,zeroCLn,1:days,'y'); % Exp(zoneSel).hzeroCLn=plot(DNLaxes,zeroCLn,1:days,'y');
Exp(zoneSel).hintL(tracN)= plot(DNLaxes,intL,1:days); Exp(zoneSel).hintLb(tracN)= plot(DNLaxes,intL,1:days,'rs'); Exp(zoneSel).hintL(tracN)= plot(DNLaxes,intL,1:days); Exp(zoneSel).hintLb(tracN)= plot(DNLaxes,intL,1:days,'rs');
Exp(zoneSel).hintLadj(tracN)= plot(DNLaxes,intLadj,1:days,'g'); Exp(zoneSel).hintLadjb(tracN)= plot(DNLaxes,intLadj,1:days,'gs'); Exp(zoneSel).hintLadj(tracN)= plot(DNLaxes,intLadj,1:days,'g'); Exp(zoneSel).hintLadjb(tracN)= plot(DNLaxes,intLadj,1:days,'gs');
catch, catch,

View File

@@ -3,17 +3,16 @@ global exp
global exDlst global exDlst
global exFolder global exFolder
c= strfind(exDlst,' '); c=strfind(exDlst,' ');
d= strfind(exDlst,'_'); 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
end end
clear matFile clear matFile
@@ -21,27 +20,25 @@ 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
clear resF clear resF
clear resMatF clear resMatF
for n=1:size(dirLst,1) for n=1:size(dirLst,1)
if sum(ismember('Results2', dirLst(n).name))==8 if sum(ismember('Results2', dirLst(n).name))==8
resF= dirLst(n).name resF=dirLst(n).name
resMatF= fullfile(exFolder,cell2mat(expDlst(m)),resF,'matResults') resMatF=fullfile(exFolder,cell2mat(expDlst(m)),resF,'matResults')
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
end %for o=1:size(matFlst,1) end
end
end %if sum(ismember('Results2', dirLst(n).name)) end
end %for n=1:size(dirLst,1) end
end %for m= 1:size(expDlst,2)
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

@@ -21,8 +21,8 @@ exDirs=dir(exFolder)
exFs= {exDirs.name} exFs= {exDirs.name}
f = figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' ); f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' );
hListbox = uicontrol(... hListbox=uicontrol(...
'Style', 'listbox',... 'Style', 'listbox',...
'String',sort(exFs),... 'String',sort(exFs),...
'value',[],... 'value',[],...
@@ -36,8 +36,8 @@ function load_listbox(source,eventdata)
%global CSrchRng %global CSrchRng
%global CSrearchRange %global CSrearchRange
userIndx = (get(source,'value')) userIndx=(get(source,'value'))
userStr = (get(source,'string')) userStr=(get(source,'string'))
%scLstIndx= str2num(char(strrep(userStr(userIndx), 'Scan', ''))) %scLstIndx= str2num(char(strrep(userStr(userIndx), 'Scan', '')))
user_entry=userStr(userIndx) user_entry=userStr(userIndx)
@@ -51,7 +51,7 @@ user_entry=userStr(userIndx)
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];
hedit8 = uicontrol(... hedit8=uicontrol(...
'Style', 'pushbutton',... 'Style', 'pushbutton',...
'String',{'Continue'},... 'String',{'Continue'},...
'Units','normalized',... 'Units','normalized',...

View File

@@ -50,7 +50,7 @@ function EZmultiDayGui
f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' ); f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' );
hListbox = uicontrol(... hListbox=uicontrol(...
'Style', 'listbox',... 'Style', 'listbox',...
'String',ExpOrderByExp,... 'String',ExpOrderByExp,...
'value',[],... 'value',[],...
@@ -72,7 +72,7 @@ function EZmultiDayGui
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];
hedit8 = uicontrol(... hedit8=uicontrol(...
'Style', 'pushbutton',... 'Style', 'pushbutton',...
'String',{'Continue'},... 'String',{'Continue'},...
'Units','normalized',... 'Units','normalized',...

View File

@@ -173,12 +173,12 @@ EZVimDisplay %*
%********************* %*********************
usrRefFg=0; usrRefFg=0;
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 = {'RF1','None'}; def={'RF1','None'};
answer = inputdlg(prompt,dlg_title,num_lines,def); answer=inputdlg(prompt,dlg_title,num_lines,def);
if iscell(answer(1)) if iscell(answer(1))
rfGene= cell2mat(answer(1)); rfGene= cell2mat(answer(1));
else else
@@ -266,7 +266,7 @@ if expN==1 %Adapted to accomodate AppDesigner 230821
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 %Adapted to accomodate AppDesigner 230821 if expN==2 %Adapted to accomodate AppDesigner 230821
@@ -283,7 +283,7 @@ if expN==2 %Adapted to accomodate AppDesigner 230821
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
@@ -301,7 +301,7 @@ if expN==3 %Adapted to accomodate AppDesigner 230821
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

View File

@@ -301,7 +301,7 @@ else
Exp(expN).Dexp(n).RFmd1indx(d+1)=firstZero; Exp(expN).Dexp(n).RFmd1indx(d+1)=firstZero;
Exp(expN).Dexp(n).RFmd1pltN= RF1mp; Exp(expN).Dexp(n).RFmd1pltN= RF1mp;
try medValList1{d+1}= Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; catch, catcherror = 'Ln356', end try medValList1{d+1}= Exp(expN).Dexp(n).scan(rf1scN).plate(1).CFout(medianIndx,5); nonZeroCnt; catch, catcherror='Ln356', end
end %~isempty(nonZeroIndx) && length(medianIndx) > (.15*384) end %~isempty(nonZeroIndx) && length(medianIndx) > (.15*384)
catch %try ~ln375 catch %try ~ln375
@@ -595,8 +595,8 @@ uu= horzcat(uu,vv);
for d=1:DMnum for d=1:DMnum
medianIndxG=[]; medianIndxG=[];
NZrfIndxG=[]; NZrfIndxG=[];
minG = min(nonzeros(vv(:,d))); minG=min(nonzeros(vv(:,d)));
maxG = max(nonzeros(vv(:,d))); maxG=max(nonzeros(vv(:,d)));
RFmeanG= mean(nonzeros(vv(:,d))); RFmeanG= mean(nonzeros(vv(:,d)));
RFstdG= std(nonzeros(vv(:,d))); RFstdG= std(nonzeros(vv(:,d)));
NZrfIndxG= find(vv(:,d)); %find(nonzeros(vv(:,d))); NZrfIndxG= find(vv(:,d)); %find(nonzeros(vv(:,d)));

View File

@@ -1,221 +1,182 @@
%EZplotUcmp.m % EZplotUcmp.m
% User find and build composite of Selected Gene Composite and
% Plot it on OLay Plot and Trend plot DNLaxles
% For Single and Multi experiment Studies
% Called when Composite_ toggle button is clicked.
% Data stored for printable Trend Plot production (click [L] in DNLaxes )
%***********User find and build composite of Selected Gene Composite and
%*************Plot it on OLay Plot and Trend plot DNLaxles
%***************For Single and Multi experiment Studies
%Called when Composite_ toggle button is clicked.
%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
traceN=Exp(expN).traceN; traceN=Exp(expN).traceN;
DexpN= Exp(expN).DexpN; DexpN=Exp(expN).DexpN;
dmSel=Exp(zoneSel).Dexp(DexpN).pertSel; dmSel=Exp(zoneSel).Dexp(DexpN).pertSel;
%dmSel= str2num(get(ghandles.DMed3,'string')) % dmSel=str2num(get(ghandles.DMed3,'string'))
patrnN=strfind(selGnOrf{1},':'); % extract Gene-Orf Name
patrndash=strfind(selGnOrf{1},'-');
selStrNm=char(selGnOrf);
usrGene=selStrNm(1:(patrnN(1)-1));
patrnN=strfind(selGnOrf{1},':'); %Extract Gene-Orf Name
patrndash= strfind(selGnOrf{1},'-');
selStrNm= char(selGnOrf)
usrGene= selStrNm(1:(patrnN(1)-1));
if strcmpi(selStrNm(1:3),'RF-') if strcmpi(selStrNm(1:3),'RF-')
usrGeneSearch= selStrNm(4:(patrndash(2)-1)); usrGeneSearch=selStrNm(4:(patrndash(2)-1));
elseif strcmp(selStrNm(1:3),'RF1') elseif strcmp(selStrNm(1:3),'RF1')
usrGeneSearch= selStrNm(1:3); usrGeneSearch=selStrNm(1:3);
else else
usrGeneSearch= selStrNm(1:(patrnN(1)-1)); usrGeneSearch=selStrNm(1:(patrnN(1)-1));
end end
prompt={'Enter Specifics Term if used to futher specify selection '};
dlg_title='User Specifics Term for Refinement Composite';
num_lines=1;
def={'None'};
answer=inputdlg(prompt,dlg_title,num_lines,def);
usrSpec=cell2mat(answer(1));
if strcmpi(usrSpec,'None'), usrGnSp={strcat(usrGene,'-')};
elseif length(usrSpec)> 8,
trimUspec=usrSpec(1:8);
usrGnSp=strcat(usrGene,',',{trimUspec});
else
trimUspec=usrSpec;
usrGnSp=strcat(usrGene,',',{trimUspec});
end
prompt = {'Enter Specifics Term if used to futher specify selection '}; % For n=DexpN:DexpN %n=1:Exp(expN).DexpLength %LOOP Thru DayExps
dlg_title = 'User Specifics Term for Refinement Composite'; n=DexpN;
num_lines = 1;
def = {'None'};
answer = inputdlg(prompt,dlg_title,num_lines,def);
usrSpec= cell2mat(answer(1));
if strcmpi(usrSpec,'None'), usrGnSp= {strcat(usrGene,'-')};
elseif length(usrSpec)> 8,
trimUspec= usrSpec(1:8);
usrGnSp= strcat(usrGene,',',{trimUspec});
else
trimUspec= usrSpec;
usrGnSp= strcat(usrGene,',',{trimUspec});
end
%for n= DexpN:DexpN %n= 1:Exp(expN).DexpLength %LOOP Thru DayExps
n= DexpN;
MPnum=length(Exp(expN).Dexp(DexpN).MP); MPnum=length(Exp(expN).Dexp(DexpN).MP);
DMnum= length(Exp(expN).Dexp(DexpN).DM.drug); DMnum=length(Exp(expN).Dexp(DexpN).DM.drug);
% Extract expDay from ExpName string
%Extract expDay from ExpName string dayNpos=max(strfind(Exp(expN).Dexp(DexpN).ExpFoldr, '_D'));
dayNpos= max(strfind(Exp(expN).Dexp(DexpN).ExpFoldr, '_D')); dayLbl=Exp(expN).Dexp(DexpN).ExpFoldr(dayNpos+1:end);
dayLbl= Exp(expN).Dexp(DexpN).ExpFoldr(dayNpos+1:end);
%*********************************
dRF1indx=0; dRF1indx=0;
usrSp=usrSpec; % user entry of Specifics for Ref selection
usrSp= usrSpec; %user entry of Specifics for Ref selection
%*******************************************************
for mp=1:length(Exp(expN).Dexp(DexpN).MP) for mp=1:length(Exp(expN).Dexp(DexpN).MP)
for ind384=1:384 for ind384=1:384
try % try
%Insert test for numeric in genename and orf if isnumeric % Insert test for numeric in genename and orf if isnumeric
%Correct common EXCEL problem of converting OCT1 into a date numeric % Correct common EXCEL problem of converting OCT1 into a date numeric
if cell2mat(Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384))==38991, if cell2mat(Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384))==38991,
Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)={'OCT1_'}; Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)={'OCT1_'};
elseif isnumeric(cell2mat(Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384))) elseif isnumeric(cell2mat(Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)))
Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)={' '}; Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)={' '};
end end
%*****************************************************************
%DISPersed REFerence capture and find Medians % DISPersed REFerence capture and find Medians
if ( ((strcmpi((Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)),usrGeneSearch) && ... if ( ((strcmpi((Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)),usrGeneSearch) && ...
strcmpi((Exp(expN).Dexp(DexpN).MP(mp).specifics{1}(ind384)),usrSp)))... strcmpi((Exp(expN).Dexp(DexpN).MP(mp).specifics{1}(ind384)),usrSp))) || ...
|| ((strcmpi((Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)),usrGeneSearch) && ... ((strcmpi((Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)),usrGeneSearch) && ...
strcmpi(usrSp,'None'))) ), strcmpi(usrSp,'None'))) ),
dRF1indx=dRF1indx+1; dRF1indx=dRF1indx+1;
Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384) =strrep((Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)),':',' '); Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384) =strrep((Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)),':',' ');
drf(dRF1indx,1)= (Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384)); drf(dRF1indx,1)=(Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384));
drf(dRF1indx,2)={mp}; drfMP(dRF1indx,mp)= mp; drf(dRF1indx,2)={mp}; drfMP(dRF1indx,mp)=mp;
drf(dRF1indx,3)={ind384}; drfPindx(dRF1indx,mp)= ind384; drf(dRF1indx,3)={ind384}; drfPindx(dRF1indx,mp)=ind384;
%drf(dRF1indx,7)= (Exp(expN).Dexp(DexpN).MP(mp).specifics{1}(ind384)); %drf(dRF1indx,7)=(Exp(expN).Dexp(DexpN).MP(mp).specifics{1}(ind384));
end
end %if isempty(regexpi(char((Exp(expN).Dexp(DexpN).MP(mp).genename{1}(ind384))),'blank'))... catch
%******************************************************************************* msgBadGeneName=strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
catch end
msgBadGeneName= strcat('check genename at mp=',num2str(mp),' indx=',num2str(ind384))
end end
end %end associated with for ind384=1:384
mp mp
end %end associated with for mp=1:length(Exp(expN).Dexp(DexpN).MP) end
%*****************************************************
%************************************************************************************************
vvL=[]; %Initialize to cover case where all spot are Zero NoGrowth See NIGrowthflg==0 vvL=[]; % initialize to cover case where all spot are Zero NoGrowth See NIGrowthflg==0
if exist('drf','var') if exist('drf','var')
%Det. index of change from one MP to the next % Det. index of change from one MP to the next
i=2; i=2;
clear chgIndx clear chgIndx
chgIndx(1)=1; chgIndx(1)=1;
for j=1:length(drf(:,3)) for j=1:length(drf(:,3))
if j>1 if j>1
if cell2mat(drf(j,2))~= cell2mat(drf((j-1),2)), chgIndx(i)=j; i=i+1; end if cell2mat(drf(j,2))~=cell2mat(drf((j-1),2)), chgIndx(i)=j; i=i+1; end
end end
end end
chgIndx(length(chgIndx)+1)= size(drf,1) +1; %length(drf)+1; chgIndx(length(chgIndx)+1)=size(drf,1) +1; % length(drf)+1;
vvL=zeros(size(drf,1),1 ); % length(drf)+1;
vvL= zeros(size(drf,1),1 ); %length(drf)+1; dMPs=unique(cell2mat(drf(:,2)));
%************************************ for d=1:length(Exp(expN).Dexp(DexpN).DM.drug)
dMPs= unique(cell2mat(drf(:,2)));
%*****************************************
for d= 1:length(Exp(expN).Dexp(DexpN).DM.drug)
for mm=1:length(dMPs) % length(chgIndx) for mm=1:length(dMPs) % length(chgIndx)
usrScNdisp=((dMPs(mm)-1)*DMnum)+(d); usrScNdisp=((dMPs(mm)-1)*DMnum)+(d);
NZusrIndx= drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm)); medianIndxDisp= NZusrIndx; NZusrIndx=drfPindx((find(drfPindx(:,dMPs(mm)))),dMPs(mm));
medianIndxDisp=NZusrIndx;
vvL(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(DexpN).scan(usrScNdisp).plate(1).CFout(NZusrIndx,5); vvL(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(DexpN).scan(usrScNdisp).plate(1).CFout(NZusrIndx,5);
%For Global Ref Composite 17_1009 %**************************************************************************
vvK(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(DexpN).scan(usrScNdisp).plate(1).CFout(NZusrIndx,3); vvK(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(DexpN).scan(usrScNdisp).plate(1).CFout(NZusrIndx,3);
vvr(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(DexpN).scan(usrScNdisp).plate(1).CFout(NZusrIndx,4); vvr(chgIndx(mm):(chgIndx(mm+1)-1))=Exp(expN).Dexp(DexpN).scan(usrScNdisp).plate(1).CFout(NZusrIndx,4);
%***************************************************************************************************** end
end %for mm=1:length(dMPs)
%****************CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES****************************************************************** % CALC. GLOBAL MEAN, STD, AND MEDIAN FOR DISTRIBUTED REFERENCES
%for d= 1:length(Exp(expN).Dexp(DexpN).DM.drug) % for d=1:length(Exp(expN).Dexp(DexpN).DM.drug)
NZusrIndxG=[]; NZusrIndxG=[];
NZusrIndxG= find(vvL); NZusrIndxG=find(vvL);
if isempty(nonzeros(vvL)), nonZeroCntD=0; if isempty(nonzeros(vvL))
else nonZeroCntD= length(nonzeros(vvL)); nonZeroCntD=0;
else
nonZeroCntD=length(nonzeros(vvL));
end end
%Calc. of median value for composite doesn't require and odd number of Indx items %Calc. of median value for composite doesn't require and odd number of Indx items
NZusrIndxG= NZusrIndxG(:); NZusrIndxG=NZusrIndxG(:);
if ~isempty(NZusrIndxG) && length(NZusrIndxG) > 0 %(.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero if ~isempty(NZusrIndxG) && length(NZusrIndxG) > 0 %(.15*size(drf,1)) %To calc. a median, more than 15% of spots must be nonZero
UsrLvals{d}=vvL(NZusrIndxG);
UsrLvals{d}= vvL(NZusrIndxG); UsrKvals{d}=vvK(NZusrIndxG);
UsrKvals{d}= vvK(NZusrIndxG); Usrrvals{d}=vvr(NZusrIndxG);
Usrrvals{d}= vvr(NZusrIndxG); end
end end
end end
if ~exist('drf','var')
end % if exist('drf','var')
%END OF DISPERSE
%*********************************************************************
%####################################################################
%end %for n=1:Exp(expN).DexpLength %Loop thru Dayexps
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
% 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(dmSel)))); Ks= num2str(K); Kstd= std(cell2mat((UsrKvals(dmSel)))); KstdStr= num2str(Kstd); K=median(cell2mat((UsrKvals(dmSel)))); Ks=num2str(K); Kstd=std(cell2mat((UsrKvals(dmSel)))); KstdStr=num2str(Kstd);
r= median(cell2mat((Usrrvals(dmSel)))); rs= num2str(r); rstd= std(cell2mat((Usrrvals(dmSel)))); rstdStr= num2str(rstd); r=median(cell2mat((Usrrvals(dmSel)))); rs=num2str(r); rstd=std(cell2mat((Usrrvals(dmSel)))); rstdStr=num2str(rstd);
l= median(cell2mat((UsrLvals(dmSel)))); Ls= num2str(l); Lstd= std(cell2mat((UsrLvals(dmSel)))); LstdStr= num2str(Lstd); l=median(cell2mat((UsrLvals(dmSel)))); Ls=num2str(l); Lstd=std(cell2mat((UsrLvals(dmSel)))); LstdStr=num2str(Lstd);
Kl= K - Kstd; %std(UsrKvals(dmSel)); Kl=K - Kstd; %std(UsrKvals(dmSel));
Ku= K + Kstd; %std(UsrKvals(dmSel)); Ku=K + Kstd; %std(UsrKvals(dmSel));
rl= r - rstd; %std(Usrrvals(dmSel)); rl=r - rstd; %std(Usrrvals(dmSel));
ru= r + rstd; %std(UsrKvals(dmSel)); ru=r + rstd; %std(UsrKvals(dmSel));
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
plateNum=(LBmp-1)*destPerMP + dmSel;
plateNum=(LBmp-1)*destPerMP + dmSel; MP=Exp(zoneSel).Dexp(DexpN).MP;
MP=Exp(zoneSel).Dexp(DexpN).MP;
try try
t=1:200;
t=1:200; clear g;
clear g; try
g=K ./ (1 + exp(-r.* (t - l )));
try gSlow=Kl ./ (1 + exp(-rl.* (t - lslow )));
g = K ./ (1 + exp(-r.* (t - l ))); gFast=Ku ./ (1 + exp(-ru.* (t - lfast )));
gSlow= Kl ./ (1 + exp(-rl.* (t - lslow ))); if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
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; 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;
Exp(1).traceN=Exp(1).traceN+1; Exp(1).traceN=Exp(1).traceN+1;
@@ -231,69 +192,65 @@ if K==0||r==0||l==0, g(1:200)=1;gSlow(1:200)=1;gFast(1:200)=1;end
Exp(3).traceN=Exp(3).traceN+1; Exp(3).traceN=Exp(3).traceN+1;
traceN=Exp(3).traceN; traceN=Exp(3).traceN;
end end
plot(plotAxes,t,g);hold (plotAxes,'on'); plot(plotAxes,t,g);hold (plotAxes,'on');
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');
Exp(expN).Trace(traceN).UsrGLB=usrGnSp;
Exp(expN).Trace(traceN).dmSel=dmSel;
Exp(expN).Trace(traceN).DexpN=DexpN;
for d=1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru DrugMedias
Exp(expN).Trace(traceN).Dexp(DexpN).DM(d).UsrLvals=UsrLvals(d);
Exp(expN).Trace(traceN).Dexp(DexpN).DM(d).UsrKvals=UsrKvals(d);
Exp(expN).Trace(traceN).Dexp(DexpN).DM(d).Usrrvals=Usrrvals(d);
end
Exp(expN).Trace(traceN).UsrGLB= usrGnSp; % Store L R and K valves for manual selected Composite [C] plots
Exp(expN).Trace(traceN).dmSel= dmSel; Exp(expN).ll(traceN)=l; Exp(expN).rr(traceN)=r; Exp(expN).kk(traceN)=K;
Exp(expN).Trace(traceN).DexpN= DexpN; Exp(expN).lslow(traceN)=lslow; Exp(expN).lfast(traceN)=lfast;
for d= 1:length(Exp(expN).Dexp(DexpN).DM.drug) %LOOP Thru DrugMedias
Exp(expN).Trace(traceN).Dexp(DexpN).DM(d).UsrLvals= UsrLvals(d);
Exp(expN).Trace(traceN).Dexp(DexpN).DM(d).UsrKvals= UsrKvals(d);
Exp(expN).Trace(traceN).Dexp(DexpN).DM(d).Usrrvals= Usrrvals(d);
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 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' catchissue='Ln141 EZlstBoxExt'
msg='Error' msg='Error'
end % trycatch zoneSel<4 datatip selection from Image (not from an OverLay Plot) end

View File

@@ -3,12 +3,12 @@ global exp
usrRefFg=0; usrRefFg=0;
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 = {'RF1','None'}; def={'RF1','None'};
answer = inputdlg(prompt,dlg_title,num_lines,def); answer=inputdlg(prompt,dlg_title,num_lines,def);
rfGene= cell2mat(answer(1)); rfGene= cell2mat(answer(1));
if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end if ~strcmpi(rfGene,'RF1')|| ~strcmpi(rfGene,'RF2'), usrRefFg=1; end
rfSpec= answer(2); %if strcmpi(answer(2),'None'), rfSpec= ''; end rfSpec= answer(2); %if strcmpi(answer(2),'None'), rfSpec= ''; end
@@ -81,7 +81,7 @@ if expN==1
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
@@ -95,7 +95,7 @@ if expN==2
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
@@ -110,7 +110,7 @@ if expN==3
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

View File

@@ -19,7 +19,7 @@ if NoOLay==0
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)))
@@ -30,7 +30,7 @@ if NoOLay==0
%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);
@@ -94,7 +94,7 @@ cd(w)
%tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3)); %tPtsSize=size(Exp(expN).Dexp(DexpN).FexpScanBMtp{1,1},(3));
tPtsSize=size(FexpScanBMtp{1,plateNum},(3)); %tPtsSize=size(FexpScanBMtp{1,1},(3)); 20160110 tPtsSize=size(FexpScanBMtp{1,plateNum},(3)); %tPtsSize=size(FexpScanBMtp{1,1},(3)); 20160110
%bmpFileLst = dirfullfile(char(OLresDir),num2str(plateNum),'*.bmp')); %(fullfile(expDir, char(ScLst(ScLstCnt)), '*.bmp')); %bmpFileLst=dirfullfile(char(OLresDir),num2str(plateNum),'*.bmp')); %(fullfile(expDir, char(ScLst(ScLstCnt)), '*.bmp'));
hsafety=figure; hsafety=figure;
dc= get(datacursormode) dc= get(datacursormode)
imInterval=1; imInterval=1;

View File

@@ -1,11 +1,11 @@
%Create and display Reference data in a table % Create and display Reference data in a table
global Exp global Exp
DexpN= Exp(expN).DexpN; DexpN=Exp(expN).DexpN;
rnames=Exp(expN).Dexp(DexpN).RFrnames; rnames=Exp(expN).Dexp(DexpN).RFrnames;
data= Exp(expN).Dexp(DexpN).RFdata; data=Exp(expN).Dexp(DexpN).RFdata;
cnames= [{'Median'},{'Mean'},{'STD'},{'Minimum'},{'Maximum'}]; cnames=[{'Median'},{'Mean'},{'STD'},{'Minimum'},{'Maximum'}];
f = figure('Menubar','none','Position',[1000 100 640 750],'Name',Exp(expN).Dexp(DexpN).ExpFoldr ); f=figure('Menubar','none','Position',[1000 100 640 750],...
'Name',Exp(expN).Dexp(DexpN).ExpFoldr );
t = uitable('Parent',f,'Data',data,'ColumnName',cnames,... t=uitable('Parent',f,'Data',data,'ColumnName',cnames,...
'RowName',rnames,'Position',[20 20 620 730]); 'RowName',rnames,'Position',[20 20 620 730]);

View File

@@ -4,7 +4,7 @@
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))),',');
@@ -23,12 +23,12 @@ if n==1 && ~exist('RF1scanN','var') && ~exist('RF2scanN','var') %change || &&
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));
@@ -172,8 +172,8 @@ uu= horzcat(uu,vv);
for d=1:DMnum for d=1:DMnum
medianIndxG=[]; medianIndxG=[];
NZrfIndxG=[]; NZrfIndxG=[];
minG = min(nonzeros(vv(:,d))); minG=min(nonzeros(vv(:,d)));
maxG = max(nonzeros(vv(:,d))); maxG=max(nonzeros(vv(:,d)));
RFmeanG= mean(nonzeros(vv(:,d))); RFmeanG= mean(nonzeros(vv(:,d)));
RFstdG= std(nonzeros(vv(:,d))); RFstdG= std(nonzeros(vv(:,d)));
NZrfIndxG= find(nonzeros(vv(:,d))); NZrfIndxG= find(nonzeros(vv(:,d)));

View File

@@ -79,9 +79,9 @@ try
K=scan(1,plateNum).plate(1).CFout(indx,3); Ks= num2str(K); K=scan(1,plateNum).plate(1).CFout(indx,3); Ks= num2str(K);
r=scan(1,plateNum).plate(1).CFout(indx,4); rs= num2str(r); r=scan(1,plateNum).plate(1).CFout(indx,4); rs= num2str(r);
l=scan(1,plateNum).plate(1).CFout(indx,5); Ls= num2str(l); 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 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
Kl=scan(1,plateNum).plate(1).CFout(indx,7); Kl=scan(1,plateNum).plate(1).CFout(indx,7);
Ku=scan(1,plateNum).plate(1).CFout(indx,8); Ku=scan(1,plateNum).plate(1).CFout(indx,8);
@@ -93,7 +93,7 @@ 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
@@ -140,7 +140,7 @@ end
catch catch
%{ %{
g = K ./ (1 + exp(-r.* (t - l ))); g= K ./ (1 + exp(-r.* (t - l )));
if K==0||r==0||l==0, g(1:200)=1;end if K==0||r==0||l==0, g(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);

View File

@@ -136,7 +136,7 @@ Exp(numExps+1).interacPBsel=0;
% directory in the uigetfile to load the experiment .mat file. % directory in the uigetfile to load the experiment .mat file.
try try
[openExpfile,scansDir] = uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off') [openExpfile,scansDir]=uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off')
load (fullfile(Exp(1).Dexp(1).ExpFoldr,'MasterPlateFiles','MPDMmat.mat')) load (fullfile(Exp(1).Dexp(1).ExpFoldr,'MasterPlateFiles','MPDMmat.mat'))
@@ -180,7 +180,7 @@ try
Exp(1).traceN=0; Exp(2).traceN=0; Exp(3).traceN=0; %ZoneRelated Exp(1).traceN=0; Exp(2).traceN=0; Exp(3).traceN=0; %ZoneRelated
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= {};
Exp(1).RFmd1indx=[]; Exp(1).RFmd1indx=[];
@@ -189,7 +189,7 @@ try
Exp(1).RFmd2pltN=[]; Exp(1).RFmd2pltN=[];
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= {};
Exp(2).RFmd1indx=[]; Exp(2).RFmd1indx=[];
@@ -198,7 +198,7 @@ try
Exp(2).RFmd2pltN=[]; Exp(2).RFmd2pltN=[];
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= {};
Exp(3).RFmd1indx=[]; Exp(3).RFmd1indx=[];
@@ -274,9 +274,9 @@ try
DNLaxes1= handles.DNLaxes1; DNLaxes2= handles.DNLaxes2; DNLaxes3= handles.DNLaxes3; DNLaxes1= handles.DNLaxes1; DNLaxes2= handles.DNLaxes2; DNLaxes3= handles.DNLaxes3;
zeroCLn= zeros(1,DMnum); zeroCLn= zeros(1,DMnum);
%Exp(expN).expLoadCnt(1)=1; %ZoneRelated %Exp(expN).expLoadCnt(1)=1; %ZoneRelated
Exp(1).hzeroCLn(1) = plot(DNLaxes1,zeroCLn,1:DMnum,'y'); try set(Exp(1).hzeroCLn,'visible','off'); catch ME, end Exp(1).hzeroCLn(1)=plot(DNLaxes1,zeroCLn,1:DMnum,'y'); try set(Exp(1).hzeroCLn,'visible','off'); catch ME, end
Exp(2).hzeroCLn(1) = plot(DNLaxes2,zeroCLn,1:DMnum,'y'); try set(Exp(2).hzeroCLn,'visible','off'); catch ME, end Exp(2).hzeroCLn(1)=plot(DNLaxes2,zeroCLn,1:DMnum,'y'); try set(Exp(2).hzeroCLn,'visible','off'); catch ME, end
Exp(3).hzeroCLn(1) = plot(DNLaxes3,zeroCLn,1:DMnum,'y'); try set(Exp(3).hzeroCLn,'visible','off'); catch ME, end Exp(3).hzeroCLn(1)=plot(DNLaxes3,zeroCLn,1:DMnum,'y'); try set(Exp(3).hzeroCLn,'visible','off'); catch ME, end
Exp(1).expLoadCnt=1; Exp(1).expLoadCnt=1;
Exp(2).expLoadCnt=1; Exp(2).expLoadCnt=1;
Exp(3).expLoadCnt=1; Exp(3).expLoadCnt=1;
@@ -438,7 +438,7 @@ try
rf1scN=RF1scanN+d; rf1scN=RF1scanN+d;
try %if RF1scanN doesn't exist this addition to list will be skipped try %if RF1scanN doesn't exist this addition to list will be skipped
nonZeroIndx = find(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5)); nonZeroIndx=find(Exp(expN).Dexp(1).scan(rf1scN).plate(1).CFout(1:384,5));
if isempty(nonZeroIndx), nonZeroCnt=0; medianIndx= nonZeroIndx; if isempty(nonZeroIndx), nonZeroCnt=0; medianIndx= nonZeroIndx;
else nonZeroCnt=length(nonZeroIndx); else nonZeroCnt=length(nonZeroIndx);
@@ -793,8 +793,8 @@ try
for d=1:DMnum for d=1:DMnum
medianIndxD=[]; medianIndxD=[];
NZrfIndxG=[]; NZrfIndxG=[];
minG = min(nonzeros(vv(:,d))); minG=min(nonzeros(vv(:,d)));
maxG = max(nonzeros(vv(:,d))); maxG=max(nonzeros(vv(:,d)));
RFmeanG=mean(nonzeros(vv(:,d))); RFmeanG=mean(nonzeros(vv(:,d)));
RFstdG= std(nonzeros(vv(:,d))); RFstdG= std(nonzeros(vv(:,d)));
NZrfIndxG= find(vv(:,d)); %find(nonzeros(vv(:,d))); WWRONG FOR A WHILE! find(nonzeros(vv(:,d))); NZrfIndxG= find(vv(:,d)); %find(nonzeros(vv(:,d))); WWRONG FOR A WHILE! find(nonzeros(vv(:,d)));

View File

@@ -26,8 +26,8 @@ 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;
@@ -43,8 +43,8 @@ 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);

View File

@@ -2,25 +2,25 @@
hFstrip=figure; hFstrip=figure;
%figure(hFstrip,'Visible','off') %figure(hFstrip,'Visible','off')
t = text(.05,.05,tmPtTx,'FontSize',8, 'FontWeight','bold'); %, 'FontWeight','demi') t=text(.05,.05,tmPtTx,'FontSize',8, 'FontWeight','bold'); %, 'FontWeight','demi')
%Bspace= zeros(20,size(Fcutsc,2))+255; %Bspace= zeros(20,size(Fcutsc,2))+255;
F=[]; F=[];
% Capture the text from the screen: % Capture the text from the screen:
F = getframe(gca,[10 10 200 200]); F=getframe(gca,[10 10 200 200]);
% Close the figure: % Close the figure:
close close
cc=[]; cc=[];
c=[]; c=[];
% Select any plane of the resulting image: % Select any plane of the resulting image:
cc = F.cdata(:,:,1); cc=F.cdata(:,:,1);
c= cc(182:195,18:60); c= cc(182:195,18:60);
% %
i=[]; i=[];
j=[]; j=[];
% Determine where the text was (black is 0): % Determine where the text was (black is 0):
%[i,j] = find(cc == 0); %[i,j]=find(cc == 0);
[i,j] = find(c < 255); [i,j]=find(c < 255);
% Read in or load the image that is to contain the text: % Read in or load the image that is to contain the text:
@@ -29,10 +29,10 @@ j=[];
%Bspace= zeros(20,size(Fcutsc,2))+255; %Bspace= zeros(20,size(Fcutsc,2))+255;
Bspace= zeros((210-size(Fcutsc,1)),size(Fcutsc,2))+255; Bspace= zeros((210-size(Fcutsc,1)),size(Fcutsc,2))+255;
ind=[]; ind=[];
ind = sub2ind(size(Bspace),i,j); ind=sub2ind(size(Bspace),i,j);
% Index into new image, replacing pixels with white: % Index into new image, replacing pixels with white:
Bspace(ind) = uint8(0); Bspace(ind)=uint8(0);
%figure %figure
% Display and color the new image: % Display and color the new image:
%imagesc(Bspace) %imagesc(Bspace)

View File

@@ -3,7 +3,7 @@ function varargout = EZviewGui(varargin)
% EZVIEWGUI, by itself, creates a new EZVIEWGUI or raises the existing % EZVIEWGUI, by itself, creates a new EZVIEWGUI or raises the existing
% singleton*. % singleton*.
% %
% H = EZVIEWGUI returns the handle to a new EZVIEWGUI or the handle to % H=EZVIEWGUI returns the handle to a new EZVIEWGUI or the handle to
% the existing singleton*. % the existing singleton*.
% %
% EZVIEWGUI('CALLBACK',hObject,eventData,handles,...) calls the local % EZVIEWGUI('CALLBACK',hObject,eventData,handles,...) calls the local
@@ -20,8 +20,8 @@ function varargout = EZviewGui(varargin)
% %
% See also: GUIDE, GUIDATA, GUIHANDLES % See also: GUIDE, GUIDATA, GUIHANDLES
gui_Singleton = 0; gui_Singleton=0;
gui_State = struct( ... gui_State=struct( ...
'gui_Name', mfilename, ... 'gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ... 'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @EZviewGui_OpeningFcn, ... 'gui_OpeningFcn', @EZviewGui_OpeningFcn, ...
@@ -30,11 +30,11 @@ function varargout = EZviewGui(varargin)
'gui_Callback', []); 'gui_Callback', []);
if nargin && ischar(varargin{1}) if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1}); gui_State.gui_Callback=str2func(varargin{1});
end end
if nargout if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); [varargout{1:nargout}]=gui_mainfcn(gui_State, varargin{:});
else else
try try
gui_mainfcn(gui_State, varargin{:}); gui_mainfcn(gui_State, varargin{:});
@@ -52,7 +52,7 @@ function EZviewGui_OpeningFcn(hObject, eventdata, handles, varargin)
% varargin command line arguments to EZviewGui (see VARARGIN) % varargin command line arguments to EZviewGui (see VARARGIN)
% Choose default command line output for EZviewGui % Choose default command line output for EZviewGui
handles.output = hObject; handles.output=hObject;
% Update handles structure % Update handles structure
guidata(hObject, handles); guidata(hObject, handles);
@@ -94,13 +94,13 @@ function EZviewGui_OpeningFcn(hObject, eventdata, handles, varargin)
end end
% Outputs from this function are returned to the command line. % Outputs from this function are returned to the command line.
function varargout = EZviewGui_OutputFcn(hObject, eventdata, handles) function varargout=EZviewGui_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT); % varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure % hObject handle to figure
% 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)
% Get default command line output from handles structure % Get default command line output from handles structure
varargout{1} = handles.output; varargout{1}=handles.output;
end end
% Menu bar % Menu bar
@@ -368,7 +368,7 @@ function clrOlay1_Callback(hObject, eventdata, handles)
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);
@@ -587,7 +587,7 @@ function clrOlay2_Callback(hObject, eventdata, handles)
%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= {};
@@ -801,7 +801,7 @@ function clrOlay3_Callback(hObject, eventdata, handles)
%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= {};
@@ -1534,7 +1534,7 @@ set(ghandles.OLexp1,'string',{''})
cla(ghandles.OLaxes1) cla(ghandles.OLaxes1)
Exp(1).traceN=0; 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= {};
@@ -1543,7 +1543,7 @@ set(ghandles.OLexp2,'string',{''})
cla(ghandles.OLaxes2) cla(ghandles.OLaxes2)
Exp(2).traceN=0; 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= {};
@@ -1552,7 +1552,7 @@ set(ghandles.OLexp3,'string',{''})
cla(ghandles.OLaxes3); cla(ghandles.OLaxes3);
Exp(3).traceN=0; 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= {};
%} %}
@@ -1946,7 +1946,7 @@ function zonePB2_Callback(hObject, eventdata, handles)
global ghandles global ghandles
global zonePB global zonePB
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')

View File

@@ -3,14 +3,11 @@ function output_txt = myfunction(obj,event_obj)
% obj Currently not used (empty) % obj Currently not used (empty)
% event_obj Handle to event object % event_obj Handle to event object
% output_txt Data cursor text string (string or cell array of strings). % output_txt Data cursor text string (string or cell array of strings).
pos=get(event_obj,'Position');
output_txt={['X: ',num2str(pos(1),4)], ['Y: ',num2str(pos(2),4)]};
pos = get(event_obj,'Position'); % If there is a Z-coordinate in the position, display it as well
output_txt = {['X: ',num2str(pos(1),4)],... if length(pos) > 2
['Y: ',num2str(pos(2),4)]}; output_txt{end+1}=['Z: ',num2str(pos(3),4)];
end
% If there is a Z-coordinate in the position, display it as well %waitforbuttonpress
if length(pos) > 2
output_txt{end+1} = ['Z: ',num2str(pos(3),4)];
end end
%waitforbuttonpress

View File

@@ -1,12 +1,12 @@
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
% button that is pressed is returned in ButtonName. The Title of % button that is pressed is returned in ButtonName. The Title of
% the figure may be specified by adding a second string argument: % the figure may be specified by adding a second string argument:
% %
% ButtonName = questdlg(Question, Title) % ButtonName=questdlg(Question, Title)
% %
% Question will be interpreted as a normal string. % Question will be interpreted as a normal string.
% %
@@ -17,7 +17,7 @@ function ButtonName=questdlg(Question,Title,Btn1,Btn2,Btn3,Default)
% This can be changed by adding a third argument which specifies the % This can be changed by adding a third argument which specifies the
% default Button: % default Button:
% %
% ButtonName = questdlg(Question, Title, 'No') % ButtonName=questdlg(Question, Title, 'No')
% %
% Up to 3 custom button names may be specified by entering % Up to 3 custom button names may be specified by entering
% the button string name(s) as additional arguments to the function % the button string name(s) as additional arguments to the function
@@ -26,7 +26,7 @@ function ButtonName=questdlg(Question,Title,Btn1,Btn2,Btn3,Default)
% setting DEFAULT to the same string name as the button you want % setting DEFAULT to the same string name as the button you want
% to use as the default button: % to use as the default button:
% %
% ButtonName = questdlg(Question, Title, Btn1, Btn2, DEFAULT); % ButtonName=questdlg(Question, Title, Btn1, Btn2, DEFAULT);
% %
% where DEFAULT is set to Btn1. This makes Btn1 the default answer. % where DEFAULT is set to Btn1. This makes Btn1 the default answer.
% If the DEFAULT string does not match any of the button string names, % If the DEFAULT string does not match any of the button string names,
@@ -35,7 +35,7 @@ function ButtonName=questdlg(Question,Title,Btn1,Btn2,Btn3,Default)
% To use TeX interpretation for the Question string, a data % To use TeX interpretation for the Question string, a data
% structure must be used for the last argument, i.e. % structure must be used for the last argument, i.e.
% %
% ButtonName = questdlg(Question, Title, Btn1, Btn2, OPTIONS); % ButtonName=questdlg(Question, Title, Btn1, Btn2, OPTIONS);
% %
% The OPTIONS structure must include the fields Default and Interpreter. % The OPTIONS structure must include the fields Default and Interpreter.
% Interpreter may be 'none' or 'tex' and Default is the default button % Interpreter may be 'none' or 'tex' and Default is the default button
@@ -46,7 +46,7 @@ function ButtonName=questdlg(Question,Title,Btn1,Btn2,Btn3,Default)
% %
% Example: % Example:
% %
% ButtonName = questdlg('What is your favorite color?', ... % ButtonName=questdlg('What is your favorite color?', ...
% 'Color Question', ... % 'Color Question', ...
% 'Red', 'Green', 'Blue', 'Green'); % 'Red', 'Green', 'Blue', 'Green');
% switch ButtonName, % switch ButtonName,
@@ -72,7 +72,7 @@ if nargin<1
end end
Interpreter='none'; Interpreter='none';
Question = dialogCellstrHelper(Question); Question=dialogCellstrHelper(Question);
%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%
%%% General Info. %%% %%% General Info. %%%
@@ -109,10 +109,10 @@ end
%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%
%%% Create QuestFig %%% %%% Create QuestFig %%%
%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%
FigPos = get(0,'DefaultFigurePosition'); FigPos =get(0,'DefaultFigurePosition');
FigPos(3) = 267; FigPos(3)=267;
FigPos(4) = 70; FigPos(4)= 70;
FigPos = getnicedialoglocation(FigPos, get(0,'DefaultFigureUnits')); FigPos =getnicedialoglocation(FigPos, get(0,'DefaultFigureUnits'));
QuestFig=dialog( ... QuestFig=dialog( ...
'Visible' ,'off' , ... 'Visible' ,'off' , ...
@@ -164,7 +164,7 @@ if NumButtons > 1
BtnWidth=max(BtnWidth,BtnExtent(3)*btnMargin); BtnWidth=max(BtnWidth,BtnExtent(3)*btnMargin);
end end
end end
BtnHeight = max(BtnHeight,BtnExtent(4)*btnMargin); BtnHeight=max(BtnHeight,BtnExtent(4)*btnMargin);
delete(ExtControl); delete(ExtControl);
@@ -198,36 +198,36 @@ MsgTxtForeClr=Black;
MsgTxtBackClr=get(QuestFig,'Color'); MsgTxtBackClr=get(QuestFig,'Color');
CBString='uiresume(gcbf)'; CBString='uiresume(gcbf)';
DefaultValid = false; DefaultValid=false;
DefaultWasPressed = false; DefaultWasPressed=false;
BtnHandle = cell(NumButtons, 1); BtnHandle=cell(NumButtons, 1);
DefaultButton = 0; DefaultButton=0;
% Check to see if the Default string passed does match one of the % 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. % strings on the buttons in the dialog. If not, throw a warning.
for i = 1:NumButtons for i=1:NumButtons
switch i switch i
case 1 case 1
ButtonString=Btn1; ButtonString=Btn1;
ButtonTag='Btn1'; ButtonTag='Btn1';
if strcmp(ButtonString, Default) if strcmp(ButtonString, Default)
DefaultValid = true; DefaultValid=true;
DefaultButton = 1; DefaultButton=1;
end end
case 2 case 2
ButtonString=Btn2; ButtonString=Btn2;
ButtonTag='Btn2'; ButtonTag='Btn2';
if strcmp(ButtonString, Default) if strcmp(ButtonString, Default)
DefaultValid = true; DefaultValid=true;
DefaultButton = 2; DefaultButton=2;
end end
case 3 case 3
ButtonString=Btn3; ButtonString=Btn3;
ButtonTag='Btn3'; ButtonTag='Btn3';
if strcmp(ButtonString, Default) if strcmp(ButtonString, Default)
DefaultValid = true; DefaultValid=true;
DefaultButton = 3; DefaultButton=3;
end end
end end
@@ -243,7 +243,7 @@ for i = 1:NumButtons
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
@@ -278,7 +278,7 @@ texthandle=text( ...
'Tag' ,'Question' ... 'Tag' ,'Question' ...
); );
textExtent = get(texthandle, 'Extent'); textExtent=get(texthandle, 'Extent');
% (g357851)textExtent and extent from uicontrol are not the same. For window, extent from uicontrol is larger % (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. %than textExtent. But on Mac, it is reverse. Pick the max value.
@@ -395,7 +395,7 @@ end
switch(evd.Key) switch(evd.Key)
case {'return','space'} case {'return','space'}
if DefaultValid if DefaultValid
DefaultWasPressed = true; DefaultWasPressed=true;
uiresume(gcbf); uiresume(gcbf);
end end
case 'escape' case 'escape'
@@ -407,7 +407,7 @@ end
switch(evd.Key) switch(evd.Key)
case {'return'} case {'return'}
if DefaultValid if DefaultValid
DefaultWasPressed = true; DefaultWasPressed=true;
uiresume(gcbf); uiresume(gcbf);
end end
case 'escape' case 'escape'

View File

@@ -598,7 +598,7 @@ easy() {
# Make EASY dirs # Make EASY dirs
debug "mkdir -p $EASY_RESULTS_DIR" debug "mkdir -p $EASY_RESULTS_DIR"
mkdir -p "$EASY_RESULTS_DIR" mkdir -p "$EASY_RESULTS_DIR"
dirs=('PrintResults' 'CFfigs' 'Fotos' 'Fotos/BkUp' 'matResults') dirs=('PrintResults' 'CFfigs' 'Fotos')
for d in "${dirs[@]}"; do for d in "${dirs[@]}"; do
debug "mkdir $EASY_RESULTS_DIR/$d" debug "mkdir $EASY_RESULTS_DIR/$d"
mkdir "$EASY_RESULTS_DIR/$d" mkdir "$EASY_RESULTS_DIR/$d"

View File

@@ -1,15 +0,0 @@
is.numeric(NA)
is.numeric(as.numeric(NA)
)
inp= a
inp= "a"
inp <- inp[!is.na(inp)]
inp
!is.na(inp)
is.na(inp)
inp
gsub(pattern = (/D)), replacement= 3)
gsub(pattern = ("[/D)"), replacement= 3)
gsub(pattern = inp("[/D)"), replacement= 3)
list.files
list.files()

View File

@@ -1,212 +0,0 @@
% FrontEnd utility to copy source result sheet into Exp_ folders of
% StudiesQHTCP/StudyName/Exp1(2,3,4). This allow the automation of path
% capture to the StudiesDataArchieve.txt study log.
% Select, copy and Capture Study Exp_ details to study log
%Exp meta data collection
% Set path variables
wCodeDir=pwd;
Wstudy=fullfile('../', wCodeDir);
studyDate=datetime('now');
%Load results file meta data into workspace
try
ExpLabel= strcat('Exp',wCodeDir(end))
questdlg('\fontsize{20} Select the !!Results File','File Selection','OK', struct('Default','OK','Interpreter','tex'));
[resFile,resPath]= uigetfile('*.txt')
copyfile((fullfile(resPath,resFile)),fullfile(wCodeDir))
resDate= char(regexp(resFile, '(\d\d\_\d\d\d\d)|( \d\d\_\d\d\d\d|\d\d\d\d\d\d)','match'))
cd ..
if ispc
lastSep=max(strfind(Wstudy,'\'))
studyName=Wstudy((lastSep+1):end)
else
lastSep=max(strfind(Wstudy,'/'))
studyName=Wstudy((lastSep+1):end)
end
% Build the study info array
S.sDate(1)= {studyDate};
S.sName(1)= {studyName}
S.sPath(1)= {Wstudy}
S.ELabel(1)= {ExpLabel}
S.EresDate(1)= {resDate}
S.EresFile(1)= {resFile}
S.EresPath(1)= {resPath}
cd ..
fid = fopen('StudiesDataArchive.txt','a');
fprintf(fid,'StudyDate\tStudyName\tStudyPath\tExpNum\tExpDate\tExpPath\tResultFile\n');
fprintf(fid, '%s\t %s\t %s\t %s\t %s\t %s\t %s \n',S.sDate{1},S.sName{1},S.sPath{1},S.ELabel{1},S.EresDate{1},S.EresPath{1},S.EresFile{1});
fclose(fid);
fclose('all');
catch
cd(wCodeDir)
disp('Error: Unable to Execute ExpFrontend.m')
end
cd(wCodeDir)
%*************************************************************************************
%*************************************************************************************
%#####################################################################################
%Improved storage ammenable for database use
%FrontEnd utility to copy source result sheet into Exp_ folders of
%StudiesQHTCP/StudyName/Exp1(2,3,4). This allow the automation of path
%capture to the StudiesDataArchieve.txt study log.
%Select, copy and Capture Study Exp_ details to study log
studyDateNow= studyDate %preserve the 'Now' date
nowNumFNm= strcat((int2str(now)),'.mat') % from previous section incase the /StudyName doesn't have a standard date
%capture the /StudiesQHTCP directory for storing log data
cd ../..
logPath= pwd %is /.../Exp_
cd(wCodeDir)
%Try to load an existing data set from previous Frontend calls
try %end ~ln121
load(fullfile(logPath,'.studyLog.mat')) %load(fullfile('../../','studyLog.mat'))
catch %If no studyLog.mat found [Initial First Entry]
ExpLabel= strcat('Exp',wCodeDir(end))
resDate= char(regexp(resFile, '(\d\d\_\d\d\d\d)|( \d\d\_\d\d\d\d|\d\d\d\d\d\d)','match'))
cd .. %move up to current study folder from ../Exp_ folder;
%Study meta data collection
Wstudy= pwd %Capture the specific current Study directory
try %try to extract study date from folder name
studyDate= char(regexp(Wstudy, '(\d\d\_\d\d\d\d)|( \d\d\_\d\d\d\d|\d\d\d\d\d\d)| \d\d\d\d\d\d)','match'))
S.sDate(1)= {studyDate};
catch %if unsuccessful, accept the current date and convert to a 6 char string
studyDate= yyyymmdd(studyDateNow);
studyDate= (int2str(studyDate))
studyDate= studyDate(3:8)
end
%Capture StudyName
if ispc
lastSep=max(strfind(Wstudy,'\'))
studyName= Wstudy((lastSep+1):end)
else
lastSep=max(strfind(Wstudy,'/'))
studyName= Wstudy((lastSep+1):end)
end
%Put current First data entry into Structure of Save to StudyLog.mat file
S.sDate(1)= {studyDate};
S.sName(1)= {studyName}
S.sPath(1)= {Wstudy}
S.ELabel(1)= {ExpLabel}
S.EresDate(1)= {resDate}
S.EresFile(1)= {resFile}
S.EresPath(1)= {resPath}
cd(wCodeDir)
logFiletxt= fullfile(logPath,'StudiesDataArchive4DB.txt') %relative .txt path
%Initialize the StudiesDataArchive.txt file with the First row of meta data
%Print to a .txt spreadsheet the first set of data in the logFiletxt file
fid = fopen(logFiletxt,'w');
fprintf(fid,'StudyDate\tStudyName\tStudyPath\tExpNum\tExpDate\tExpPath\tResultFile\n');
fprintf(fid, '%s\t %s\t %s\t %s\t %s\t %s\t %s \n',studyDate,studyName,Wstudy,ExpLabel,resDate,resPath,resFile);
fclose(fid);
%Save the first entry meta data into a permanent .mat files for future recall
save(fullfile(logPath,'studyLog4DB.mat'), 'S')
save(fullfile(logPath,'.studyLog.mat'), 'S')
save(fullfile(logPath,'.nowNumFNm.mat'), 'S')
end %end for try for the First entry only
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%++++++++END of FIRST ENTRY startup section++++++++++++++++++++++++++++++++
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%Begin routine for all Entries After the Initial data entry****************
ExpLabel= strcat('Exp',wCodeDir(end))
resDate= char(regexp(resFile, '(\d\d\_\d\d\d\d)|( \d\d\_\d\d\d\d|\d\d\d\d\d\d)','match')) %Capture date from !!Results file
cd .. %Move to the current study folder
%Capture study meta dat
Wstudy= pwd % Capture the path to the current study
%Attempt to extract study date from folder name and convert to a
%searchable numeric date
studyDate= char(regexp(Wstudy, '(\d\d\_\d\d\d\d)|( \d\d\_\d\d\d\d|\d\d\d\d\d\d)| \d\d\d\d\d\d)','match'))
if ~isempty(studyDate) %If no date in folder name use current date and convert to 6char string
S.sDate(1)= {studyDate};
if isequal((str2num(studyDate(3))),'_') %Remove '_' so that date is a number for easy DB search
studyDate= strcat(studyDate(1:2),studyDate(4:6))
end
else
studyDate= yyyymmdd(studyDateNow);
studyDate= (int2str(studyDate))
studyDate= studyDate(3:8)
end
if ispc
lastSep=max(strfind(Wstudy,'\'))
studyName= Wstudy((lastSep+1):end)
else
lastSep=max(strfind(Wstudy,'/'))
studyName= Wstudy((lastSep+1):end)
end
%Put meta data into a structure for storage (studyLog.mat) and future
%compare operations
lastRow= length(S.sPath)
%Compare these just obtained paths with those stored in the studyLog.mat
%file and add a new row if the study or results sheet meta data is new or different
cd .. %Move the the /QHTPCstudies folder
logtxt= 'StudiesDataArchive4DB.txt'
logFiletxt= fullfile(logPath,logtxt) %
try
matched=0;
for n= 1:(lastRow)
if strcmp(Wstudy,S.sPath(n)) && strcmp(resPath, S.EresPath(n)) && strcmp(ExpLabel, S.ELabel(n))
matched= 1;
break
end
end
%Update the StudiesDataArchive.txt file with a new row of meta data
if matched== 0 %if no match for this entry then add a line to the text archive file
fid = fopen(logFiletxt,'w');
S.sDate(lastRow+1)= {studyDate};
S.sName(lastRow+1)= {studyName};
S.sPath(lastRow+1)= {Wstudy};
S.ELabel(lastRow+1)= {ExpLabel};
S.EresDate(lastRow+1)= {resDate};
S.EresFile(lastRow+1)= {resFile};
S.EresPath(lastRow+1)= {resPath};
for n= 1:(lastRow +1)
%Print to a .txt spreadsheet and Save update to .mat files
if n==1
fprintf(fid,'StudyDate\tStudyName\tStudyPath\tExpNum\tExpDate\tExpPath\tResultFile\n');
end
fprintf(fid, '%s\t %s\t %s\t %s\t %s\t %s\t %s \n',S.sDate{n},S.sName{n},S.sPath{n},S.ELabel{n},S.EresDate{n},S.EresPath{n},S.EresFile{n});
end
fclose(fid); %close DBase amenable study log file after data update
save((fullfile(logPath,'studyLog4DB.mat')), 'S') % path for studyLog.mat
save((fullfile(logPath,'.studyLog.mat')), 'S') %path backup studyLogBU.mat
save((fullfile(logPath,strcat('.',nowNumFNm))), 'S')
end
fclose('all');
catch
cd(wCodeDir) %Return to the location of the frontend.m code (/studyName/Exp_)
fclose('all');
clear S %clear data structure variable 'S.'
end
cd(wCodeDir) %Return to the location of the frontend.m code (/studyName/Exp_)
clear all %clear workspace variables