Home > FR3DSource > FR3D_DisplayExemplars.m

# FR3D_DisplayExemplars

## PURPOSE

zDisplayExamplars(Paircode,Cateogry) displays the best known

## SYNOPSIS

function [void] = zDisplayExemplars(Paircode,Category)

## DESCRIPTION

``` zDisplayExamplars(Paircode,Cateogry) displays the best known
representatives for interactions involving pairs with the given Paircode
and interaction Category```

## CROSS-REFERENCE INFORMATION

This function calls:
• zClassifyPair zClassifyPair(N1,N2) calculates the rotation matrix, axis, angle, and shift
• zDisplayNT zDisplayNT(File,NTList,ViewParam) is a general-purpose nucleotide plotting program. It can be called in several ways, for example,
This function is called by:

## SOURCE CODE

```0001 % zDisplayExamplars(Paircode,Cateogry) displays the best known
0002 % representatives for interactions involving pairs with the given Paircode
0003 % and interaction Category
0004
0005 % zDisplayExemplars(Paircode,Category), where Paircode and Category can be
0006 % vectors, will loop through all possible Paircode, Category pairs from the
0007 % two vectors.  If a certain category has subcategories, like 1, 1.1, and
0008 % 1.2, it will loop through all of those.
0009
0010 % Here are some ways to run the program:
0011
0012 % zDisplayExemplars(7,15:18) paircode 7, categories 15 to 18 (stacking)
0013 % zDisplayExemplars(1:16,1)   all paircodes, category 1
0014 % zDisplayExemplars(1:16,-12:18) all paircodes, all categories
0015
0016 function [void] = zDisplayExemplars(Paircode,Category)
0017
0018 if nargin < 2
0019   Category = [-12:-1 1:23];
0020 end
0021
0022 if nargin < 1
0023   Paircode = [1:16];
0024 end
0025
0027
0029
0030 % specify parameters for viewing -------------------------------------------
0031
0032   ViewParam.Mode      = 1;
0033   ViewParam.Normal    = 1;
0034   ViewParam.ColorAxis = [-12 30];
0035   ViewParam.SortKeys  = [];
0036   ViewParam.Nearby    = 0;
0037   ViewParam.Sugar     = 1;
0038   ViewParam.ConnectSugar = 0;
0039   ViewParam.AtOrigin  = 1;
0040   ViewParam.Hydrogen  = 1;
0041   ViewParam.Sort      = 0;
0042   ViewParam.LineStyle = '-';
0043
0044 % loop through pairs and classifications ----------------------
0045
0046 for pc = 1:length(Paircode),
0047  for ca = 1:length(Category),
0048    for row = 1:length(Exemplar(:,Paircode(pc))),
0049
0050      E = Exemplar(row,Paircode(pc));
0051
0052      if fix(E.Class) == Category(ca),
0053
0054        [Pair,s] = zClassifyPair(E.NT1,E.NT2);
0055
0056 fprintf('%10s %5s %s %5s   ',E.Filename, [E.NT1.Base E.NT1.Number],Pair.EdgeText,[E.NT2.Base E.NT2.Number]);
0057
0058        figure(1)
0059        clf
0060
0061        F.NT(1) = E.NT1;
0062        F.NT(2) = E.NT2;
0063        F.Filename = E.Filename;
0064        zDisplayNT(F,[1 2],ViewParam);
0065        view(2)
0066        grid on
0067        axis equal
0068
0069        switch fix(E.Class),
0070          case {1, 2},  axis([-2 10 -2 12 -5 5]);
0071          case 15,      axis([-5 3 -3 5 -5 5]);
0072          case 16,      axis([-4 4 -3 5 -3 5]);
0073          otherwise,    axis([-6 10 -6 10 -6 10]);
0074        end
0075
0076        Title = [E.NT1.Base E.NT2.Base ' ' num2str(E.Class) ' ' strrep(E.Filename,'_','\_') ' '];
0077        Title = [Title E.NT1.Base E.NT1.Number '-' E.NT2.Base E.NT2.Number];
0078        title(Title);
0079
0080        rotate3d on
0081
0082        fprintf('Press a key to go on\n');
0083        pause
0084
0085       end
0086     end
0087   end
0088 end```

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