~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to doc/howto/examples/graphics/render_blast1.pl

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl
2
 
 
3
 
# file: render_blast1.pl
4
 
# This is code example 1 in the Graphics-HOWTO
5
 
# Author: Lincoln Stein
6
 
 
7
 
use strict;
8
 
use lib "$ENV{HOME}/projects/bioperl-live";
9
 
use Bio::Graphics;
10
 
use Bio::SeqFeature::Generic;
11
 
 
12
 
my $panel = Bio::Graphics::Panel->new(-length => 1000,-width  => 800);
13
 
my $track = $panel->add_track(-glyph => 'generic',-label  => 1);
14
 
 
15
 
while (<>) { # read blast file
16
 
  chomp;
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);
22
 
}
23
 
 
24
 
print $panel->png;
25