[Bioperl-l] coloring of HSPs in blast panel

Steve Chervitz sac at bioperl.org
Wed Nov 21 13:43:54 EST 2007


On Nov 21, 2007 9:38 AM, Bernd Web <bernd.web at gmail.com> wrote:
> [snip]
>
> Further is is possible to get the raw_score of a hit. $hit->raw_score
> actually gets the bitscore (w/o decimal point).

Hmmm. raw_score should not be the same as bit score. So given an
example blast hit line such as:

       Score = 60.0 bits (30), Expect = 1e-06

$hit->raw_score() should return 30, not 60, as you seem to be getting.

Could you submit a bug report for this?  http://www.bioperl.org/wiki/Bugs

Thanks,
Steve

>
> On Nov 21, 2007 5:42 PM, Bernd Web <bernd.web at gmail.com> wrote:
> > Hi Russell,
> >
> > I came across your question. At first I thought all was well on my
> > system, but indeed I also have these colouring problems.
> > I noted that scrore in the bgcolor callback gets a different value!
> > Printing score during hit parsing($hit->raw_score) gives the same
> > score as -description
> > my $score = $feature->score; However, printing score in the bgcolor
> > sub gives 2573!
> > All scores in the bgcolor routine all different and higher than the
> > real scores. Were you able to solve this colouring issue?
> >
> > Regards,
> > Bernd
> >
> >
> > > Hi all,
> > > I'm using a modified version of Lincoln's tutorial
> > > (http://www.bioperl.org/wiki/HOWTO:Graphics#Parsing_Real_BLAST_Output)
> > > and I'm colouring the HSPs by setting the -bgcolor by score with a sub
> > > to give a similar image to that from NCBI but for some reason, my
> > > colours are coming out wrong (see attached example)
> > > They seem to be off by one but I can't see why.
> > >
> > > Any ideas?
> > >
> > > I can't be certain but I think it's only started doing this since our
> > > BLAST upgrade to 2.2.17 a few weeks ago.
> > >
> > > Here's the colouring code:
> > > ------------------------------------------------------------------------
> > > -------
> > > my $track = $panel->add_track(
> > >                               -glyph       => 'segments',
> > >                               -label       => 1,
> > >                               -connector   => 'dashed',
> > >                               -bgcolor     => sub {
> > >                                 my $feature = shift;
> > >                                 my $score = $feature->score;
> > >                         return 'red'       if $score >= 200;
> > >                                     return 'fuchsia' if $score >= 80;
> > >                                     return 'lime'      if $score >= 50;
> > >                         return 'blue'      if $score >= 40;
> > >                                     return 'black';
> > >                                },
> > >                               -font2color  => 'gray',
> > >                               -sort_order  => 'high_score',
> > >                               -description => sub {
> > >                                 my $feature = shift;
> > >                                 return unless
> > > $feature->has_tag('description');
> > >                                 my ($description) =
> > > $feature->each_tag_value('description');
> > >                                 my $score = $feature->score;
> > >                                 "$description, score=$score";
> > >                                },
> > >                              );
> > > ------------------------------------------------------------------------
> > > ---------
> > >
> > >
> > > Thanx,
> > >
> > > Russell Smithies
> > >
> > >
> > >
> > >
> > > =======================================================================
> > > Attention: The information contained in this message and/or attachments
> > > from AgResearch Limited is intended only for the persons or entities
> > > to which it is addressed and may contain confidential and/or privileged
> > > material. Any review, retransmission, dissemination or other use of, or
> > > taking of any action in reliance upon, this information by persons or
> > > entities other than the intended recipients is prohibited by AgResearch
> > > Limited. If you have received this message in error, please notify the
> > > sender immediately.
> > > =======================================================================
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l at lists.open-bio.org
> > > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> > >
> >
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>


More information about the Bioperl-l mailing list