Next: Example, Previous: Parsing and Comparing, Up: Top
The following utilities are used and therefore provided by the library:
reads base pair probabilities produced by
pf_fold()from the global arrayprand the pair listbase_pairproduced byfold()and produces a postscript “dot plot” that is written to filename. The “dot plot” represents each base pairing probability by a square of corresponding area in a upper triangle matrix. The lower part of the matrix contains the minimum free energy structure.
produces a secondary structure graph in PostScript and writes it to filename. Note that this function has changed from previous versions and now expects the structure to be plotted in dot-bracket notation as an argument. It does not make use of the global
base_pairarray anymore.
Same as
PS_rna_plotbut adds extra PostScript macros for various annotations (see generated PS code). The pre and post variables contain PostScript code that is verbatim copied in the resulting PS file just before and after the structure plot.
produces a secondary structure plot in SVG format and writes it to filename.
produces a secondary structure graph in the Graph Meta Language gml and writes it to filename. If
optionis an uppercase letter thesequenceis used to label nodes, ifoptionequals 'X' or 'x' the resulting file will coordinates for an initial layout of the graph.
switches between different layout algorithms for drawing secondary structures in
PS_rna_plotandgmlRNA. Current possibility are 0 for a simple radial drawing or 1 for the modified radial drawing taken from thenaviewprogram of Bruccoleri & Heinrich (1988).
generates a “random” string of characters from symbols with length l.
returns the number of positions in which s1 and s2 differ, the so called “Hamming” distance. s1 and s2 should have the same length.
returns a binary string encoding the secondary structure struc using a 5:1 compression scheme. The string is NULL terminated and can therefore be used with standard string functions such as strcmp(). Useful for programs that need to keep many structures in memory.
translate a compressed binary string produced by pack_structure() back into the familiar dot bracket notation.
returns a newly allocated table, such that: table[i]=j if (i.j) pair or 0 if i is unpaired, table[0] contains the length of the structure.
returns a string containing the current date in the format “Fri Mar 19 21:10:57 1993”.
returns a pseudo random number in the range [0..1[, usually implemented by calling
erand48().
is used by
urn (). These should be set to some random number seeds before the first call tourn ().
generates a pseudo random integer in the range [from, to].
returns a pointer to size bytes of allocated and 0 initialized memory; aborts with an error if memory is not available.
reads a line of arbitrary length from the stream *fp, and returns a pointer to the resulting string. The necessary memory is allocated and should be released using
free()when the string is no longer needed.
Prototypes for PS_rna_plot() and PS_dot_plot() reside in
PS_dot.h, the other functions are declared in utils.h.