bio-graphics 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/Bio.html +135 -0
- data/doc/classes/Bio/Graphics.html +247 -0
- data/doc/classes/Bio/Graphics/Panel.html +344 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000005.html +29 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000006.html +19 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000007.html +67 -0
- data/doc/classes/Bio/Graphics/Panel/Ruler.html +238 -0
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000008.html +20 -0
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000009.html +28 -0
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000010.html +54 -0
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000013.html +20 -0
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000014.html +28 -0
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000015.html +59 -0
- data/doc/classes/Bio/Graphics/Panel/Track.html +342 -0
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000008.html +23 -0
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000009.html +42 -0
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000010.html +285 -0
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000011.html +23 -0
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000012.html +43 -0
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000013.html +259 -0
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.html +292 -0
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.src/M000011.html +65 -0
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.src/M000014.html +65 -0
- data/doc/classes/Bio/Graphics/Panel/Track/Feature/PixelRange.html +155 -0
- data/doc/classes/Bio/Graphics/Panel/Track/Feature/PixelRange.src/M000012.html +18 -0
- data/doc/classes/Bio/Graphics/Panel/Track/Feature/PixelRange.src/M000015.html +18 -0
- data/doc/classes/ImageMap.html +185 -0
- data/doc/classes/ImageMap.src/M000001.html +18 -0
- data/doc/classes/ImageMap.src/M000002.html +24 -0
- data/doc/classes/ImageMap/ImageMapElement.html +187 -0
- data/doc/classes/ImageMap/ImageMapElement.src/M000003.html +19 -0
- data/doc/classes/ImageMap/ImageMapElement.src/M000004.html +20 -0
- data/doc/created.rid +1 -0
- data/doc/files/README_DEV.html +432 -0
- data/doc/files/TUTORIAL.html +358 -0
- data/doc/files/lib/bio-graphics_rb.html +121 -0
- data/doc/files/lib/bio/graphics/feature_rb.html +113 -0
- data/doc/files/lib/bio/graphics/image_map_rb.html +113 -0
- data/doc/files/lib/bio/graphics/panel_rb.html +113 -0
- data/doc/files/lib/bio/graphics/ruler_rb.html +113 -0
- data/doc/files/lib/bio/graphics/track_rb.html +113 -0
- data/doc/fr_class_index.html +35 -0
- data/doc/fr_file_index.html +34 -0
- data/doc/fr_method_index.html +41 -0
- data/doc/images/example.png +0 -0
- data/doc/images/glyph_showcase.png +0 -0
- data/doc/images/terms.png +0 -0
- data/doc/images/terms.svg +166 -0
- data/doc/index.html +24 -0
- data/images/example.png +0 -0
- data/images/glyph_showcase.png +0 -0
- data/images/terms.png +0 -0
- data/images/terms.svg +166 -0
- data/lib/bio-graphics.rb +18 -0
- data/lib/bio/graphics/feature.rb +136 -0
- data/lib/bio/graphics/image_map.rb +37 -0
- data/lib/bio/graphics/panel.rb +205 -0
- data/lib/bio/graphics/ruler.rb +96 -0
- data/lib/bio/graphics/track.rb +387 -0
- data/samples/arkdb_features.rb +37 -0
- data/samples/data.txt +32 -0
- data/samples/glyph_showcase.rb +29 -0
- metadata +137 -0
@@ -0,0 +1,135 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Bio</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Bio</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/bio/graphics/panel_rb.html">
|
59
|
+
lib/bio/graphics/panel.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/lib/bio/graphics/ruler_rb.html">
|
63
|
+
lib/bio/graphics/ruler.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/lib/bio/graphics/feature_rb.html">
|
67
|
+
lib/bio/graphics/feature.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../files/lib/bio/graphics/track_rb.html">
|
71
|
+
lib/bio/graphics/track.rb
|
72
|
+
</a>
|
73
|
+
<br />
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
|
77
|
+
</table>
|
78
|
+
</div>
|
79
|
+
<!-- banner header -->
|
80
|
+
|
81
|
+
<div id="bodyContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<div id="contextContent">
|
86
|
+
|
87
|
+
<div id="description">
|
88
|
+
<h1>bio/graphics/track - track class</h1>
|
89
|
+
<table>
|
90
|
+
<tr><td valign="top">Copyright:</td><td>Copyright (C) 2007 Jan Aerts <jan.aerts@bbsrc.ac.uk>
|
91
|
+
|
92
|
+
</td></tr>
|
93
|
+
<tr><td valign="top">License:</td><td>The Ruby License
|
94
|
+
|
95
|
+
</td></tr>
|
96
|
+
</table>
|
97
|
+
|
98
|
+
</div>
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if includes -->
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
<div id="class-list">
|
112
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
113
|
+
|
114
|
+
Module <a href="Bio/Graphics.html" class="link">Bio::Graphics</a><br />
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<!-- if method_list -->
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
|
129
|
+
|
130
|
+
<div id="validator-badges">
|
131
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</body>
|
135
|
+
</html>
|
@@ -0,0 +1,247 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Bio::Graphics</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Bio::Graphics</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/bio/graphics/panel_rb.html">
|
59
|
+
lib/bio/graphics/panel.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../../files/lib/bio/graphics/ruler_rb.html">
|
63
|
+
lib/bio/graphics/ruler.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../../files/lib/bio/graphics/feature_rb.html">
|
67
|
+
lib/bio/graphics/feature.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../../files/lib/bio/graphics/track_rb.html">
|
71
|
+
lib/bio/graphics/track.rb
|
72
|
+
</a>
|
73
|
+
<br />
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
|
77
|
+
</table>
|
78
|
+
</div>
|
79
|
+
<!-- banner header -->
|
80
|
+
|
81
|
+
<div id="bodyContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<div id="contextContent">
|
86
|
+
|
87
|
+
<div id="description">
|
88
|
+
<h1>DESCRIPTION</h1>
|
89
|
+
<p>
|
90
|
+
The <a href="Graphics.html">Bio::Graphics</a> set of objects allow for
|
91
|
+
creating simple images that display features on a linear map. A picture
|
92
|
+
consists of:
|
93
|
+
</p>
|
94
|
+
<ul>
|
95
|
+
<li>one <b>panel</b>: container of all tracks
|
96
|
+
|
97
|
+
</li>
|
98
|
+
<li>one or more <b>tracks</b>: container of the features. Multiple tracks can
|
99
|
+
exist in the same graphic to allow for differential visualization of
|
100
|
+
different feature types (e.g. genes as blue rectangles and polymorphisms as
|
101
|
+
red triangles)
|
102
|
+
|
103
|
+
</li>
|
104
|
+
<li>one or more <b>features</b> in each track: these are the actual features
|
105
|
+
that you want to display (e.g. ‘gene 1’, ‘SNP
|
106
|
+
123445’)
|
107
|
+
|
108
|
+
</li>
|
109
|
+
<li>a <b>ruler</b> on top of the panel: is added automatically
|
110
|
+
|
111
|
+
</li>
|
112
|
+
</ul>
|
113
|
+
<p>
|
114
|
+
Schematically:
|
115
|
+
</p>
|
116
|
+
<pre>
|
117
|
+
panel
|
118
|
+
+-> track 1
|
119
|
+
| +-> feature 1
|
120
|
+
| +-> feature 2
|
121
|
+
| +-> feature 3
|
122
|
+
+-> track 2
|
123
|
+
| +-> feature 4
|
124
|
+
| +-> feature 5
|
125
|
+
+-> ruler
|
126
|
+
</pre>
|
127
|
+
<h1>USAGE</h1>
|
128
|
+
<pre>
|
129
|
+
# Create a panel for something with a length of 653. This could be a
|
130
|
+
# sequence of 653 bp, but also a genetic map of 653 cM.
|
131
|
+
g = Bio::Graphics::Panel.new(653)
|
132
|
+
|
133
|
+
# Add the first track (e.g. 'genes')
|
134
|
+
track1 = g.add_track('genes')
|
135
|
+
|
136
|
+
# And put features in that track
|
137
|
+
track1.add_feature('gene1',250,375)
|
138
|
+
track1.add_feature('gene2',54,124)
|
139
|
+
track1.add_feature('gene3',100,500)
|
140
|
+
|
141
|
+
# Add a second track (e.g. 'polymorphisms')
|
142
|
+
track2 = g.add_track('polymorphisms','red','triangle')
|
143
|
+
|
144
|
+
# And put features on this one
|
145
|
+
track2.add_feature('polymorphism 1',56,56)
|
146
|
+
track2.add_feature('polymorphism 2',103,103)
|
147
|
+
|
148
|
+
# Create the actual image as SVG text
|
149
|
+
g.draw('my_picture.png')
|
150
|
+
</pre>
|
151
|
+
<h1>FUTURE PROSPECTS</h1>
|
152
|
+
<p>
|
153
|
+
Any help from other developers is welcomed to work on these features:
|
154
|
+
</p>
|
155
|
+
<ul>
|
156
|
+
<li>Would be nice if this module would be easily accessible from any object
|
157
|
+
that implements bioruby‘s Bio::Map::ActsAsMap.
|
158
|
+
|
159
|
+
</li>
|
160
|
+
</ul>
|
161
|
+
|
162
|
+
</div>
|
163
|
+
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
|
168
|
+
</div>
|
169
|
+
|
170
|
+
|
171
|
+
<!-- if includes -->
|
172
|
+
|
173
|
+
<div id="section">
|
174
|
+
|
175
|
+
<div id="class-list">
|
176
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
177
|
+
|
178
|
+
Class <a href="Graphics/Panel.html" class="link">Bio::Graphics::Panel</a><br />
|
179
|
+
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div id="constants-list">
|
183
|
+
<h3 class="section-bar">Constants</h3>
|
184
|
+
|
185
|
+
<div class="name-list">
|
186
|
+
<table summary="Constants">
|
187
|
+
<tr class="top-aligned-row context-row">
|
188
|
+
<td class="context-item-name">DEFAULT_PANEL_WIDTH</td>
|
189
|
+
<td>=</td>
|
190
|
+
<td class="context-item-value">800</td>
|
191
|
+
<td width="3em"> </td>
|
192
|
+
<td class="context-item-desc">
|
193
|
+
The defaults
|
194
|
+
|
195
|
+
</td>
|
196
|
+
</tr>
|
197
|
+
<tr class="top-aligned-row context-row">
|
198
|
+
<td class="context-item-name">TRACK_HEADER_HEIGHT</td>
|
199
|
+
<td>=</td>
|
200
|
+
<td class="context-item-value">12</td>
|
201
|
+
</tr>
|
202
|
+
<tr class="top-aligned-row context-row">
|
203
|
+
<td class="context-item-name">FEATURE_HEIGHT</td>
|
204
|
+
<td>=</td>
|
205
|
+
<td class="context-item-value">10</td>
|
206
|
+
</tr>
|
207
|
+
<tr class="top-aligned-row context-row">
|
208
|
+
<td class="context-item-name">FEATURE_V_DISTANCE</td>
|
209
|
+
<td>=</td>
|
210
|
+
<td class="context-item-value">5</td>
|
211
|
+
</tr>
|
212
|
+
<tr class="top-aligned-row context-row">
|
213
|
+
<td class="context-item-name">FEATURE_ARROW_LENGTH</td>
|
214
|
+
<td>=</td>
|
215
|
+
<td class="context-item-value">5</td>
|
216
|
+
</tr>
|
217
|
+
<tr class="top-aligned-row context-row">
|
218
|
+
<td class="context-item-name">RULER_TEXT_HEIGHT</td>
|
219
|
+
<td>=</td>
|
220
|
+
<td class="context-item-value">10</td>
|
221
|
+
</tr>
|
222
|
+
<tr class="top-aligned-row context-row">
|
223
|
+
<td class="context-item-name">RULER_MIN_DISTANCE_TICKS_PIXEL</td>
|
224
|
+
<td>=</td>
|
225
|
+
<td class="context-item-value">5</td>
|
226
|
+
</tr>
|
227
|
+
</table>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
<!-- if method_list -->
|
237
|
+
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
|
242
|
+
<div id="validator-badges">
|
243
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
</body>
|
247
|
+
</html>
|
@@ -0,0 +1,344 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Bio::Graphics::Panel</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Bio::Graphics::Panel</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/bio/graphics/panel_rb.html">
|
59
|
+
lib/bio/graphics/panel.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../../../files/lib/bio/graphics/ruler_rb.html">
|
63
|
+
lib/bio/graphics/ruler.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../../../files/lib/bio/graphics/feature_rb.html">
|
67
|
+
lib/bio/graphics/feature.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../../../files/lib/bio/graphics/track_rb.html">
|
71
|
+
lib/bio/graphics/track.rb
|
72
|
+
</a>
|
73
|
+
<br />
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
|
77
|
+
<tr class="top-aligned-row">
|
78
|
+
<td><strong>Parent:</strong></td>
|
79
|
+
<td>
|
80
|
+
Object
|
81
|
+
</td>
|
82
|
+
</tr>
|
83
|
+
</table>
|
84
|
+
</div>
|
85
|
+
<!-- banner header -->
|
86
|
+
|
87
|
+
<div id="bodyContent">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
<div id="contextContent">
|
92
|
+
|
93
|
+
<div id="description">
|
94
|
+
<p>
|
95
|
+
The <a href="Panel.html">Bio::Graphics::Panel</a> class describes the
|
96
|
+
complete graph and contains all tracks. See <a
|
97
|
+
href="../Graphics.html">Bio::Graphics</a> documentation for explanation of
|
98
|
+
interplay between different classes.
|
99
|
+
</p>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<div id="method-list">
|
107
|
+
<h3 class="section-bar">Methods</h3>
|
108
|
+
|
109
|
+
<div class="name-list">
|
110
|
+
<a href="#M000006">add_track</a>
|
111
|
+
<a href="#M000007">draw</a>
|
112
|
+
<a href="#M000005">new</a>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
|
119
|
+
<!-- if includes -->
|
120
|
+
|
121
|
+
<div id="section">
|
122
|
+
|
123
|
+
<div id="class-list">
|
124
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
125
|
+
|
126
|
+
Class <a href="Panel/Ruler.html" class="link">Bio::Graphics::Panel::Ruler</a><br />
|
127
|
+
Class <a href="Panel/Track.html" class="link">Bio::Graphics::Panel::Track</a><br />
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<div id="attribute-list">
|
135
|
+
<h3 class="section-bar">Attributes</h3>
|
136
|
+
|
137
|
+
<div class="name-list">
|
138
|
+
<table>
|
139
|
+
<tr class="top-aligned-row context-row">
|
140
|
+
<td class="context-item-name">clickable</td>
|
141
|
+
<td class="context-item-value"> [RW] </td>
|
142
|
+
<td class="context-item-desc"></td>
|
143
|
+
</tr>
|
144
|
+
<tr class="top-aligned-row context-row">
|
145
|
+
<td class="context-item-name">display_start</td>
|
146
|
+
<td class="context-item-value"> [RW] </td>
|
147
|
+
<td class="context-item-desc"></td>
|
148
|
+
</tr>
|
149
|
+
<tr class="top-aligned-row context-row">
|
150
|
+
<td class="context-item-name">display_stop</td>
|
151
|
+
<td class="context-item-value"> [RW] </td>
|
152
|
+
<td class="context-item-desc"></td>
|
153
|
+
</tr>
|
154
|
+
<tr class="top-aligned-row context-row">
|
155
|
+
<td class="context-item-name">height</td>
|
156
|
+
<td class="context-item-value"> [RW] </td>
|
157
|
+
<td class="context-item-desc"></td>
|
158
|
+
</tr>
|
159
|
+
<tr class="top-aligned-row context-row">
|
160
|
+
<td class="context-item-name">image_map</td>
|
161
|
+
<td class="context-item-value"> [RW] </td>
|
162
|
+
<td class="context-item-desc"></td>
|
163
|
+
</tr>
|
164
|
+
<tr class="top-aligned-row context-row">
|
165
|
+
<td class="context-item-name">length</td>
|
166
|
+
<td class="context-item-value"> [RW] </td>
|
167
|
+
<td class="context-item-desc"></td>
|
168
|
+
</tr>
|
169
|
+
<tr class="top-aligned-row context-row">
|
170
|
+
<td class="context-item-name">number_of_times_bumped</td>
|
171
|
+
<td class="context-item-value"> [RW] </td>
|
172
|
+
<td class="context-item-desc"></td>
|
173
|
+
</tr>
|
174
|
+
<tr class="top-aligned-row context-row">
|
175
|
+
<td class="context-item-name">rescale_factor</td>
|
176
|
+
<td class="context-item-value"> [RW] </td>
|
177
|
+
<td class="context-item-desc"></td>
|
178
|
+
</tr>
|
179
|
+
<tr class="top-aligned-row context-row">
|
180
|
+
<td class="context-item-name">tracks</td>
|
181
|
+
<td class="context-item-value"> [RW] </td>
|
182
|
+
<td class="context-item-desc"></td>
|
183
|
+
</tr>
|
184
|
+
<tr class="top-aligned-row context-row">
|
185
|
+
<td class="context-item-name">width</td>
|
186
|
+
<td class="context-item-value"> [RW] </td>
|
187
|
+
<td class="context-item-desc"></td>
|
188
|
+
</tr>
|
189
|
+
</table>
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<!-- if method_list -->
|
196
|
+
<div id="methods">
|
197
|
+
<h3 class="section-bar">Public Class methods</h3>
|
198
|
+
|
199
|
+
<div id="method-M000005" class="method-detail">
|
200
|
+
<a name="M000005"></a>
|
201
|
+
|
202
|
+
<div class="method-heading">
|
203
|
+
<a href="Panel.src/M000005.html" target="Code" class="method-signature"
|
204
|
+
onclick="popupCode('Panel.src/M000005.html');return false;">
|
205
|
+
<span class="method-name">new</span><span class="method-args">(length, width = DEFAULT_PANEL_WIDTH, clickable = false, display_start = nil, display_stop = nil)</span>
|
206
|
+
</a>
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<div class="method-description">
|
210
|
+
<p>
|
211
|
+
Create a <a href="Panel.html#M000005">new</a> <a
|
212
|
+
href="Panel.html">Bio::Graphics::Panel</a> object
|
213
|
+
</p>
|
214
|
+
<pre>
|
215
|
+
g = Bio::Graphics::Panel.new(456)
|
216
|
+
</pre>
|
217
|
+
<p>
|
218
|
+
The height of the image is calculated automatically depending on how many
|
219
|
+
tracks and features it contains. The width of the image defaults to 800 pt
|
220
|
+
but can be set manually by using a second argument:
|
221
|
+
</p>
|
222
|
+
<pre>
|
223
|
+
g = Bio::Graphics::Panel.new(456, 400)
|
224
|
+
</pre>
|
225
|
+
<p>
|
226
|
+
See also: Bio::Graphics::Track, BioExt::Graphics::Feature
|
227
|
+
</p>
|
228
|
+
<hr size="1"></hr><p>
|
229
|
+
<b>Arguments</b>:
|
230
|
+
</p>
|
231
|
+
<ul>
|
232
|
+
<li><em>length</em> :: length of the thing you want to visualize, e.g for
|
233
|
+
visualizing a sequence that is 3.24 kb long, use 324.
|
234
|
+
|
235
|
+
</li>
|
236
|
+
<li><em>width</em> :: width of the resulting image in pt. This should be a
|
237
|
+
string and not an integer. Default = ‘800’ (Notice the
|
238
|
+
quotes…).
|
239
|
+
|
240
|
+
</li>
|
241
|
+
<li><em>clickable</em> :: whether the picture should have clickable glyphs or
|
242
|
+
not (default: false) If set to true, a html file will be created with the
|
243
|
+
map.
|
244
|
+
|
245
|
+
</li>
|
246
|
+
<li><em>display_start</em> :: start coordinate to be displayed (default: 1)
|
247
|
+
|
248
|
+
</li>
|
249
|
+
<li><em>display_stop</em> :: stop coordinate to be displayed (default: length
|
250
|
+
of sequence)
|
251
|
+
|
252
|
+
</li>
|
253
|
+
</ul>
|
254
|
+
<table>
|
255
|
+
<tr><td valign="top"><b>Returns</b>:</td><td><a href="Panel.html">Bio::Graphics::Panel</a> object
|
256
|
+
|
257
|
+
</td></tr>
|
258
|
+
</table>
|
259
|
+
</div>
|
260
|
+
</div>
|
261
|
+
|
262
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
263
|
+
|
264
|
+
<div id="method-M000006" class="method-detail">
|
265
|
+
<a name="M000006"></a>
|
266
|
+
|
267
|
+
<div class="method-heading">
|
268
|
+
<a href="Panel.src/M000006.html" target="Code" class="method-signature"
|
269
|
+
onclick="popupCode('Panel.src/M000006.html');return false;">
|
270
|
+
<span class="method-name">add_track</span><span class="method-args">(name, feature_colour = [0,0,1], feature_glyph = 'generic')</span>
|
271
|
+
</a>
|
272
|
+
</div>
|
273
|
+
|
274
|
+
<div class="method-description">
|
275
|
+
<p>
|
276
|
+
Adds a Bio::Graphics::Track container to this panel. A panel contains a
|
277
|
+
logical grouping of features, e.g. (for sequence annotation:) genes,
|
278
|
+
polymorphisms, ESTs, etc.
|
279
|
+
</p>
|
280
|
+
<pre>
|
281
|
+
est_track = g.add_track('ESTs')
|
282
|
+
gene_track = g.add_track('genes')
|
283
|
+
</pre>
|
284
|
+
<hr size="1"></hr><p>
|
285
|
+
<b>Arguments</b>:
|
286
|
+
</p>
|
287
|
+
<ul>
|
288
|
+
<li><em>name</em> (required) :: Name of the track to be displayed (e.g.
|
289
|
+
‘genes’)
|
290
|
+
|
291
|
+
</li>
|
292
|
+
<li><em>colour</em> :: Colour to be used to <a
|
293
|
+
href="Panel.html#M000007">draw</a> the features within the track. Default =
|
294
|
+
‘blue‘
|
295
|
+
|
296
|
+
</li>
|
297
|
+
<li><em>glyph</em> :: Glyph to use for drawing the features. Options are:
|
298
|
+
‘generic’, ‘directed_generic’,
|
299
|
+
‘spliced’, ‘directed_spliced’ and
|
300
|
+
‘triangle’. Triangles can be used for features whose start and
|
301
|
+
stop positions are the same (e.g. SNPs). If you try to <a
|
302
|
+
href="Panel.html#M000007">draw</a> a feature that is longer with triangles,
|
303
|
+
an error will be shown.
|
304
|
+
|
305
|
+
</li>
|
306
|
+
</ul>
|
307
|
+
<table>
|
308
|
+
<tr><td valign="top"><b>Returns</b>:</td><td>Bio::Graphics::Track object that has just been created
|
309
|
+
|
310
|
+
</td></tr>
|
311
|
+
</table>
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
|
315
|
+
<div id="method-M000007" class="method-detail">
|
316
|
+
<a name="M000007"></a>
|
317
|
+
|
318
|
+
<div class="method-heading">
|
319
|
+
<a href="Panel.src/M000007.html" target="Code" class="method-signature"
|
320
|
+
onclick="popupCode('Panel.src/M000007.html');return false;">
|
321
|
+
<span class="method-name">draw</span><span class="method-args">(file_name)</span>
|
322
|
+
</a>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div class="method-description">
|
326
|
+
<p>
|
327
|
+
Create the drawing
|
328
|
+
</p>
|
329
|
+
</div>
|
330
|
+
</div>
|
331
|
+
|
332
|
+
|
333
|
+
</div>
|
334
|
+
|
335
|
+
|
336
|
+
</div>
|
337
|
+
|
338
|
+
|
339
|
+
<div id="validator-badges">
|
340
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
341
|
+
</div>
|
342
|
+
|
343
|
+
</body>
|
344
|
+
</html>
|