[Bioperl-l] Problems with Bioperl graphics
Crabtree, Jonathan
crabtree at tigr.ORG
Tue Jul 5 11:23:22 EDT 2005
One difference between your code and the tutorial is that you've set
-label to 4 in your call to add_track(); in the tutorial this parameter
is set to 1. Try changing the 4 to 1 and see what happens. Another
difference is that you're using the 'graded_segments' glyph instead of
the 'generic' glyph (I don't think this should matter, but you were
asking whether your code differs from that in the tutorial ;)
Jonathan
> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org
> [mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of Wacki
> Sent: Tuesday, July 05, 2005 3:23 AM
> To: bioperl-l at bioperl.org
> Subject: [Bioperl-l] Problems with Bioperl graphics
>
>
> I followed the tutorial here:
>
> http://bioperl.org/HOWTOs/Graphics-HOWTO/gettingStarted.html
>
> And ran this exact code:
>
> http://biokdd.informatics.indiana.edu/jnowacki/render_blast1.txt
>
> The image produced is shown here:
>
> http://biokdd.informatics.indiana.edu/jnowacki/test.png
>
> It doesn't have the name of the hits. What is wrong? The
> code is exactly the same as the tutorial is it not?
>
>
>
>
>
>
> code:
>
> #!/usr/bin/perl
>
> # This is code example 2 in the Graphics-HOWTO
> use strict;
> use lib '/home/lstein/projects/bioperl-live';
> use Bio::Graphics;
> use Bio::SeqFeature::Generic;
>
> my $panel = Bio::Graphics::Panel->new(-length => 1000,
> -width => 800,
> -pad_left => 10,
> -pad_right => 10,
> );
> my $full_length = Bio::SeqFeature::Generic->new(-start=>1,-end=>1000);
> $panel->add_track($full_length,
> -glyph => 'arrow',
> -tick => 2,
> -fgcolor => 'black',
> -double => 1,
> );
>
> my $track = $panel->add_track(-glyph => 'graded_segments',
> -label => 4,
> -bgcolor => 'blue',
> -min_score => 0,
> -max_score => 1000);
>
> while (<>) { # read blast file
> chomp;
> next if /^\#/; # ignore comments
> my($name,$score,$start,$end) = split /\t+/;
> my $feature =
> Bio::SeqFeature::Generic->new(-display_name=>$name,-score=>$score,
>
> -start=>$start,-end=>$end); $track->add_feature($feature); }
>
> binmode(STDOUT);
> print $panel->png;
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-> bio.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list