1FEATURE_DRAW(1)       User Contributed Perl Documentation      FEATURE_DRAW(1)
2
3
4

NAME

6       feature_draw.pl -- Render a Bio::Graphics Feature File
7

SYNOPSIS

9        feature_draw.pl [options] file.txt [file2.txt...] > rendering.png
10        feature_draw.pl [options] file.txt [file2.txt...] | display -
11

DESCRIPTION

13       The feature_draw.pl script is a thin front end around the Bio::Graphics
14       module.  It accepts a list of files containing sequence (protein,
15       nucleotide) feature coordinates from the file(s) listed on the command
16       line or on standard input, renders them, and produces a PNG file on
17       standard output.
18
19   Options
20       This script uses GNU-style long options.  This allows you to specify
21       the image width option, for example, with any of the following
22       alternative forms:
23
24        --width=800
25        --width 800
26        -width 800
27        -w 800
28
29       --width
30           This sets the width of the image, in pixels.  The default is 800
31           pixels.
32
33       --range
34           This sets the range of the region displayed, in base pairs from
35           start to stop. Any of the following formats are accepted:
36
37             --range 1..1000
38             --range 1,1000
39             --range 1-1000
40
41           Negative ranges are allowed.
42

Feature Files Format

44       This script accepts and processes sequence annotations in a simple tab-
45       delimited format or in GFF format.
46
47       The feature file format has a configuration section and a data section.
48       The configuration section sets up the size and overall properties of
49       the image, and the data section gives the feature data itself.
50
51   Configuration Section
52       If not provided, this scripts generates a reasonable default
53       configuration section for you, so you do not need to provide a
54       configuration section to get a reasonable image. However, to tune the
55       appearance of the image, you will probably want to tweak the
56       configuration. Here is an excerpt from the configuration section:
57
58        # example file
59        [general]
60        bases = -1000..21000
61        height = 12
62
63        [EST]
64        glyph = segments
65        bgcolor= yellow
66        connector = dashed
67        height = 5
68
69        [FGENES]
70        glyph = transcript2
71        bgcolor = green
72        description = 1
73
74       The configuration section is divided into a set of sections, each one
75       labeled with a [section title]. The [general] section specifies global
76       options for the entire image. Other sections apply to particular
77       feature types. In the example above, the configuration in the [EST]
78       section applies to features labeled as ESTs, while the configuration in
79       the [FGENES] section applies to features labeled as predictions from
80       the FGENES gene prediction program.
81
82       Inside each section is a series of name=value pairs, where the name is
83       the name of an option to set. You can put whitespace around the = sign
84       to make it more readable, or even use a colon (:) if you prefer. The
85       following option names are recognized:
86
87        Option     Value                                       Example
88        ------     -----                                       -------
89
90        bases      Min & max of the sequence range (bp)           1200..60000
91        width      width of the image (pixels)                    600
92        height     Height of each graphical element (pixels)      10
93        glyph      Style of each graphical element (see below)    transcript
94        fgcolor    Foreground color of each element               yellow
95        bgcolor    Background color of each element               blue
96        linewidth  Width of lines                                 3
97        label      Print the feature's name                       1
98        description Whether to print the feature's description    0
99        bump       Elements are not allowed to collide            1
100        ticks      Print tick marks on arrows                     1
101        connector  Type of group connector (dashed, hat or solid) dashed
102
103       The "bases" and "width" options are only relevant in the [general]
104       section. They are overridden by the like-named command-line options.
105
106       The remainder of the options can be located in any section, but if
107       present in the [general] section will set defaults for the others.
108
109       Colors are English-language color names or Web-style #RRGGBB colors
110       (see a book on HTML for an explanation). True/false values are 1 for
111       true, and 0 for false. Numeric ranges can be expressed in start..end
112       fashion with two dots, or as start-end with a hyphen.
113
114       The "glyph" option controls how the features are rendered. The
115       following glyphs are implemented:
116
117         Name                Description
118         ----                -----------
119
120         box                 A filled rectangle, nondirectional.
121         ellipse             An oval.
122         arrow               An arrow; can be unidirectional or
123                             bidirectional.  It is also capable of displaying
124                             a scale with major and minor tickmarks, and can
125                             be oriented horizontally or vertically.
126         segments            A set of filled rectangles connected by solid
127                             lines. Used for interrupted features, such as
128                             gapped alignments and exon groups.
129         transcript          Similar to segments, but the connecting line is
130                             a "hat" shape, and the direction of
131                             transcription is indicated by a small arrow.
132         transcript2         Similar to transcript, but the direction of
133                             transcription is indicated by a terminal segment
134                             in the shape of an arrow.
135         primers             Two inward pointing arrows connected by a line. Used for STSs.
136
137       The bump option is the most important option for controlling the look
138       of the image. If set to false (the number 0), then the features are
139       allowed to overlap. If set to true (the number 1), then the features
140       will move vertically to avoid colliding. If not specified, bump is
141       turned on if the number of any given type of sequence feature is
142       greater than 50.
143
144   Data Section
145       The data section can follow or proceed the configuration section. The
146       two sections can also be intermixed. The data section is a tab or
147       whitespace-delimited file which you can export from a spreadsheet
148       application or word processor file (be sure to save as text only!)
149
150       Here is an example data section:
151
152       Cosmid     B0511        .       516-619 Cosmid     B0511        .
153       3185-3294 Cosmid     B0511        .       10946-11208 Cosmid     B0511
154       .       13126-13511 Cosmid     B0511        .       66-208 Cosmid
155       B0511        .       6354-6499 Cosmid     B0511        .
156       13955-14115 EST        yk595e6.5    +       3187-3294 EST
157       yk846e07.3   -       11015-11208 EST        yk53c10
158                  yk53c10.5    +       18892-19154
159                  yk53c10.3    -       15000-15500,15700-15800 EST
160       yk53c10.5    +       16032-16105 SwissProt  PECANEX      +
161       13153-13656     Swedish fish FGENESH    "Gene 1"     -
162       1-205,518-616,661-735,3187-3365,3436-3846       Transmembrane domain
163       FGENESH    "Gene 2"     -       16626-17396,17451-17597 Kinase and
164       sushi domains
165
166       Each line of the file contains five columns. The columns are:
167
168        Column #   Description
169        --------   -----------
170
171        1          feature type
172        2          feature name
173        3          strand
174        4          coordinates
175        5          description
176
177       Feature type
178           The feature type should correspond to one of the [feature type]
179           headings in the configuration section. If it doesn't, the [general]
180           options will be applied to the feature when rendering it. The
181           feature name is a name for the feature. Use a "." or "-" if this is
182           not relevant. If the name contains whitespace, put single or double
183           quotes ("") around the name.
184
185       Strand
186           The strand indicates which strand the feature is on. It is one of
187           "+" for the forward strand, "-" for the reverse strand, or "." for
188           features that are not stranded.
189
190       Coordinates
191           The coordinates column is a set of one or more ranges that the
192           feature occupies. Ranges are written using ".." as in start..stop,
193           or with hyphens, as in start-stop. For features that are composed
194           of multiple ranges &em; for example transcripts that have multiple
195           exons &em; you can either put the ranges on the same line separated
196           by commas or spaces, or put the ranges on individual lines and just
197           use the same feature name and type to group them. In the example
198           above, the Cosmid B0511 features use the individual line style,
199           while the FGENESH features use the all-ranges-on-one-line style.
200
201       Description
202           The last column contains some descriptive text. If the description
203           option is set to true, this text will be printed underneath the
204           feature in the rendering.
205
206       Finally, it is possible to group related features together. An example
207       is the ESTs yk53c10.5 and yk53c10.3, which are related by being reads
208       from the two ends of the clone yk53c10. To indicate this relationship,
209       generate a section that looks like this:
210
211        EST        yk53c10
212                   yk53c10.5    +       18892-19154
213                   yk53c10.3    -       15000-15500,15700-15800
214
215       The group is indicated by a line that contains just two columns
216       containing the feature type and a unique name for the group. Follow
217       this line with all the features that form the group, but leave the
218       first column (the feature type) blank. The group will be rendered by
219       drawing a dashed line between all the members of the group. You can
220       change this by specifying a different connector option in the
221       configuration section for this feature type.
222

BUGS

224       Please report them to the author.
225

SEE ALSO

227       Bio::Graphics
228

AUTHOR

230       Lincoln Stein, lstein@cshl.org
231
232
233
234perl v5.12.0                      2010-04-29                   FEATURE_DRAW(1)
Impressum