[Bioperl-l] Bio::Graphics segments problem

Vamsi vamsi at warta.bio.psu.edu
Mon Sep 29 15:26:44 EDT 2003


Hi,

When I run the script below, the co-ordinates seem to be off slightly.
They start correctly but end at 41 instead of 40 and 91 instead of 90
with the latest tar.gz bioperl distribution. However, they are correctly
rendered using an older distribution.

Also, I am not able to use the commented out 
$p->add_track(segments => [[1,40],[61,90]])
line though the documentation for Bio::Graphics::Panel shows something
very similar.

Any suggestions?

Thanks,
Vamsi

------------------
use Bio::Graphics::Panel;
use Bio::SeqFeature::Generic;

my $length = 100;
my $seq = Bio::SeqFeature::Generic->new(-start => 1,
					-end => $length);

my $p = new Bio::Graphics::Panel(
				 -length => $length,
				 -width => 800,
				 );
$p->add_track($seq,
	      -glyph => 'arrow',
	      -tick => 2,
	      -double => 1,
	      );

#$p->add_track(segments => [[1,40],[61,90]]);
my $g = $p->add_track();
$g->add_group([[1,40],[61,90]]);

open(F, '>b.png');
binmode F;
print F $p->png();
close F;



More information about the Bioperl-l mailing list