[Bioperl-l] adding HSP information to BLAST output graphic (Bio::Graphics)

Adam Witney awitney at sgul.ac.uk
Thu Aug 21 14:41:10 UTC 2008


I am going through the Bio::Graphics HOWTO on the wiki.

Looking at render_blast4.pl, the description text describes the whole  
hit and is set for the whole track, but i would like to be able to add  
HSP information such as the identity matches onto the picture, this is  
stored in the $hsp object. How would i go about adding that to the  

the relevant piece of code is:

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

       next unless $hit->significance < 1E-20;

       my $feature = Bio::SeqFeature::Generic->new(
                                                   -score        =>  
                                                   -display_name =>  
                                                   -tag          => {
description => $hit->description

       while( my $hsp = $hit->next_hsp )


thanks for any help


More information about the Bioperl-l mailing list