Home > FR3DSource > mSpecifyQueryforGUI.m

mSpecifyQueryforGUI

PURPOSE ^

mSpecifyQueryforGUI reads the entries in the GUI to set query constraints

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 mSpecifyQueryforGUI reads the entries in the GUI to set query constraints

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % mSpecifyQueryforGUI reads the entries in the GUI to set query constraints
0002 
0003 % The variable Query has several fields:
0004 % xSpecifyQuery returns the description of a model motif
0005 % The variable Query has several fields:
0006 %   Query.Filename       a string like 1s72
0007 %   Query.NTList         list of nucleotide numbers
0008 %   Query.ChainList      list of chains, to uniquely identify NTs from numbers
0009 %   Query.Mask           a mask for which nucleotides to allow
0010 %   Query.AngleWeight    weights to put on the angles
0011 %   Query.DistanceWeight weights to put on nucleotide distances
0012 %   Query.DiscCutoff     discrepancy cutoff D_0
0013 %   Query.RelCutoff      relaxed cutoff D_1
0014 %   Query.Diff        maximum difference between sorted nucleotide
0015 %     indices; use with Sequential = 1 to screen for sequential constraints
0016 %   Query.Geometric      set to 0 to ignore geometry, only use screens.
0017 %                        Default is 1.
0018 %   Query.ExcludeOverlap set to 1 to eliminate highly redundant motifs with
0019 %     larger discrepancies; often, you get the same candidate with one or two
0020 %     nucleotides different but much higher discrepancy.  Default is 1 when
0021 %     Query.NumNT > 6.
0022 %Added: Query.Config
0023 
0024 for i=1:NTlen
0025     h=findobj('Tag',strcat('Config',num2str(i)));
0026     v=get(h,'Value');
0027     s=get(h,'String');
0028     Query.Config(i)=s(v); %use curly baracelets here {} because Query.Mask must be a character array, not a cell array. The (1) means that only first letter is taken (what is after it may be just description)
0029 end
0030 %%%End Read Query.ChainList from GUI
0031 
0032 DiscCutoff=str2num(get(handles.GuarCutoff,'String')); %%%GuarCutoff name changed into DiscCutoff
0033 if ~isempty(DiscCutoff)
0034    Query.DiscCutoff = DiscCutoff;
0035 end
0036 
0037 RelCutoff=str2num(get(handles.RelCutoff,'String'));
0038 if ~isempty(RelCutoff)
0039    Query.RelCutoff = RelCutoff;
0040 end
0041 
0042 v=get(handles.Overlap,'Value');
0043 if v==1
0044     Query.ExcludeOverlap=1;
0045 else
0046     Query.ExcludeOverlap=0;
0047 end
0048 
0049 Query.Name=get(handles.SearchName,'String');
0050 desc=get(handles.SearchDescription,'String');
0051 if ~isempty(desc) && ~strcmp(desc,'-')
0052     Query.Description=desc;
0053 end
0054 
0055 if get(handles.Geometric,'Value') == 1
0056     Query.Geometric=1;
0057 else
0058     Query.Geometric=0;
0059 end
0060 
0061 %%%Read Query.Diagonal from GUI
0062 % Query.Diagonal includes Mask information and also some other info
0063 for i=1:NTlen
0064     h=findobj('Tag',strcat('Diagonal',num2str(i)));
0065     s=get(h,'String');
0066     Query.Diagonal{i}=s;
0067 end
0068 %%%End Read Query.Diagonal from GUI
0069 
0070 
0071 %%%Read Query.Diff from GUI
0072 % Query.Diff        = [4 4];
0073 for i=1:NTlen
0074     for j=1:(i-1)
0075         h=findobj('Tag',strcat('Diff',num2str(i),num2str(j)));
0076         s=get(h,'String');
0077         Query.Diff{i,j}=s;
0078     end
0079 end
0080 
0081 for i=1:NTlen
0082     for j=(i+1):NTlen
0083         h=findobj('Tag',strcat('BPType',num2str(i),num2str(j)));
0084         s=get(h,'String');
0085         Query.Edges{i,j}= regexprep(s,',',' '); %users can enter , instead of spaces between interaction codes
0086     end
0087 end
0088 
0089

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