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
data/lib/feature.rb
ADDED
@@ -0,0 +1,204 @@
|
|
1
|
+
module Bio
|
2
|
+
class Feature
|
3
|
+
def initialize(feature, position, qualifiers = [], parent = nil, subfeatures = [])
|
4
|
+
@feature, @position, @qualifiers, @parent = feature, position, qualifiers, parent
|
5
|
+
@subfeatures = Array.new
|
6
|
+
subfeatures.each {|sf| add_subfeature(sf) }
|
7
|
+
@locations = Bio::Locations.new(@position)
|
8
|
+
end
|
9
|
+
|
10
|
+
# Returns type of feature in String (e.g 'CDS', 'gene')
|
11
|
+
attr_accessor :feature
|
12
|
+
|
13
|
+
# Returns position of the feature in String (e.g. 'complement(123..146)')
|
14
|
+
attr_accessor :position
|
15
|
+
|
16
|
+
# Returns position of the feature as a Bio::Locations object
|
17
|
+
attr_accessor :locations
|
18
|
+
|
19
|
+
# Returns an Array of Qualifier objects.
|
20
|
+
attr_accessor :qualifiers
|
21
|
+
|
22
|
+
# Returns parent of Bio::Feature is it is a subfeature of another one
|
23
|
+
attr_accessor :parent
|
24
|
+
|
25
|
+
# Returns an Array of Bio::Feature objects
|
26
|
+
attr_accessor :subfeatures
|
27
|
+
|
28
|
+
# Adds a Bio::Feature as a subfeature.
|
29
|
+
# *Arguments*:
|
30
|
+
# * (required) _feature_: Bio::Feature object
|
31
|
+
# *Returns*:: Bio::Feature object
|
32
|
+
def add_subfeature(sf)
|
33
|
+
sf.parent = self
|
34
|
+
@subfeatures.push(sf)
|
35
|
+
return self
|
36
|
+
end
|
37
|
+
|
38
|
+
# Adds a Qualifier object to the Feature.
|
39
|
+
#
|
40
|
+
# *Arguments*:
|
41
|
+
# * (required) _qualifier_: Bio::Feature::Qualifier object
|
42
|
+
# *Returns*:: Bio::Feature object
|
43
|
+
def add_qualifier(a)
|
44
|
+
@qualifiers.push(a) if a.is_a? Qualifier
|
45
|
+
return self
|
46
|
+
end
|
47
|
+
alias :append_qualifier :add_qualifier
|
48
|
+
|
49
|
+
# Iterates on each subfeature object.
|
50
|
+
#
|
51
|
+
# *Arguments*:
|
52
|
+
# * (optional) _key_: if specified, only iterates over subfeatures of this type
|
53
|
+
def each_subfeature(arg = nil)
|
54
|
+
@subfeatures.each do |x|
|
55
|
+
next if arg and x.feature != arg
|
56
|
+
yield x
|
57
|
+
end
|
58
|
+
end
|
59
|
+
alias :each :each_subfeature
|
60
|
+
|
61
|
+
# Iterates on each qualifer object.
|
62
|
+
#
|
63
|
+
# *Arguments*:
|
64
|
+
# * (optional) _key_: if specified, only iterates over qualifiers with this key
|
65
|
+
def each_qualifier(arg = nil)
|
66
|
+
@qualifiers.each do |x|
|
67
|
+
next if arg and x.qualifier != arg
|
68
|
+
yield x
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# # Returns a Hash constructed from qualifier objects.
|
73
|
+
# def assoc
|
74
|
+
# STDERR.puts "Bio::Feature#assoc is deprecated, use Bio::Feature#to_hash instead" if $DEBUG
|
75
|
+
# hash = Hash.new
|
76
|
+
# @qualifiers.each do |x|
|
77
|
+
# hash[x.qualifier] = x.value
|
78
|
+
# end
|
79
|
+
# return hash
|
80
|
+
# end
|
81
|
+
#
|
82
|
+
# # Returns a Hash constructed from qualifier objects.
|
83
|
+
# def to_hash
|
84
|
+
# hash = Hash.new
|
85
|
+
# @qualifiers.each do |x|
|
86
|
+
# hash[x.qualifier] ||= []
|
87
|
+
# hash[x.qualifier] << x.value
|
88
|
+
# end
|
89
|
+
# return hash
|
90
|
+
# end
|
91
|
+
#
|
92
|
+
# # Short cut for the Bio::Feature#to_hash[key]
|
93
|
+
# def [](key)
|
94
|
+
# self.to_hash[key]
|
95
|
+
# end
|
96
|
+
|
97
|
+
# Container for qualifier-value pairs for sequence features.
|
98
|
+
class Qualifier
|
99
|
+
# Creates a new Bio::Feature::Qualifier object
|
100
|
+
#
|
101
|
+
# *Arguments*:
|
102
|
+
# * (required) _key_: key of the qualifier (e.g. "gene")
|
103
|
+
# * (required) _value_: value of the qualifier (e.g. "CYP2D6")
|
104
|
+
# *Returns*:: Bio::Feature::Qualifier object
|
105
|
+
def initialize(key, value)
|
106
|
+
@qualifier, @value = key, value
|
107
|
+
end
|
108
|
+
|
109
|
+
# Qualifier name in String
|
110
|
+
attr_reader :qualifier
|
111
|
+
|
112
|
+
# Qualifier value in String
|
113
|
+
attr_reader :value
|
114
|
+
|
115
|
+
end #Qualifier
|
116
|
+
|
117
|
+
end #Feature
|
118
|
+
|
119
|
+
|
120
|
+
# = DESCRIPTION
|
121
|
+
# Container for a list of Feature objects.
|
122
|
+
#
|
123
|
+
# = USAGE
|
124
|
+
# # First, create some Bio::Feature objects
|
125
|
+
# feature1 = Bio::Feature.new('intron','3627..4059')
|
126
|
+
# feature2 = Bio::Feature.new('exon','4060..4236')
|
127
|
+
# feature3 = Bio::Feature.new('intron','4237..4426')
|
128
|
+
# feature4 = Bio::Feature.new('CDS','join(2538..3626,4060..4236)',
|
129
|
+
# [ Bio::Feature::Qualifier.new('gene', 'CYP2D6'),
|
130
|
+
# Bio::Feature::Qualifier.new('translation','MGXXTVMHLL...')
|
131
|
+
# ])
|
132
|
+
#
|
133
|
+
# # And create a container for them
|
134
|
+
# feature_container = Bio::Features.new([ feature1, feature2, feature3, feature4 ])
|
135
|
+
#
|
136
|
+
# # Iterate over all features and print
|
137
|
+
# feature_container.each do |feature|
|
138
|
+
# puts feature.feature + "\t" + feature.position
|
139
|
+
# feature.each do |qualifier|
|
140
|
+
# puts "- " + qualifier.qualifier + ": " + qualifier.value
|
141
|
+
# end
|
142
|
+
# end
|
143
|
+
#
|
144
|
+
# # Iterate only over CDS features and extract translated amino acid sequences
|
145
|
+
# features.each("CDS") do |feature|
|
146
|
+
# hash = feature.to_hash
|
147
|
+
# name = hash["gene"] || hash["product"] || hash["note"]
|
148
|
+
# aaseq = hash["translation"]
|
149
|
+
# pos = feature.position
|
150
|
+
# if name and seq
|
151
|
+
# puts ">#{gene} #{feature.position}"
|
152
|
+
# puts aaseq
|
153
|
+
# end
|
154
|
+
# end
|
155
|
+
class Features
|
156
|
+
# Create a new Bio::Features object.
|
157
|
+
#
|
158
|
+
# *Arguments*:
|
159
|
+
# * (optional) _list_ _of_ _features_: list of Bio::Feature objects
|
160
|
+
# *Returns*:: Bio::Features object
|
161
|
+
def initialize(ary = [])
|
162
|
+
@features = ary
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns an Array of Feature objects.
|
166
|
+
attr_accessor :features
|
167
|
+
|
168
|
+
# Appends a Feature object to Features.
|
169
|
+
#
|
170
|
+
# *Arguments*:
|
171
|
+
# * (required) _feature_: Bio::Feature object
|
172
|
+
# *Returns*:: Bio::Features object
|
173
|
+
def append(a)
|
174
|
+
@features.push(a) if a.is_a? Feature
|
175
|
+
return self
|
176
|
+
end
|
177
|
+
|
178
|
+
# Iterates on each feature object.
|
179
|
+
#
|
180
|
+
# *Arguments*:
|
181
|
+
# * (optional) _key_: if specified, only iterates over features with this key
|
182
|
+
def each(arg = nil)
|
183
|
+
@features.each do |x|
|
184
|
+
next if arg and x.feature != arg
|
185
|
+
yield x
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Short cut for the Features#features[n]
|
190
|
+
def [](*arg)
|
191
|
+
@features[*arg]
|
192
|
+
end
|
193
|
+
|
194
|
+
# Short cut for the Features#features.first
|
195
|
+
def first
|
196
|
+
@features.first
|
197
|
+
end
|
198
|
+
|
199
|
+
# Short cut for the Features#features.last
|
200
|
+
def last
|
201
|
+
@features.last
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
data/samples/arkdb_features.rb
CHANGED
@@ -2,13 +2,15 @@ require File.dirname(__FILE__) + '/../lib/bio-graphics'
|
|
2
2
|
|
3
3
|
#Initialize graphic for a nucleotide sequence of 4173015 bp, zooming in on the
|
4
4
|
#region 11111..3333333
|
5
|
-
my_panel = Bio::Graphics::Panel.new(4173015,
|
5
|
+
my_panel = Bio::Graphics::Panel.new(4173015, :width => 600, :clickable => true,
|
6
|
+
:display_range => 11111..3333333,
|
7
|
+
:vertical => true)
|
6
8
|
#my_panel = Bio::Graphics::Panel.new(4173015, 800, false, 1, 4173015)
|
7
9
|
|
8
10
|
#Create and configure tracks
|
9
|
-
scaffold_track = my_panel.add_track('scaffold', false)
|
10
|
-
marker_track = my_panel.add_track('marker'
|
11
|
-
clone_track = my_panel.add_track('clone', false)
|
11
|
+
scaffold_track = my_panel.add_track('scaffold', :label => false)
|
12
|
+
marker_track = my_panel.add_track('marker')
|
13
|
+
clone_track = my_panel.add_track('clone', :label => false)
|
12
14
|
|
13
15
|
scaffold_track.colour = [1,0,0]
|
14
16
|
marker_track.colour = [0,1,0]
|
@@ -21,15 +23,15 @@ File.open('data.txt').each do |line|
|
|
21
23
|
accession, type, start, stop = line.split(/\t/)
|
22
24
|
if type == 'scaffold'
|
23
25
|
if start.nil?
|
24
|
-
scaffold_track.add_feature(accession)
|
26
|
+
scaffold_track.add_feature(Bio::Feature.new('scaffold', '1..4173015'), :label => accession)
|
25
27
|
else
|
26
|
-
scaffold_track.add_feature(
|
28
|
+
scaffold_track.add_feature(Bio::Feature.new('scaffold', start + '..' + stop), :label => accession, :link => 'http://www.google.com/search?q=' + accession)
|
27
29
|
end
|
28
30
|
|
29
31
|
elsif type == 'marker'
|
30
|
-
marker_track.add_feature(
|
32
|
+
marker_track.add_feature(Bio::Feature.new('marker', ((start.to_i + stop.to_i)/2).to_s), :label => accession, :link => 'http://www.thearkdb.org/arkdb/do/getMarkerDetail?accession=' + accession)
|
31
33
|
elsif type == 'clone'
|
32
|
-
clone_track.add_feature(
|
34
|
+
clone_track.add_feature(Bio::Feature.new('clone', start + '..' + stop), :label => accession)
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
data/samples/glyph_showcase.rb
CHANGED
@@ -1,33 +1,69 @@
|
|
1
1
|
require '../lib/bio-graphics'
|
2
2
|
|
3
|
-
my_panel = Bio::Graphics::Panel.new(500, 1000,
|
3
|
+
my_panel = Bio::Graphics::Panel.new(500, :width => 1000, :format => :svg)
|
4
4
|
|
5
|
-
generic_track = my_panel.add_track('generic', false)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
generic_track = my_panel.add_track('generic', :label => false)
|
6
|
+
box_track = my_panel.add_track('box', :label => false, :glyph => :box)
|
7
|
+
line_track = my_panel.add_track('line', :label => false, :glyph => :line, :colour => [0,0,1])
|
8
|
+
line_with_handles_track = my_panel.add_track('line_with_handles', :label => false, :glyph => :line_with_handles, :colour => [1,0,0])
|
9
|
+
directed_track = my_panel.add_track('directed', :label => false, :glyph => :directed_generic, :colour => [0,1,0])
|
10
|
+
directed_box_track = my_panel.add_track('directed_box', :label => false, :glyph => :directed_box, :colour => [0,1,0])
|
11
|
+
triangle_track = my_panel.add_track('triangle', :label => false, :glyph => :triangle, :colour => [1,0,0])
|
12
|
+
spliced_track = my_panel.add_track('spliced', :label => false, :glyph => :spliced, :colour => [1,0,0])
|
13
|
+
directed_spliced_track = my_panel.add_track('directed_spliced', :label => false, :glyph => :directed_spliced, :colour => [1,0,1])
|
14
|
+
composite_track = my_panel.add_track('composite_features', :label => false, :glyph => { 'utr5' => :line, 'utr3' => :line, 'cds' => :directed_spliced})
|
15
|
+
transcript_track = my_panel.add_track('transcripts', :label => true, :glyph => :transcript)
|
11
16
|
|
12
|
-
generic_track.add_feature('
|
13
|
-
generic_track.add_feature('
|
14
|
-
generic_track.add_feature('
|
17
|
+
generic_track.add_feature(Bio::Feature.new('clone', '250..375'), :label => 'clone1', :link => 'http://www.newsforge.com', :colour => [0.5,0.8,0.2])
|
18
|
+
generic_track.add_feature(Bio::Feature.new('clone', '54..124'), :label => 'clone2', :link => 'http://www.thearkdb.org')
|
19
|
+
generic_track.add_feature(Bio::Feature.new('clone', '100..449'), :label => 'clone3', :link => 'http://www.google.com')
|
15
20
|
|
16
|
-
line_track.add_feature('
|
17
|
-
line_track.add_feature('
|
21
|
+
line_track.add_feature(Bio::Feature.new('utr', 'complement(200..320)'), :label => 'some_utr')
|
22
|
+
line_track.add_feature(Bio::Feature.new('utr', '355..480'), :link => 'http://www.zdnet.co.uk')
|
18
23
|
|
19
|
-
|
20
|
-
|
24
|
+
line_with_handles_track.add_feature(Bio::Feature.new('utr', 'complement(200..320)'))
|
25
|
+
line_with_handles_track.add_feature(Bio::Feature.new('utr', '355..480'), :link => 'http://www.zdnet.co.uk')
|
21
26
|
|
22
|
-
|
23
|
-
|
27
|
+
directed_track.add_feature(Bio::Feature.new('primer', '50..60'), :link => 'http://www.google.com')
|
28
|
+
directed_track.add_feature(Bio::Feature.new('primer', 'complement(80..120)'), :link => 'http://www.sourceforge.net')
|
24
29
|
|
25
|
-
|
26
|
-
|
27
|
-
spliced_track.add_feature('gene3','join(134..152,209..283)')
|
30
|
+
directed_box_track.add_feature(Bio::Feature.new('primer', '50..60'), :link => 'http://www.google.com')
|
31
|
+
directed_box_track.add_feature(Bio::Feature.new('primer', 'complement(80..120)'), :link => 'http://www.sourceforge.net')
|
28
32
|
|
29
|
-
|
30
|
-
|
31
|
-
directed_spliced_track.add_feature('gene6','join(134..152,209..283)')
|
33
|
+
triangle_track.add_feature(Bio::Feature.new('snp', '56'))
|
34
|
+
triangle_track.add_feature(Bio::Feature.new('snp', '103'), :link =>'http://digg.com')
|
32
35
|
|
36
|
+
spliced_track.add_feature(Bio::Feature.new('spliced', 'join(34..52,109..183)'), :link =>'http://news.bbc.co.uk')
|
37
|
+
spliced_track.add_feature(Bio::Feature.new('spliced', 'complement(join(170..231,264..299,350..360,409..445))'), :label => 'anonymous')
|
38
|
+
spliced_track.add_feature(Bio::Feature.new('spliced', 'join(134..152,209..283)'))
|
39
|
+
|
40
|
+
directed_spliced_track.add_feature(Bio::Feature.new('cds', 'join(34..52,109..183)'), :link => 'http://www.vrtnieuws.net')
|
41
|
+
directed_spliced_track.add_feature(Bio::Feature.new('cds', 'complement(join(170..231,264..299,350..360,409..445))'), :link => 'http://bioinformatics.roslin.ac.uk')
|
42
|
+
directed_spliced_track.add_feature(Bio::Feature.new('cds', 'join(134..152,209..283)'))
|
43
|
+
|
44
|
+
box_track.add_feature(Bio::Feature.new('clone', '250..375'), :link => 'http://www.newsforge.com')
|
45
|
+
box_track.add_feature(Bio::Feature.new('clone', '54..124'), :link => 'http://www.thearkdb.org')
|
46
|
+
box_track.add_feature(Bio::Feature.new('clone', '100..449'), :link => 'http://www.google.com')
|
47
|
+
|
48
|
+
transcript1_utr5 = Bio::Feature.new('utr5', '100..150')
|
49
|
+
transcript1_cds = Bio::Feature.new('cds', 'join(150..225, 250..275, 310..330)')
|
50
|
+
transcript1_utr3 = Bio::Feature.new('utr3', '330..375')
|
51
|
+
transcript2_utr5 = Bio::Feature.new('utr5', 'complement(330..375)')
|
52
|
+
transcript2_cds = Bio::Feature.new('cds', 'complement(join(150..225, 250..275, 310..330))')
|
53
|
+
transcript2_utr3 = Bio::Feature.new('utr3', 'complement(100..150)')
|
54
|
+
|
55
|
+
transcript1 = Bio::Feature.new('transcript', 'join(100..150, 150..225, 250..275, 310..330, 330..375)', [], nil, [transcript1_utr5,transcript1_cds,transcript1_utr3])
|
56
|
+
transcript2 = Bio::Feature.new('transcript', 'complement(join(100..150, 150..225, 250..275, 310..330, 330..375))', [], nil, [transcript2_utr5,transcript2_cds,transcript2_utr3])
|
57
|
+
|
58
|
+
composite_track.add_feature(transcript1, :label => 'my_transcript')
|
59
|
+
composite_track.add_feature(transcript2, :label => 'my_reverse_transcript')
|
60
|
+
transcript_track.add_feature(transcript1, :label => 'my_transcript')
|
61
|
+
transcript_track.add_feature(transcript2, :label => 'my_reverse_transcript')
|
62
|
+
|
63
|
+
my_panel.draw('glyph_showcase.svg')
|
64
|
+
my_panel.format = :png
|
33
65
|
my_panel.draw('glyph_showcase.png')
|
66
|
+
my_panel.format = :pdf
|
67
|
+
my_panel.draw('glyph_showcase.pdf')
|
68
|
+
my_panel.format = :ps
|
69
|
+
my_panel.draw('glyph_showcase.ps')
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Data from http://pfam.sanger.ac.uk/protein?id=Q8C6V9_MOUSE
|
2
|
+
require '../lib/bio-graphics'
|
3
|
+
my_panel = Bio::Graphics::Panel.new(700, :width => 600)
|
4
|
+
|
5
|
+
track = my_panel.add_track('Q8C6V9_MOUSE')
|
6
|
+
track.glyph = :generic
|
7
|
+
|
8
|
+
# First make the Bio::Feature objects and then create a Bio::Graphics feature
|
9
|
+
cimr_1 = Bio::Feature.new('CIMR', '3..142')
|
10
|
+
fn2 = Bio::Feature.new('fn2', '151..190')
|
11
|
+
cimr_2 = Bio::Feature.new('CIMR', '194..331')
|
12
|
+
cimr_3 = Bio::Feature.new('CIMR', '485..527')
|
13
|
+
|
14
|
+
track.add_feature(cimr_1, :label => 'CIMR', :colour => [0,1,0])
|
15
|
+
track.add_feature(fn2, :label => 'fn2', :colour => [1,0,0])
|
16
|
+
track.add_feature(cimr_2, :label => 'CIMR', :colour => [0,1,0])
|
17
|
+
track.add_feature(cimr_3, :label => 'CIMR', :colour => [0,1,0])
|
18
|
+
|
19
|
+
my_panel.draw('protein_domains.png')
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require '../lib/bio-graphics'
|
2
|
+
my_panel = Bio::Graphics::Panel.new(700, :width => 600)
|
3
|
+
|
4
|
+
track = my_panel.add_track('transcripts')
|
5
|
+
track.glyph = :directed_spliced
|
6
|
+
|
7
|
+
# First make the Bio::Feature objects
|
8
|
+
# Arguments are:
|
9
|
+
# * type
|
10
|
+
# * location
|
11
|
+
# * qualifiers
|
12
|
+
# * parent
|
13
|
+
# * subfeatures
|
14
|
+
utr5 = Bio::Feature.new('utr', '100..150')
|
15
|
+
cds = Bio::Feature.new('cds', 'join(150..225, 250..275, 310..330)')
|
16
|
+
utr3 = Bio::Feature.new('utr', '330..375')
|
17
|
+
|
18
|
+
transcript = Bio::Feature.new('transcript', 'join(100..150, 150..225, 250..275, 310..330, 330..375)', [], nil, [utr5,cds,utr3])
|
19
|
+
|
20
|
+
# And then create the Bio::Graphics feature
|
21
|
+
# Arguments are:
|
22
|
+
# * Bio::Feature object
|
23
|
+
# * name
|
24
|
+
# * colour
|
25
|
+
# * glyphs
|
26
|
+
track.add_feature(transcript, :label => 'my_label_a', :glyph => { 'utr' => :line, 'cds' => :directed_spliced })
|
27
|
+
|
28
|
+
# Or do it all in one go, but then we can't do subfeatures.
|
29
|
+
track.add_feature(Bio::Feature.new('mrna', 'complement(join(120..250, 300..350, 375..390))'), :label => 'my_label_b', :colour => [0,1,0])
|
30
|
+
|
31
|
+
my_panel.draw('subfeatures.png')
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Bio::Graphics::Glyph
|
2
|
+
class Bio::Graphics::Glyph::CustomTestGlyphInFile < Bio::Graphics::Glyph::Common
|
3
|
+
|
4
|
+
def draw
|
5
|
+
(self.left_pixel..self.right_pixel).step(20) do |pos|
|
6
|
+
@feature_context.move_to(pos, 0)
|
7
|
+
@feature_context.line_to(pos, Bio::Graphics::FEATURE_HEIGHT)
|
8
|
+
@feature_context.close_path.stroke
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/test/unit/data.txt
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
test scaffold
|
2
|
+
ARKSCA00000496 scaffold 1766280 3140306
|
3
|
+
ARKSCA00000495 scaffold 1454125 1756279
|
4
|
+
ARKMKR00050962 marker 1547565 1547116
|
5
|
+
ARKMKR00049743 marker 1467043 1467548
|
6
|
+
ARKMKR00049753 marker 1293787 1294437
|
7
|
+
ARKMKR00033347 marker 976330 976530
|
8
|
+
ARKMKR00049788 marker 959182 959941
|
9
|
+
ARKMKR00049746 marker 3030496 3031106
|
10
|
+
ARKCLN00574951 clone 1454125 1743183
|
11
|
+
ARKCLN00580755 clone 1115673 1332008
|
12
|
+
ARKCLN00734502 clone 2680312 2880020
|
13
|
+
ARKCLN00637391 clone 1291903 1444124
|
14
|
+
ARKCLN00733777 clone 554351 745744
|
15
|
+
ARKCLN00516431 clone 1766280 2053569
|
16
|
+
ARKCLN00734156 clone 1973620 2155335
|
17
|
+
ARKCLN00605941 clone 1576502 1756279
|
18
|
+
ARKCLN00608810 clone 672169 860914
|
19
|
+
ARKCLN00565213 clone 348808 418529
|
20
|
+
ARKCLN00679752 clone 2321244 2563972
|
21
|
+
ARKCLN00538485 clone 2851750 3078918
|
22
|
+
ARKCLN00581628 clone 2966855 3140306
|
23
|
+
ARKCLN00511832 clone 1034205 1213124
|
24
|
+
ARKCLN00734700 clone 2566852 2709684
|
25
|
+
ARKCLN00534126 clone 1043517 1290570
|
26
|
+
ARKCLN00734007 clone 951813 1154597
|
27
|
+
ARKCLN00733988 clone 140268 332409
|
28
|
+
ARKCLN00589095 clone 800155 1015201
|
29
|
+
ARKCLN00635737 clone 265756 445381
|
30
|
+
ARKCLN00573316 clone 2226636 2363631
|
31
|
+
ARKCLN00494906 clone 2130193 2314107
|
32
|
+
ARKCLN00515356 clone 81435 254456
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require File.dirname(__FILE__) + '/../../lib/bio-graphics'
|
3
|
+
|
4
|
+
class TestExtensions < Test::Unit::TestCase
|
5
|
+
def test_range
|
6
|
+
r = (1..5)
|
7
|
+
assert_equal(1, r.begin)
|
8
|
+
assert_equal(5, r.end)
|
9
|
+
assert_equal(1, r.lend)
|
10
|
+
assert_equal(5, r.rend)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_string
|
14
|
+
snake = 'this_is_a_string'
|
15
|
+
assert_equal('ThisIsAString', snake.camel_case)
|
16
|
+
|
17
|
+
camel = 'ThisIsAnotherString'
|
18
|
+
assert_equal('this_is_another_string', camel.snake_case)
|
19
|
+
|
20
|
+
class_name = 'Bio::Graphics::Glyph::Generic'
|
21
|
+
assert(class_name.to_class == Bio::Graphics::Glyph::Generic)
|
22
|
+
end
|
23
|
+
end
|