[Bioperl-l] FW: Bio::Graphics::Panel question

Kevin Brown Kevin.M.Brown at asu.edu
Mon Nov 16 13:22:07 EST 2009

Please keep your responses on the list for more timely help.

Kevin Brown
Center for Innovations in Medicine
Biodesign Institute
Arizona State University 



From: Xiaoyu Liang [mailto:veronica.xiaoyu at gmail.com] 
Sent: Monday, November 16, 2009 9:34 AM
To: Kevin Brown
Subject: Re: [Bioperl-l] Bio::Graphics::Panel question

Hi Kevin, 

Thank you for ur quick response. I attached the BLAST .out file here.
And the follow is my code part. I have an array keeping the color for
each hit, and I printed it out the array, there is no missing. 

my $track = $panel->add_track(
                              -glyph       => 'graded_segments',
                              -label       => 1,
                              -connector   => 'dashed',
                              -font2color  => 'red',
                              -sort_order  => 'high_score',
                              -description => sub {
                                $feature = shift;
                                #print "--".$feature."\n";
                                return unless
                                my ($description) =
                                my ($id) = $feature->display_name;
                                my @records= split(/\|/,$description);
                                my $score = $feature->score;
                                #print $id.":".$score."\n";
                                if($score >=200){
                                        push (@color_array,1);
                                }elsif($score >=80){
                                        push (@color_array,2);
                                }elsif($score >=50){
                                        push (@color_array,3);
                                }elsif($score >= 40){
                                        push (@color_array,4);
                                        push (@color_array,5);
                                if($type == 1){
                                        "Species:Arabidopsis TF
Family:$records[1] Score=$score";
                                }elsif($type == 2){
                                                "Species:$records[1] TF
Family:$records[2] Accepted Name:$records[3] Score=$score";
                                                "Species:$records[1] TF
Family:$records[2] Score=$score";
                               -bgcolor => sub{
                                        return unless
                                        if($color_array[$index] == 1 ){
                                                $color = 'red';
                                        if($color_array[$index]== 2){
                                                $color = 'orange';
                                        if($color_array[$index]== 3){
                                                $color = 'green';
                                        if($color_array[$index]== 4){
                                                $color = 'blue';
                                        if($color_array[$index]== 5){
                                                $color = 'black';
                                        #if ($index == 20){
                                        #        $color = 'black';
                                        #print $feature."\n";
                                        return $color;

Best regrads,

On Mon, Nov 16, 2009 at 10:49 AM, Kevin Brown <Kevin.M.Brown at asu.edu>

	To really be able to tell if this was a bug, I (and probably the
	devs) would need to see that part of your code and the Blast
file that
	is having this issue as it could be your callback for color
choice vs
	the blast object (e.g. your color picker is missing an option
that the
	data comes in with and so returns with a blank value).

	-----Original Message-----
	From: bioperl-l-bounces at lists.open-bio.org
	[mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of
Xiaoyu Liang
	Sent: Friday, November 13, 2009 1:36 PM
	To: Bioperl-l at lists.open-bio.org
	Subject: [Bioperl-l] Bio::Graphics::Panel question
	I'm using Bio::Graphics to parse the blast result and generate
	But, sometimes, in the middle of the output image, the hit's
color is
	white, eventhough I set it to other colors. I attached the
picture here
	for an example. This doesn't occur all the time, usually, it
works well.
	I'm wondering if I did something wrong? or depends on the blast
	Thank you,
	Bioperl-l mailing list
	Bioperl-l at lists.open-bio.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1258388779.out
Type: application/octet-stream
Size: 32599 bytes
Desc: 1258388779.out
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20091116/cb23e40d/attachment-0001.obj>

More information about the Bioperl-l mailing list