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.
Files changed (144) hide show
  1. data/README.md +88 -0
  2. data/VERSION +1 -1
  3. data/bio-svgenes.gemspec +131 -8
  4. data/doc/classes/Bio.html +131 -0
  5. data/doc/classes/Bio/Graphics.html +142 -0
  6. data/doc/classes/Bio/Graphics/Glyph.html +987 -0
  7. data/doc/classes/Bio/Graphics/Glyph.src/M000001.html +26 -0
  8. data/doc/classes/Bio/Graphics/Glyph.src/M000002.html +27 -0
  9. data/doc/classes/Bio/Graphics/Glyph.src/M000003.html +32 -0
  10. data/doc/classes/Bio/Graphics/Glyph.src/M000004.html +27 -0
  11. data/doc/classes/Bio/Graphics/Glyph.src/M000005.html +25 -0
  12. data/doc/classes/Bio/Graphics/Glyph.src/M000006.html +29 -0
  13. data/doc/classes/Bio/Graphics/Glyph.src/M000007.html +107 -0
  14. data/doc/classes/Bio/Graphics/Glyph.src/M000008.html +51 -0
  15. data/doc/classes/Bio/Graphics/Glyph.src/M000009.html +23 -0
  16. data/doc/classes/Bio/Graphics/Glyph.src/M000010.html +18 -0
  17. data/doc/classes/Bio/Graphics/Glyph.src/M000011.html +75 -0
  18. data/doc/classes/Bio/Graphics/Glyph.src/M000012.html +51 -0
  19. data/doc/classes/Bio/Graphics/Glyph.src/M000013.html +23 -0
  20. data/doc/classes/Bio/Graphics/Glyph.src/M000014.html +26 -0
  21. data/doc/classes/Bio/Graphics/Glyph.src/M000015.html +27 -0
  22. data/doc/classes/Bio/Graphics/Glyph.src/M000016.html +32 -0
  23. data/doc/classes/Bio/Graphics/Glyph.src/M000017.html +27 -0
  24. data/doc/classes/Bio/Graphics/Glyph.src/M000018.html +25 -0
  25. data/doc/classes/Bio/Graphics/Glyph.src/M000019.html +29 -0
  26. data/doc/classes/Bio/Graphics/Glyph.src/M000020.html +107 -0
  27. data/doc/classes/Bio/Graphics/Glyph.src/M000021.html +51 -0
  28. data/doc/classes/Bio/Graphics/Glyph.src/M000022.html +23 -0
  29. data/doc/classes/Bio/Graphics/Glyph.src/M000023.html +18 -0
  30. data/doc/classes/Bio/Graphics/Glyph.src/M000024.html +75 -0
  31. data/doc/classes/Bio/Graphics/MiniFeature.html +243 -0
  32. data/doc/classes/Bio/Graphics/MiniFeature.src/M000001.html +25 -0
  33. data/doc/classes/Bio/Graphics/MiniFeature.src/M000003.html +25 -0
  34. data/doc/classes/Bio/Graphics/MiniFeature.src/M000024.html +25 -0
  35. data/doc/classes/Bio/Graphics/Page.html +705 -0
  36. data/doc/classes/Bio/Graphics/Page.src/M000010.html +35 -0
  37. data/doc/classes/Bio/Graphics/Page.src/M000011.html +83 -0
  38. data/doc/classes/Bio/Graphics/Page.src/M000012.html +24 -0
  39. data/doc/classes/Bio/Graphics/Page.src/M000013.html +29 -0
  40. data/doc/classes/Bio/Graphics/Page.src/M000014.html +24 -0
  41. data/doc/classes/Bio/Graphics/Page.src/M000015.html +20 -0
  42. data/doc/classes/Bio/Graphics/Page.src/M000016.html +20 -0
  43. data/doc/classes/Bio/Graphics/Page.src/M000017.html +18 -0
  44. data/doc/classes/Bio/Graphics/Page.src/M000018.html +18 -0
  45. data/doc/classes/Bio/Graphics/Page.src/M000019.html +18 -0
  46. data/doc/classes/Bio/Graphics/Page.src/M000020.html +18 -0
  47. data/doc/classes/Bio/Graphics/Page.src/M000021.html +18 -0
  48. data/doc/classes/Bio/Graphics/Page.src/M000022.html +18 -0
  49. data/doc/classes/Bio/Graphics/Page.src/M000023.html +18 -0
  50. data/doc/classes/Bio/Graphics/Page.src/M000024.html +18 -0
  51. data/doc/classes/Bio/Graphics/Page.src/M000025.html +35 -0
  52. data/doc/classes/Bio/Graphics/Page.src/M000026.html +83 -0
  53. data/doc/classes/Bio/Graphics/Page.src/M000027.html +24 -0
  54. data/doc/classes/Bio/Graphics/Page.src/M000028.html +29 -0
  55. data/doc/classes/Bio/Graphics/Page.src/M000029.html +24 -0
  56. data/doc/classes/Bio/Graphics/Page.src/M000030.html +20 -0
  57. data/doc/classes/Bio/Graphics/Page.src/M000031.html +20 -0
  58. data/doc/classes/Bio/Graphics/Page.src/M000032.html +18 -0
  59. data/doc/classes/Bio/Graphics/Page.src/M000033.html +18 -0
  60. data/doc/classes/Bio/Graphics/Page.src/M000034.html +18 -0
  61. data/doc/classes/Bio/Graphics/Page.src/M000035.html +18 -0
  62. data/doc/classes/Bio/Graphics/Page.src/M000036.html +18 -0
  63. data/doc/classes/Bio/Graphics/Page.src/M000037.html +18 -0
  64. data/doc/classes/Bio/Graphics/Page.src/M000038.html +18 -0
  65. data/doc/classes/Bio/Graphics/Page.src/M000039.html +18 -0
  66. data/doc/classes/Bio/Graphics/Page.src/M000040.html +107 -0
  67. data/doc/classes/Bio/Graphics/Page.src/M000041.html +18 -0
  68. data/doc/classes/Bio/Graphics/Page.src/M000042.html +23 -0
  69. data/doc/classes/Bio/Graphics/Page.src/M000043.html +18 -0
  70. data/doc/classes/Bio/Graphics/Page.src/M000044.html +18 -0
  71. data/doc/classes/Bio/Graphics/Primitive.html +204 -0
  72. data/doc/classes/Bio/Graphics/Primitive.src/M000001.html +21 -0
  73. data/doc/classes/Bio/Graphics/Primitive.src/M000002.html +20 -0
  74. data/doc/classes/Bio/Graphics/Primitive.src/M000008.html +21 -0
  75. data/doc/classes/Bio/Graphics/Primitive.src/M000009.html +20 -0
  76. data/doc/classes/Bio/Graphics/Primitive.src/M000022.html +21 -0
  77. data/doc/classes/Bio/Graphics/Primitive.src/M000023.html +20 -0
  78. data/doc/classes/Bio/Graphics/SVGEE.html +290 -0
  79. data/doc/classes/Bio/Graphics/SVGEE.src/M000002.html +24 -0
  80. data/doc/classes/Bio/Graphics/SVGEE.src/M000003.html +18 -0
  81. data/doc/classes/Bio/Graphics/SVGEE.src/M000004.html +24 -0
  82. data/doc/classes/Bio/Graphics/SVGEE.src/M000005.html +18 -0
  83. data/doc/classes/Bio/Graphics/SVGEE.src/M000006.html +18 -0
  84. data/doc/classes/Bio/Graphics/SVGEE.src/M000007.html +21 -0
  85. data/doc/classes/Bio/Graphics/SVGEE.src/M000008.html +27 -0
  86. data/doc/classes/Bio/Graphics/SVGEE.src/M000009.html +23 -0
  87. data/doc/classes/Bio/Graphics/SVGEE.src/M000016.html +24 -0
  88. data/doc/classes/Bio/Graphics/SVGEE.src/M000017.html +18 -0
  89. data/doc/classes/Bio/Graphics/SVGEE.src/M000018.html +18 -0
  90. data/doc/classes/Bio/Graphics/SVGEE.src/M000019.html +21 -0
  91. data/doc/classes/Bio/Graphics/SVGEE.src/M000020.html +27 -0
  92. data/doc/classes/Bio/Graphics/SVGEE.src/M000021.html +23 -0
  93. data/doc/classes/Bio/Graphics/Track.html +473 -0
  94. data/doc/classes/Bio/Graphics/Track.src/M000001.html +35 -0
  95. data/doc/classes/Bio/Graphics/Track.src/M000002.html +18 -0
  96. data/doc/classes/Bio/Graphics/Track.src/M000003.html +28 -0
  97. data/doc/classes/Bio/Graphics/Track.src/M000004.html +18 -0
  98. data/doc/classes/Bio/Graphics/Track.src/M000010.html +35 -0
  99. data/doc/classes/Bio/Graphics/Track.src/M000011.html +18 -0
  100. data/doc/classes/Bio/Graphics/Track.src/M000012.html +28 -0
  101. data/doc/classes/Bio/Graphics/Track.src/M000013.html +18 -0
  102. data/doc/created.rid +1 -9
  103. data/doc/files/lib/bio-svgenes_rb.html +131 -0
  104. data/doc/files/lib/bio/graphics/glyph_rb.html +101 -0
  105. data/doc/files/lib/bio/graphics/mini_feature_rb.html +101 -0
  106. data/doc/files/lib/bio/graphics/page_rb.html +111 -0
  107. data/doc/files/lib/bio/graphics/primitive_rb.html +101 -0
  108. data/doc/files/lib/bio/graphics/svgee_rb.html +101 -0
  109. data/doc/files/lib/bio/graphics/track_rb.html +101 -0
  110. data/doc/fr_class_index.html +34 -0
  111. data/doc/fr_file_index.html +33 -0
  112. data/doc/fr_method_index.html +70 -0
  113. data/doc/index.html +21 -91
  114. data/doc/manual/bootstrap/css/bootstrap-responsive.css +1109 -0
  115. data/doc/manual/bootstrap/css/bootstrap-responsive.min.css +9 -0
  116. data/doc/manual/bootstrap/css/bootstrap.css +6158 -0
  117. data/doc/manual/bootstrap/css/bootstrap.min.css +9 -0
  118. data/doc/manual/bootstrap/img/glyphicons-halflings-white.png +0 -0
  119. data/doc/manual/bootstrap/img/glyphicons-halflings.png +0 -0
  120. data/doc/manual/bootstrap/js/bootstrap.js +2276 -0
  121. data/doc/manual/bootstrap/js/bootstrap.min.js +6 -0
  122. data/doc/manual/img/circle.png +0 -0
  123. data/doc/manual/img/directed.png +0 -0
  124. data/doc/manual/img/down_triangle.png +0 -0
  125. data/doc/manual/img/histogram.png +0 -0
  126. data/doc/manual/img/span.png +0 -0
  127. data/doc/manual/img/transcript.png +0 -0
  128. data/doc/manual/img/up_triangle.png +0 -0
  129. data/doc/manual/manual.html +360 -0
  130. data/doc/manual/manual.md +307 -0
  131. data/doc/rdoc-style.css +208 -0
  132. data/examples/example.rb +12 -8
  133. data/examples/{make_example.rb → example2.rb} +5 -16
  134. data/lib/bio/graphics/glyph.rb +293 -126
  135. data/lib/bio/graphics/mini_feature.rb +24 -17
  136. data/lib/bio/graphics/page.rb +112 -54
  137. data/lib/bio/graphics/primitive.rb +12 -9
  138. data/lib/bio/graphics/svgee.rb +9 -11
  139. data/lib/bio/graphics/track.rb +92 -10
  140. metadata +132 -9
  141. data/README.rdoc +0 -19
  142. data/examples/annotate_snps.rb +0 -86
  143. data/examples/eg2.rb +0 -40
  144. data/examples/get_coverage_in_windows.rb +0 -176
@@ -0,0 +1,24 @@
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::SVGEE)</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/svgee.rb, line 13</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-identifier">opts</span> = {<span class="ruby-identifier">:width</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'100%'</span>, <span class="ruby-identifier">:height</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'100%'</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
16
+ <span class="ruby-ivar">@width</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:width</span>]
17
+ <span class="ruby-ivar">@height</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:height</span>]
18
+ <span class="ruby-ivar">@style</span>= <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:style</span>]
19
+ <span class="ruby-ivar">@primitives</span> = []
20
+ <span class="ruby-ivar">@defs</span> = []
21
+ <span class="ruby-ivar">@supported_primitives</span> = [<span class="ruby-identifier">:circle</span>, <span class="ruby-identifier">:rectangle</span>, <span class="ruby-identifier">:ellipse</span>, <span class="ruby-identifier">:line</span>, <span class="ruby-identifier">:polyline</span>, <span class="ruby-identifier">:text</span>]
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </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>open_tag (Bio::Graphics::SVGEE)</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/svgee.rb, line 24</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open_tag</span>
15
+ <span class="ruby-node">%{&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot; width=&quot;#{@width}&quot; height=&quot;#{@height}&quot; style=&quot;#{@style}&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;}</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,24 @@
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::SVGEE)</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/svgee.rb, line 13</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-identifier">opts</span> = {<span class="ruby-identifier">:width</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'100%'</span>, <span class="ruby-identifier">:height</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'100%'</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
16
+ <span class="ruby-ivar">@width</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:width</span>]
17
+ <span class="ruby-ivar">@height</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:height</span>]
18
+ <span class="ruby-ivar">@style</span>= <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:style</span>]
19
+ <span class="ruby-ivar">@primitives</span> = []
20
+ <span class="ruby-ivar">@defs</span> = []
21
+ <span class="ruby-ivar">@supported_primitives</span> = [<span class="ruby-identifier">:circle</span>, <span class="ruby-identifier">:rectangle</span>, <span class="ruby-identifier">:ellipse</span>, <span class="ruby-identifier">:line</span>, <span class="ruby-identifier">:polyline</span>, <span class="ruby-identifier">:text</span>]
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </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>open_tag (Bio::Graphics::SVGEE)</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/svgee.rb, line 24</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open_tag</span>
15
+ <span class="ruby-node">%{&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot; width=&quot;#{@width}&quot; height=&quot;#{@height}&quot; style=&quot;#{@style}&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;}</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>close_tag (Bio::Graphics::SVGEE)</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/svgee.rb, line 29</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close_tag</span>
15
+ <span class="ruby-value str">%{&lt;/svg&gt;}</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,21 @@
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>add_primitive (Bio::Graphics::SVGEE)</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/svgee.rb, line 94</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_primitive</span>(<span class="ruby-identifier">primitive_object</span>)
15
+ <span class="ruby-identifier">args</span> = {}
16
+ <span class="ruby-identifier">primitive_object</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/@/</span>,<span class="ruby-value str">&quot;&quot;</span>).<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">primitive_object</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">v</span>) }
17
+ <span class="ruby-identifier">primitive_string</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:primitive</span>)
18
+ <span class="ruby-identifier">make_tag</span>(<span class="ruby-identifier">primitive_string</span>, <span class="ruby-identifier">args</span>)
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </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>gradient (Bio::Graphics::SVGEE)</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/svgee.rb, line 102</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gradient</span>(<span class="ruby-identifier">a</span>)
15
+ <span class="ruby-identifier">definition_string</span> = <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">a</span>[<span class="ruby-identifier">:type</span>]
16
+ <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:radial</span>
17
+ <span class="ruby-node">%{&lt;radialGradient id=&quot;#{a[:id]}&quot; cx=&quot;#{a[:cx]}%&quot; cy=&quot;#{a[:cy]}%&quot; r=&quot;#{a[:r]}%&quot; fx=&quot;#{a[:fx]}%&quot; fy=&quot;#{a[:fy]}%&quot;&gt;}</span>
18
+ <span class="ruby-keyword kw">else</span>
19
+ <span class="ruby-node">%{&lt;linearGradient id=&quot;#{a[:id]}&quot; x1=&quot;#{a[:x1]}%&quot; x2=&quot;#{a[:x2]}%&quot; y1=&quot;#{a[:y1]}%&quot; y2=&quot;#{a[:y2]}%&quot;&gt;}</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-identifier">a</span>[<span class="ruby-identifier">:stops</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
22
+ <span class="ruby-identifier">definition_string</span> = <span class="ruby-identifier">definition_string</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;\n&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-node">%{&lt;stop offset=&quot;#{s[:offset]}%&quot; style=&quot;stop-color:#{s[:color]};stop-opacity:#{s[:opacity]}&quot; /&gt;}</span>
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-identifier">add_def</span> <span class="ruby-identifier">definition_string</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">a</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">:linear</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'&lt;/linearGradient&gt;'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'&lt;/radialGradient&gt;'</span>)
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </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>draw (Bio::Graphics::SVGEE)</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/svgee.rb, line 115</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>
15
+ <span class="ruby-identifier">head</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open_tag</span>
16
+ <span class="ruby-identifier">defstring</span> = <span class="ruby-value str">&quot;&quot;</span>
17
+ <span class="ruby-identifier">defstring</span> = <span class="ruby-value str">&quot;&lt;defs&gt;\n&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">defs</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;\n &lt;/defs&gt;\n&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">defs</span>.<span class="ruby-identifier">empty?</span>
18
+ <span class="ruby-identifier">shapes</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">primitives</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
19
+ <span class="ruby-identifier">close</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">close_tag</span>
20
+ <span class="ruby-identifier">head</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">defstring</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">shapes</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">close</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,24 @@
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::SVGEE)</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/svgee.rb, line 17</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-identifier">opts</span> = {<span class="ruby-identifier">:width</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'100%'</span>, <span class="ruby-identifier">:height</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'100%'</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>)
16
+ <span class="ruby-ivar">@width</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:width</span>]
17
+ <span class="ruby-ivar">@height</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:height</span>]
18
+ <span class="ruby-ivar">@style</span>= <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:style</span>]
19
+ <span class="ruby-ivar">@primitives</span> = []
20
+ <span class="ruby-ivar">@defs</span> = []
21
+ <span class="ruby-ivar">@supported_primitives</span> = [<span class="ruby-identifier">:circle</span>, <span class="ruby-identifier">:rectangle</span>, <span class="ruby-identifier">:ellipse</span>, <span class="ruby-identifier">:line</span>, <span class="ruby-identifier">:polyline</span>, <span class="ruby-identifier">:text</span>]
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </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>open_tag (Bio::Graphics::SVGEE)</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/svgee.rb, line 27</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open_tag</span>
15
+ <span class="ruby-node">%{&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot; width=&quot;#{@width}&quot; height=&quot;#{@height}&quot; style=&quot;#{@style}&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;}</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>close_tag (Bio::Graphics::SVGEE)</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/svgee.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close_tag</span>
15
+ <span class="ruby-value str">%{&lt;/svg&gt;}</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,21 @@
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>add_primitive (Bio::Graphics::SVGEE)</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/svgee.rb, line 96</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_primitive</span>(<span class="ruby-identifier">primitive_object</span>)
15
+ <span class="ruby-identifier">args</span> = {}
16
+ <span class="ruby-identifier">primitive_object</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/@/</span>,<span class="ruby-value str">&quot;&quot;</span>).<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">primitive_object</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">v</span>) }
17
+ <span class="ruby-identifier">primitive_string</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:primitive</span>)
18
+ <span class="ruby-identifier">make_tag</span>(<span class="ruby-identifier">primitive_string</span>, <span class="ruby-identifier">args</span>)
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </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>gradient (Bio::Graphics::SVGEE)</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/svgee.rb, line 104</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gradient</span>(<span class="ruby-identifier">a</span>)
15
+ <span class="ruby-identifier">definition_string</span> = <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">a</span>[<span class="ruby-identifier">:type</span>]
16
+ <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:radial</span>
17
+ <span class="ruby-node">%{&lt;radialGradient id=&quot;#{a[:id]}&quot; cx=&quot;#{a[:cx]}%&quot; cy=&quot;#{a[:cy]}%&quot; r=&quot;#{a[:r]}%&quot; fx=&quot;#{a[:fx]}%&quot; fy=&quot;#{a[:fy]}%&quot;&gt;}</span>
18
+ <span class="ruby-keyword kw">else</span>
19
+ <span class="ruby-node">%{&lt;linearGradient id=&quot;#{a[:id]}&quot; x1=&quot;#{a[:x1]}%&quot; x2=&quot;#{a[:x2]}%&quot; y1=&quot;#{a[:y1]}%&quot; y2=&quot;#{a[:y2]}%&quot;&gt;}</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-identifier">a</span>[<span class="ruby-identifier">:stops</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
22
+ <span class="ruby-identifier">definition_string</span> = <span class="ruby-identifier">definition_string</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;\n&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-node">%{&lt;stop offset=&quot;#{s[:offset]}%&quot; style=&quot;stop-color:#{s[:color]};stop-opacity:#{s[:opacity]}&quot; /&gt;}</span>
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-identifier">add_def</span> <span class="ruby-identifier">definition_string</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">a</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">:linear</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'&lt;/linearGradient&gt;'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'&lt;/radialGradient&gt;'</span>)
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </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>draw (Bio::Graphics::SVGEE)</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/svgee.rb, line 117</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>
15
+ <span class="ruby-identifier">head</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open_tag</span>
16
+ <span class="ruby-identifier">defstring</span> = <span class="ruby-value str">&quot;&quot;</span>
17
+ <span class="ruby-identifier">defstring</span> = <span class="ruby-value str">&quot;&lt;defs&gt;\n&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">defs</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;\n &lt;/defs&gt;\n&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">defs</span>.<span class="ruby-identifier">empty?</span>
18
+ <span class="ruby-identifier">shapes</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">primitives</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
19
+ <span class="ruby-identifier">close</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">close_tag</span>
20
+ <span class="ruby-identifier">head</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">defstring</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">shapes</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">close</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,473 @@
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::Track</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::Track</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/bio/graphics/track_rb.html">
59
+ lib/bio/graphics/track.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 <a href="Track.html">Bio::Graphics::Track</a> object acts as a
84
+ container for <a href="MiniFeature.html">Bio::Graphics::MiniFeature</a>
85
+ objects. The <a href="Track.html">Bio::Graphics::Track</a> takes style
86
+ information on instantiation. Style information is applied to each feature
87
+ in the track by the track
88
+ </p>
89
+
90
+ </div>
91
+
92
+
93
+ </div>
94
+
95
+ <div id="method-list">
96
+ <h3 class="section-bar">Methods</h3>
97
+
98
+ <div class="name-list">
99
+ <a href="#M000011">add</a>&nbsp;&nbsp;
100
+ <a href="#M000012">get_rows</a>&nbsp;&nbsp;
101
+ <a href="#M000010">new</a>&nbsp;&nbsp;
102
+ <a href="#M000013">overlaps</a>&nbsp;&nbsp;
103
+ </div>
104
+ </div>
105
+
106
+ </div>
107
+
108
+
109
+ <!-- if includes -->
110
+
111
+ <div id="section">
112
+
113
+
114
+
115
+
116
+
117
+ <div id="attribute-list">
118
+ <h3 class="section-bar">Attributes</h3>
119
+
120
+ <div class="name-list">
121
+ <table>
122
+ <tr class="top-aligned-row context-row">
123
+ <td class="context-item-name">args</td>
124
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
125
+ <td class="context-item-desc"></td>
126
+ </tr>
127
+ <tr class="top-aligned-row context-row">
128
+ <td class="context-item-name">feature_height</td>
129
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
130
+ <td class="context-item-desc"></td>
131
+ </tr>
132
+ <tr class="top-aligned-row context-row">
133
+ <td class="context-item-name">feature_rows</td>
134
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
135
+ <td class="context-item-desc"></td>
136
+ </tr>
137
+ <tr class="top-aligned-row context-row">
138
+ <td class="context-item-name">features</td>
139
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
140
+ <td class="context-item-desc"></td>
141
+ </tr>
142
+ <tr class="top-aligned-row context-row">
143
+ <td class="context-item-name">glyph</td>
144
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
145
+ <td class="context-item-desc"></td>
146
+ </tr>
147
+ <tr class="top-aligned-row context-row">
148
+ <td class="context-item-name">label</td>
149
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
150
+ <td class="context-item-desc"></td>
151
+ </tr>
152
+ <tr class="top-aligned-row context-row">
153
+ <td class="context-item-name">max_y</td>
154
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
155
+ <td class="context-item-desc"></td>
156
+ </tr>
157
+ <tr class="top-aligned-row context-row">
158
+ <td class="context-item-name">min_width</td>
159
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
160
+ <td class="context-item-desc"></td>
161
+ </tr>
162
+ <tr class="top-aligned-row context-row">
163
+ <td class="context-item-name">name</td>
164
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
165
+ <td class="context-item-desc"></td>
166
+ </tr>
167
+ <tr class="top-aligned-row context-row">
168
+ <td class="context-item-name">name</td>
169
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
170
+ <td class="context-item-desc"></td>
171
+ </tr>
172
+ <tr class="top-aligned-row context-row">
173
+ <td class="context-item-name">number_rows</td>
174
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
175
+ <td class="context-item-desc"></td>
176
+ </tr>
177
+ <tr class="top-aligned-row context-row">
178
+ <td class="context-item-name">scale</td>
179
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
180
+ <td class="context-item-desc"></td>
181
+ </tr>
182
+ <tr class="top-aligned-row context-row">
183
+ <td class="context-item-name">track_height</td>
184
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
185
+ <td class="context-item-desc"></td>
186
+ </tr>
187
+ </table>
188
+ </div>
189
+ </div>
190
+
191
+
192
+
193
+ <!-- if method_list -->
194
+ <div id="methods">
195
+ <h3 class="section-bar">Public Class methods</h3>
196
+
197
+ <div id="method-M000010" class="method-detail">
198
+ <a name="M000010"></a>
199
+
200
+ <div class="method-heading">
201
+ <a href="Track.src/M000010.html" target="Code" class="method-signature"
202
+ onclick="popupCode('Track.src/M000010.html');return false;">
203
+ <span class="method-name">new</span><span class="method-args">(args)</span>
204
+ </a>
205
+ </div>
206
+
207
+ <div class="method-description">
208
+ <p>
209
+ Creates a <a href="Track.html#M000010">new</a> <a
210
+ href="Track.html">Bio::Graphics::Track</a>
211
+ </p>
212
+ <h2>args</h2>
213
+ <ul>
214
+ <li>:glyph = one of Bio::Graphics::Glyphs#glyphs currently
215
+
216
+ </li>
217
+ </ul>
218
+ <pre>
219
+ [:generic, :directed, :transcript, :scale, :label, :histogram, :circle, :down_triangle, :up_triangle, :span]
220
+ </pre>
221
+ <ul>
222
+ <li>:stroke_color = the outline colour of the glyphs in the track (default =
223
+ &quot;black&quot;), can be any SVG colour eg rgb(256,0,0) or FF0000
224
+
225
+ </li>
226
+ <li>:fill_color = the fill colour of the glyphs in the track (default =
227
+ &#8216;red&#8217;), can be any SVG colour eg rgb(256,0,0) or FF0000, or one
228
+ of the built in gradient types <a
229
+ href="Glyph.html#M000023">Bio::Graphics::Glyph#gradients</a>
230
+
231
+ </li>
232
+ </ul>
233
+ <pre>
234
+ [:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
235
+ </pre>
236
+ <p>
237
+ or a custom definition of a gradient
238
+ </p>
239
+ <pre>
240
+ {:type =&gt; :radial,
241
+ :id =&gt; :custom,
242
+ :cx =&gt; 5,
243
+ :cy =&gt; 5,
244
+ :r =&gt; 50,
245
+ :fx =&gt; 50,
246
+ :fy =&gt; 50,
247
+ :stops =&gt; [ {
248
+ :offset =&gt; 0,
249
+ :color =&gt; 'rgb(255,255,255)',
250
+ :opacity =&gt; 0
251
+ }, {
252
+ :offset =&gt; 100,
253
+ :color =&gt; 'rgb(0,127,200)',
254
+ :opacity =&gt; 1
255
+ }, ]
256
+ }
257
+ </pre>
258
+ <ul>
259
+ <li>:track_height = minimum height for the track, will be modified
260
+ automatically if more space is needed e.g for overlapping features (default
261
+ = auto),
262
+
263
+ </li>
264
+ <li>:name = a displayed name for the track (default =
265
+ &#8216;feature_track&#8217;)
266
+
267
+ </li>
268
+ <li>:label = display the name given to the track (default = true),
269
+
270
+ </li>
271
+ <li>:stroke_width = width in pixels of the outline of the glyphs (default=1)
272
+
273
+ </li>
274
+ <li>:x_round = x radius of the ellipse used to round off the corners of
275
+ rectangles (default = 1)
276
+
277
+ </li>
278
+ <li>:y_round = y radius of the ellipse used to round off the corners of
279
+ rectangles (default = 1)
280
+
281
+ </li>
282
+ </ul>
283
+ <p>
284
+ :utr_fill_color = the fill colour of the utr part of the glyph (default =
285
+ &#8216;black&#8217;), can be any SVG colour eg rgb(256,0,0) or FF0000, or
286
+ one of the built in gradient types <a
287
+ href="Glyph.html#M000023">Bio::Graphics::Glyph#gradients</a>
288
+ </p>
289
+ <pre>
290
+ [:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
291
+ </pre>
292
+ <p>
293
+ or a custom definition of a gradient
294
+ </p>
295
+ <pre>
296
+ {:type =&gt; :radial,
297
+ :id =&gt; :custom,
298
+ :cx =&gt; 5,
299
+ :cy =&gt; 5,
300
+ :r =&gt; 50,
301
+ :fx =&gt; 50,
302
+ :fy =&gt; 50,
303
+ :stops =&gt; [ {
304
+ :offset =&gt; 0,
305
+ :color =&gt; 'rgb(255,255,255)',
306
+ :opacity =&gt; 0
307
+ }, {
308
+ :offset =&gt; 100,
309
+ :color =&gt; 'rgb(0,127,200)',
310
+ :opacity =&gt; 1
311
+ }, ]
312
+ }
313
+ </pre>
314
+ <ul>
315
+ <li>:utr_stroke = the outline colour of the utr part of the glyph (default =
316
+ &quot;black&quot;), can be any SVG colour eg rgb(256,0,0) or FF0000
317
+
318
+ </li>
319
+ <li>:utr_stroke_width = The width of the outline stroke for the utr part of the
320
+ glyph (default = 1)
321
+
322
+ </li>
323
+ <li>:exon_fill_color = the fill colour of the utr part of the glyph (default =
324
+ &#8216;red&#8217;), can be any SVG colour eg rgb(256,0,0) or FF0000, or one
325
+ of the built in gradient types <a
326
+ href="Glyph.html#M000023">Bio::Graphics::Glyph#gradients</a> or a custom
327
+ definition of a gradient
328
+
329
+ </li>
330
+ </ul>
331
+ <pre>
332
+ [:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
333
+ </pre>
334
+ <p>
335
+ or a custom definition of a gradient
336
+ </p>
337
+ <pre>
338
+ {:type =&gt; :radial,
339
+ :id =&gt; :custom,
340
+ :cx =&gt; 5,
341
+ :cy =&gt; 5,
342
+ :r =&gt; 50,
343
+ :fx =&gt; 50,
344
+ :fy =&gt; 50,
345
+ :stops =&gt; [ {
346
+ :offset =&gt; 0,
347
+ :color =&gt; 'rgb(255,255,255)',
348
+ :opacity =&gt; 0
349
+ }, {
350
+ :offset =&gt; 100,
351
+ :color =&gt; 'rgb(0,127,200)',
352
+ :opacity =&gt; 1
353
+ }, ]
354
+ </pre>
355
+ <ul>
356
+ <li>:exon_stroke = the outline colour of the exon part of the glyph (default =
357
+ &quot;black&quot;) can be any SVG colour eg rgb(256,0,0) or FF0000
358
+
359
+ </li>
360
+ <li>:exon_stroke_width = The width of the outline stroke for the exon part of
361
+ the glyph (default = 1)
362
+
363
+ </li>
364
+ <li>:line_color = the colour for the line part that joins the blocks (default =
365
+ &#8216;black&#8217;) can be any SVG colour eg rgb(256,0,0) or FF0000
366
+
367
+ </li>
368
+ <li>:line_width = the width ffor the line part that joins the blocks (default =
369
+ 1)
370
+
371
+ </li>
372
+ <li>:exon_style = an arbitrary SVG compliant style string eg
373
+ &quot;fill-opacity:0.4;&quot;
374
+
375
+ </li>
376
+ <li>:utr_style = an arbitrary SVG compliant style string eg
377
+ &quot;fill-opacity:0.4;&quot;
378
+
379
+ </li>
380
+ <li>:line_style = an arbitrary SVG compliant style string eg
381
+ &quot;fill-opacity:0.4;&quot;
382
+
383
+ </li>
384
+ <li>:gap_marker = style of the line between blocks - either angled or straight
385
+
386
+ </li>
387
+ </ul>
388
+ </div>
389
+ </div>
390
+
391
+ <h3 class="section-bar">Public Instance methods</h3>
392
+
393
+ <div id="method-M000011" class="method-detail">
394
+ <a name="M000011"></a>
395
+
396
+ <div class="method-heading">
397
+ <a href="Track.src/M000011.html" target="Code" class="method-signature"
398
+ onclick="popupCode('Track.src/M000011.html');return false;">
399
+ <span class="method-name">add</span><span class="method-args">(feature)</span>
400
+ </a>
401
+ </div>
402
+
403
+ <div class="method-description">
404
+ <p>
405
+ Adds a <a href="Track.html#M000010">new</a> <a
406
+ href="MiniFeature.html">Bio::Graphics::MiniFeature</a> object to the
407
+ current <a href="Track.html">Bio::Graphics::Track</a>
408
+ </p>
409
+ </div>
410
+ </div>
411
+
412
+ <div id="method-M000012" class="method-detail">
413
+ <a name="M000012"></a>
414
+
415
+ <div class="method-heading">
416
+ <a href="Track.src/M000012.html" target="Code" class="method-signature"
417
+ onclick="popupCode('Track.src/M000012.html');return false;">
418
+ <span class="method-name">get_rows</span><span class="method-args">()</span>
419
+ </a>
420
+ </div>
421
+
422
+ <div class="method-description">
423
+ <p>
424
+ Calculates how many rows are needed per track for overlapping features and
425
+ which row each feature should be in. Usually only called by the enclosing
426
+ <a href="Page.html">Bio::Graphics::Page</a> object.
427
+ </p>
428
+ </div>
429
+ </div>
430
+
431
+ <div id="method-M000013" class="method-detail">
432
+ <a name="M000013"></a>
433
+
434
+ <div class="method-heading">
435
+ <a href="Track.src/M000013.html" target="Code" class="method-signature"
436
+ onclick="popupCode('Track.src/M000013.html');return false;">
437
+ <span class="method-name">overlaps</span><span class="method-args">(f1, f2)</span>
438
+ </a>
439
+ </div>
440
+
441
+ <div class="method-description">
442
+ <p>
443
+ Calculates whether two <a
444
+ href="MiniFeature.html">Bio::Graphics::MiniFeature</a> objects overlap by
445
+ examining their start and end positions.
446
+ </p>
447
+ <p>
448
+ <tt>args</tt>
449
+ </p>
450
+ <ul>
451
+ <li>f1 - a <a href="MiniFeature.html">Bio::Graphics::MiniFeature</a> object
452
+
453
+ </li>
454
+ <li>f2 - a <a href="MiniFeature.html">Bio::Graphics::MiniFeature</a> object
455
+
456
+ </li>
457
+ </ul>
458
+ </div>
459
+ </div>
460
+
461
+
462
+ </div>
463
+
464
+
465
+ </div>
466
+
467
+
468
+ <div id="validator-badges">
469
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
470
+ </div>
471
+
472
+ </body>
473
+ </html>