bio-graphics 1.2 → 1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/classes/Bio.html +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
@@ -0,0 +1,73 @@
|
|
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::SubFeature)</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/subfeature.rb, line 21</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">feature</span>, <span class="ruby-identifier">feature_object</span>, <span class="ruby-identifier">opts</span> = {})
|
15
|
+
<span class="ruby-ivar">@feature</span> = <span class="ruby-identifier">feature</span>
|
16
|
+
<span class="ruby-ivar">@feature_object</span> = <span class="ruby-identifier">feature_object</span>
|
17
|
+
<span class="ruby-identifier">opts</span> = {
|
18
|
+
<span class="ruby-identifier">:glyph</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>,
|
19
|
+
<span class="ruby-identifier">:colour</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">colour</span>
|
20
|
+
}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>)
|
21
|
+
|
22
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:glyph</span>]
|
23
|
+
<span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:colour</span>]
|
24
|
+
|
25
|
+
<span class="ruby-ivar">@locations</span> = <span class="ruby-ivar">@feature_object</span>.<span class="ruby-identifier">locations</span>
|
26
|
+
|
27
|
+
<span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span>}.<span class="ruby-identifier">min</span>.<span class="ruby-identifier">to_i</span>
|
28
|
+
<span class="ruby-ivar">@stop</span> = <span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span>}.<span class="ruby-identifier">max</span>.<span class="ruby-identifier">to_i</span>
|
29
|
+
<span class="ruby-ivar">@strand</span> = <span class="ruby-ivar">@locations</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">strand</span>.<span class="ruby-identifier">to_i</span>
|
30
|
+
<span class="ruby-ivar">@pixel_range_collection</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
31
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">false</span>
|
32
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
33
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">false</span>
|
34
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
35
|
+
|
36
|
+
<span class="ruby-comment cmt"># Get all pixel ranges for the subfeatures</span>
|
37
|
+
<span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
38
|
+
<span class="ruby-comment cmt"># xxxxxx [ ]</span>
|
39
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
40
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">true</span>
|
41
|
+
<span class="ruby-keyword kw">next</span>
|
42
|
+
<span class="ruby-comment cmt"># [ ] xxxxx</span>
|
43
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
44
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
45
|
+
<span class="ruby-keyword kw">next</span>
|
46
|
+
<span class="ruby-comment cmt"># xxxx[xxx ]</span>
|
47
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
48
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
49
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
50
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
51
|
+
<span class="ruby-comment cmt"># [ xxxx]xxxx</span>
|
52
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
53
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
54
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
55
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
56
|
+
<span class="ruby-comment cmt"># xxxx[xxxxxxxxxx]xxxx</span>
|
57
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
58
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
59
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
60
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
61
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
62
|
+
<span class="ruby-comment cmt"># [ xxxxx ]</span>
|
63
|
+
<span class="ruby-keyword kw">else</span>
|
64
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
65
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
66
|
+
<span class="ruby-keyword kw">end</span>
|
67
|
+
|
68
|
+
<span class="ruby-ivar">@pixel_range_collection</span>.<span class="ruby-identifier">push</span>(<span class="ruby-constant">Range</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">start_pixel</span>, <span class="ruby-identifier">stop_pixel</span>))
|
69
|
+
|
70
|
+
<span class="ruby-keyword kw">end</span>
|
71
|
+
<span class="ruby-keyword kw">end</span></pre>
|
72
|
+
</body>
|
73
|
+
</html>
|
@@ -0,0 +1,69 @@
|
|
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::SubFeature)</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/subfeature.rb, line 133</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>(<span class="ruby-identifier">feature_context</span>)
|
15
|
+
<span class="ruby-comment cmt"># Set the glyph to be used. The glyph can be set as a symbol (e.g. :generic)</span>
|
16
|
+
<span class="ruby-comment cmt"># or as a hash (e.g. {'utr' => :line, 'cds' => :directed_spliced}).</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hash</span>
|
18
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>[<span class="ruby-ivar">@feature_object</span>.<span class="ruby-identifier">feature</span>]
|
19
|
+
<span class="ruby-keyword kw">else</span>
|
20
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
|
23
|
+
<span class="ruby-comment cmt"># We have to check if we want to change the glyph type from directed to</span>
|
24
|
+
<span class="ruby-comment cmt"># undirected</span>
|
25
|
+
<span class="ruby-comment cmt"># There are 2 cases where we don't want to draw arrows on</span>
|
26
|
+
<span class="ruby-comment cmt"># features:</span>
|
27
|
+
<span class="ruby-comment cmt"># (a) when the picture is really zoomed out, features are</span>
|
28
|
+
<span class="ruby-comment cmt"># so small that the arrow itself is too big</span>
|
29
|
+
<span class="ruby-comment cmt"># (b) if a directed feature on the fw strand extends beyond</span>
|
30
|
+
<span class="ruby-comment cmt"># the end of the picture, the arrow is out of view. This</span>
|
31
|
+
<span class="ruby-comment cmt"># is the same as considering the feature as undirected.</span>
|
32
|
+
<span class="ruby-comment cmt"># The same obviously goes for features on the reverse</span>
|
33
|
+
<span class="ruby-comment cmt"># strand that extend beyond the left side of the image.</span>
|
34
|
+
<span class="ruby-comment cmt">#</span>
|
35
|
+
<span class="ruby-comment cmt"># (a) Zoomed out</span>
|
36
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">false</span>
|
37
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@stop</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span>).<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator"><</span> <span class="ruby-value">2</span>
|
38
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">true</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
<span class="ruby-comment cmt"># (b) Extending beyond borders picture</span>
|
41
|
+
<span class="ruby-keyword kw">if</span> ( <span class="ruby-ivar">@chopped_at_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@strand</span> = <span class="ruby-value">1</span> ) <span class="ruby-keyword kw">or</span> ( <span class="ruby-ivar">@chopped_at_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@strand</span> = <span class="ruby-value">-1</span> )
|
42
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">true</span>
|
43
|
+
<span class="ruby-keyword kw">end</span>
|
44
|
+
|
45
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-keyword kw">nil</span>
|
46
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_generic</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
47
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:generic</span>
|
48
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_spliced</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
49
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:spliced</span>
|
50
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_box</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
51
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:box</span>
|
52
|
+
<span class="ruby-keyword kw">else</span>
|
53
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-ivar">@glyph</span>
|
54
|
+
<span class="ruby-keyword kw">end</span>
|
55
|
+
|
56
|
+
<span class="ruby-comment cmt"># And draw the thing.</span>
|
57
|
+
|
58
|
+
<span class="ruby-identifier">feature_context</span>.<span class="ruby-identifier">set_source_rgb</span>(<span class="ruby-ivar">@colour</span>)
|
59
|
+
|
60
|
+
<span class="ruby-identifier">glyph</span> = (<span class="ruby-value str">"Bio::Graphics::Glyph::"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">local_feature_glyph</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">camel_case</span>).<span class="ruby-identifier">to_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">feature_context</span>)
|
61
|
+
<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">draw</span>
|
62
|
+
|
63
|
+
<span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">left_pixel_of_subfeatures</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">left_pixel</span>)
|
64
|
+
<span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">right_pixel_of_subfeatures</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">right_pixel</span>)
|
65
|
+
|
66
|
+
|
67
|
+
<span class="ruby-keyword kw">end</span></pre>
|
68
|
+
</body>
|
69
|
+
</html>
|
@@ -0,0 +1,73 @@
|
|
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::SubFeature)</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/subfeature.rb, line 21</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">feature</span>, <span class="ruby-identifier">feature_object</span>, <span class="ruby-identifier">opts</span> = {})
|
15
|
+
<span class="ruby-ivar">@feature</span> = <span class="ruby-identifier">feature</span>
|
16
|
+
<span class="ruby-ivar">@feature_object</span> = <span class="ruby-identifier">feature_object</span>
|
17
|
+
<span class="ruby-identifier">opts</span> = {
|
18
|
+
<span class="ruby-identifier">:glyph</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>,
|
19
|
+
<span class="ruby-identifier">:colour</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">colour</span>
|
20
|
+
}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>)
|
21
|
+
|
22
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:glyph</span>]
|
23
|
+
<span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:colour</span>]
|
24
|
+
|
25
|
+
<span class="ruby-ivar">@locations</span> = <span class="ruby-ivar">@feature_object</span>.<span class="ruby-identifier">locations</span>
|
26
|
+
|
27
|
+
<span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span>}.<span class="ruby-identifier">min</span>.<span class="ruby-identifier">to_i</span>
|
28
|
+
<span class="ruby-ivar">@stop</span> = <span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span>}.<span class="ruby-identifier">max</span>.<span class="ruby-identifier">to_i</span>
|
29
|
+
<span class="ruby-ivar">@strand</span> = <span class="ruby-ivar">@locations</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">strand</span>.<span class="ruby-identifier">to_i</span>
|
30
|
+
<span class="ruby-ivar">@pixel_range_collection</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
31
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">false</span>
|
32
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
33
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">false</span>
|
34
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
35
|
+
|
36
|
+
<span class="ruby-comment cmt"># Get all pixel ranges for the subfeatures</span>
|
37
|
+
<span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
38
|
+
<span class="ruby-comment cmt"># xxxxxx [ ]</span>
|
39
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
40
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">true</span>
|
41
|
+
<span class="ruby-keyword kw">next</span>
|
42
|
+
<span class="ruby-comment cmt"># [ ] xxxxx</span>
|
43
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
44
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
45
|
+
<span class="ruby-keyword kw">next</span>
|
46
|
+
<span class="ruby-comment cmt"># xxxx[xxx ]</span>
|
47
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
48
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
49
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
50
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
51
|
+
<span class="ruby-comment cmt"># [ xxxx]xxxx</span>
|
52
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
53
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
54
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
55
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
56
|
+
<span class="ruby-comment cmt"># xxxx[xxxxxxxxxx]xxxx</span>
|
57
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
58
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
59
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
60
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
61
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
62
|
+
<span class="ruby-comment cmt"># [ xxxxx ]</span>
|
63
|
+
<span class="ruby-keyword kw">else</span>
|
64
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
65
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
66
|
+
<span class="ruby-keyword kw">end</span>
|
67
|
+
|
68
|
+
<span class="ruby-ivar">@pixel_range_collection</span>.<span class="ruby-identifier">push</span>(<span class="ruby-constant">Range</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">start_pixel</span>, <span class="ruby-identifier">stop_pixel</span>))
|
69
|
+
|
70
|
+
<span class="ruby-keyword kw">end</span>
|
71
|
+
<span class="ruby-keyword kw">end</span></pre>
|
72
|
+
</body>
|
73
|
+
</html>
|
@@ -0,0 +1,69 @@
|
|
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::SubFeature)</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/subfeature.rb, line 133</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>(<span class="ruby-identifier">feature_context</span>)
|
15
|
+
<span class="ruby-comment cmt"># Set the glyph to be used. The glyph can be set as a symbol (e.g. :generic)</span>
|
16
|
+
<span class="ruby-comment cmt"># or as a hash (e.g. {'utr' => :line, 'cds' => :directed_spliced}).</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hash</span>
|
18
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>[<span class="ruby-ivar">@feature_object</span>.<span class="ruby-identifier">feature</span>]
|
19
|
+
<span class="ruby-keyword kw">else</span>
|
20
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
|
23
|
+
<span class="ruby-comment cmt"># We have to check if we want to change the glyph type from directed to</span>
|
24
|
+
<span class="ruby-comment cmt"># undirected</span>
|
25
|
+
<span class="ruby-comment cmt"># There are 2 cases where we don't want to draw arrows on</span>
|
26
|
+
<span class="ruby-comment cmt"># features:</span>
|
27
|
+
<span class="ruby-comment cmt"># (a) when the picture is really zoomed out, features are</span>
|
28
|
+
<span class="ruby-comment cmt"># so small that the arrow itself is too big</span>
|
29
|
+
<span class="ruby-comment cmt"># (b) if a directed feature on the fw strand extends beyond</span>
|
30
|
+
<span class="ruby-comment cmt"># the end of the picture, the arrow is out of view. This</span>
|
31
|
+
<span class="ruby-comment cmt"># is the same as considering the feature as undirected.</span>
|
32
|
+
<span class="ruby-comment cmt"># The same obviously goes for features on the reverse</span>
|
33
|
+
<span class="ruby-comment cmt"># strand that extend beyond the left side of the image.</span>
|
34
|
+
<span class="ruby-comment cmt">#</span>
|
35
|
+
<span class="ruby-comment cmt"># (a) Zoomed out</span>
|
36
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">false</span>
|
37
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@stop</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span>).<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator"><</span> <span class="ruby-value">2</span>
|
38
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">true</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
<span class="ruby-comment cmt"># (b) Extending beyond borders picture</span>
|
41
|
+
<span class="ruby-keyword kw">if</span> ( <span class="ruby-ivar">@chopped_at_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@strand</span> = <span class="ruby-value">1</span> ) <span class="ruby-keyword kw">or</span> ( <span class="ruby-ivar">@chopped_at_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@strand</span> = <span class="ruby-value">-1</span> )
|
42
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">true</span>
|
43
|
+
<span class="ruby-keyword kw">end</span>
|
44
|
+
|
45
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-keyword kw">nil</span>
|
46
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_generic</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
47
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:generic</span>
|
48
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_spliced</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
49
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:spliced</span>
|
50
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_box</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
51
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:box</span>
|
52
|
+
<span class="ruby-keyword kw">else</span>
|
53
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-ivar">@glyph</span>
|
54
|
+
<span class="ruby-keyword kw">end</span>
|
55
|
+
|
56
|
+
<span class="ruby-comment cmt"># And draw the thing.</span>
|
57
|
+
|
58
|
+
<span class="ruby-identifier">feature_context</span>.<span class="ruby-identifier">set_source_rgb</span>(<span class="ruby-ivar">@colour</span>)
|
59
|
+
|
60
|
+
<span class="ruby-identifier">glyph</span> = (<span class="ruby-value str">"Bio::Graphics::Glyph::"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">local_feature_glyph</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">camel_case</span>).<span class="ruby-identifier">to_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">feature_context</span>)
|
61
|
+
<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">draw</span>
|
62
|
+
|
63
|
+
<span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">left_pixel_of_subfeatures</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">left_pixel</span>)
|
64
|
+
<span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">right_pixel_of_subfeatures</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">right_pixel</span>)
|
65
|
+
|
66
|
+
|
67
|
+
<span class="ruby-keyword kw">end</span></pre>
|
68
|
+
</body>
|
69
|
+
</html>
|
@@ -0,0 +1,73 @@
|
|
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::SubFeature)</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/subfeature.rb, line 21</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">feature</span>, <span class="ruby-identifier">feature_object</span>, <span class="ruby-identifier">opts</span> = {})
|
15
|
+
<span class="ruby-ivar">@feature</span> = <span class="ruby-identifier">feature</span>
|
16
|
+
<span class="ruby-ivar">@feature_object</span> = <span class="ruby-identifier">feature_object</span>
|
17
|
+
<span class="ruby-identifier">opts</span> = {
|
18
|
+
<span class="ruby-identifier">:glyph</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>,
|
19
|
+
<span class="ruby-identifier">:colour</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">colour</span>
|
20
|
+
}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>)
|
21
|
+
|
22
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:glyph</span>]
|
23
|
+
<span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:colour</span>]
|
24
|
+
|
25
|
+
<span class="ruby-ivar">@locations</span> = <span class="ruby-ivar">@feature_object</span>.<span class="ruby-identifier">locations</span>
|
26
|
+
|
27
|
+
<span class="ruby-ivar">@start</span> = <span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span>}.<span class="ruby-identifier">min</span>.<span class="ruby-identifier">to_i</span>
|
28
|
+
<span class="ruby-ivar">@stop</span> = <span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span>}.<span class="ruby-identifier">max</span>.<span class="ruby-identifier">to_i</span>
|
29
|
+
<span class="ruby-ivar">@strand</span> = <span class="ruby-ivar">@locations</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">strand</span>.<span class="ruby-identifier">to_i</span>
|
30
|
+
<span class="ruby-ivar">@pixel_range_collection</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
31
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">false</span>
|
32
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
33
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">false</span>
|
34
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">false</span>
|
35
|
+
|
36
|
+
<span class="ruby-comment cmt"># Get all pixel ranges for the subfeatures</span>
|
37
|
+
<span class="ruby-ivar">@locations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
38
|
+
<span class="ruby-comment cmt"># xxxxxx [ ]</span>
|
39
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
40
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_start</span> = <span class="ruby-keyword kw">true</span>
|
41
|
+
<span class="ruby-keyword kw">next</span>
|
42
|
+
<span class="ruby-comment cmt"># [ ] xxxxx</span>
|
43
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
44
|
+
<span class="ruby-ivar">@hidden_subfeatures_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
45
|
+
<span class="ruby-keyword kw">next</span>
|
46
|
+
<span class="ruby-comment cmt"># xxxx[xxx ]</span>
|
47
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span>
|
48
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
49
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
50
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
51
|
+
<span class="ruby-comment cmt"># [ xxxx]xxxx</span>
|
52
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
53
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
54
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
55
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
56
|
+
<span class="ruby-comment cmt"># xxxx[xxxxxxxxxx]xxxx</span>
|
57
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_stop</span>
|
58
|
+
<span class="ruby-identifier">start_pixel</span> = <span class="ruby-value">1</span>
|
59
|
+
<span class="ruby-identifier">stop_pixel</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">width</span>
|
60
|
+
<span class="ruby-ivar">@chopped_at_start</span> = <span class="ruby-keyword kw">true</span>
|
61
|
+
<span class="ruby-ivar">@chopped_at_stop</span> = <span class="ruby-keyword kw">true</span>
|
62
|
+
<span class="ruby-comment cmt"># [ xxxxx ]</span>
|
63
|
+
<span class="ruby-keyword kw">else</span>
|
64
|
+
<span class="ruby-identifier">start_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
65
|
+
<span class="ruby-identifier">stop_pixel</span> = ( <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">display_start</span> ).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>
|
66
|
+
<span class="ruby-keyword kw">end</span>
|
67
|
+
|
68
|
+
<span class="ruby-ivar">@pixel_range_collection</span>.<span class="ruby-identifier">push</span>(<span class="ruby-constant">Range</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">start_pixel</span>, <span class="ruby-identifier">stop_pixel</span>))
|
69
|
+
|
70
|
+
<span class="ruby-keyword kw">end</span>
|
71
|
+
<span class="ruby-keyword kw">end</span></pre>
|
72
|
+
</body>
|
73
|
+
</html>
|
@@ -0,0 +1,69 @@
|
|
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::SubFeature)</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/subfeature.rb, line 133</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>(<span class="ruby-identifier">feature_context</span>)
|
15
|
+
<span class="ruby-comment cmt"># Set the glyph to be used. The glyph can be set as a symbol (e.g. :generic)</span>
|
16
|
+
<span class="ruby-comment cmt"># or as a hash (e.g. {'utr' => :line, 'cds' => :directed_spliced}).</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hash</span>
|
18
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>[<span class="ruby-ivar">@feature_object</span>.<span class="ruby-identifier">feature</span>]
|
19
|
+
<span class="ruby-keyword kw">else</span>
|
20
|
+
<span class="ruby-ivar">@glyph</span> = <span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">glyph</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
|
23
|
+
<span class="ruby-comment cmt"># We have to check if we want to change the glyph type from directed to</span>
|
24
|
+
<span class="ruby-comment cmt"># undirected</span>
|
25
|
+
<span class="ruby-comment cmt"># There are 2 cases where we don't want to draw arrows on</span>
|
26
|
+
<span class="ruby-comment cmt"># features:</span>
|
27
|
+
<span class="ruby-comment cmt"># (a) when the picture is really zoomed out, features are</span>
|
28
|
+
<span class="ruby-comment cmt"># so small that the arrow itself is too big</span>
|
29
|
+
<span class="ruby-comment cmt"># (b) if a directed feature on the fw strand extends beyond</span>
|
30
|
+
<span class="ruby-comment cmt"># the end of the picture, the arrow is out of view. This</span>
|
31
|
+
<span class="ruby-comment cmt"># is the same as considering the feature as undirected.</span>
|
32
|
+
<span class="ruby-comment cmt"># The same obviously goes for features on the reverse</span>
|
33
|
+
<span class="ruby-comment cmt"># strand that extend beyond the left side of the image.</span>
|
34
|
+
<span class="ruby-comment cmt">#</span>
|
35
|
+
<span class="ruby-comment cmt"># (a) Zoomed out</span>
|
36
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">false</span>
|
37
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@stop</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span>).<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">track</span>.<span class="ruby-identifier">panel</span>.<span class="ruby-identifier">rescale_factor</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator"><</span> <span class="ruby-value">2</span>
|
38
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">true</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
<span class="ruby-comment cmt"># (b) Extending beyond borders picture</span>
|
41
|
+
<span class="ruby-keyword kw">if</span> ( <span class="ruby-ivar">@chopped_at_stop</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@strand</span> = <span class="ruby-value">1</span> ) <span class="ruby-keyword kw">or</span> ( <span class="ruby-ivar">@chopped_at_start</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@strand</span> = <span class="ruby-value">-1</span> )
|
42
|
+
<span class="ruby-identifier">replace_directed_with_undirected</span> = <span class="ruby-keyword kw">true</span>
|
43
|
+
<span class="ruby-keyword kw">end</span>
|
44
|
+
|
45
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-keyword kw">nil</span>
|
46
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_generic</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
47
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:generic</span>
|
48
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_spliced</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
49
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:spliced</span>
|
50
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@glyph</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:directed_box</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">replace_directed_with_undirected</span>
|
51
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-identifier">:box</span>
|
52
|
+
<span class="ruby-keyword kw">else</span>
|
53
|
+
<span class="ruby-identifier">local_feature_glyph</span> = <span class="ruby-ivar">@glyph</span>
|
54
|
+
<span class="ruby-keyword kw">end</span>
|
55
|
+
|
56
|
+
<span class="ruby-comment cmt"># And draw the thing.</span>
|
57
|
+
|
58
|
+
<span class="ruby-identifier">feature_context</span>.<span class="ruby-identifier">set_source_rgb</span>(<span class="ruby-ivar">@colour</span>)
|
59
|
+
|
60
|
+
<span class="ruby-identifier">glyph</span> = (<span class="ruby-value str">"Bio::Graphics::Glyph::"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">local_feature_glyph</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">camel_case</span>).<span class="ruby-identifier">to_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">feature_context</span>)
|
61
|
+
<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">draw</span>
|
62
|
+
|
63
|
+
<span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">left_pixel_of_subfeatures</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">left_pixel</span>)
|
64
|
+
<span class="ruby-ivar">@feature</span>.<span class="ruby-identifier">right_pixel_of_subfeatures</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">glyph</span>.<span class="ruby-identifier">right_pixel</span>)
|
65
|
+
|
66
|
+
|
67
|
+
<span class="ruby-keyword kw">end</span></pre>
|
68
|
+
</body>
|
69
|
+
</html>
|
@@ -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::Track</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,16 +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::Track</td>
|
54
54
|
</tr>
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
57
57
|
<td>
|
58
|
-
<a href="
|
59
|
-
lib/bio/graphics/feature.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../../../../files/lib/bio/graphics/track_rb.html">
|
58
|
+
<a href="../../../files/lib/bio/graphics/track_rb.html">
|
63
59
|
lib/bio/graphics/track.rb
|
64
60
|
</a>
|
65
61
|
<br />
|
@@ -84,9 +80,10 @@
|
|
84
80
|
|
85
81
|
<div id="description">
|
86
82
|
<p>
|
87
|
-
The Bio::Graphics::Track class describes the
|
88
|
-
same type. See <a
|
89
|
-
documentation for explanation of
|
83
|
+
The <a href="Track.html">Bio::Graphics::Track</a> class describes the
|
84
|
+
container for features of the same type. See <a
|
85
|
+
href="../Graphics.html">Bio::Graphics</a> documentation for explanation of
|
86
|
+
interplay between different classes.
|
90
87
|
</p>
|
91
88
|
|
92
89
|
</div>
|
@@ -98,9 +95,9 @@ documentation for explanation of interplay between different classes.
|
|
98
95
|
<h3 class="section-bar">Methods</h3>
|
99
96
|
|
100
97
|
<div class="name-list">
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
98
|
+
<a href="#M000022">add_feature</a>
|
99
|
+
<a href="#M000023">draw</a>
|
100
|
+
<a href="#M000021">new</a>
|
104
101
|
</div>
|
105
102
|
</div>
|
106
103
|
|
@@ -111,12 +108,6 @@ documentation for explanation of interplay between different classes.
|
|
111
108
|
|
112
109
|
<div id="section">
|
113
110
|
|
114
|
-
<div id="class-list">
|
115
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
116
|
-
|
117
|
-
Class <a href="Track/Feature.html" class="link">Bio::Graphics::Panel::Track::Feature</a><br />
|
118
|
-
|
119
|
-
</div>
|
120
111
|
|
121
112
|
|
122
113
|
|
@@ -186,56 +177,53 @@ documentation for explanation of interplay between different classes.
|
|
186
177
|
<div id="methods">
|
187
178
|
<h3 class="section-bar">Public Class methods</h3>
|
188
179
|
|
189
|
-
<div id="method-
|
190
|
-
<a name="
|
180
|
+
<div id="method-M000021" class="method-detail">
|
181
|
+
<a name="M000021"></a>
|
191
182
|
|
192
183
|
<div class="method-heading">
|
193
|
-
<a href="Track.src/
|
194
|
-
onclick="popupCode('Track.src/
|
195
|
-
<span class="method-name">new</span><span class="method-args">(panel, name,
|
184
|
+
<a href="Track.src/M000021.html" target="Code" class="method-signature"
|
185
|
+
onclick="popupCode('Track.src/M000021.html');return false;">
|
186
|
+
<span class="method-name">new</span><span class="method-args">(panel, name, opts = {})</span>
|
196
187
|
</a>
|
197
188
|
</div>
|
198
189
|
|
199
190
|
<div class="method-description">
|
200
191
|
<p>
|
201
192
|
!!Not to be used directly. Use <a
|
202
|
-
href="
|
193
|
+
href="Panel.html#M000030">Bio::Graphics::Panel.add_track</a> instead!! A
|
203
194
|
track can not exist except within the confines of a <a
|
204
|
-
href="
|
195
|
+
href="Panel.html">Bio::Graphics::Panel</a> object.
|
205
196
|
</p>
|
206
197
|
<hr size="1"></hr><p>
|
207
198
|
<b>Arguments</b>:
|
208
199
|
</p>
|
209
200
|
<ul>
|
210
|
-
<li><em>panel</em> (required) :: <a
|
211
|
-
|
212
|
-
belongs to
|
201
|
+
<li><em>panel</em> (required) :: <a href="Panel.html">Bio::Graphics::Panel</a>
|
202
|
+
object that this track belongs to
|
213
203
|
|
214
204
|
</li>
|
215
205
|
<li><em>name</em> (required) :: Name of the track to be displayed (e.g.
|
216
206
|
‘genes’)
|
217
207
|
|
218
208
|
</li>
|
219
|
-
<li
|
220
|
-
|
209
|
+
<li>_:label_ :: Boolean: should the label for each feature be drawn or not
|
210
|
+
Default = true
|
221
211
|
|
222
212
|
</li>
|
223
|
-
<li
|
224
|
-
|
225
|
-
|
213
|
+
<li>_:glyph_ :: <a href="Glyph.html">Glyph</a> to use for drawing the features.
|
214
|
+
Options are: :generic, :directed_generic, :box, directed_box, :spliced,
|
215
|
+
:directed_spliced, :dot, :triangle, :line and :line_with_handles. Default =
|
216
|
+
:generic
|
226
217
|
|
227
218
|
</li>
|
228
|
-
<li><em>
|
229
|
-
|
230
|
-
|
231
|
-
positions are the same (e.g. SNPs). If you try to <a
|
232
|
-
href="Track.html#M000010">draw</a> a feature that is longer with triangles,
|
233
|
-
an error will be shown.
|
219
|
+
<li><em>colour</em> :: Colour to be used to <a
|
220
|
+
href="Track.html#M000023">draw</a> the features within the track (in RGB)
|
221
|
+
Default = [0,0,1] (i.e. blue)
|
234
222
|
|
235
223
|
</li>
|
236
224
|
</ul>
|
237
225
|
<table>
|
238
|
-
<tr><td valign="top"><b>Returns</b>:</td><td>Bio::Graphics::Track object
|
226
|
+
<tr><td valign="top"><b>Returns</b>:</td><td><a href="Track.html">Bio::Graphics::Track</a> object
|
239
227
|
|
240
228
|
</td></tr>
|
241
229
|
</table>
|
@@ -244,28 +232,28 @@ an error will be shown.
|
|
244
232
|
|
245
233
|
<h3 class="section-bar">Public Instance methods</h3>
|
246
234
|
|
247
|
-
<div id="method-
|
248
|
-
<a name="
|
235
|
+
<div id="method-M000022" class="method-detail">
|
236
|
+
<a name="M000022"></a>
|
249
237
|
|
250
238
|
<div class="method-heading">
|
251
|
-
<a href="Track.src/
|
252
|
-
onclick="popupCode('Track.src/
|
253
|
-
<span class="method-name">add_feature</span><span class="method-args">(
|
239
|
+
<a href="Track.src/M000022.html" target="Code" class="method-signature"
|
240
|
+
onclick="popupCode('Track.src/M000022.html');return false;">
|
241
|
+
<span class="method-name">add_feature</span><span class="method-args">(feature_object, opts = {})</span>
|
254
242
|
</a>
|
255
243
|
</div>
|
256
244
|
|
257
245
|
<div class="method-description">
|
258
246
|
<p>
|
259
|
-
|
260
|
-
href="
|
261
|
-
|
262
|
-
|
247
|
+
Takes a <a href="../Feature.html">Bio::Feature</a> and adds it as a <a
|
248
|
+
href="Feature.html">Bio::Graphics::Feature</a> to this track. A track
|
249
|
+
contains features of the same type, e.g. (for sequence annotation:) genes,
|
250
|
+
polymorphisms, ESTs, etc.
|
263
251
|
</p>
|
264
252
|
<pre>
|
265
|
-
est_track.add_feature('EST1','50..60')
|
266
|
-
est_track.add_feature('EST2','52..73')
|
267
|
-
est_track.add_feature('EST3','41..69')
|
268
|
-
gene_track.add_feature('gene2','39..73')
|
253
|
+
est_track.add_feature(Bio::Feature.new('EST1','50..60'))
|
254
|
+
est_track.add_feature(Bio::Feature.new('EST2','52..73'))
|
255
|
+
est_track.add_feature(Bio::Feature.new('EST3','41..69'))
|
256
|
+
gene_track.add_feature(Bio::Feature.new('gene2','39..73'))
|
269
257
|
</pre>
|
270
258
|
<p>
|
271
259
|
For spliced features:
|
@@ -284,39 +272,49 @@ See the documentation in Bio::Locations for a full description of how
|
|
284
272
|
locations can be defined.
|
285
273
|
</p>
|
286
274
|
<p>
|
287
|
-
Features are only added if they are at least
|
288
|
-
region. If a feature is completely outside of the
|
289
|
-
added. If it should be only partly visible, it is
|
275
|
+
<a href="../Features.html">Features</a> are only added if they are at least
|
276
|
+
partly in the displayed region. If a feature is completely outside of the
|
277
|
+
region, it‘s not added. If it should be only partly visible, it is
|
278
|
+
added completely.
|
290
279
|
</p>
|
291
280
|
<hr size="1"></hr><p>
|
292
281
|
<b>Arguments</b>:
|
293
282
|
</p>
|
294
283
|
<ul>
|
295
|
-
<li><em>
|
284
|
+
<li><em>feature</em> <em>object</em> (required) :: A <a
|
285
|
+
href="../Feature.html">Bio::Feature</a> object
|
286
|
+
|
287
|
+
</li>
|
288
|
+
<li><em>label</em> :: Label for the feature. Default = ‘anonymous‘
|
289
|
+
|
290
|
+
</li>
|
291
|
+
<li><em>link</em> :: URL to link to for this glyph. Default = nil
|
296
292
|
|
297
293
|
</li>
|
298
|
-
<li><em>
|
294
|
+
<li><em>glyph</em> :: <a href="Glyph.html">Glyph</a> for the feature. Default =
|
295
|
+
glyph of the track
|
299
296
|
|
300
297
|
</li>
|
301
|
-
<li><em>
|
298
|
+
<li><em>colour</em> :: Colour for the feature. Default = colour of the track
|
302
299
|
|
303
300
|
</li>
|
304
301
|
</ul>
|
305
302
|
<table>
|
306
|
-
<tr><td valign="top"><b>Returns</b>:</td><td>Bio::Graphics::
|
303
|
+
<tr><td valign="top"><b>Returns</b>:</td><td><a href="Feature.html">Bio::Graphics::Feature</a> object that was created
|
304
|
+
or nil
|
307
305
|
|
308
306
|
</td></tr>
|
309
307
|
</table>
|
310
308
|
</div>
|
311
309
|
</div>
|
312
310
|
|
313
|
-
<div id="method-
|
314
|
-
<a name="
|
311
|
+
<div id="method-M000023" class="method-detail">
|
312
|
+
<a name="M000023"></a>
|
315
313
|
|
316
314
|
<div class="method-heading">
|
317
|
-
<a href="Track.src/
|
318
|
-
onclick="popupCode('Track.src/
|
319
|
-
<span class="method-name">draw</span><span class="method-args">(
|
315
|
+
<a href="Track.src/M000023.html" target="Code" class="method-signature"
|
316
|
+
onclick="popupCode('Track.src/M000023.html');return false;">
|
317
|
+
<span class="method-name">draw</span><span class="method-args">(panel_destination)</span>
|
320
318
|
</a>
|
321
319
|
</div>
|
322
320
|
|
@@ -324,13 +322,13 @@ added. If it should be only partly visible, it is added completely.
|
|
324
322
|
<p>
|
325
323
|
Adds the track to a cairo drawing. This method should not be used directly
|
326
324
|
by the user, but is called by <a
|
327
|
-
href="
|
325
|
+
href="Panel.html#M000031">Bio::Graphics::Panel.draw</a>
|
328
326
|
</p>
|
329
327
|
<hr size="1"></hr><p>
|
330
328
|
<b>Arguments</b>:
|
331
329
|
</p>
|
332
330
|
<ul>
|
333
|
-
<li><em>
|
331
|
+
<li><em>panel__drawing</em> (required) :: the panel cairo object
|
334
332
|
|
335
333
|
</li>
|
336
334
|
</ul>
|