AcePerl

 view release on metacpan or  search on metacpan

Ace/Graphics/Panel.pm  view on Meta::CPAN


  ellipse     A filled ellipse, nondirectional.

  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.

  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 arrow that indicates
              the direction of transcription is the last exon
              itself.

  primers     Two inward pointing arrows connected by a line.
	      Used for STSs.

  toomany     A "cloud", to indicate too many features to show
	      individually.  This is a placeholder that will be
	      replaced by something more clever, such as a histogram
	      or density plot.

  group	      A group of related features connected by a dashed line.
	      This is used internally by the Track class and should
	      not be called explicitly.

If the glyph name is omitted from add_track(), the "box" glyph will be
used by default.

The @options array is a list of name/value pairs that control the
attributes of the track.  The options are in turn passed to the
glyphs.  Each glyph has its own specialized subset of options, but
some are shared by all glyphs:

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

  -glyph      Glyph to use              none

  -fgcolor    Foreground color		black

  -outlinecolor				black
	      Synonym for -fgcolor

  -bgcolor    Background color          white

  -fillcolor  Interior color of filled  turquoise
	      images

  -linewidth  Width of lines drawn by	1
		    glyph

  -height     Height of glyph		10

  -font       Glyph font		gdSmallFont

  -label      Whether to draw a label	false

  -bump	      Bump direction		0

  -connect_groups                       false
              Connect groups by a
	      dashed line (see below)

  -key        Show this track in the    undef
              key

Colors can be expressed in either of two ways: as symbolic names such
as "cyan" and as HTML-style #RRGGBB triples.  The symbolic names are
the 140 colors defined in the Netscape/Internet Explorer color cube,
and can be retrieved using the Ace::Graphics::Panel->color_names()
method.

The background color is used for the background color of the track
itself.  The foreground color controls the color of lines and strings.
The interior color is used for filled objects such as boxes.

The -label argument controls whether or not the ID of the feature
should be printed next to the feature.  It is accepted by most, but
not all of the glyphs.

The -bump argument controls what happens when glyphs collide.  By
default, they will simply overlap (value 0).  A -bump value of +1 will
cause overlapping glyphs to bump downwards until there is room for
them.  A -bump value of -1 will cause overlapping glyphs to bump
upwards.

The -key argument declares that the track is to be shown in a key
appended to the bottom of the image.  The key contains a picture of a
glyph and a label describing what the glyph means.  The label is
specified in the argument to -key.

If present, the -glyph argument overrides the glyph given in the first
or second argument.

add_track() returns an Ace::Graphics::Track object.  You can use this
object to add additional features or to control the appearance of the
track with greater detail, or just ignore it.  Tracks are added in
order from the top of the image to the bottom.  To add tracks to the
top of the image, use unshift_track().

Typical usage is:

 $panel->add_track( thistle    => \@genes,
 		    -fillcolor =>  'green',
 		    -fgcolor   =>  'black',
 		    -bump      =>  +1,
 		    -height    => 10,
 		    -label     => 1);

=item $track = unshift_track($glyph,$features,@options)

unshift_track() works like add_track(), except that the new track is
added to the top of the image rather than the bottom.



( run in 0.501 second using v1.01-cache-2.11-cpan-ceb78f64989 )