Home > FR3DSource > mSetLoadedParameters.m

mSetLoadedParameters

PURPOSE ^

mSetLoadedParameters.m fills in entries in the GUI from a saved search file

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

mSetLoadedParameters.m fills in entries in the GUI from a saved search file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %mSetLoadedParameters.m fills in entries in the GUI from a saved search file
0002 
0003 Query=Search.Query;
0004 
0005 s  = get(handles.SearchPDBs,'String');
0006 ss = get(handles.QueryPDB,'String');
0007 
0008 v=[];
0009 
0010 for i=1:length(Search.Filenames)
0011     ff = find(strcmp(upper(s),upper(Search.Filenames{i})));
0012     if ~isempty(ff),
0013       v=[v ff(1)];
0014     end
0015 end
0016 set(handles.SearchPDBs,'Value',v);
0017 
0018 if Search.Query.Geometric == 1
0019     set(handles.Geometric,'Value',1);
0020     set(handles.NonGeometric,'Value',0);
0021     set(handles.ViewQuery,'Visible','on');
0022     set(handles.ReadQuery,'Visible','on');
0023     set(handles.GenerateMatrix,'Visible','off');
0024 
0025     v=find(strcmp(lower(ss),lower(Search.Query.Filename)));
0026 
0027 if isempty(v),
0028   v = 1;
0029 end
0030 
0031     set(handles.QueryPDB,'Value',v);
0032     set(handles.QueryPDB,'Visible','on');
0033     set(handles.QueryPDBTitle,'Visible','on');
0034 
0035 % %     mGetPDBfilenames %defines s
0036 % %     set(handles.SearchPDBs,'String',s);
0037 % %     set(handles.SearchPDBs,'Min',1);
0038 % %     set(handles.SearchPDBs,'Max',length(s)+1);
0039 % %
0040 % %     set(handles.QueryPDB,'String',s);
0041 
0042 
0043     NT=Search.Query.NTList;
0044     A=NT{1};
0045     for i=2:length(NT)
0046         A=[A ',' NT{i}];
0047     end
0048     set(handles.QueryNTs,'String',A);
0049     set(handles.QueryNTs,'Visible','on');
0050     set(handles.QueryNTsTitle,'Visible','on');
0051 
0052     
0053     
0054 % % %     for i=1:25
0055 % % %         h=findobj('Tag',strcat('ChainPopup',num2str(i)));
0056 % % %         delete(h);
0057 % % %     end
0058 h = findobj('-regexp','Tag','ChainPopup[0-9]');
0059 delete(h);
0060     
0061     if length(NT)<13
0062         x=.054;
0063         y=.04;
0064     else
0065         x=.684/length(NT);
0066         y=.54/length(NT);
0067     end
0068 
0069     if isfield(Search.Query,'ChainList'),    
0070       for i=1:length(NT),
0071         handles.ChainPopup(i) = uicontrol('Tag',strcat('ChainPopup',num2str(i)),'Style','popupmenu','Units','normalized','Position',[(0.305+x*(i-1)) (0.795) x-.003 .04],'String',Search.Query.ChainList{i},'Background',[1 1 1]);
0072       end
0073     end
0074 
0075     set(handles.QueryChains,'Visible','on')%this the text just to the left of the popups
0076 %     mCreateChains
0077 %     for i=1:length(NT)
0078 %         h=findobj('Tag',strcat('ChainPopup',num2str(i)));
0079 %         s=get(h,'String');
0080 %         v=find(strcmp(s,Search.Query.ChainList{i}));
0081 %         set(h,'Value',v);
0082 %     end
0083   set(handles.NumberOfNTsTitle,'Visible','off'); 
0084   set(handles.NumberOfNTs,'Visible','off');
0085   set(handles.GuarCutoff,'Visible','on');
0086   if isfield(Search.Query,'DiscCutoff')
0087       set(handles.GuarCutoff,'String',num2str(Search.Query.DiscCutoff));
0088   end
0089   set(handles.RelCutoff,'Visible','on');
0090   if isfield(Search.Query,'RelCutoff')
0091       set(handles.RelCutoff,'String',num2str(Search.Query.RelCutoff));
0092   end
0093 
0094 
0095 else
0096   set(handles.GuarCutoff,'Visible','off');
0097   set(handles.RelCutoff,'Visible','off');
0098     set(handles.Geometric,'Value',0);
0099     set(handles.NonGeometric,'Value',1);
0100     set(handles.ViewQuery,'Visible','off');
0101     set(handles.ReadQuery,'Visible','off');
0102     set(handles.GenerateMatrix,'Visible','on');
0103     set(handles.NumberOfNTs,'String',num2str(Search.Query.NumNT));
0104     set(handles.NumberOfNTs,'Visible','on');
0105     set(handles.NumberOfNTsTitle,'Visible','on');
0106     set(handles.QueryPDBTitle,'Visible','off');
0107     set(handles.QueryNTsTitle,'Visible','off');
0108     set(handles.QueryChains,'Visible','off');
0109     set(handles.QueryPDB,'Visible','off');
0110     set(handles.QueryNTs,'Visible','off');
0111     for i=1:Search.Query.NumNT
0112         NT{i}=num2str(i);
0113     end
0114     % % %     for i=1:25
0115     % % %         h=findobj('Tag',strcat('ChainPopup',num2str(i)));
0116     % % %         delete(h);
0117     % % %     end
0118     h = findobj('-regexp','Tag','ChainPopup[0-9]');
0119     delete(h);
0120 end
0121 
0122 set(handles.SearchNameText,'Visible','on');
0123 set(handles.SearchDescriptionText,'Visible','on');
0124 set(handles.GuarCutoffText,'Visible','on');
0125 set(handles.RelCutoffText,'Visible','on');
0126 set(handles.SearchName,'Visible','on');
0127 if isfield(Search.Query,'Number')
0128     set(handles.SearchName,'String',num2str(Search.Query.Name));%num2str works whether this is character or number
0129 end
0130 set(handles.SearchDescription,'Visible','on');
0131 if isfield(Search.Query,'Description')
0132     set(handles.SearchDescription,'String',Search.Query.Description);
0133 end
0134 set(handles.Overlap,'Visible','on');
0135 if isfield(Search.Query,'ExcludeOverlap')
0136     v=Search.Query.ExcludeOverlap;
0137     if v==0
0138         v=2;
0139     end
0140     set(handles.Overlap,'Value',v);
0141 end
0142 set(handles.DisplayCandidates,'Visible','on');
0143 set(handles.ListCandidates,'Visible','on');
0144 
0145 set(handles.RunSearch,'Visible','off');
0146 set(handles.Status,'String','Loaded saved search results. You can examine these results using "Display Candidates" or "List Candidates", or you can repeat the analysis by starting from "Read Query" '); 
0147 
0148 %%The matrix
0149 mCreateMatrix_Loaded

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