[Bioperl-l] coloring of HSPs in blast panel
Bernd Web
bernd.web at gmail.com
Wed Nov 21 17:38:30 UTC 2007
Hi,
I now found that bgcolor is using a $feature->score that is coming
directly from the blast report, it is not the bit score.
-bgcolor => sub {my $feature = shift;
my $score = $feature->score;
print "$score\n"; }
always print the score, even if the score is not set in the
Bio::SeqFeature::Generic object.
-description callbacks are somehow using the score from the SeqFeature object.
Does anyone have an idea why?
Further is is possible to get the raw_score of a hit. $hit->raw_score
actually gets the bitscore (w/o decimal point).
Bernd
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
> >
>
More information about the Bioperl-l
mailing list