[Bioperl-l] Bio::Graphics - roblem with heterogeneous_segments

Lincoln Stein lstein at cshl.edu
Wed Jul 23 12:25:02 EDT 2003


Hi,

Heterogeneous segments operates only on the subfeatures of a multi-part 
feature.  Enclosed is an example script and its output.

Another way to achieve this (and maybe easier) is just to have a bgcolor 
callback that looks at the score and chooses the appropriate color.

Regards,

Lincoln

On Tuesday 22 July 2003 06:36 pm, Dmitri Bichko wrote:
> Hello,
>
> I am trying to render a BLAST result and color the segments according to
> the raw score.  Rather than using a gradient, however, I need to use
> four distinct colors.  I thought I could do this with
> heterogeneous_segments. As a test:
>
> my $track = $panel->add_track(-glyph		=>
> 'heterogeneous_segments',
> 					-label		=>	0,
> 					-connector		=>
> 'dashed',
> 					-sort_order		=>
> 'high_score',
> 					-height		=>	3,
> 					-bgcolor		=>
> 'green',
> 					-test_color		=>
> 'blue',
> );
>
> And to create the features:
>
> my $feature = Bio::SeqFeature::Generic->new(
> 							-score	=>
> $hit->raw_score,
> 							-seq_id	=>
> $hit->name,
> 							-source
> => 	'test',
> );
>
> All the segments are just colored with the default bgcolor, the
> source_color seems to have no effect; am I missing something?
>
> Thanks,
> Dmitri
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein at cshl.org			                  Cold Spring Harbor, NY
========================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_hetero.pl
Type: text/x-perl
Size: 974 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20030723/cfb6fa87/test_hetero.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_hetero.png
Type: image/png
Size: 881 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20030723/cfb6fa87/test_hetero.png


More information about the Bioperl-l mailing list