~ubuntu-branches/ubuntu/lucid/bioperl/lucid

« back to all changes in this revision

Viewing changes to scripts/biographics/bp_glyphs2-demo.PLS

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2007-09-21 22:52:22 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070921225222-tt20m2yy6ycuy2d8
Tags: 1.5.2.102-1
* Developer release.
* Upgraded source package to debhelper 5 and standards-version 3.7.2.
* Added libmodule-build-perl and libtest-harness-perl to
  build-depends-indep.
* Disabled automatic CRAN download.
* Using quilt instead of .diff.gz to manage modifications.
* Updated Recommends list for the binary package.
* Moved the "production-quality" scripts to /usr/bin/.
* New maintainer: Debian-Med packaging team mailing list.
* New uploaders: Charles Plessy and Steffen Moeller.
* Updated Depends, Recommends and Suggests.
* Imported in Debian-Med's SVN repository on Alioth.
* Executing the regression tests during package building.
* Moved the Homepage: field out from the package's description.
* Updated watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
#Wed Sep  1 18:54:18 EDT 2004
 
4
#Simon Ilyushchenko - demonstrating several new glyphs for gbrowse, part 2.
 
5
 
 
6
use strict;
 
7
 
 
8
use Bio::Graphics::Panel;
 
9
 
 
10
=head1 NAME
 
11
 
 
12
bp_glyphs2-demo.pl - Second demo of Bio::Graphics glyphs
 
13
 
 
14
=head1 SYNOPSIS
 
15
 
 
16
  % bp_glyphs2-demo.pl | display -
 
17
 
 
18
=head1 DESCRIPTION
 
19
 
 
20
Generates a PNG image of some of the more esoteric Bio::Graphics glyphs.
 
21
 
 
22
=head1 SEE ALSO
 
23
 
 
24
L<Bio::Graphics>, the BioGraphics HOWTO.
 
25
 
 
26
=head1 AUTHOR
 
27
 
 
28
Simon Ilyushchenko
 
29
 
 
30
Copyright (c) 2004 Cold Spring Harbor Laboratory
 
31
 
 
32
This library is free software; you can redistribute it and/or modify
 
33
it under the same terms as Perl itself.  See DISCLAIMER.txt for
 
34
disclaimers of warranty.
 
35
 
 
36
=cut
 
37
 
 
38
my $ftr = 'Bio::Graphics::Feature';
 
39
my $segment = $ftr->new(-start=>1,-end=>400,-name=>'ZK154',-type=>'clone');
 
40
my $subseg1 = $ftr->new(-start=>100,-end=>300,-name=>'glyphs 2');
 
41
 
 
42
my $panel = Bio::Graphics::Panel->new(
 
43
                    -grid => 1,
 
44
                    -segment => $segment,
 
45
                    -key_style => 'bottom');
 
46
 
 
47
$subseg1->name('dumbbell - arrows with arc ');
 
48
 
 
49
$panel->add_track(segments=>[$subseg1],
 
50
            -label => 1,
 
51
                        -width => 50,
 
52
                        -height => 30,
 
53
                        -arc => 1,
 
54
                        -shape_size => 20,
 
55
                        -fgcolor => 'crimson',
 
56
                        -end_shape => "arrow",
 
57
                        -glyph => 'dumbbell');
 
58
 
 
59
$subseg1->name('dumbbell - wave ');
 
60
 
 
61
$panel->add_track(segments=>[$subseg1],
 
62
            -label => 1,
 
63
                        -shape_size => 20,
 
64
                        -end_shape => "wave",
 
65
                        -height => 20,
 
66
                        -fgcolor => 'green',
 
67
                        -glyph => 'dumbbell');
 
68
 
 
69
$subseg1->name('two bolts');
 
70
 
 
71
$panel->add_track(segments=>[$subseg1],
 
72
            -label => 1,
 
73
                        -shape_size => 40,
 
74
                        -bolt_color => 'violet',
 
75
                        -height => 20,
 
76
                        -glyph => 'two_bolts');
 
77
 
 
78
$subseg1->name('wave');
 
79
 
 
80
$panel->add_track(segments=>[$subseg1],
 
81
            -label => 1,
 
82
                        -height => 10,
 
83
                        -circle => 1,
 
84
                        -glyph => 'wave');
 
85
 
 
86
$subseg1->name('broken line');
 
87
 
 
88
$panel->add_track(segments=>[$subseg1],
 
89
            -label => 1,
 
90
                        -height => 20,
 
91
                        -glyph => 'broken_line');
 
92
 
 
93
$subseg1->name('tic_tac_toe');
 
94
 
 
95
$panel->add_track(segments=>[$subseg1],
 
96
            -label => 1,
 
97
                        -height => 20,
 
98
                        -glyph => 'tic_tac_toe');
 
99
 
 
100
$subseg1->name('text_in_box');
 
101
 
 
102
$panel->add_track(segments=>[$subseg1],
 
103
            -label => 1,
 
104
                        -height => 20,
 
105
                        -text_bgcolor => 'yellow',
 
106
                        -glyph => 'text_in_box');
 
107
 
 
108
 
 
109
$subseg1->name('christmas arrow');
 
110
 
 
111
$panel->add_track(segments=>[$subseg1],
 
112
            -label => 1,
 
113
                        -height => 20,
 
114
                        -fgcolor => 'steelblue',
 
115
                        -glyph => 'christmas_arrow');
 
116
 
 
117
 
 
118
$subseg1->name('pentagram');
 
119
 
 
120
$panel->add_track(segments=>[$subseg1],
 
121
            -label => 1,
 
122
                        -height => 20,
 
123
                        -glyph => 'pentagram');
 
124
 
 
125
 
 
126
$subseg1->name('weighted arrow');
 
127
 
 
128
$panel->add_track(segments=>[$subseg1],
 
129
            -label => 1,
 
130
                        -height => 20,
 
131
                        -fgcolor => 'sienna',
 
132
                        -glyph => 'weighted_arrow');
 
133
 
 
134
 
 
135
 
 
136
open OUT,">glyphs2.png" or die "Couldn't open glyphs2.png for writing: $!";
 
137
print OUT $panel->gd->png;
 
138
close OUT;
 
139
 
 
140