Home > FR3DSource > mCreateMatrix_Loaded.m

mCreateMatrix_Loaded

PURPOSE ^

mCreateMatrix_Loaded

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

mCreateMatrix_Loaded

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %mCreateMatrix_Loaded
0002 
0003 %%%%%%Create the basepair matrix (and delete extra ones) for determining
0004 %%%%%%Query.Diff, Query.Edges, Query.Diagonal
0005 %%%%%%Query.Config added
0006 if length(NT)<13
0007     x=.054;
0008     y=.04;
0009 else
0010     x=.684/length(NT);
0011     y=.54/length(NT);
0012 end
0013 
0014 % % % for i=1:25
0015 % % %     h=findobj('Tag',strcat('Config',num2str(i)));
0016 % % %     delete(h);
0017 % % % end
0018 h = findobj('-regexp','Tag','Config[0-9]');
0019 delete(h);
0020 
0021 for i=1:length(NT)
0022     str={'','anti','syn'};
0023     if isfield(Search.Query,'Config'),
0024       switch Search.Query.Config{i}
0025         case 'anti' 
0026           PreviousConfig(i) = 2;
0027         case 'syn'  
0028           PreviousConfig(i) = 3;
0029         otherwise   
0030           PreviousConfig(i) = 1;
0031       end
0032     else
0033       PreviousConfig(i) = 1;
0034     end
0035     handles.Config(i) = uicontrol('Tag',strcat('Config',num2str(i)),'Style','popupmenu','Units','normalized','Position',[(0.305+x*(i-1)) (0.8-y) x-.003 y-.005],'Background',[1 1 1],'String',str,'Value',PreviousConfig(i));
0036 end
0037 
0038 % % % for i=1:25
0039 % % %     hh=findobj('Tag',strcat('BPtexth',num2str(i)));
0040 % % %     delete(hh);
0041 % % %     hv=findobj('Tag',strcat('BPtextv',num2str(i)));
0042 % % %     delete(hv);
0043 % % %     hd=findobj('Tag',strcat('Diagonal',num2str(i)));
0044 % % %     delete(hd);
0045 % % %     for j=1:25
0046 % % %         hh=findobj('Tag',strcat('BPType',num2str(i),num2str(j)));
0047 % % %         delete(hh);
0048 % % %         hv=findobj('Tag',strcat('Diff',num2str(i),num2str(j)));
0049 % % %         delete(hv);
0050 % % %     end
0051 % % % end
0052 hh = findobj('-regexp','Tag','BPtexth[0-9]');
0053 hv = findobj('-regexp','Tag','BPtextv[0-9]');
0054 hd = findobj('-regexp','Tag','Diagonal[0-9]');
0055 hbp = findobj('-regexp','Tag','BPType[0-9]');
0056 hdif = findobj('-regexp','Tag','Diff[0-9]');
0057 delete(hh,hv,hd,hbp,hdif)
0058 
0059 
0060 
0061 for i=1:length(NT)
0062     if isfield(Search.Query,'NT')
0063         Bas=Search.Query.NT(i).Base;
0064         Num=Search.Query.NT(i).Number;
0065         str=strcat(Bas,Num);
0066     else
0067         Bas='NT';
0068         str=strcat(Bas,num2str(i));
0069     end
0070     handles.BPtexth(i) = uicontrol('Tag',strcat('BPtexth',num2str(i)),'Style','text','Units','normalized','Position',[(0.305+x*(i-1)) (0.75-y) x-.003 y-.005],'String',str);
0071     handles.BPtextv(i) = uicontrol('Tag',strcat('BPtextv',num2str(i)),'Style','text','Units','normalized','Position',[(0.26) (0.725-y*i) .056 y-.005],'String',str);
0072 end
0073 
0074 %%%Now the matrix:
0075 %MaskList={'N (ACGU)','A','C','G','U','R (AG)','Y (CU)','M (AC)','W (AU)','S (GC)','K (GU)','V (ACG)','H (ACU)','D (AGU)','B (CGU)'};
0076 PreviousMasks=ones(1,25); %declared
0077 % PreviousDiff={''};
0078 % PreviousBPType={''};
0079 
0080 for i=1:length(NT)
0081     for j=1:length(NT)
0082         if j==i
0083             if isfield(Search.Query,'Diagonal')
0084                 PreviousDiagonal{i}=Search.Query.Diagonal{i};
0085             else PreviousDiagonal{i}='N';
0086             end
0087             handles.Diagonal(i) = uicontrol('Tag',strcat('Diagonal',num2str(i)),'Style','edit','Units','normalized','Position',[(0.305+x*(j-1)) (0.73-y*i) x-.003 y-.005],'Background',[1 1 1],'String',PreviousDiagonal{i});
0088         end
0089         if i<j
0090             if isfield(Search.Query,'Edges')
0091                 if ~isempty(Search.Query.Edges{i,j}),
0092                     PreviousBPType{i,j}=Search.Query.Edges{i,j};
0093                 else
0094                     PreviousBPType{i,j}='';
0095                 end
0096             else PreviousBPType{i,j}='';
0097             end
0098             handles.BPType(i,j) = uicontrol('Tag',strcat('BPType',num2str(i),num2str(j)),'Style','edit','Units','normalized','Position',[(0.305+x*(j-1)) (0.73-y*i) x-.003 y-.005],'String',PreviousBPType{i,j},'Background',[1 1 0]);
0099         elseif i>j
0100             if isfield(Search.Query,'Diff')
0101                 if ~isempty(Search.Query.Diff(i,j)),
0102                     PreviousDiff{i,j}=Search.Query.Diff{i,j};
0103                 else
0104                     PreviousDiff{i,j}='';
0105                 end
0106             else PreviousDiff{i,j}='';
0107             end
0108             handles.Diff(i,j) = uicontrol('Tag',strcat('Diff',num2str(i),num2str(j)),'Style','edit','Units','normalized','Position',[(0.305+x*(j-1)) (0.73-y*i) x-.003 y-.005],'String',PreviousDiff{i,j},'Background',[0 1 1]);
0109         end
0110     end
0111 end
0112 
0113 set(handles.ConfigText,'Visible','on');
0114 set(handles.NTmaskText,'Visible','on');
0115 set(handles.MaxDistText,'Visible','on');
0116 set(handles.InteractionText,'Visible','on');
0117 
0118 % Search.Query.Edges
0119 % PreviousBPType
0120 % Search.Query.Diff
0121 % PreviousDiff
0122

Generated on Fri 03-Apr-2009 09:52:35 by m2html © 2003