.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "FREND 1p"
.TH FREND 1p "2012-02-20" "perl v5.14.2" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
frend.pl \-\- Render a Bio::Graphics Feature File on the web
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& http://your.host.com/cgi\-bin/frend.pl
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The frend.pl script is a thin front end around the Bio::Graphics
module.  It accepts a list of files containing sequence (protein,
nucleotide) feature coordinates from the file(s) listed on the command
line or on standard input, renders them, and produces a \s-1PNG\s0 file on
standard output.
.SH "INSTALLATION"
.IX Header "INSTALLATION"
Copy this script into your web site's cgi-bin directory.  Name it
whatever you want.
.SH "Feature Files Format"
.IX Header "Feature Files Format"
This script accepts and processes sequence annotations in a simple
tab-delimited format or in \s-1GFF\s0 format.
.PP
The feature file format has a configuration section and a data
section. The configuration section sets up the size and overall
properties of the image, and the data section gives the feature
data itself.
.SS "Configuration Section"
.IX Subsection "Configuration Section"
If not provided, this scripts generates a reasonable default
configuration section for you, so you do not need to provide a
configuration section to get a reasonable image. However, to tune the
appearance of the image, you will probably want to tweak the
configuration. Here is an excerpt from the configuration section:
.PP
.Vb 4
\& # example file
\& [general]
\& bases = \-1000..21000
\& height = 12
\&
\& [EST]
\& glyph = segments
\& bgcolor= yellow
\& connector = solid
\& height = 5
\&
\& [FGENES]
\& glyph = transcript2
\& bgcolor = green
\& description = 1
.Ve
.PP
The configuration section is divided into a set of sections, each one
labeled with a [section title]. The [general] section specifies global
options for the entire image. Other sections apply to particular
feature types. In the example above, the configuration in the [\s-1EST\s0]
section applies to features labeled as ESTs, while the configuration
in the [\s-1FGENES\s0] section applies to features labeled as predictions
from the \s-1FGENES\s0 gene prediction program.
.PP
Inside each section is a series of name=value pairs, where the name is
the name of an option to set. You can put whitespace around the = sign
to make it more readable, or even use a colon (:) if you prefer. The
following option names are recognized:
.PP
.Vb 2
\& Option     Value                                       Example
\& \-\-\-\-\-\-     \-\-\-\-\-                                       \-\-\-\-\-\-\-
\&
\& bases      Min & max of the sequence range (bp)           1200..60000
\& width      width of the image (pixels)                    600
\& height     Height of each graphical element (pixels)      10
\& glyph      Style of each graphical element (see below)    transcript
\& fgcolor    Foreground color of each element               yellow
\& bgcolor    Background color of each element               blue
\& linewidth  Width of lines                                 3
\& label      Print the feature\*(Aqs name                       1
\& description Whether to print the feature\*(Aqs description    0
\& bump       Elements are not allowed to collide            1
\& ticks      Print tick marks on arrows                     1
\& connector  Type of group connector (dashed, hat or solid) dashed
.Ve
.PP
The \*(L"bases\*(R" and \*(L"width\*(R" options are only relevant in the [general]
section. They are overridden by the like-named command-line options.
.PP
The remainder of the options can be located in any section, but if
present in the [general] section will set defaults for the others.
.PP
Colors are English-language color names or Web-style #RRGGBB colors
(see a book on \s-1HTML\s0 for an explanation). True/false values are 1 for
true, and 0 for false. Numeric ranges can be expressed in start..end
fashion with two dots, or as start-end with a hyphen.
.PP
The \*(L"glyph\*(R" option controls how the features are rendered. The
following glyphs are implemented:
.PP
.Vb 2
\&  Name                Description
\&  \-\-\-\-                \-\-\-\-\-\-\-\-\-\-\-
\&
\&  box                 A filled rectangle, nondirectional.
\&  ellipse             An oval.
\&  arrow               An arrow; can be unidirectional or
\&                      bidirectional.  It is also capable of displaying
\&                      a scale with major and minor tickmarks, and can 
\&                      be oriented horizontally or vertically. 
\&  segments            A set of filled rectangles connected by solid
\&                      lines. Used for interrupted features, such as 
\&                      gapped alignments and exon groups.
\&  transcript          Similar to segments, but the connecting line is
\&                      a "hat" shape, and the direction of
\&                      transcription is indicated by a small arrow. 
\&  transcript2         Similar to transcript, but the direction of
\&                      transcription is indicated by a terminal segment
\&                      in the shape of an arrow. 
\&  primers             Two inward pointing arrows connected by a line. Used for STSs.
.Ve
.PP
The bump option is the most important option for controlling the look
of the image. If set to false (the number 0), then the features are
allowed to overlap. If set to true (the number 1), then the features
will move vertically to avoid colliding. If not specified, bump is
turned on if the number of any given type of sequence feature is
greater than 50.
.SS "Data Section"
.IX Subsection "Data Section"
The data section can follow or proceed the configuration section. The
two sections can also be intermixed. The data section is a tab or
whitespace-delimited file which you can export from a spreadsheet
application or word processor file (be sure to save as text only!)
.PP
Here is an example data section:
.PP
Cosmid     B0511        .       516\-619
Cosmid     B0511        .       3185\-3294
Cosmid     B0511        .       10946\-11208
Cosmid     B0511        .       13126\-13511
Cosmid     B0511        .       66\-208
Cosmid     B0511        .       6354\-6499
Cosmid     B0511        .       13955\-14115
\&\s-1EST\s0        yk595e6.5    +       3187\-3294
\&\s-1EST\s0        yk846e07.3   \-       11015\-11208
\&\s-1EST\s0        yk53c10
           yk53c10.5    +       18892\-19154
           yk53c10.3    \-       15000\-15500,15700\-15800
\&\s-1EST\s0        yk53c10.5    +       16032\-16105
SwissProt  \s-1PECANEX\s0      +       13153\-13656     Swedish fish
\&\s-1FGENESH\s0    \*(L"Gene 1\*(R"     \-       1\-205,518\-616,661\-735,3187\-3365,3436\-3846       Transmembrane domain
\&\s-1FGENESH\s0    \*(L"Gene 2\*(R"     \-       16626\-17396,17451\-17597 Kinase and sushi domains
.PP
Each line of the file contains five columns. The columns are:
.PP
.Vb 2
\& Column #   Description
\& \-\-\-\-\-\-\-\-   \-\-\-\-\-\-\-\-\-\-\-
\&
\& 1          feature type
\& 2          feature name
\& 3          strand
\& 4          coordinates
\& 5          description
.Ve
.IP "Feature type" 4
.IX Item "Feature type"
The feature type should correspond to one of the [feature type]
headings in the configuration section. If it doesn't, the [general]
options will be applied to the feature when rendering it. The feature
name is a name for the feature. Use a \*(L".\*(R" or \*(L"\-\*(R" if this is not
relevant. If the name contains whitespace, put single or double quotes
("") around the name.
.IP "Strand" 4
.IX Item "Strand"
The strand indicates which strand the feature is on. It is one of \*(L"+\*(R"
for the forward strand, \*(L"\-\*(R" for the reverse strand, or \*(L".\*(R" for
features that are not stranded.
.IP "Coordinates" 4
.IX Item "Coordinates"
The coordinates column is a set of one or more ranges that the feature
occupies. Ranges are written using \*(L"..\*(R" as in start..stop, or with
hyphens, as in start-stop. For features that are composed of multiple
ranges &em; for example transcripts that have multiple exons &em; you
can either put the ranges on the same line separated by commas or
spaces, or put the ranges on individual lines and just use the same
feature name and type to group them. In the example above, the Cosmid
B0511 features use the individual line style, while the \s-1FGENESH\s0
features use the all-ranges-on-one-line style.
.IP "Description" 4
.IX Item "Description"
The last column contains some descriptive text. If the description
option is set to true, this text will be printed underneath the
feature in the rendering.
.PP
Finally, it is possible to group related features together. An example
is the ESTs yk53c10.5 and yk53c10.3, which are related by being reads
from the two ends of the clone yk53c10. To indicate this relationship,
generate a section that looks like this:
.PP
.Vb 3
\& EST        yk53c10
\&            yk53c10.5    +       18892\-19154
\&            yk53c10.3    \-       15000\-15500,15700\-15800
.Ve
.PP
The group is indicated by a line that contains just two columns
containing the feature type and a unique name for the group. Follow
this line with all the features that form the group, but leave the
first column (the feature type) blank. The group will be rendered by
drawing a dashed line between all the members of the group. You can
change this by specifying a different connector option in the
configuration section for this feature type.
.SH "BUGS"
.IX Header "BUGS"
Please report them to the author.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Bio::Graphics, feature_draw.pl
.SH "AUTHOR"
.IX Header "AUTHOR"
Lincoln Stein, lstein@cshl.org
