[Bioperl-l] Bio::Graphics heterogeneous_segments problem.
Lincoln Stein
lstein at cshl.org
Tue Feb 11 16:40:41 EST 2003
OK, it's an interesting bug that effects all the segmented glyphs. Ordinarily
you won't see this because the subfeatures will extend to the ends of the
parent feature.
I will try to find out why this happens when scaled by 10.
Lincoln
On Monday 03 February 2003 02:25 pm, Marco Aurelio Valtas Cunha wrote:
> Hi all,
>
> If you work with bigger SeqFeatures the end graph is not rendered. If
> run this script (bellow) you'll get something like:
>
> ----XXXXXXXXXX------
>
> But when you mutiply the constants by ten, the graph render like:
>
> ----XXXXXXXXXX
>
> no end tail.
> PS: All GD, libgd and Bio::Graphics are up to date.
>
> Thanks Marco.
>
>
> use strict;
> use warnings;
> use Bio::Graphics;
> use Bio::SeqFeature::Generic;
>
> # Some test coord.
> use constant I_SIZE => 200;
> use constant E_START => 50;
> use constant E_END => 150;
>
> my $intron = Bio::SeqFeature::Generic->new(
> -primary => 'region_2',
> -start => '0',
> -end => I_SIZE,
> -strand => 1,
> -source => 'intron',
> );
>
> my $exon = Bio::SeqFeature::Generic->new(
> -primary => '',
> -start => E_START,
> -end => E_END,
> -source => 'exon',
> );
> $intron->add_sub_SeqFeature($exon);
>
> my $graphics = Bio::Graphics::Panel->new(
> -segment => $intron,
> -width => '200',
> );
>
> $graphics->add_track(
> heterogeneous_segments => $intron,
> -fgcolor => 'black',
> -exon_color => 'red',
> -height => 8,
> );
>
> print $graphics->png;
--
========================================================================
Lincoln D. Stein Cold Spring Harbor Laboratory
lstein at cshl.org Cold Spring Harbor, NY
========================================================================
More information about the Bioperl-l
mailing list