3
# file: render_blast1.pl
4
# This is code example 1 in the Graphics-HOWTO
5
# Author: Lincoln Stein
8
use lib "$ENV{HOME}/projects/bioperl-live";
10
use Bio::SeqFeature::Generic;
12
my $panel = Bio::Graphics::Panel->new(-length => 1000,-width => 800);
13
my $track = $panel->add_track(-glyph => 'generic',-label => 1);
15
while (<>) { # read blast file
17
next if /^\#/; # ignore comments
18
my($name,$score,$start,$end) = split /\t+/;
19
my $feature = Bio::SeqFeature::Generic->new(-display_name=>$name,-score=>$score,
20
-start=>$start,-end=>$end);
21
$track->add_feature($feature);