Home > FR3DSource > zBasePhosphateTable.m

zBasePhosphateTable

PURPOSE ^

zBasePhosphateTable(File,NTList) displays a table of interactions

SYNOPSIS ^

function [void] = zBasePhosphateTable(File,NTList,Disc)

DESCRIPTION ^

 zBasePhosphateTable(File,NTList) displays a table of interactions
 among the nucleotides NTList.  If passed, it displays the number Disc

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % zBasePhosphateTable(File,NTList) displays a table of interactions
0002 % among the nucleotides NTList.  If passed, it displays the number Disc
0003 
0004 function [void] = zBasePhosphateTable(File,NTList,Disc)
0005 
0006 % if File is a text string (filename), load the file and display
0007 
0008 if strcmp(class(File),'char'),
0009   Filename = File;
0010   File = zGetNTData(Filename,0);
0011 end
0012 
0013 % if NTList is a cell array of numbers, look up the indices
0014 
0015 if strcmp(class(NTList),'char'),
0016   NTList = {NTList};
0017 end
0018 
0019 if strcmp(class(NTList),'cell'),
0020   Indices = zIndexLookup(File,NTList);
0021 else
0022   Indices = NTList;
0023 end
0024 
0025 %Indices = sort(Indices);
0026 
0027 fprintf('  File %s',File.Filename);         % display filename
0028 fprintf(' Chain ');
0029 for j=1:length(Indices),
0030   fprintf('%s',File.NT(Indices(j)).Chain);
0031 end
0032 fprintf('\n');
0033 
0034 if nargin == 3,
0035   fprintf('%6.4f',Disc);                 % display discrepancy if passed
0036 else
0037   fprintf('       ');
0038 end
0039 
0040 for j=1:length(Indices),
0041   fprintf('%6s',[File.NT(Indices(j)).Base File.NT(Indices(j)).Number]);
0042 end
0043 fprintf('\n');
0044 
0045 Config = {'(A)' , '(S)'};
0046 
0047 for i=1:length(Indices),
0048   fprintf('%6s',[File.NT(Indices(i)).Base File.NT(Indices(i)).Number]);
0049   for j=1:length(Indices),
0050     if j > i,
0051       fprintf('%6s', zBasePhosphateText(File.BasePhosphate(Indices(i),Indices(j))));
0052     elseif j == i,
0053       fprintf('%6s', [File.NT(Indices(i)).Base Config{File.NT(Indices(i)).Syn+1}]);
0054     else
0055       fprintf('%6s', zBasePhosphateText(File.BasePhosphate(Indices(i),Indices(j))));
0056     end
0057   end
0058   fprintf('\n');
0059 end
0060 
0061 drawnow

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