Bio::Graphics::Glyph pinsertion
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::Graphics::Glyph::pinsertion - The "Drosophila P-element Insertion" glyph
Package variables
No package variables defined.
Included modules
Bio::Graphics::Glyph::generic
GD
Inherit
Bio::Graphics::Glyph::generic
Synopsis
  See Bio::Graphics::Panel and Bio::Graphics::Glyph.
Description
This glyph was designed to show P-element insertions in the Drosophila
genome, but in fact is suitable for any type of zero-width feature.
Also see the triangle glyph. In addition to the generic options, this glyph recognizes:
 Option Name       Description              Default
----------- ----------- -------
-insertion_width Width of glyph in pixels 3
Methods
box
No description
Code
draw
No description
Code
insertion_width
No description
Code
Methods description
None available.
Methods code
boxdescriptionprevnextTop
sub box {
  my $self = shift;
  my $half = $self->insertion_width/2;
return ($self->left-$half,$self->top,$self->right+$half,$self->bottom);
}
drawdescriptionprevnextTop
sub draw {
  my $self = shift;

  my $gd = shift;
  my ($left,$top) = @_;
  my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_);

  my $height = $self->height;

  my $half = $self->insertion_width/2;
my $fill = $self->bgcolor; my $poly = GD::Polygon->new; if ($self->feature->strand > 0) { #plus strand
$poly->addPt($x1 - $half, $y1); $poly->addPt($x1 + ($half), $y1); $poly->addPt($x1, $y2); #pointer down
} else { $poly->addPt($x1, $y1); #pointer up
$poly->addPt($x1 - $half, $y2); $poly->addPt($x1 + ($half), $y2); } $gd->filledPolygon($poly, $fill); $gd->polygon($poly, $fill); # add a label if requested
$self->draw_label($gd,$left,$top) if $self->option('label'); $self->draw_description($gd,$left,$top) if $self->option('description'); } 1;
}
insertion_widthdescriptionprevnextTop
sub insertion_width {
  my $self = shift;
  return $self->option('insertion_width') || 6;
}

# override draw method
}
General documentation
BUGSTop
Please report them.
SEE ALSOTop
Bio::Graphics::Panel,
Bio::Graphics::Glyph,
Bio::Graphics::Glyph::arrow,
Bio::Graphics::Glyph::cds,
Bio::Graphics::Glyph::crossbox,
Bio::Graphics::Glyph::diamond,
Bio::Graphics::Glyph::dna,
Bio::Graphics::Glyph::dot,
Bio::Graphics::Glyph::ellipse,
Bio::Graphics::Glyph::extending_arrow,
Bio::Graphics::Glyph::generic,
Bio::Graphics::Glyph::graded_segments,
Bio::Graphics::Glyph::heterogeneous_segments,
Bio::Graphics::Glyph::line,
Bio::Graphics::Glyph::pinsertion,
Bio::Graphics::Glyph::primers,
Bio::Graphics::Glyph::rndrect,
Bio::Graphics::Glyph::segments,
Bio::Graphics::Glyph::ruler_arrow,
Bio::Graphics::Glyph::toomany,
Bio::Graphics::Glyph::transcript,
Bio::Graphics::Glyph::transcript2,
Bio::Graphics::Glyph::translation,
Bio::Graphics::Glyph::triangle,
Bio::DB::GFF,
Bio::SeqI,
Bio::SeqFeatureI,
Bio::Das,
GD
AUTHORTop
Allen Day <day@cshl.org>, Shengqiang Shu <sshu@bdgp.lbl.gov>
Copyright (c) 2001 Cold Spring Harbor Laboratory, BDGP
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.