bio-graphics 1.2 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/Bio.html +4 -26
- data/doc/classes/Bio/Feature.html +350 -0
- data/doc/classes/Bio/Feature.src/M000010.html +21 -0
- data/doc/classes/Bio/Feature.src/M000011.html +20 -0
- data/doc/classes/Bio/Feature.src/M000012.html +19 -0
- data/doc/classes/Bio/Feature.src/M000014.html +21 -0
- data/doc/classes/Bio/Feature.src/M000016.html +21 -0
- data/doc/classes/Bio/Feature.src/M000034.html +21 -0
- data/doc/classes/Bio/Feature.src/M000035.html +20 -0
- data/doc/classes/Bio/Feature.src/M000036.html +19 -0
- data/doc/classes/Bio/Feature.src/M000038.html +21 -0
- data/doc/classes/Bio/Feature.src/M000040.html +21 -0
- data/doc/classes/Bio/Feature.src/M000042.html +21 -0
- data/doc/classes/Bio/Feature.src/M000043.html +20 -0
- data/doc/classes/Bio/Feature.src/M000044.html +21 -0
- data/doc/classes/Bio/Feature.src/M000045.html +20 -0
- data/doc/classes/Bio/Feature.src/M000046.html +19 -0
- data/doc/classes/Bio/Feature.src/M000048.html +21 -0
- data/doc/classes/Bio/Feature.src/M000050.html +21 -0
- data/doc/classes/Bio/Feature.src/M000074.html +21 -0
- data/doc/classes/Bio/Feature.src/M000075.html +20 -0
- data/doc/classes/Bio/Feature.src/M000076.html +19 -0
- data/doc/classes/Bio/Feature.src/M000078.html +21 -0
- data/doc/classes/Bio/Feature.src/M000080.html +21 -0
- data/doc/classes/Bio/Feature/Qualifier.html +189 -0
- data/doc/classes/Bio/Feature/Qualifier.src/M000017.html +18 -0
- data/doc/classes/Bio/Feature/Qualifier.src/M000041.html +18 -0
- data/doc/classes/Bio/Feature/Qualifier.src/M000049.html +18 -0
- data/doc/classes/Bio/Feature/Qualifier.src/M000051.html +18 -0
- data/doc/classes/Bio/Feature/Qualifier.src/M000081.html +18 -0
- data/doc/classes/Bio/Features.html +329 -0
- data/doc/classes/Bio/Features.src/M000004.html +18 -0
- data/doc/classes/Bio/Features.src/M000005.html +19 -0
- data/doc/classes/Bio/Features.src/M000006.html +21 -0
- data/doc/classes/Bio/Features.src/M000007.html +18 -0
- data/doc/classes/Bio/Features.src/M000008.html +18 -0
- data/doc/classes/Bio/Features.src/M000009.html +18 -0
- data/doc/classes/Bio/Features.src/M000028.html +18 -0
- data/doc/classes/Bio/Features.src/M000029.html +19 -0
- data/doc/classes/Bio/Features.src/M000030.html +21 -0
- data/doc/classes/Bio/Features.src/M000031.html +18 -0
- data/doc/classes/Bio/Features.src/M000032.html +18 -0
- data/doc/classes/Bio/Features.src/M000033.html +18 -0
- data/doc/classes/Bio/Features.src/M000036.html +18 -0
- data/doc/classes/Bio/Features.src/M000037.html +19 -0
- data/doc/classes/Bio/Features.src/M000038.html +18 -0
- data/doc/classes/Bio/Features.src/M000039.html +19 -0
- data/doc/classes/Bio/Features.src/M000040.html +21 -0
- data/doc/classes/Bio/Features.src/M000041.html +18 -0
- data/doc/classes/Bio/Features.src/M000042.html +18 -0
- data/doc/classes/Bio/Features.src/M000043.html +18 -0
- data/doc/classes/Bio/Features.src/M000068.html +18 -0
- data/doc/classes/Bio/Features.src/M000069.html +19 -0
- data/doc/classes/Bio/Features.src/M000070.html +21 -0
- data/doc/classes/Bio/Features.src/M000071.html +18 -0
- data/doc/classes/Bio/Features.src/M000072.html +18 -0
- data/doc/classes/Bio/Features.src/M000073.html +18 -0
- data/doc/classes/Bio/Graphics.html +28 -42
- data/doc/classes/Bio/Graphics/{Panel/Track/Feature.html → Feature.html} +98 -125
- data/doc/classes/Bio/Graphics/Feature.src/M000020.html +51 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000021.html +65 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000022.html +55 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000023.html +66 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000024.html +51 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000025.html +65 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000026.html +55 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000054.html +51 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000055.html +65 -0
- data/doc/classes/Bio/Graphics/Feature.src/M000056.html +55 -0
- data/doc/classes/Bio/Graphics/Feature/SubFeature.html +348 -0
- data/doc/classes/Bio/Graphics/Feature/SubFeature.src/M000025.html +68 -0
- data/doc/classes/Bio/Graphics/Feature/SubFeature.src/M000026.html +67 -0
- data/doc/classes/Bio/Graphics/Glyph.html +178 -0
- data/doc/classes/Bio/Graphics/Glyph/Box.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/Box.src/M000004.html +24 -0
- data/doc/classes/Bio/Graphics/Glyph/Box.src/M000032.html +24 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.html +187 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.src/M000004.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.src/M000005.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.src/M000006.html +24 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.src/M000007.html +24 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.src/M000033.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.src/M000034.html +24 -0
- data/doc/classes/Bio/Graphics/Glyph/Common.src/M000035.html +24 -0
- data/doc/classes/Bio/Graphics/Glyph/CustomTestGlyph.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/CustomTestGlyph.src/M000037.html +22 -0
- data/doc/classes/Bio/Graphics/Glyph/CustomTestGlyphInFile.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/CustomTestGlyphInFile.src/M000038.html +22 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedBox.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedBox.src/M000009.html +31 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedBox.src/M000039.html +31 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedGeneric.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedGeneric.src/M000011.html +26 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedGeneric.src/M000013.html +26 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedGeneric.src/M000043.html +26 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedSpliced.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedSpliced.src/M000008.html +40 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedSpliced.src/M000010.html +40 -0
- data/doc/classes/Bio/Graphics/Glyph/DirectedSpliced.src/M000040.html +40 -0
- data/doc/classes/Bio/Graphics/{Panel/Track/Feature/PixelRange.html → Glyph/Dot.html} +16 -19
- data/doc/classes/Bio/Graphics/Glyph/Dot.src/M000013.html +22 -0
- data/doc/classes/Bio/Graphics/Glyph/Dot.src/M000015.html +22 -0
- data/doc/classes/Bio/Graphics/Glyph/Dot.src/M000045.html +22 -0
- data/doc/classes/Bio/Graphics/Glyph/Generic.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/Generic.src/M000009.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph/Generic.src/M000011.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph/Generic.src/M000041.html +18 -0
- data/doc/classes/Bio/Graphics/Glyph/Line.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/Line.src/M000012.html +20 -0
- data/doc/classes/Bio/Graphics/Glyph/Line.src/M000014.html +20 -0
- data/doc/classes/Bio/Graphics/Glyph/Line.src/M000044.html +20 -0
- data/doc/classes/Bio/Graphics/Glyph/LineWithHandles.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/LineWithHandles.src/M000014.html +28 -0
- data/doc/classes/Bio/Graphics/Glyph/LineWithHandles.src/M000016.html +28 -0
- data/doc/classes/Bio/Graphics/Glyph/LineWithHandles.src/M000046.html +28 -0
- data/doc/classes/Bio/Graphics/Glyph/Spliced.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/Spliced.src/M000010.html +19 -0
- data/doc/classes/Bio/Graphics/Glyph/Spliced.src/M000012.html +19 -0
- data/doc/classes/Bio/Graphics/Glyph/Spliced.src/M000042.html +19 -0
- data/doc/classes/Bio/Graphics/Glyph/Transcript.html +113 -0
- data/doc/classes/Bio/Graphics/Glyph/Triangle.html +139 -0
- data/doc/classes/Bio/Graphics/Glyph/Triangle.src/M000007.html +21 -0
- data/doc/classes/Bio/Graphics/Glyph/Triangle.src/M000008.html +21 -0
- data/doc/classes/Bio/Graphics/Glyph/Triangle.src/M000036.html +21 -0
- data/doc/classes/{ImageMap.html → Bio/Graphics/ImageMap.html} +50 -16
- data/doc/classes/{ImageMap.src/M000001.html → Bio/Graphics/ImageMap.src/M000030.html} +3 -3
- data/doc/classes/Bio/Graphics/ImageMap.src/M000031.html +18 -0
- data/doc/classes/Bio/Graphics/ImageMap.src/M000032.html +18 -0
- data/doc/classes/Bio/Graphics/ImageMap.src/M000033.html +18 -0
- data/doc/classes/{ImageMap.src/M000002.html → Bio/Graphics/ImageMap.src/M000034.html} +7 -4
- data/doc/classes/Bio/Graphics/ImageMap.src/M000035.html +24 -0
- data/doc/classes/Bio/Graphics/ImageMap.src/M000062.html +18 -0
- data/doc/classes/Bio/Graphics/ImageMap.src/M000063.html +18 -0
- data/doc/classes/Bio/Graphics/ImageMap.src/M000064.html +27 -0
- data/doc/classes/Bio/Graphics/ImageMap.src/M000065.html +24 -0
- data/doc/classes/{ImageMap/ImageMapElement.html → Bio/Graphics/ImageMap/Element.html} +14 -14
- data/doc/classes/{ImageMap/ImageMapElement.src/M000003.html → Bio/Graphics/ImageMap/Element.src/M000034.html} +3 -3
- data/doc/classes/{ImageMap/ImageMapElement.src/M000004.html → Bio/Graphics/ImageMap/Element.src/M000035.html} +6 -4
- data/doc/classes/Bio/Graphics/ImageMap/Element.src/M000036.html +19 -0
- data/doc/classes/Bio/Graphics/ImageMap/Element.src/M000037.html +22 -0
- data/doc/classes/Bio/Graphics/ImageMap/Element.src/M000066.html +19 -0
- data/doc/classes/Bio/Graphics/ImageMap/Element.src/M000067.html +22 -0
- data/doc/classes/Bio/Graphics/Panel.html +70 -69
- data/doc/classes/Bio/Graphics/Panel.src/M000025.html +52 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000026.html +20 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000027.html +98 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000028.html +20 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000029.html +52 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000030.html +20 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000031.html +98 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000059.html +52 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000060.html +20 -0
- data/doc/classes/Bio/Graphics/Panel.src/M000061.html +98 -0
- data/doc/classes/Bio/Graphics/{Panel/Ruler.html → Ruler.html} +50 -21
- data/doc/classes/Bio/Graphics/Ruler.src/M000015.html +30 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000016.html +20 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000017.html +30 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000018.html +20 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000019.html +26 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000020.html +45 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000047.html +30 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000048.html +20 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000049.html +26 -0
- data/doc/classes/Bio/Graphics/Ruler.src/M000050.html +45 -0
- data/doc/classes/Bio/Graphics/SubFeature.html +348 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000001.html +73 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000002.html +69 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000023.html +73 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000024.html +69 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000027.html +73 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000028.html +69 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000057.html +73 -0
- data/doc/classes/Bio/Graphics/SubFeature.src/M000058.html +69 -0
- data/doc/classes/Bio/Graphics/{Panel/Track.html → Track.html} +67 -69
- data/doc/classes/Bio/Graphics/Track.src/M000017.html +39 -0
- data/doc/classes/Bio/Graphics/Track.src/M000018.html +37 -0
- data/doc/classes/Bio/Graphics/Track.src/M000019.html +45 -0
- data/doc/classes/Bio/Graphics/Track.src/M000020.html +41 -0
- data/doc/classes/Bio/Graphics/Track.src/M000021.html +39 -0
- data/doc/classes/Bio/Graphics/Track.src/M000022.html +37 -0
- data/doc/classes/Bio/Graphics/Track.src/M000023.html +45 -0
- data/doc/classes/Bio/Graphics/Track.src/M000051.html +39 -0
- data/doc/classes/Bio/Graphics/Track.src/M000052.html +37 -0
- data/doc/classes/Bio/Graphics/Track.src/M000053.html +45 -0
- data/doc/classes/Range.html +129 -0
- data/doc/classes/String.html +167 -0
- data/doc/classes/String.src/M000001.html +18 -0
- data/doc/classes/String.src/M000002.html +18 -0
- data/doc/classes/String.src/M000003.html +23 -0
- data/doc/classes/String.src/M000029.html +18 -0
- data/doc/classes/String.src/M000030.html +18 -0
- data/doc/classes/String.src/M000031.html +23 -0
- data/doc/classes/TestCustomGlyph.html +137 -0
- data/doc/classes/TestCustomGlyph.src/M000025.html +25 -0
- data/doc/classes/TestCustomGlyphInFile.html +167 -0
- data/doc/classes/TestCustomGlyphInFile.src/M000026.html +19 -0
- data/doc/classes/TestCustomGlyphInFile.src/M000027.html +25 -0
- data/doc/classes/TestCustomGlyphInFile.src/M000028.html +18 -0
- data/doc/classes/TestExtensions.html +152 -0
- data/doc/classes/TestExtensions.src/M000015.html +22 -0
- data/doc/classes/TestExtensions.src/M000016.html +25 -0
- data/doc/classes/TestFeature.html +152 -0
- data/doc/classes/TestFeature.src/M000017.html +19 -0
- data/doc/classes/TestFeature.src/M000018.html +21 -0
- data/doc/classes/TestImageMap.html +182 -0
- data/doc/classes/TestImageMap.src/M000019.html +22 -0
- data/doc/classes/TestImageMap.src/M000020.html +56 -0
- data/doc/classes/TestImageMap.src/M000021.html +56 -0
- data/doc/classes/TestImageMap.src/M000022.html +20 -0
- data/doc/classes/TestPanel.html +276 -0
- data/doc/classes/TestPanel.src/M000001.html +18 -0
- data/doc/classes/TestPanel.src/M000002.html +61 -0
- data/doc/classes/TestPanel.src/M000003.html +35 -0
- data/doc/classes/TestPanel.src/M000004.html +54 -0
- data/doc/classes/TestPanel.src/M000005.html +54 -0
- data/doc/classes/TestPanel.src/M000006.html +41 -0
- data/doc/classes/TestPanel.src/M000007.html +36 -0
- data/doc/classes/TestPanel.src/M000008.html +20 -0
- data/doc/classes/TestPanel.src/M000009.html +26 -0
- data/doc/classes/TestPanel.src/M000010.html +21 -0
- data/doc/classes/TestRuler.html +152 -0
- data/doc/classes/TestRuler.src/M000013.html +22 -0
- data/doc/classes/TestRuler.src/M000014.html +31 -0
- data/doc/classes/TestSubFeature.html +152 -0
- data/doc/classes/TestSubFeature.src/M000023.html +21 -0
- data/doc/classes/TestSubFeature.src/M000024.html +18 -0
- data/doc/classes/TestTrack.html +152 -0
- data/doc/classes/TestTrack.src/M000011.html +19 -0
- data/doc/classes/TestTrack.src/M000012.html +23 -0
- data/doc/created.rid +1 -1
- data/doc/files/README_DEV.html +399 -70
- data/doc/files/TUTORIAL.html +188 -67
- data/doc/files/lib/bio-graphics_rb.html +3 -2
- data/doc/files/lib/bio/graphics/feature_rb.html +12 -6
- data/doc/files/lib/bio/graphics/glyphs/box_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/common_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/directed_box_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/directed_generic_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/directed_spliced_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/dot_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/generic_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/line_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/line_with_handles_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/spliced_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/transcript_rb.html +113 -0
- data/doc/files/lib/bio/graphics/glyphs/triangle_rb.html +113 -0
- data/doc/files/lib/bio/graphics/image_map_rb.html +3 -2
- data/doc/files/lib/bio/graphics/panel_rb.html +10 -2
- data/doc/files/lib/bio/graphics/ruler_rb.html +3 -2
- data/doc/files/lib/bio/graphics/subfeature_rb.html +114 -0
- data/doc/files/lib/bio/graphics/track_rb.html +3 -2
- data/doc/files/lib/feature_rb.html +101 -0
- data/doc/files/samples/arkdb_features_rb.html +101 -0
- data/doc/files/samples/glyph_showcase_rb.html +108 -0
- data/doc/files/samples/protein_domains_rb.html +115 -0
- data/doc/files/samples/subfeatures_rb.html +108 -0
- data/doc/files/scripts/gff2png_rb.html +154 -0
- data/doc/files/test/unit/custom_glyph_in_file_rb.html +101 -0
- data/doc/files/test/unit/test_class_extensions_rb.html +108 -0
- data/doc/files/test/unit/test_creation_rb.html +108 -0
- data/doc/files/test/unit/test_custom_glyph_rb.html +108 -0
- data/doc/files/test/unit/test_draw_rb.html +108 -0
- data/doc/files/test/unit/test_imagemap_rb.html +108 -0
- data/doc/files/test/unit/test_subfeatures_rb.html +108 -0
- data/doc/fr_class_index.html +24 -6
- data/doc/fr_file_index.html +14 -0
- data/doc/fr_method_index.html +51 -19
- data/doc/images/glyph_showcase.png +0 -0
- data/doc/images/terms.svg +146 -132
- data/images/glyph_showcase.png +0 -0
- data/lib/bio-graphics.rb +38 -6
- data/lib/bio/graphics/feature.rb +212 -440
- data/lib/bio/graphics/glyphs/box.rb +21 -0
- data/lib/bio/graphics/glyphs/common.rb +149 -0
- data/lib/bio/graphics/glyphs/directed_box.rb +28 -0
- data/lib/bio/graphics/glyphs/directed_generic.rb +23 -0
- data/lib/bio/graphics/glyphs/directed_spliced.rb +39 -0
- data/lib/bio/graphics/glyphs/dot.rb +21 -0
- data/lib/bio/graphics/glyphs/generic.rb +15 -0
- data/lib/bio/graphics/glyphs/line.rb +17 -0
- data/lib/bio/graphics/glyphs/line_with_handles.rb +25 -0
- data/lib/bio/graphics/glyphs/spliced.rb +16 -0
- data/lib/bio/graphics/glyphs/transcript.rb +12 -0
- data/lib/bio/graphics/glyphs/triangle.rb +18 -0
- data/lib/bio/graphics/image_map.rb +25 -4
- data/lib/bio/graphics/panel.rb +266 -209
- data/lib/bio/graphics/ruler.rb +95 -96
- data/lib/bio/graphics/subfeature.rb +187 -0
- data/lib/bio/graphics/track.rb +155 -156
- data/lib/feature.rb +204 -0
- data/samples/arkdb_features.rb +10 -8
- data/samples/glyph_showcase.rb +58 -22
- data/samples/protein_domains.rb +19 -0
- data/samples/subfeatures.rb +31 -0
- data/test/unit/custom_glyph_in_file.rb +12 -0
- data/test/unit/data.txt +32 -0
- data/test/unit/test_class_extensions.rb +23 -0
- data/test/unit/test_creation.rb +43 -13
- data/test/unit/test_custom_glyph.rb +50 -0
- data/test/unit/test_draw.rb +211 -0
- data/test/unit/test_imagemap.rb +134 -0
- data/test/unit/test_subfeatures.rb +17 -0
- metadata +396 -119
- data/doc/classes/Bio/Graphics/Panel.src/M000005.html +0 -29
- data/doc/classes/Bio/Graphics/Panel.src/M000006.html +0 -19
- data/doc/classes/Bio/Graphics/Panel.src/M000007.html +0 -68
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000008.html +0 -20
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000009.html +0 -28
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000010.html +0 -54
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000013.html +0 -20
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000014.html +0 -20
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000015.html +0 -28
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000016.html +0 -59
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000017.html +0 -20
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000018.html +0 -28
- data/doc/classes/Bio/Graphics/Panel/Ruler.src/M000019.html +0 -59
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000008.html +0 -26
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000009.html +0 -42
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000010.html +0 -52
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000011.html +0 -23
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000012.html +0 -43
- data/doc/classes/Bio/Graphics/Panel/Track.src/M000013.html +0 -259
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.src/M000011.html +0 -65
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.src/M000012.html +0 -39
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.src/M000013.html +0 -27
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.src/M000014.html +0 -225
- data/doc/classes/Bio/Graphics/Panel/Track/Feature.src/M000015.html +0 -48
- data/doc/classes/Bio/Graphics/Panel/Track/Feature/PixelRange.src/M000012.html +0 -18
- data/doc/classes/Bio/Graphics/Panel/Track/Feature/PixelRange.src/M000013.html +0 -18
- data/doc/classes/Bio/Graphics/Panel/Track/Feature/PixelRange.src/M000015.html +0 -18
- data/doc/classes/Bio/Graphics/Panel/Track/Feature/PixelRange.src/M000016.html +0 -18
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
7
|
<head>
|
8
|
-
<title>Class: Bio::Graphics::
|
8
|
+
<title>Class: Bio::Graphics::Ruler</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
12
|
<script type="text/javascript">
|
13
13
|
// <![CDATA[
|
14
14
|
|
@@ -50,12 +50,12 @@
|
|
50
50
|
<table class="header-table">
|
51
51
|
<tr class="top-aligned-row">
|
52
52
|
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Bio::Graphics::
|
53
|
+
<td class="class-name-in-header">Bio::Graphics::Ruler</td>
|
54
54
|
</tr>
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
57
57
|
<td>
|
58
|
-
<a href="
|
58
|
+
<a href="../../../files/lib/bio/graphics/ruler_rb.html">
|
59
59
|
lib/bio/graphics/ruler.rb
|
60
60
|
</a>
|
61
61
|
<br />
|
@@ -80,10 +80,10 @@
|
|
80
80
|
|
81
81
|
<div id="description">
|
82
82
|
<p>
|
83
|
-
The Bio::Graphics::Ruler class describes the ruler
|
84
|
-
graph. This is created automatically when creating the
|
85
|
-
Bio::Graphics::Panel.to_svg. See BioExt::Graphics
|
86
|
-
explanation of interplay between different classes.
|
83
|
+
The <a href="Ruler.html">Bio::Graphics::Ruler</a> class describes the ruler
|
84
|
+
to be drawn on the graph. This is created automatically when creating the
|
85
|
+
picture by using Bio::Graphics::Panel.to_svg. See BioExt::Graphics
|
86
|
+
documentation for explanation of interplay between different classes.
|
87
87
|
</p>
|
88
88
|
|
89
89
|
</div>
|
@@ -95,9 +95,10 @@ explanation of interplay between different classes.
|
|
95
95
|
<h3 class="section-bar">Methods</h3>
|
96
96
|
|
97
97
|
<div class="name-list">
|
98
|
-
<a href="#
|
99
|
-
<a href="#M000019">
|
98
|
+
<a href="#M000020">draw</a>
|
99
|
+
<a href="#M000019">first_tick_position</a>
|
100
100
|
<a href="#M000017">new</a>
|
101
|
+
<a href="#M000018">scaling_factor</a>
|
101
102
|
</div>
|
102
103
|
</div>
|
103
104
|
|
@@ -132,6 +133,11 @@ explanation of interplay between different classes.
|
|
132
133
|
<td class="context-item-value"> [RW] </td>
|
133
134
|
<td class="context-item-desc"></td>
|
134
135
|
</tr>
|
136
|
+
<tr class="top-aligned-row context-row">
|
137
|
+
<td class="context-item-name">min_pixels_per_tick</td>
|
138
|
+
<td class="context-item-value"> [RW] </td>
|
139
|
+
<td class="context-item-desc"></td>
|
140
|
+
</tr>
|
135
141
|
<tr class="top-aligned-row context-row">
|
136
142
|
<td class="context-item-name">minor_tick_distance</td>
|
137
143
|
<td class="context-item-value"> [RW] </td>
|
@@ -147,6 +153,16 @@ explanation of interplay between different classes.
|
|
147
153
|
<td class="context-item-value"> [RW] </td>
|
148
154
|
<td class="context-item-desc"></td>
|
149
155
|
</tr>
|
156
|
+
<tr class="top-aligned-row context-row">
|
157
|
+
<td class="context-item-name">tick_height</td>
|
158
|
+
<td class="context-item-value"> [RW] </td>
|
159
|
+
<td class="context-item-desc"></td>
|
160
|
+
</tr>
|
161
|
+
<tr class="top-aligned-row context-row">
|
162
|
+
<td class="context-item-name">tick_text_height</td>
|
163
|
+
<td class="context-item-value"> [RW] </td>
|
164
|
+
<td class="context-item-desc"></td>
|
165
|
+
</tr>
|
150
166
|
</table>
|
151
167
|
</div>
|
152
168
|
</div>
|
@@ -170,15 +186,14 @@ explanation of interplay between different classes.
|
|
170
186
|
<div class="method-description">
|
171
187
|
<p>
|
172
188
|
Creates a <a href="Ruler.html#M000017">new</a> <a
|
173
|
-
href="Ruler.html">Bio::Graphics::
|
189
|
+
href="Ruler.html">Bio::Graphics::Ruler</a> object.
|
174
190
|
</p>
|
175
191
|
<hr size="1"></hr><p>
|
176
192
|
<b>Arguments</b>:
|
177
193
|
</p>
|
178
194
|
<ul>
|
179
|
-
<li><em>panel</em> (required) :: <a
|
180
|
-
|
181
|
-
belongs to
|
195
|
+
<li><em>panel</em> (required) :: <a href="Panel.html">Bio::Graphics::Panel</a>
|
196
|
+
object that this ruler belongs to
|
182
197
|
|
183
198
|
</li>
|
184
199
|
<li><em>colour</em> :: colour of the ruler. Default = ‘black‘
|
@@ -186,7 +201,7 @@ belongs to
|
|
186
201
|
</li>
|
187
202
|
</ul>
|
188
203
|
<table>
|
189
|
-
<tr><td valign="top"><b>Returns</b>:</td><td>Bio::Graphics::Ruler object
|
204
|
+
<tr><td valign="top"><b>Returns</b>:</td><td><a href="Ruler.html">Bio::Graphics::Ruler</a> object
|
190
205
|
|
191
206
|
</td></tr>
|
192
207
|
</table>
|
@@ -195,13 +210,13 @@ belongs to
|
|
195
210
|
|
196
211
|
<h3 class="section-bar">Public Instance methods</h3>
|
197
212
|
|
198
|
-
<div id="method-
|
199
|
-
<a name="
|
213
|
+
<div id="method-M000020" class="method-detail">
|
214
|
+
<a name="M000020"></a>
|
200
215
|
|
201
216
|
<div class="method-heading">
|
202
|
-
<a href="Ruler.src/
|
203
|
-
onclick="popupCode('Ruler.src/
|
204
|
-
<span class="method-name">
|
217
|
+
<a href="Ruler.src/M000020.html" target="Code" class="method-signature"
|
218
|
+
onclick="popupCode('Ruler.src/M000020.html');return false;">
|
219
|
+
<span class="method-name">draw</span><span class="method-args">(panel_drawing)</span>
|
205
220
|
</a>
|
206
221
|
</div>
|
207
222
|
|
@@ -215,7 +230,21 @@ belongs to
|
|
215
230
|
<div class="method-heading">
|
216
231
|
<a href="Ruler.src/M000019.html" target="Code" class="method-signature"
|
217
232
|
onclick="popupCode('Ruler.src/M000019.html');return false;">
|
218
|
-
<span class="method-name">
|
233
|
+
<span class="method-name">first_tick_position</span><span class="method-args">(start = @panel.display_start, minor_tick = @minor_tick_distance)</span>
|
234
|
+
</a>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div class="method-description">
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div id="method-M000018" class="method-detail">
|
242
|
+
<a name="M000018"></a>
|
243
|
+
|
244
|
+
<div class="method-heading">
|
245
|
+
<a href="Ruler.src/M000018.html" target="Code" class="method-signature"
|
246
|
+
onclick="popupCode('Ruler.src/M000018.html');return false;">
|
247
|
+
<span class="method-name">scaling_factor</span><span class="method-args">(min_pixels_per_tick = @min_pixels_per_tick, rescale_factor = @panel.rescale_factor)</span>
|
219
248
|
</a>
|
220
249
|
</div>
|
221
250
|
|
@@ -0,0 +1,30 @@
|
|
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::Ruler)</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/ruler.rb, line 27</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">panel</span>, <span class="ruby-identifier">colour</span> = [<span class="ruby-value">0</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>])
|
15
|
+
<span class="ruby-ivar">@panel</span> = <span class="ruby-identifier">panel</span>
|
16
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-value str">'ruler'</span>
|
17
|
+
<span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">colour</span>
|
18
|
+
|
19
|
+
<span class="ruby-comment cmt"># Number of pixels between each tick, used to calculate tick spacing</span>
|
20
|
+
<span class="ruby-ivar">@min_pixels_per_tick</span> = <span class="ruby-value">5</span>
|
21
|
+
<span class="ruby-comment cmt"># The base height of minor ticks in pixels</span>
|
22
|
+
<span class="ruby-ivar">@tick_height</span> = <span class="ruby-value">5</span>
|
23
|
+
<span class="ruby-comment cmt"># The height of the text in pixels</span>
|
24
|
+
<span class="ruby-ivar">@tick_text_height</span> = <span class="ruby-value">10</span>
|
25
|
+
|
26
|
+
<span class="ruby-ivar">@minor_tick_distance</span> = <span class="ruby-ivar">@min_pixels_per_tick</span> <span class="ruby-operator">**</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scaling_factor</span>
|
27
|
+
<span class="ruby-ivar">@major_tick_distance</span> = <span class="ruby-ivar">@minor_tick_distance</span> <span class="ruby-operator">*</span> <span class="ruby-value">10</span>
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
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>scaling_factor (Bio::Graphics::Ruler)</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/ruler.rb, line 46</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scaling_factor</span>(<span class="ruby-identifier">min_pixels_per_tick</span> = <span class="ruby-ivar">@min_pixels_per_tick</span>,
|
15
|
+
<span class="ruby-identifier">rescale_factor</span> = <span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">rescale_factor</span>)
|
16
|
+
(<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">min_pixels_per_tick</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">rescale_factor</span>) <span class="ruby-operator">/</span>
|
17
|
+
<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">min_pixels_per_tick</span>)).<span class="ruby-identifier">ceil</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
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::Ruler)</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/ruler.rb, line 27</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">panel</span>, <span class="ruby-identifier">colour</span> = [<span class="ruby-value">0</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>])
|
15
|
+
<span class="ruby-ivar">@panel</span> = <span class="ruby-identifier">panel</span>
|
16
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-value str">'ruler'</span>
|
17
|
+
<span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">colour</span>
|
18
|
+
|
19
|
+
<span class="ruby-comment cmt"># Number of pixels between each tick, used to calculate tick spacing</span>
|
20
|
+
<span class="ruby-ivar">@min_pixels_per_tick</span> = <span class="ruby-value">5</span>
|
21
|
+
<span class="ruby-comment cmt"># The base height of minor ticks in pixels</span>
|
22
|
+
<span class="ruby-ivar">@tick_height</span> = <span class="ruby-value">5</span>
|
23
|
+
<span class="ruby-comment cmt"># The height of the text in pixels</span>
|
24
|
+
<span class="ruby-ivar">@tick_text_height</span> = <span class="ruby-value">10</span>
|
25
|
+
|
26
|
+
<span class="ruby-ivar">@minor_tick_distance</span> = <span class="ruby-ivar">@min_pixels_per_tick</span> <span class="ruby-operator">**</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scaling_factor</span>
|
27
|
+
<span class="ruby-ivar">@major_tick_distance</span> = <span class="ruby-ivar">@minor_tick_distance</span> <span class="ruby-operator">*</span> <span class="ruby-value">10</span>
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
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>scaling_factor (Bio::Graphics::Ruler)</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/ruler.rb, line 46</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scaling_factor</span>(<span class="ruby-identifier">min_pixels_per_tick</span> = <span class="ruby-ivar">@min_pixels_per_tick</span>,
|
15
|
+
<span class="ruby-identifier">rescale_factor</span> = <span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">rescale_factor</span>)
|
16
|
+
(<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">min_pixels_per_tick</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">rescale_factor</span>) <span class="ruby-operator">/</span>
|
17
|
+
<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">min_pixels_per_tick</span>)).<span class="ruby-identifier">ceil</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</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>first_tick_position (Bio::Graphics::Ruler)</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/ruler.rb, line 52</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first_tick_position</span>(<span class="ruby-identifier">start</span> = <span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">display_start</span>,
|
15
|
+
<span class="ruby-identifier">minor_tick</span> = <span class="ruby-ivar">@minor_tick_distance</span>)
|
16
|
+
<span class="ruby-comment cmt"># * Find position of first tick.</span>
|
17
|
+
<span class="ruby-comment cmt"># Most of the time, we don't want the first tick on the very first</span>
|
18
|
+
<span class="ruby-comment cmt"># basepair of the view. Suppose that would be position 333 in the</span>
|
19
|
+
<span class="ruby-comment cmt"># sequence. Then the numbers under the major tickmarks would be:</span>
|
20
|
+
<span class="ruby-comment cmt"># 343, 353, 363, 373 and so on. Instead, we want 350, 360, 370, 380.</span>
|
21
|
+
<span class="ruby-comment cmt"># So we want to find the position of the first tick.</span>
|
22
|
+
<span class="ruby-identifier">modulo_from_tick</span> = (<span class="ruby-identifier">start</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">minor_tick</span>)
|
23
|
+
<span class="ruby-identifier">start</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">modulo_from_tick</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> (<span class="ruby-identifier">minor_tick</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">modulo_from_tick</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
|
24
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,45 @@
|
|
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::Ruler)</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/ruler.rb, line 64</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>(<span class="ruby-identifier">panel_drawing</span>)
|
15
|
+
<span class="ruby-identifier">ruler_drawing</span> = <span class="ruby-constant">Cairo</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">panel_drawing</span>)
|
16
|
+
|
17
|
+
<span class="ruby-comment cmt"># Draw line</span>
|
18
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">move_to</span>(<span class="ruby-value">0</span>,<span class="ruby-value">10</span>)
|
19
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">line_to</span>(<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>, <span class="ruby-value">10</span>)
|
20
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">stroke</span>
|
21
|
+
|
22
|
+
<span class="ruby-comment cmt"># Draw ticks</span>
|
23
|
+
<span class="ruby-comment cmt"># * And start drawing the rest.</span>
|
24
|
+
<span class="ruby-identifier">first_tick_position</span>.<span class="ruby-identifier">step</span>(<span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">display_stop</span>, <span class="ruby-ivar">@minor_tick_distance</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tick</span><span class="ruby-operator">|</span>
|
25
|
+
<span class="ruby-identifier">tick_pixel_position</span> = (<span class="ruby-identifier">tick</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>) <span class="ruby-operator">/</span> <span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
26
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">move_to</span>(<span class="ruby-identifier">tick_pixel_position</span>.<span class="ruby-identifier">floor</span>, <span class="ruby-ivar">@min_pixels_per_tick</span>)
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tick</span>.<span class="ruby-identifier">modulo</span>(<span class="ruby-ivar">@major_tick_distance</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
28
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">rel_line_to</span>(<span class="ruby-value">0</span>, <span class="ruby-value">3</span><span class="ruby-operator">*</span><span class="ruby-ivar">@tick_height</span>)
|
29
|
+
|
30
|
+
<span class="ruby-comment cmt"># Draw tick number</span>
|
31
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">select_font_face</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">FONT</span>)
|
32
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">set_font_size</span>(<span class="ruby-ivar">@tick_text_height</span>)
|
33
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">move_to</span>(<span class="ruby-identifier">tick_pixel_position</span>.<span class="ruby-identifier">floor</span>, <span class="ruby-value">4</span><span class="ruby-operator">*</span><span class="ruby-ivar">@tick_height</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@tick_text_height</span>)
|
34
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">show_text</span>(<span class="ruby-identifier">tick</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span>)
|
35
|
+
<span class="ruby-keyword kw">else</span>
|
36
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">rel_line_to</span>(<span class="ruby-value">0</span>, <span class="ruby-ivar">@tick_height</span>)
|
37
|
+
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">stroke</span>
|
40
|
+
<span class="ruby-keyword kw">end</span>
|
41
|
+
|
42
|
+
<span class="ruby-ivar">@height</span> = <span class="ruby-value">5</span><span class="ruby-operator">*</span><span class="ruby-ivar">@tick_height</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@tick_text_height</span>
|
43
|
+
<span class="ruby-keyword kw">end</span></pre>
|
44
|
+
</body>
|
45
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
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::Ruler)</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/ruler.rb, line 27</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">panel</span>, <span class="ruby-identifier">colour</span> = [<span class="ruby-value">0</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>])
|
15
|
+
<span class="ruby-ivar">@panel</span> = <span class="ruby-identifier">panel</span>
|
16
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-value str">'ruler'</span>
|
17
|
+
<span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">colour</span>
|
18
|
+
|
19
|
+
<span class="ruby-comment cmt"># Number of pixels between each tick, used to calculate tick spacing</span>
|
20
|
+
<span class="ruby-ivar">@min_pixels_per_tick</span> = <span class="ruby-value">5</span>
|
21
|
+
<span class="ruby-comment cmt"># The base height of minor ticks in pixels</span>
|
22
|
+
<span class="ruby-ivar">@tick_height</span> = <span class="ruby-value">5</span>
|
23
|
+
<span class="ruby-comment cmt"># The height of the text in pixels</span>
|
24
|
+
<span class="ruby-ivar">@tick_text_height</span> = <span class="ruby-value">10</span>
|
25
|
+
|
26
|
+
<span class="ruby-ivar">@minor_tick_distance</span> = <span class="ruby-ivar">@min_pixels_per_tick</span> <span class="ruby-operator">**</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scaling_factor</span>
|
27
|
+
<span class="ruby-ivar">@major_tick_distance</span> = <span class="ruby-ivar">@minor_tick_distance</span> <span class="ruby-operator">*</span> <span class="ruby-value">10</span>
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
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>scaling_factor (Bio::Graphics::Ruler)</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/ruler.rb, line 46</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scaling_factor</span>(<span class="ruby-identifier">min_pixels_per_tick</span> = <span class="ruby-ivar">@min_pixels_per_tick</span>,
|
15
|
+
<span class="ruby-identifier">rescale_factor</span> = <span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">rescale_factor</span>)
|
16
|
+
(<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">min_pixels_per_tick</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">rescale_factor</span>) <span class="ruby-operator">/</span>
|
17
|
+
<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">min_pixels_per_tick</span>)).<span class="ruby-identifier">ceil</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</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>first_tick_position (Bio::Graphics::Ruler)</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/ruler.rb, line 52</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first_tick_position</span>(<span class="ruby-identifier">start</span> = <span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">display_start</span>,
|
15
|
+
<span class="ruby-identifier">minor_tick</span> = <span class="ruby-ivar">@minor_tick_distance</span>)
|
16
|
+
<span class="ruby-comment cmt"># * Find position of first tick.</span>
|
17
|
+
<span class="ruby-comment cmt"># Most of the time, we don't want the first tick on the very first</span>
|
18
|
+
<span class="ruby-comment cmt"># basepair of the view. Suppose that would be position 333 in the</span>
|
19
|
+
<span class="ruby-comment cmt"># sequence. Then the numbers under the major tickmarks would be:</span>
|
20
|
+
<span class="ruby-comment cmt"># 343, 353, 363, 373 and so on. Instead, we want 350, 360, 370, 380.</span>
|
21
|
+
<span class="ruby-comment cmt"># So we want to find the position of the first tick.</span>
|
22
|
+
<span class="ruby-identifier">modulo_from_tick</span> = (<span class="ruby-identifier">start</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">minor_tick</span>)
|
23
|
+
<span class="ruby-identifier">start</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">modulo_from_tick</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> (<span class="ruby-identifier">minor_tick</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">modulo_from_tick</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
|
24
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,45 @@
|
|
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::Ruler)</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/ruler.rb, line 64</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>(<span class="ruby-identifier">panel_drawing</span>)
|
15
|
+
<span class="ruby-identifier">ruler_drawing</span> = <span class="ruby-constant">Cairo</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">panel_drawing</span>)
|
16
|
+
|
17
|
+
<span class="ruby-comment cmt"># Draw line</span>
|
18
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">move_to</span>(<span class="ruby-value">0</span>,<span class="ruby-value">10</span>)
|
19
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">line_to</span>(<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>, <span class="ruby-value">10</span>)
|
20
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">stroke</span>
|
21
|
+
|
22
|
+
<span class="ruby-comment cmt"># Draw ticks</span>
|
23
|
+
<span class="ruby-comment cmt"># * And start drawing the rest.</span>
|
24
|
+
<span class="ruby-identifier">first_tick_position</span>.<span class="ruby-identifier">step</span>(<span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">display_stop</span>, <span class="ruby-ivar">@minor_tick_distance</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tick</span><span class="ruby-operator">|</span>
|
25
|
+
<span class="ruby-identifier">tick_pixel_position</span> = (<span class="ruby-identifier">tick</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>) <span class="ruby-operator">/</span> <span class="ruby-ivar">@panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
26
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">move_to</span>(<span class="ruby-identifier">tick_pixel_position</span>.<span class="ruby-identifier">floor</span>, <span class="ruby-ivar">@min_pixels_per_tick</span>)
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tick</span>.<span class="ruby-identifier">modulo</span>(<span class="ruby-ivar">@major_tick_distance</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
28
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">rel_line_to</span>(<span class="ruby-value">0</span>, <span class="ruby-value">3</span><span class="ruby-operator">*</span><span class="ruby-ivar">@tick_height</span>)
|
29
|
+
|
30
|
+
<span class="ruby-comment cmt"># Draw tick number</span>
|
31
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">select_font_face</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">FONT</span>)
|
32
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">set_font_size</span>(<span class="ruby-ivar">@tick_text_height</span>)
|
33
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">move_to</span>(<span class="ruby-identifier">tick_pixel_position</span>.<span class="ruby-identifier">floor</span>, <span class="ruby-value">4</span><span class="ruby-operator">*</span><span class="ruby-ivar">@tick_height</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@tick_text_height</span>)
|
34
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">show_text</span>(<span class="ruby-identifier">tick</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span>)
|
35
|
+
<span class="ruby-keyword kw">else</span>
|
36
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">rel_line_to</span>(<span class="ruby-value">0</span>, <span class="ruby-ivar">@tick_height</span>)
|
37
|
+
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-identifier">ruler_drawing</span>.<span class="ruby-identifier">stroke</span>
|
40
|
+
<span class="ruby-keyword kw">end</span>
|
41
|
+
|
42
|
+
<span class="ruby-ivar">@height</span> = <span class="ruby-value">5</span><span class="ruby-operator">*</span><span class="ruby-ivar">@tick_height</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@tick_text_height</span>
|
43
|
+
<span class="ruby-keyword kw">end</span></pre>
|
44
|
+
</body>
|
45
|
+
</html>
|