Delila Program: rav

rav program

Documentation for the rav program is below, with links to related programs in the "see also" section.

{version = 1.22; (* of rav.p 1998 January 27}

(* begin module describe.rav *)
   rav: running average information curve

   rav(symvec: in, ravp: in, xyin: out, marks: out, colorkey: out output: out)

   symvec:  output of rsdata or alpro, contains an information curve.

   ravp:  parameters to control the program.  The file must contain the
      following parameters, one per line:

      parameterversion: The version number of the program.  This allows the
         user to be warned if an old parameter file is used.

      minwindowsize:  (integer, bases) minimum size of windows to average.

      maxwindowsize:  (integer, bases) maximum size of windows to average.

      stepwindowsize:  (integer, bases) how to increment window size.

      colorX, colorY: (real, cm) x and y coordinates of lower left corner of
         color key for color to bit conversion.

      colorWidth, colorHeight: (real, cm) x and y size of color key (respectively)

      colorThick: (real, cm) thickness of lines in color key strip

      colorTransform: (integer) Defines how the PostScript colors
         are to be transformed.  PostScript colors run from red through
         red, so the highest values have the same color as the lowest ones.
         This parameter determines how to transform the color scale.

         0: no transform

         1: transform as given by

               hue := colorAtransform*hue + colorBtransform

            This gives the user full control as a linear transformation.

         2: cutoff:
            If the hue is less than colorAtransform/2
               larger than colorBtransform/3
            then hue is set to 0.3;
            otherwise it is zero 0 (red).  This gives a red line in the
            region between the two parameters.

         3. Transform that gives yellow up to red:
            hue := 0.84*hue + 0.16

         4: Roy G. Biv transform: the spectrum.
            (red, orange, yellow, green, blue, indigo, violet)
            where red is highest.  The transform is
            hue := -magic*hue + magic;
            magic = 0.85

      colorAtransform: multiplicative parameter for colorTransform = 2

      colorBtransform: additive parameter for colorTransform = 2

   xyin:  output of this program for plotting by xyplo.
       data columns:
       1: position of window center
       2: window size
       3: average of information in window (bits)
       4: standard deviation of information (bits)
       5: color hue (0 to 1)
       6: color saturation (0 to 1)
       7: color brightness (0 to 1)
       8: xsize
       9: ysize

   marks:  output of this program for inclusion with a sequence logo
      created by makelogo.  This is the best way to display the data!

   colorkey: a PostScript file that creates a key showing the relationship
      between bits and colors.  When one runs xyin through the xyplo program
      the color shows the degree of (averaged) conservation; this key can be
      inserted into the xyout graphic by including it in your xyplom file.

   output: messages to the user

   The program rav creates a Running AVerage information curve starting from
   the symvec format produced by alpro or rseq.  This is an improvement over
   the winfo program because winfo only used the rsdata format from rseq and
   therefore cannot handle sequences that come from alpro (which are in
   symvec format).

   In addition, because results are reported in the marks file, this program
   supercedes winfo.

   Windows coordinates are reported at the center of the window.

   The marks file is set up so that the the average value is shown by a
   rectangle, ranging one standard deviation above and below the mean.

   Note that for odd window sizes the boxes are placed surrounding a base in
   the sequence logo, while odd ones are offset between bases.  You can check
   that the program is working correctly by trying window sizes of 1 (which
   should match the heights of the logo and have boxes that match the error
   bars); size 2 (which should be between bases and start to show averaging)



1.20      version of rav that this parameter file is designed for.
1         minimum window size to average.
50        maximum window size to average.
5         increment of window size.
18.3 10   colorX, colorY (cm): coordinates of lower left corner of key
0.5 8     colorWidth, colorHeight (cm): size of key
0.2       colorThick (cm): thickness of lines in color key strip
4         colorTransform 0:none,1:control,2:cutoff,3:.84hue+.16,4:-.85hue+.85
0.84      colorAtransform multiplicative color transform parameter
0.16      colorBtransform additive color transform parameter


2 6       zerox zeroy         graph coordinate center
zx 0 3000  zx min max          (character, real, real) if zx='x' then set xaxis
zy 0 100   zy min max          (character, real, real) if zy='y' then set yaxis
10 10 1 1 xinterval yinterval xsubintervals ysubintervals: axis intervals
6 4       xwidth    ywidth    width of numbers in characters
0 0       xdecimal  ydecimal  number of decimal places
16 16     xsize     ysize     size of axes in cm
window size
a         zc                  'c' crosshairs, axXyYnN
n 2       zxl base            if zxl='l' then make x axis log to the given base
n 2       zyl base            if zyl='l' then make y axis log to the given base
1 2       xcolumn   ycolumn   columns of xyin that determine plot location
0         symbol column       the xyin column to read symbols from
8  9      xscolumn  yscolumn  columns of xyin that determine the symbol size
5 6 7     hue saturation brightness   columns for color manipulation
R         symbol-to-plot      c(circle)bd(dotted box)x+Ifgpr(rectangle)
0         symbol-flag         character in xyin that indicates that this symbol
-1.0      symbol sizex        side in cm on the x axis of the symbol.
-1.0      symbol sizey        as for the x axis, get size from yscolumn
n         no connection (example for connection is c- 0.125 for dashed 0.125 cm)
n  0.125  linetype  size      linetype l.-in and size of dashes or dots
          **** version 8.50 of xyplop: uses cm for distances


see also
   winfo.p, rseq.p, xyplo.p, makelogo.p, struco.p,
   ravp, ravxyplop

   Thomas Dana Schneider


technical notes
   Constant maxwin is the largest window size allowed.

   When the sequence logo runs over multiple lines, the marks from rav have
   to be triggered AFTER the letter.  If this is not done, the box appears on
   the previous line, and is missing from the first stack of the next line.
   The trick is to write the box backwards - right to left.  The box is
   therefore triggered after the stack has been written and is always
   associated with the stack.  This has the consequence that the box is
   written on top of the stack, but it is completely clean.

dedicated to
   Pete Rogan

(* end module describe.rav *)
{This manual page was created by makman 1.45}

{created by htmlink 1.62}
U.S. Department of Health and Human Services  |  National Institutes of Health  |  National Cancer Institute  |  | 
Policies  |  Viewing Files  |  Accessibility  |  FOIA