[Bioperl-l] Bio::Graphics heterogeneous_segments problem.

Marco Aurelio Valtas Cunha mavcunha at gordon.fmrp.usp.br
Mon Feb 3 17:25:53 EST 2003


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;



-- 
    _    Marco A Valtas Cunha     http://scarecrow.fmrp.usp.br/~mavcunha/
  ('v')  Lab de Bioinformatica    http://bit.fmrp.usp.br
//-=-\\ Hemocentro de Rib Preto  http://ctc.fmrp.usp.br
(\_=_/) Fax: 55 16 3963-9309     Tel: 55 16 3963-9300 R:9603
  ^^ ^^  <--sumo penguim



More information about the Bioperl-l mailing list