~ubuntu-branches/ubuntu/edgy/bioperl/edgy

« back to all changes in this revision

Viewing changes to Bio/Graphics.pm

  • Committer: Bazaar Package Importer
  • Author(s): Matt Hope
  • Date: 2002-03-20 01:16:30 UTC
  • Revision ID: james.westby@ubuntu.com-20020320011630-wyvmxwc7o5bi4665
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Bio::Graphics;
 
2
 
 
3
use Bio::Graphics::Panel;
 
4
use strict;
 
5
 
 
6
use vars '$VERSION';
 
7
$VERSION = '0.98';
 
8
 
 
9
1;
 
10
 
 
11
=head1 NAME
 
12
 
 
13
Bio::Graphics - Generate GD images of Bio::Seq objects
 
14
 
 
15
=head1 SYNOPSIS
 
16
 
 
17
  use Bio::Graphics;
 
18
  use Ace::Sequence; # or any other way to create a Bio::Seq object
 
19
 
 
20
  # get a set of Bio::SeqFeature objects ... somehow
 
21
  my $db     = Ace->connect(-host=>'brie2.cshl.org',-port=>2005) or die;
 
22
  my $cosmid = Ace::Sequence->new(-seq=>'Y16B4A',
 
23
                                  -db=>$db,-start=>-15000,-end=>15000) or die;
 
24
  my @transcripts = $cosmid->transcripts;
 
25
 
 
26
  # let the drawing begin...
 
27
  my $panel = Bio::Graphics::Panel->new( -segment => $cosmid,
 
28
                                         -width   => 800  );
 
29
 
 
30
  $panel->add_track(arrow => $cosmid,
 
31
                    -bump => 0,
 
32
                    -tick =>2);
 
33
 
 
34
  $panel->add_track(transcript => \@transcripts,
 
35
                    -bgcolor   =>  'wheat',
 
36
                    -fgcolor   =>  'black',
 
37
                    -key       => 'Curated Genes',
 
38
                    -bump      =>  +1,
 
39
                    -height    =>  10,
 
40
                    -label     =>  1);
 
41
 
 
42
  my $boxes = $panel->boxes;
 
43
  print $panel->png;
 
44
 
 
45
=head1 DESCRIPTION
 
46
 
 
47
Please see L<Bio::Graphics::Panel> for the full API.
 
48
 
 
49
=head1 SEE ALSO
 
50
 
 
51
L<Bio::Graphics::Panel>,
 
52
L<Bio::Graphics::Glyph>,
 
53
L<Bio::SeqI>,
 
54
L<Bio::SeqFeatureI>,
 
55
L<Bio::Das>,
 
56
L<Bio::DB::GFF::Feature>,
 
57
L<Ace::Sequence>,
 
58
L<GD>
 
59
 
 
60
=head1 AUTHOR
 
61
 
 
62
Lincoln Stein E<lt>lstein@cshl.orgE<gt>.
 
63
 
 
64
Copyright (c) 2001 Cold Spring Harbor Laboratory
 
65
 
 
66
This library is free software; you can redistribute it and/or modify
 
67
it under the same terms as Perl itself.  See DISCLAIMER.txt for
 
68
disclaimers of warranty.
 
69
 
 
70
=cut
 
71