bio-graphics 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,292 @@
|
|
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::Track::Feature</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::Track::Feature</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../../files/lib/bio/graphics/feature_rb.html">
|
59
|
+
lib/bio/graphics/feature.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
The Bio::Graphics::Track::Feature class describes features to be placed on
|
84
|
+
the graph. See <a href="../../../Graphics.html">Bio::Graphics</a>
|
85
|
+
documentation for explanation of interplay between different classes.
|
86
|
+
</p>
|
87
|
+
<p>
|
88
|
+
The position of the <a href="Feature.html">Feature</a> is a Bio::Locations
|
89
|
+
object to make it possible to transparently work with simple and spliced
|
90
|
+
features.
|
91
|
+
</p>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<div id="method-list">
|
99
|
+
<h3 class="section-bar">Methods</h3>
|
100
|
+
|
101
|
+
<div class="name-list">
|
102
|
+
<a href="#M000011">new</a>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
|
108
|
+
|
109
|
+
<!-- if includes -->
|
110
|
+
|
111
|
+
<div id="section">
|
112
|
+
|
113
|
+
<div id="class-list">
|
114
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
115
|
+
|
116
|
+
Class <a href="Feature/PixelRange.html" class="link">Bio::Graphics::Panel::Track::Feature::PixelRange</a><br />
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<div id="attribute-list">
|
124
|
+
<h3 class="section-bar">Attributes</h3>
|
125
|
+
|
126
|
+
<div class="name-list">
|
127
|
+
<table>
|
128
|
+
<tr class="top-aligned-row context-row">
|
129
|
+
<td class="context-item-name">chopped_at_start</td>
|
130
|
+
<td class="context-item-value"> [RW] </td>
|
131
|
+
<td class="context-item-desc">
|
132
|
+
Is the first subfeature incomplete?
|
133
|
+
|
134
|
+
</td>
|
135
|
+
</tr>
|
136
|
+
<tr class="top-aligned-row context-row">
|
137
|
+
<td class="context-item-name">chopped_at_stop</td>
|
138
|
+
<td class="context-item-value"> [RW] </td>
|
139
|
+
<td class="context-item-desc">
|
140
|
+
Is the last subfeature incomplete?
|
141
|
+
|
142
|
+
</td>
|
143
|
+
</tr>
|
144
|
+
<tr class="top-aligned-row context-row">
|
145
|
+
<td class="context-item-name">hidden_subfeatures_at_start</td>
|
146
|
+
<td class="context-item-value"> [RW] </td>
|
147
|
+
<td class="context-item-desc">
|
148
|
+
Are there subfeatures out of view at the left side of the picture?
|
149
|
+
|
150
|
+
</td>
|
151
|
+
</tr>
|
152
|
+
<tr class="top-aligned-row context-row">
|
153
|
+
<td class="context-item-name">hidden_subfeatures_at_stop</td>
|
154
|
+
<td class="context-item-value"> [RW] </td>
|
155
|
+
<td class="context-item-desc">
|
156
|
+
Are there subfeatures out of view at the right side of the picture?
|
157
|
+
|
158
|
+
</td>
|
159
|
+
</tr>
|
160
|
+
<tr class="top-aligned-row context-row">
|
161
|
+
<td class="context-item-name">link</td>
|
162
|
+
<td class="context-item-value"> [RW] </td>
|
163
|
+
<td class="context-item-desc">
|
164
|
+
The URL to be followed when the glyph for this feature is clicked
|
165
|
+
|
166
|
+
</td>
|
167
|
+
</tr>
|
168
|
+
<tr class="top-aligned-row context-row">
|
169
|
+
<td class="context-item-name">location</td>
|
170
|
+
<td class="context-item-value"> [RW] </td>
|
171
|
+
<td class="context-item-desc">
|
172
|
+
The location of the feature (which is a Bio::Locations object)
|
173
|
+
|
174
|
+
</td>
|
175
|
+
</tr>
|
176
|
+
<tr class="top-aligned-row context-row">
|
177
|
+
<td class="context-item-name">name</td>
|
178
|
+
<td class="context-item-value"> [RW] </td>
|
179
|
+
<td class="context-item-desc">
|
180
|
+
The name of the feature
|
181
|
+
|
182
|
+
</td>
|
183
|
+
</tr>
|
184
|
+
<tr class="top-aligned-row context-row">
|
185
|
+
<td class="context-item-name">pixel_range_collection</td>
|
186
|
+
<td class="context-item-value"> [RW] </td>
|
187
|
+
<td class="context-item-desc">
|
188
|
+
The array keeping the pixel ranges for the sub-features. Unspliced features
|
189
|
+
will just have one element, while spliced features will have more than one.
|
190
|
+
|
191
|
+
</td>
|
192
|
+
</tr>
|
193
|
+
<tr class="top-aligned-row context-row">
|
194
|
+
<td class="context-item-name">start</td>
|
195
|
+
<td class="context-item-value"> [RW] </td>
|
196
|
+
<td class="context-item-desc">
|
197
|
+
The start position of the feature (in bp)
|
198
|
+
|
199
|
+
</td>
|
200
|
+
</tr>
|
201
|
+
<tr class="top-aligned-row context-row">
|
202
|
+
<td class="context-item-name">stop</td>
|
203
|
+
<td class="context-item-value"> [RW] </td>
|
204
|
+
<td class="context-item-desc">
|
205
|
+
The stop position of the feature (in bp)
|
206
|
+
|
207
|
+
</td>
|
208
|
+
</tr>
|
209
|
+
<tr class="top-aligned-row context-row">
|
210
|
+
<td class="context-item-name">strand</td>
|
211
|
+
<td class="context-item-value"> [RW] </td>
|
212
|
+
<td class="context-item-desc">
|
213
|
+
The strand of the feature
|
214
|
+
|
215
|
+
</td>
|
216
|
+
</tr>
|
217
|
+
<tr class="top-aligned-row context-row">
|
218
|
+
<td class="context-item-name">track</td>
|
219
|
+
<td class="context-item-value"> [RW] </td>
|
220
|
+
<td class="context-item-desc">
|
221
|
+
The track that this feature belongs to
|
222
|
+
|
223
|
+
</td>
|
224
|
+
</tr>
|
225
|
+
</table>
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<!-- if method_list -->
|
232
|
+
<div id="methods">
|
233
|
+
<h3 class="section-bar">Public Class methods</h3>
|
234
|
+
|
235
|
+
<div id="method-M000011" class="method-detail">
|
236
|
+
<a name="M000011"></a>
|
237
|
+
|
238
|
+
<div class="method-heading">
|
239
|
+
<a href="Feature.src/M000011.html" target="Code" class="method-signature"
|
240
|
+
onclick="popupCode('Feature.src/M000011.html');return false;">
|
241
|
+
<span class="method-name">new</span><span class="method-args">(track, name, location = Bio::Locations.new('1..' + track.panel.length.to_s), link = nil)</span>
|
242
|
+
</a>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
<div class="method-description">
|
246
|
+
<p>
|
247
|
+
!!Not to be used directly. Use <a
|
248
|
+
href="../Track.html#M000009">Bio::Graphics::Panel::Track.add_feature</a>
|
249
|
+
instead!! A feature can not exist except within the confines of a <a
|
250
|
+
href="../Track.html">Bio::Graphics::Panel::Track</a> object.
|
251
|
+
</p>
|
252
|
+
<hr size="1"></hr><p>
|
253
|
+
<b>Arguments</b>:
|
254
|
+
</p>
|
255
|
+
<ul>
|
256
|
+
<li><em>panel</em> (required) :: <a
|
257
|
+
href="../Track.html">Bio::Graphics::Panel::Track</a> object that this
|
258
|
+
feature belongs to
|
259
|
+
|
260
|
+
</li>
|
261
|
+
<li><em>name</em> (required) :: Name of the feature
|
262
|
+
|
263
|
+
</li>
|
264
|
+
<li><em>location</em> :: Bio::Locations object. Default = whole panel, forward
|
265
|
+
strand
|
266
|
+
|
267
|
+
</li>
|
268
|
+
<li><em>link</em> :: URL for clickable images
|
269
|
+
|
270
|
+
</li>
|
271
|
+
</ul>
|
272
|
+
<table>
|
273
|
+
<tr><td valign="top"><b>Returns</b>:</td><td>Bio::Graphics::Track::Feature object
|
274
|
+
|
275
|
+
</td></tr>
|
276
|
+
</table>
|
277
|
+
</div>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
|
281
|
+
</div>
|
282
|
+
|
283
|
+
|
284
|
+
</div>
|
285
|
+
|
286
|
+
|
287
|
+
<div id="validator-badges">
|
288
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
289
|
+
</div>
|
290
|
+
|
291
|
+
</body>
|
292
|
+
</html>
|
@@ -0,0 +1,65 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>new (Bio::Graphics::Panel::Track::Feature)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/bio/graphics/feature.rb, line 37</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">track</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">location</span> = <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Locations</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'1..'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>), <span class="ruby-identifier">link</span> = <span class="ruby-keyword kw">nil</span>)
|
15
|
+
<span class="ruby-ivar">@track</span> = <span class="ruby-identifier">track</span>
|
16
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
17
|
+
<span class="ruby-ivar">@location</span> = <span class="ruby-identifier">location</span>
|
18
|
+
<span class="ruby-ivar">@start</span> = <span class="ruby-identifier">location</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span>}.<span class="ruby-identifier">min</span>.<span class="ruby-identifier">to_i</span>
|
19
|
+
<span class="ruby-ivar">@stop</span> = <span class="ruby-identifier">location</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span>}.<span class="ruby-identifier">max</span>.<span class="ruby-identifier">to_i</span>
|
20
|
+
<span class="ruby-ivar">@strand</span> = <span class="ruby-identifier">location</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">strand</span>.<span class="ruby-identifier">to_i</span>
|
21
|
+
<span class="ruby-ivar">@link</span> = <span class="ruby-identifier">link</span>
|
22
|
+
<span class="ruby-ivar">@pixel_range_collection</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
23
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">false</span>
|
24
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
25
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">false</span>
|
26
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
27
|
+
|
28
|
+
<span class="ruby-comment cmt"># Get all pixel ranges for the subfeatures
|
29
|
+
<span class="ruby-identifier">location</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
30
|
+
<span class="ruby-comment cmt"># xxxxxx [ ]
|
31
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
32
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">true</span>
|
33
|
+
<span class="ruby-keyword kw">next</span>
|
34
|
+
<span class="ruby-comment cmt"># [ ] xxxxx
|
35
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
36
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
37
|
+
<span class="ruby-keyword kw">next</span>
|
38
|
+
<span class="ruby-comment cmt"># xxxx[xxx ]
|
39
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
40
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
41
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
42
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
43
|
+
<span class="ruby-comment cmt"># [ xxxx]xxxx
|
44
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
45
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
46
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
47
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
48
|
+
<span class="ruby-comment cmt"># xxxx[xxxxxxxxxx]xxxx
|
49
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
50
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
51
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
52
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
53
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
54
|
+
<span class="ruby-comment cmt"># [ xxxxx ]
|
55
|
+
<span class="ruby-keyword kw">else</span>
|
56
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
57
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
58
|
+
<span class="ruby-keyword kw">end</span>
|
59
|
+
|
60
|
+
<span class="ruby-ivar">@pixel_range_collection</span>.<span class="ruby-identifier">push</span>(<span class="ruby-constant">PixelRange</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">start_pixel</span>, <span class="ruby-identifier">stop_pixel</span>))
|
61
|
+
|
62
|
+
<span class="ruby-keyword kw">end</span>
|
63
|
+
<span class="ruby-keyword kw">end</span></pre>
|
64
|
+
</body>
|
65
|
+
</html>
|
@@ -0,0 +1,65 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>new (Bio::Graphics::Panel::Track::Feature)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/bio/graphics/feature.rb, line 36</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">track</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">location</span> = <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Locations</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'0..'</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">track</span>.<span class="ruby-identifier">width</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">rescale_factor</span>).<span class="ruby-identifier">to_s</span>), <span class="ruby-identifier">link</span> = <span class="ruby-keyword kw">nil</span>)
|
15
|
+
<span class="ruby-ivar">@track</span> = <span class="ruby-identifier">track</span>
|
16
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
17
|
+
<span class="ruby-ivar">@location</span> = <span class="ruby-identifier">location</span>
|
18
|
+
<span class="ruby-ivar">@start</span> = <span class="ruby-identifier">location</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span>}.<span class="ruby-identifier">min</span>.<span class="ruby-identifier">to_i</span>
|
19
|
+
<span class="ruby-ivar">@stop</span> = <span class="ruby-identifier">location</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span>}.<span class="ruby-identifier">max</span>.<span class="ruby-identifier">to_i</span>
|
20
|
+
<span class="ruby-ivar">@strand</span> = <span class="ruby-identifier">location</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">strand</span>.<span class="ruby-identifier">to_i</span>
|
21
|
+
<span class="ruby-ivar">@link</span> = <span class="ruby-identifier">link</span>
|
22
|
+
<span class="ruby-ivar">@pixel_range_collection</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
23
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">false</span>
|
24
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
25
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">false</span>
|
26
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
27
|
+
|
28
|
+
<span class="ruby-comment cmt"># Get all pixel ranges for the subfeatures
|
29
|
+
<span class="ruby-identifier">location</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
30
|
+
<span class="ruby-comment cmt"># xxxxxx [ ]
|
31
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
32
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">true</span>
|
33
|
+
<span class="ruby-keyword kw">next</span>
|
34
|
+
<span class="ruby-comment cmt"># [ ] xxxxx
|
35
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
36
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
37
|
+
<span class="ruby-keyword kw">next</span>
|
38
|
+
<span class="ruby-comment cmt"># xxxx[xxx ]
|
39
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
40
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
41
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
42
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
43
|
+
<span class="ruby-comment cmt"># [ xxxx]xxxx
|
44
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
45
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
46
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
47
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
48
|
+
<span class="ruby-comment cmt"># xxxx[xxxxxxxxxx]xxxx
|
49
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
50
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
51
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
52
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
53
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
54
|
+
<span class="ruby-comment cmt"># [ xxxxx ]
|
55
|
+
<span class="ruby-keyword kw">else</span>
|
56
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
57
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
58
|
+
<span class="ruby-keyword kw">end</span>
|
59
|
+
|
60
|
+
<span class="ruby-ivar">@pixel_range_collection</span>.<span class="ruby-identifier">push</span>(<span class="ruby-constant">PixelRange</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">start_pixel</span>, <span class="ruby-identifier">stop_pixel</span>))
|
61
|
+
|
62
|
+
<span class="ruby-keyword kw">end</span>
|
63
|
+
<span class="ruby-keyword kw">end</span></pre>
|
64
|
+
</body>
|
65
|
+
</html>
|
@@ -0,0 +1,155 @@
|
|
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::Track::Feature::PixelRange</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::Track::Feature::PixelRange</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../../../files/lib/bio/graphics/feature_rb.html">
|
59
|
+
lib/bio/graphics/feature.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000012">new</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
|
98
|
+
<div id="section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<div id="attribute-list">
|
105
|
+
<h3 class="section-bar">Attributes</h3>
|
106
|
+
|
107
|
+
<div class="name-list">
|
108
|
+
<table>
|
109
|
+
<tr class="top-aligned-row context-row">
|
110
|
+
<td class="context-item-name">start_pixel</td>
|
111
|
+
<td class="context-item-value"> [RW] </td>
|
112
|
+
<td class="context-item-desc"></td>
|
113
|
+
</tr>
|
114
|
+
<tr class="top-aligned-row context-row">
|
115
|
+
<td class="context-item-name">stop_pixel</td>
|
116
|
+
<td class="context-item-value"> [RW] </td>
|
117
|
+
<td class="context-item-desc"></td>
|
118
|
+
</tr>
|
119
|
+
</table>
|
120
|
+
</div>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<!-- if method_list -->
|
126
|
+
<div id="methods">
|
127
|
+
<h3 class="section-bar">Public Class methods</h3>
|
128
|
+
|
129
|
+
<div id="method-M000012" class="method-detail">
|
130
|
+
<a name="M000012"></a>
|
131
|
+
|
132
|
+
<div class="method-heading">
|
133
|
+
<a href="PixelRange.src/M000012.html" target="Code" class="method-signature"
|
134
|
+
onclick="popupCode('PixelRange.src/M000012.html');return false;">
|
135
|
+
<span class="method-name">new</span><span class="method-args">(start_pixel, stop_pixel)</span>
|
136
|
+
</a>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
</div>
|
148
|
+
|
149
|
+
|
150
|
+
<div id="validator-badges">
|
151
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
</body>
|
155
|
+
</html>
|