NAME

Bio::Graphics::Glyph::xyplot - The xyplot glyph

SYNOPSIS

See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.

DESCRIPTION

This glyph is used for drawing features that have a position on the genome and a numeric value. It can be used to represent gene prediction scores, motif-calling scores, percent similarity, microarray intensities, or other features that require a line plot.

The X axis represents the position on the genome, as per all other glyphs. The Y axis represents the score. Options allow you to set the height of the glyph, the maximum and minimum scores, the color of the line and axis, and the symbol to draw.

The plot is designed to work on a single feature group that contains subfeatures. It is the subfeatures that carry the score information. The best way to arrange for this is to create an aggregator for the feature. We'll take as an example a histogram of repeat density in which interval are spaced every megabase and the score indicates the number of repeats in the interval; we'll assume that the database has been loaded in in such a way that each interval is a distinct feature with the method name "density" and the source name "repeat". Furthermore, all the repeat features are grouped together into a single group (the name of the group is irrelevant). If you are using Bio::DB::GFF and Bio::Graphics directly, the sequence of events would look like this:

my $agg = Bio::DB::GFF::Aggregator->new(-method    => 'repeat_density',
                                        -sub_parts => 'density:repeat');
my $db  = Bio::DB::GFF->new(-dsn=>'my_database',
                            -aggregators => $agg);
my $segment  = $db->segment('Chr1');
my @features = $segment->features('repeat_density');

my $panel = Bio::Graphics::Panel->new;
$panel->add_track(\@features,
                  -glyph => 'xyplot');

If you are using Generic Genome Browser, you will add this to the configuration file:

aggregators = repeat_density{density:repeat}
              clone alignment etc

OPTIONS

The following options are standard among all Glyphs. See Bio::Graphics::Glyph for a full explanation.

Option      Description                      Default
------      -----------                      -------

-fgcolor      Foreground color	       black

-outlinecolor	Synonym for -fgcolor

-bgcolor      Background color               turquoise

-fillcolor    Synonym for -bgcolor

-linewidth    Line width                     1

-height       Height of glyph		       10

-font         Glyph font		       gdSmallFont

-label        Whether to draw a label	       0 (false)

-description  Whether to draw a description  0 (false)

In addition, the alignment glyph recognizes the following glyph-specific options:

Option         Description                  Default
------         -----------                  -------

-max_score   Maximum value of the	      Calculated
             feature's "score" attribute

-min_score   Minimum value of the           Calculated
             feature's "score" attribute

-graph_type  Type of graph to generate.     Histogram
             Options are: "histogram",
             "boxes", "line", "points",
             or "linepoints".

-point_symbol Symbol to use. Options are    none
              "triangle", "square", "disc",
              "point", and "none".

-point_radius Radius of the symbol, in      1
              pixels

-scale        Position where the Y axis     none
              scale is drawn if any.
              It should be one of
              "left", "right" or "none"

-graph_height Specify height of the graph   Same as the
                                            "height" option.

BUGS

Please report them.

SEE ALSO

Bio::Graphics::Panel, Bio::Graphics::Track, Bio::Graphics::Glyph::transcript2, Bio::Graphics::Glyph::anchored_arrow, Bio::Graphics::Glyph::arrow, Bio::Graphics::Glyph::box, Bio::Graphics::Glyph::primers, Bio::Graphics::Glyph::segments, Bio::Graphics::Glyph::toomany, Bio::Graphics::Glyph::transcript,

AUTHOR

Lincoln Stein <lstein@cshl.org>

Copyright (c) 2001 Cold Spring Harbor Laboratory

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.