[Bioperl-l] Boxes and features...

Lincoln Stein lstein at cshl.org
Mon Mar 3 12:05:51 EST 2003


Hi William,

Sorry I didn't notice this before.  The problem is that you are using the 
-box_subparts option when you add the track.  This is telling the track to 
return the SUBFEATURES when you call boxes() rather than the top level 
features.  So what you're getting from boxes() is the HSP subcomponents, 
which don't happen to have tags.

You can either:

	1) remove -box_subparts (or set it to 0)
	2) add the tags to each of the HSPs

It depends on whether you want clicks to be directed at each HSP or at the hit 
as a whole.

Lincoln

> >> my $track = $panel->add_track(-glyph        => 'graded_segments',
> >> 			      -label        => 1,
> >> 			      -connector    => 'dashed',
> >> 			      -bgcolor      => 'blue',
> >> 			      -font2color   => 'red',
> >> 			      -sort_order   => 'high_score',
> >> 			      -box_subparts => 1,
> >> 			      -description  => sub {
> >> 				my $feature = shift;
> >> 				return unless $feature->has_tag('desription');

========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein at cshl.org			                  Cold Spring Harbor, NY
========================================================================




More information about the Bioperl-l mailing list