[Bioperl-l] Getting Co-ordinates in Bio::Graphics::Panel
Adam Woolfe
awoolfe at rfcgr.mrc.ac.uk
Wed May 5 14:07:04 EDT 2004
Im trying to get the co-ordinates of glyphs on each track drawn using
Bio::Graphics:Panel.
i know from CPAN documentation that you can use the boxes() function as
in:
@coords = $panel->boxes();
but I have a whole set of glyphs on several tracks which I would like to
get the coordinates for. Here is an example of one of the tracks I would
like to get coordinates for.
#create a new Panel object
my $panel = Bio::Graphics::Panel->new(-length => $seqlength,
-key_style=>'between',
-offset=>1,
-width =>1000,
-pad_left => 10,
-pad_right => 10,
-pad_top => 10,
-pad_bottom => 10);
my $org1track = $panel->add_track(-glyph => 'graded_segments',
-label => 1,
-bgcolor => 'blue',
-min_score => 0,
-max_score => 100,
-key =>'Org1');
#each glyph is drawn on the track
foreach $glyph.... {
$org1object =
Bio::SeqFeature::Generic->new(-score=>$glyph[2],-start=>$glyph[0],
-end=>$glyph[1]);
$org1track->add_feature($org1object);
}
I want the coordinates for each of those features I added to the
$org1track track. I tried using:
@coords = $org1track->boxes();
but that didnt work. How can I achieve this?
cheers,
Adam
More information about the Bioperl-l
mailing list