bio-svgenes 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +88 -0
- data/VERSION +1 -1
- data/bio-svgenes.gemspec +131 -8
- data/doc/classes/Bio.html +131 -0
- data/doc/classes/Bio/Graphics.html +142 -0
- data/doc/classes/Bio/Graphics/Glyph.html +987 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000001.html +26 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000002.html +27 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000003.html +32 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000004.html +27 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000005.html +25 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000006.html +29 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000007.html +107 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000008.html +51 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000009.html +23 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000010.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000011.html +75 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000012.html +51 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000013.html +23 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000014.html +26 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000015.html +27 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000016.html +32 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000017.html +27 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000018.html +25 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000019.html +29 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000020.html +107 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000021.html +51 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000022.html +23 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000023.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph.src/M000024.html +75 -0
- data/doc/classes/Bio/Graphics/MiniFeature.html +243 -0
- data/doc/classes/Bio/Graphics/MiniFeature.src/M000001.html +25 -0
- data/doc/classes/Bio/Graphics/MiniFeature.src/M000003.html +25 -0
- data/doc/classes/Bio/Graphics/MiniFeature.src/M000024.html +25 -0
- data/doc/classes/Bio/Graphics/Page.html +705 -0
- data/doc/classes/Bio/Graphics/Page.src/M000010.html +35 -0
- data/doc/classes/Bio/Graphics/Page.src/M000011.html +83 -0
- data/doc/classes/Bio/Graphics/Page.src/M000012.html +24 -0
- data/doc/classes/Bio/Graphics/Page.src/M000013.html +29 -0
- data/doc/classes/Bio/Graphics/Page.src/M000014.html +24 -0
- data/doc/classes/Bio/Graphics/Page.src/M000015.html +20 -0
- data/doc/classes/Bio/Graphics/Page.src/M000016.html +20 -0
- data/doc/classes/Bio/Graphics/Page.src/M000017.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000018.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000019.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000020.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000021.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000022.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000023.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000024.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000025.html +35 -0
- data/doc/classes/Bio/Graphics/Page.src/M000026.html +83 -0
- data/doc/classes/Bio/Graphics/Page.src/M000027.html +24 -0
- data/doc/classes/Bio/Graphics/Page.src/M000028.html +29 -0
- data/doc/classes/Bio/Graphics/Page.src/M000029.html +24 -0
- data/doc/classes/Bio/Graphics/Page.src/M000030.html +20 -0
- data/doc/classes/Bio/Graphics/Page.src/M000031.html +20 -0
- data/doc/classes/Bio/Graphics/Page.src/M000032.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000033.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000034.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000035.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000036.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000037.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000038.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000039.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000040.html +107 -0
- data/doc/classes/Bio/Graphics/Page.src/M000041.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000042.html +23 -0
- data/doc/classes/Bio/Graphics/Page.src/M000043.html +18 -0
- data/doc/classes/Bio/Graphics/Page.src/M000044.html +18 -0
- data/doc/classes/Bio/Graphics/Primitive.html +204 -0
- data/doc/classes/Bio/Graphics/Primitive.src/M000001.html +21 -0
- data/doc/classes/Bio/Graphics/Primitive.src/M000002.html +20 -0
- data/doc/classes/Bio/Graphics/Primitive.src/M000008.html +21 -0
- data/doc/classes/Bio/Graphics/Primitive.src/M000009.html +20 -0
- data/doc/classes/Bio/Graphics/Primitive.src/M000022.html +21 -0
- data/doc/classes/Bio/Graphics/Primitive.src/M000023.html +20 -0
- data/doc/classes/Bio/Graphics/SVGEE.html +290 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000002.html +24 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000003.html +18 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000004.html +24 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000005.html +18 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000006.html +18 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000007.html +21 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000008.html +27 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000009.html +23 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000016.html +24 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000017.html +18 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000018.html +18 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000019.html +21 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000020.html +27 -0
- data/doc/classes/Bio/Graphics/SVGEE.src/M000021.html +23 -0
- data/doc/classes/Bio/Graphics/Track.html +473 -0
- data/doc/classes/Bio/Graphics/Track.src/M000001.html +35 -0
- data/doc/classes/Bio/Graphics/Track.src/M000002.html +18 -0
- data/doc/classes/Bio/Graphics/Track.src/M000003.html +28 -0
- data/doc/classes/Bio/Graphics/Track.src/M000004.html +18 -0
- data/doc/classes/Bio/Graphics/Track.src/M000010.html +35 -0
- data/doc/classes/Bio/Graphics/Track.src/M000011.html +18 -0
- data/doc/classes/Bio/Graphics/Track.src/M000012.html +28 -0
- data/doc/classes/Bio/Graphics/Track.src/M000013.html +18 -0
- data/doc/created.rid +1 -9
- data/doc/files/lib/bio-svgenes_rb.html +131 -0
- data/doc/files/lib/bio/graphics/glyph_rb.html +101 -0
- data/doc/files/lib/bio/graphics/mini_feature_rb.html +101 -0
- data/doc/files/lib/bio/graphics/page_rb.html +111 -0
- data/doc/files/lib/bio/graphics/primitive_rb.html +101 -0
- data/doc/files/lib/bio/graphics/svgee_rb.html +101 -0
- data/doc/files/lib/bio/graphics/track_rb.html +101 -0
- data/doc/fr_class_index.html +34 -0
- data/doc/fr_file_index.html +33 -0
- data/doc/fr_method_index.html +70 -0
- data/doc/index.html +21 -91
- data/doc/manual/bootstrap/css/bootstrap-responsive.css +1109 -0
- data/doc/manual/bootstrap/css/bootstrap-responsive.min.css +9 -0
- data/doc/manual/bootstrap/css/bootstrap.css +6158 -0
- data/doc/manual/bootstrap/css/bootstrap.min.css +9 -0
- data/doc/manual/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/doc/manual/bootstrap/img/glyphicons-halflings.png +0 -0
- data/doc/manual/bootstrap/js/bootstrap.js +2276 -0
- data/doc/manual/bootstrap/js/bootstrap.min.js +6 -0
- data/doc/manual/img/circle.png +0 -0
- data/doc/manual/img/directed.png +0 -0
- data/doc/manual/img/down_triangle.png +0 -0
- data/doc/manual/img/histogram.png +0 -0
- data/doc/manual/img/span.png +0 -0
- data/doc/manual/img/transcript.png +0 -0
- data/doc/manual/img/up_triangle.png +0 -0
- data/doc/manual/manual.html +360 -0
- data/doc/manual/manual.md +307 -0
- data/doc/rdoc-style.css +208 -0
- data/examples/example.rb +12 -8
- data/examples/{make_example.rb → example2.rb} +5 -16
- data/lib/bio/graphics/glyph.rb +293 -126
- data/lib/bio/graphics/mini_feature.rb +24 -17
- data/lib/bio/graphics/page.rb +112 -54
- data/lib/bio/graphics/primitive.rb +12 -9
- data/lib/bio/graphics/svgee.rb +9 -11
- data/lib/bio/graphics/track.rb +92 -10
- metadata +132 -9
- data/README.rdoc +0 -19
- data/examples/annotate_snps.rb +0 -86
- data/examples/eg2.rb +0 -40
- data/examples/get_coverage_in_windows.rb +0 -176
@@ -0,0 +1,51 @@
|
|
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>scale (Bio::Graphics::Glyph)</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/glyph.rb, line 337</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scale</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">first_mark</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:start</span>]
|
16
|
+
<span class="ruby-identifier">last_mark</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:stop</span>]
|
17
|
+
<span class="ruby-comment cmt">#(num.to_f / @nt_per_px_x.to_f)</span>
|
18
|
+
<span class="ruby-identifier">full_dist</span> = <span class="ruby-identifier">last_mark</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">first_mark</span>
|
19
|
+
<span class="ruby-identifier">interval_width</span> = <span class="ruby-identifier">full_dist</span> <span class="ruby-operator">/</span> (<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:number_of_intervals</span>] <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)
|
20
|
+
|
21
|
+
|
22
|
+
<span class="ruby-identifier">a</span> = [<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:line</span>,
|
23
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
24
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
25
|
+
<span class="ruby-identifier">:x1</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>, <span class="ruby-identifier">:x2</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:page_width</span>],<span class="ruby-comment cmt"># * 1.1, </span>
|
26
|
+
<span class="ruby-identifier">:y1</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"20"</span>, <span class="ruby-identifier">:y2</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"20"</span> )]
|
27
|
+
|
28
|
+
|
29
|
+
<span class="ruby-identifier">marks</span> = (<span class="ruby-identifier">first_mark</span><span class="ruby-operator">..</span><span class="ruby-identifier">last_mark</span>).<span class="ruby-identifier">step</span>(<span class="ruby-identifier">interval_width</span>).<span class="ruby-identifier">to_a</span>
|
30
|
+
|
31
|
+
<span class="ruby-identifier">px_per_nt</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:page_width</span>].<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">full_dist</span>.<span class="ruby-identifier">to_f</span>
|
32
|
+
<span class="ruby-identifier">marks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mark</span><span class="ruby-operator">|</span>
|
33
|
+
<span class="ruby-identifier">x</span> = (<span class="ruby-identifier">mark</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">first_mark</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">px_per_nt</span>
|
34
|
+
<span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:rectangle</span>,
|
35
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">x</span>,
|
36
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-value">20</span>,
|
37
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
38
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
39
|
+
<span class="ruby-identifier">:width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
40
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">5</span> )
|
41
|
+
|
42
|
+
<span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span>,
|
43
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">x</span>,
|
44
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-value">40</span>, <span class="ruby-identifier">:fill</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
45
|
+
<span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">mark</span>,
|
46
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"font-family:Arial;font-style:italic"</span>)
|
47
|
+
<span class="ruby-keyword kw">end</span>
|
48
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">a</span>
|
49
|
+
<span class="ruby-keyword kw">end</span></pre>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
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>label (Bio::Graphics::Glyph)</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/glyph.rb, line 382</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">label</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span>,
|
16
|
+
<span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:text</span>],
|
17
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x</span>],
|
18
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>],
|
19
|
+
<span class="ruby-identifier">:fill</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
20
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"font-family:monospace;"</span>)]
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
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>generic (Bio::Graphics::Glyph)</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/glyph.rb, line 59</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">generic</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">args</span> = {
|
16
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>,
|
17
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'red'</span>,
|
18
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
19
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
20
|
+
<span class="ruby-identifier">:x_round</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
21
|
+
<span class="ruby-identifier">:y_round</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
22
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"fill-opacity:0.4;"</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
|
23
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:rectangle</span>, <span class="ruby-identifier">args</span>)]
|
24
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
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>circle (Bio::Graphics::Glyph)</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/glyph.rb, line 103</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">circle</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">args</span> = {
|
16
|
+
<span class="ruby-identifier">:radius</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>,
|
17
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'red'</span>,
|
18
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
19
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
20
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">""</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
|
21
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x_center</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x</span>]
|
22
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y_center</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>]
|
23
|
+
[<span class="ruby-identifier">:x</span>, <span class="ruby-identifier">:y</span>].<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)}
|
24
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:circle</span>, <span class="ruby-identifier">args</span>)]
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,32 @@
|
|
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>directed (Bio::Graphics::Glyph)</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/glyph.rb, line 151</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">directed</span>(<span class="ruby-identifier">args</span>) <span class="ruby-comment cmt">#:x, :y, :width :fill, :stroke :stroke_width, :style, :height</span>
|
15
|
+
<span class="ruby-identifier">args</span> = {
|
16
|
+
|
17
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>,
|
18
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'red'</span>,
|
19
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
20
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
21
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"fill-opacity:0.4;"</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
|
22
|
+
|
23
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:strand</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'-'</span>
|
24
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:points</span>] = <span class="ruby-node">"#{args[:x]},#{args[:y]} #{args[:x] + args[:width]},#{args[:y]} #{args[:x] + args[:width]},#{args[:y] + args[:height] } #{args[:x]},#{args[:y] + (args[:height])} #{args[:x] - (args[:height] * 0.2)},#{args[:y] + (args[:height]/2)}"</span>
|
25
|
+
<span class="ruby-keyword kw">else</span>
|
26
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:points</span>] = <span class="ruby-node">"#{args[:x]},#{args[:y]} #{args[:x] + args[:width] - (args[:height] * 0.2)},#{args[:y]} #{args[:x] + args[:width]},#{args[:y] + (args[:height]/2) } #{args[:x] + args[:width] - (args[:height] * 0.2)},#{args[:y] + args[:height]} #{args[:x]},#{args[:y] + args[:height]}"</span>
|
27
|
+
|
28
|
+
<span class="ruby-keyword kw">end</span>
|
29
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:polygon</span>, <span class="ruby-identifier">args</span>)]
|
30
|
+
<span class="ruby-keyword kw">end</span></pre>
|
31
|
+
</body>
|
32
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
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>down_triangle (Bio::Graphics::Glyph)</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/glyph.rb, line 200</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">down_triangle</span>(<span class="ruby-identifier">args</span>) <span class="ruby-comment cmt">#:x, :y, :width :fill, :stroke :stroke_width, :style, :height</span>
|
15
|
+
<span class="ruby-identifier">args</span> = {
|
16
|
+
|
17
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>,
|
18
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'red'</span>,
|
19
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
20
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
21
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"fill-opacity:0.4;"</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
|
22
|
+
|
23
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:points</span>] = <span class="ruby-node">"#{args[:x]},#{args[:y]} #{args[:x] + args[:width]},#{args[:y]} #{ args[:x] + (args[:width]/2) },#{(args[:y] + args[:height]) }"</span>
|
24
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:polygon</span>, <span class="ruby-identifier">args</span>)]
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
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>up_triangle (Bio::Graphics::Glyph)</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/glyph.rb, line 245</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">up_triangle</span>(<span class="ruby-identifier">args</span>) <span class="ruby-comment cmt">#:x, :y, :width :fill, :stroke :stroke_width, :style, :height</span>
|
15
|
+
<span class="ruby-identifier">args</span> = {
|
16
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>,
|
17
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'red'</span>,
|
18
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
19
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
20
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"fill-opacity:0.4;"</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
|
21
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:points</span>] = <span class="ruby-node">"#{args[:x]},#{args[:y] + args[:height]} #{args[:x] + args[:width]},#{args[:y] + args[:height]} #{ args[:x] + (args[:width]/2) },#{args[:y] }"</span>
|
22
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:polygon</span>, <span class="ruby-identifier">args</span>)]
|
23
|
+
<span class="ruby-keyword kw">end</span></pre>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1,29 @@
|
|
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>span (Bio::Graphics::Glyph)</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/glyph.rb, line 289</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">span</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">args</span> = {
|
16
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>,
|
17
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'red'</span>,
|
18
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
19
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
20
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"fill-opacity:1;"</span>
|
21
|
+
}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
|
22
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x1</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x</span>]
|
23
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x2</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:width</span>]
|
24
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y1</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>]
|
25
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y2</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>]
|
26
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:line</span>, <span class="ruby-identifier">args</span>)]
|
27
|
+
<span class="ruby-keyword kw">end</span></pre>
|
28
|
+
</body>
|
29
|
+
</html>
|
@@ -0,0 +1,107 @@
|
|
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>transcript (Bio::Graphics::Glyph)</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/glyph.rb, line 366</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">transcript</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">args</span> = {
|
16
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>,
|
17
|
+
<span class="ruby-identifier">:utr_fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
18
|
+
<span class="ruby-identifier">:utr_stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
19
|
+
<span class="ruby-identifier">:utr_stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
20
|
+
<span class="ruby-identifier">:exon_fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'red'</span>,
|
21
|
+
<span class="ruby-identifier">:exon_stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
22
|
+
<span class="ruby-identifier">:exon_stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
23
|
+
<span class="ruby-identifier">:line_color</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
24
|
+
<span class="ruby-identifier">:line_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
25
|
+
<span class="ruby-identifier">:exon_style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"fill-opacity:0.4;"</span>,
|
26
|
+
<span class="ruby-identifier">:utr_style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">""</span>,
|
27
|
+
<span class="ruby-identifier">:line_style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">""</span>,
|
28
|
+
<span class="ruby-identifier">:block_gaps</span> =<span class="ruby-operator">></span> <span class="ruby-value str">""</span>,
|
29
|
+
<span class="ruby-identifier">:gap_marker</span> =<span class="ruby-operator">></span> <span class="ruby-value str">""</span>
|
30
|
+
}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
|
31
|
+
|
32
|
+
<span class="ruby-identifier">composite</span> = []
|
33
|
+
|
34
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utrs</span>].<span class="ruby-identifier">empty?</span> <span class="ruby-comment cmt">##draw the utr as terminal element...##terminal utr is the one with the point on...</span>
|
35
|
+
<span class="ruby-identifier">x</span>,<span class="ruby-identifier">width</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:strand</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'-'</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utrs</span>].<span class="ruby-identifier">shift</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utrs</span>].<span class="ruby-identifier">pop</span>
|
36
|
+
<span class="ruby-identifier">composite</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Glyph</span>.<span class="ruby-identifier">directed</span>(<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">x</span>,
|
37
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>],
|
38
|
+
<span class="ruby-identifier">:width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">width</span>,
|
39
|
+
<span class="ruby-identifier">:strand</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:strand</span>],
|
40
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:height</span>],
|
41
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_fill_color</span>],
|
42
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span><span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_stroke</span>],
|
43
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_stroke_width</span>],
|
44
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_style</span>] )
|
45
|
+
<span class="ruby-comment cmt">##draw the other(s!) </span>
|
46
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utrs</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">utr</span><span class="ruby-operator">|</span>
|
47
|
+
<span class="ruby-identifier">composite</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:rectangle</span>, {
|
48
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">utr</span>.<span class="ruby-identifier">first</span>,
|
49
|
+
<span class="ruby-identifier">:width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">utr</span>.<span class="ruby-identifier">last</span>,
|
50
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>],
|
51
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:height</span>],
|
52
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_fill_color</span>],
|
53
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span><span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_stroke</span>],
|
54
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_stroke_width</span>],
|
55
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:utr_style</span>]} )
|
56
|
+
<span class="ruby-keyword kw">end</span>
|
57
|
+
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt">## draw the terminal exon as terminal element </span>
|
58
|
+
<span class="ruby-identifier">points</span> = <span class="ruby-keyword kw">nil</span>
|
59
|
+
<span class="ruby-identifier">x</span>,<span class="ruby-identifier">width</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:strand</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'-'</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exons</span>].<span class="ruby-identifier">shift</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exons</span>].<span class="ruby-identifier">pop</span>
|
60
|
+
<span class="ruby-identifier">composite</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Glyph</span>.<span class="ruby-identifier">directed</span>(<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">x</span>,
|
61
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>],
|
62
|
+
<span class="ruby-identifier">:width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">width</span>,
|
63
|
+
<span class="ruby-identifier">:strand</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:strand</span>],
|
64
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:height</span>],
|
65
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_fill_color</span>],
|
66
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span><span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_stroke</span>],
|
67
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_stroke_width</span>],
|
68
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_style</span>] )
|
69
|
+
<span class="ruby-keyword kw">end</span>
|
70
|
+
<span class="ruby-comment cmt">#draw any remaining exons</span>
|
71
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exons</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">exon</span><span class="ruby-operator">|</span>
|
72
|
+
<span class="ruby-identifier">composite</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:rectangle</span>, {
|
73
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">exon</span>[<span class="ruby-value">0</span>],
|
74
|
+
<span class="ruby-identifier">:width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">exon</span>[<span class="ruby-value">1</span>],
|
75
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>],
|
76
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:height</span>],
|
77
|
+
<span class="ruby-identifier">:fill_color</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_fill_color</span>],
|
78
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span><span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_stroke</span>],
|
79
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_stroke_width</span>],
|
80
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:exon_style</span>]} )
|
81
|
+
<span class="ruby-keyword kw">end</span>
|
82
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:gap_marker</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"angled"</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:block_gaps</span>].<span class="ruby-identifier">empty?</span>
|
83
|
+
<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:block_gaps</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gap</span><span class="ruby-operator">|</span>
|
84
|
+
<span class="ruby-identifier">points</span> = <span class="ruby-node">"#{gap.first},#{args[:y] + (args[:height]/2) } #{gap.first + (gap.last/2)},#{args[:y]} #{gap.first + gap.last},#{args[:y] + (args[:height]/2)}"</span>
|
85
|
+
<span class="ruby-identifier">composite</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:polyline</span>, {
|
86
|
+
<span class="ruby-identifier">:points</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">points</span>,
|
87
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:line_color</span>],
|
88
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:line_width</span>],
|
89
|
+
<span class="ruby-identifier">:fill</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"none"</span>,
|
90
|
+
<span class="ruby-identifier">:line_style</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:line_style</span>]})
|
91
|
+
<span class="ruby-keyword kw">end</span>
|
92
|
+
<span class="ruby-keyword kw">else</span>
|
93
|
+
<span class="ruby-comment cmt">#add line</span>
|
94
|
+
<span class="ruby-identifier">composite</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:line</span>, {
|
95
|
+
<span class="ruby-identifier">:x1</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x</span>],
|
96
|
+
<span class="ruby-identifier">:x2</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{args[:x] + args[:width]}"</span>,
|
97
|
+
<span class="ruby-identifier">:y1</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>] <span class="ruby-operator">+</span> (<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:height</span>]<span class="ruby-operator">/</span><span class="ruby-value">2</span>),
|
98
|
+
<span class="ruby-identifier">:y2</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>] <span class="ruby-operator">+</span> (<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:height</span>]<span class="ruby-operator">/</span><span class="ruby-value">2</span>),
|
99
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:line_color</span>],
|
100
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:line_width</span>],
|
101
|
+
<span class="ruby-identifier">:line_style</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:line_style</span>]})
|
102
|
+
|
103
|
+
<span class="ruby-keyword kw">end</span>
|
104
|
+
<span class="ruby-identifier">composite</span>
|
105
|
+
<span class="ruby-keyword kw">end</span></pre>
|
106
|
+
</body>
|
107
|
+
</html>
|
@@ -0,0 +1,51 @@
|
|
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>scale (Bio::Graphics::Glyph)</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/glyph.rb, line 470</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scale</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">first_mark</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:start</span>]
|
16
|
+
<span class="ruby-identifier">last_mark</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:stop</span>]
|
17
|
+
<span class="ruby-comment cmt">#(num.to_f / @nt_per_px_x.to_f)</span>
|
18
|
+
<span class="ruby-identifier">full_dist</span> = <span class="ruby-identifier">last_mark</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">first_mark</span>
|
19
|
+
<span class="ruby-identifier">interval_width</span> = <span class="ruby-identifier">full_dist</span> <span class="ruby-operator">/</span> (<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:number_of_intervals</span>] <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)
|
20
|
+
|
21
|
+
|
22
|
+
<span class="ruby-identifier">a</span> = [<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:line</span>,
|
23
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
24
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
25
|
+
<span class="ruby-identifier">:x1</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>, <span class="ruby-identifier">:x2</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:page_width</span>],<span class="ruby-comment cmt"># * 1.1, </span>
|
26
|
+
<span class="ruby-identifier">:y1</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"20"</span>, <span class="ruby-identifier">:y2</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"20"</span> )]
|
27
|
+
|
28
|
+
|
29
|
+
<span class="ruby-identifier">marks</span> = (<span class="ruby-identifier">first_mark</span><span class="ruby-operator">..</span><span class="ruby-identifier">last_mark</span>).<span class="ruby-identifier">step</span>(<span class="ruby-identifier">interval_width</span>).<span class="ruby-identifier">to_a</span>
|
30
|
+
|
31
|
+
<span class="ruby-identifier">px_per_nt</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:page_width</span>].<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">full_dist</span>.<span class="ruby-identifier">to_f</span>
|
32
|
+
<span class="ruby-identifier">marks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mark</span><span class="ruby-operator">|</span>
|
33
|
+
<span class="ruby-identifier">x</span> = (<span class="ruby-identifier">mark</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">first_mark</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">px_per_nt</span>
|
34
|
+
<span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:rectangle</span>,
|
35
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">x</span>,
|
36
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-value">20</span>,
|
37
|
+
<span class="ruby-identifier">:stroke</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
38
|
+
<span class="ruby-identifier">:stroke_width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
39
|
+
<span class="ruby-identifier">:width</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>,
|
40
|
+
<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">5</span> )
|
41
|
+
|
42
|
+
<span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span>,
|
43
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">x</span>,
|
44
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-value">40</span>, <span class="ruby-identifier">:fill</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'black'</span>,
|
45
|
+
<span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">mark</span>,
|
46
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"font-family:Arial;font-style:italic"</span>)
|
47
|
+
<span class="ruby-keyword kw">end</span>
|
48
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">a</span>
|
49
|
+
<span class="ruby-keyword kw">end</span></pre>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
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>label (Bio::Graphics::Glyph)</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/glyph.rb, line 515</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">label</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
[<span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">Graphics</span><span class="ruby-operator">::</span><span class="ruby-constant">Primitive</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span>,
|
16
|
+
<span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:text</span>],
|
17
|
+
<span class="ruby-identifier">:x</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:x</span>],
|
18
|
+
<span class="ruby-identifier">:y</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:y</span>],
|
19
|
+
<span class="ruby-identifier">:fill</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"black"</span>,
|
20
|
+
<span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"font-family:monospace;"</span>)]
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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>gradients (Bio::Graphics::Glyph)</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/glyph.rb, line 525</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gradients</span> <span class="ruby-comment cmt">#needs to know which of its gradients are predefined</span>
|
15
|
+
[<span class="ruby-identifier">:red_white_h</span>, <span class="ruby-identifier">:green_white_h</span>, <span class="ruby-identifier">:blue_white_h</span>, <span class="ruby-identifier">:yellow_white_h</span>, <span class="ruby-identifier">:red_white_radial</span>, <span class="ruby-identifier">:green_white_radial</span>, <span class="ruby-identifier">:blue_white_radial</span>, <span class="ruby-identifier">:yellow_white_radial</span> ]
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|