~ubuntu-branches/ubuntu/oneiric/bioperl/oneiric

« back to all changes in this revision

Viewing changes to scripts/biographics/bp_glyphs1-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
#Thu Aug 19 22:29:23 EDT 2004
 
4
#Simon Ilyushchenko - demonstrating several new glyphs for gbrowse, part 1.
 
5
 
 
6
use strict;
 
7
 
 
8
use Bio::Graphics::Panel;
 
9
 
 
10
=head1 NAME
 
11
 
 
12
bp_glyphs1-demo.pl - First 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=>1000,-name=>'ZK154',-type=>'clone');
 
40
my $subseg1 = $ftr->new(-start=>100,-end=>600,-name=>'saw teeth');
 
41
 
 
42
my $panel = Bio::Graphics::Panel->new(
 
43
                    -grid => 1,
 
44
                    -segment => $segment,
 
45
                    -key_style => 'bottom');
 
46
 
 
47
$panel->add_track(segments=>[$subseg1],
 
48
            -label => 1,
 
49
                        -interval => 20,
 
50
                        -width => 20,
 
51
                        -glyph => 'saw_teeth');
 
52
 
 
53
$subseg1->name('frequent saw teeth');
 
54
 
 
55
$panel->add_track(segments=>[$subseg1],
 
56
            -label => 1,
 
57
                        -interval => 0,
 
58
                        -width => 10,
 
59
                        -fgcolor => 'red',
 
60
                        -glyph => 'saw_teeth');
 
61
 
 
62
$subseg1->name('dashed line');
 
63
 
 
64
$panel->add_track(segments=>[$subseg1],
 
65
            -label => 1,
 
66
                        -dash_size => 10,
 
67
                        -space_size => 5,
 
68
                        -glyph => 'dashed_line');
 
69
 
 
70
$subseg1->name('thick colored dashed line with shear');
 
71
 
 
72
$panel->add_track(segments=>[$subseg1],
 
73
            -label => 1,
 
74
                        -fgcolor => 'red',
 
75
                        -dash_size => 20,
 
76
                        -space_size => 5,
 
77
                        -space_color => 'blue',
 
78
                        -shear => 'yes',
 
79
                        -linewidth => 2,
 
80
                        -glyph => 'dashed_line');
 
81
 
 
82
$subseg1->name('three letters');
 
83
 
 
84
$panel->add_track(segments=>[$subseg1],
 
85
            -label => 1,
 
86
                        -width => 20,
 
87
                        -interval => 10,
 
88
                        -pad_top => 30,
 
89
                        -glyph => 'three_letters');
 
90
 
 
91
$subseg1->name('flag');
 
92
 
 
93
$panel->add_track(segments=>[$subseg1],
 
94
            -label => 1,
 
95
                        -width => 20,
 
96
                        -text => "ori",
 
97
                        -height => 30,
 
98
                        -glyph => 'flag');
 
99
 
 
100
$subseg1->name('dumbbell - square ');
 
101
 
 
102
$panel->add_track(segments=>[$subseg1],
 
103
            -label => 1,
 
104
                        -shape_sive => 20,
 
105
                        -end_shape => "square",
 
106
                        -height => 20,
 
107
                        -glyph => 'dumbbell');
 
108
 
 
109
$subseg1->name('dumbbell - diamond');
 
110
 
 
111
$panel->add_track(segments=>[$subseg1],
 
112
            -label => 1,
 
113
                        -shape_size => 20,
 
114
                        -end_shape => "diamond",
 
115
                        -fgcolor => 'orange',
 
116
                        -height => 20,
 
117
                        -glyph => 'dumbbell');
 
118
 
 
119
$subseg1->name('dumbbell - tree');
 
120
 
 
121
$panel->add_track(segments=>[$subseg1],
 
122
            -label => 1,
 
123
                        -shape_size => 20,
 
124
                        -end_shape => "tree",
 
125
                        -fgcolor => 'green',
 
126
                        -height => 20,
 
127
                        -glyph => 'dumbbell');
 
128
 
 
129
$subseg1->name('dumbbell - clover');
 
130
 
 
131
$panel->add_track(segments=>[$subseg1],
 
132
            -label => 1,
 
133
                        -shape_size => 20,
 
134
                        -end_shape => "clover",
 
135
                        -fgcolor => 'pink',
 
136
                        -height => 20,
 
137
                        -glyph => 'dumbbell');
 
138
 
 
139
 
 
140
$subseg1->name('dumbbell - star with text');
 
141
 
 
142
$panel->add_track(segments=>[$subseg1],
 
143
            -label => 1,
 
144
                        -shape_size => 40,
 
145
                        -end_shape => "star",
 
146
                        -fgcolor => 'red',
 
147
                        -height => 40,
 
148
                        -caption => 'Back in USSR',
 
149
                        -glyph => 'dumbbell');
 
150
 
 
151
 
 
152
$subseg1->name('dumbbell - bubble text');
 
153
 
 
154
$panel->add_track(segments=>[$subseg1],
 
155
            -label => 1,
 
156
                        -shape_size => 20,
 
157
                        -end_shape => "bubble",
 
158
                        -bubble_text => 'CpG',
 
159
                        -fgcolor => 'red',
 
160
                        -height => 20,
 
161
                        -glyph => 'dumbbell');
 
162
 
 
163
 
 
164
 
 
165
 
 
166
 
 
167
 
 
168
 
 
169
open OUT,">glyphs1.png" or die "Couldn't open glyphs1.png for writing: $!";
 
170
print OUT $panel->gd->png;
 
171
close OUT;
 
172
 
 
173