Class | Bio::Graphics::Glyph |
In: |
lib/bio/graphics/glyph.rb
|
Parent: | Object |
A glyph is a particular shape that represents a genomic feature. Bio::Graphics::Glyph objects represent glyphs. Bio::Graphics::Glyphs are created internally according to specification from the Bio::Graphics::Track and not instantiated directly by the user. Internally, these are constructed as an array of Bio::Graphics::Primitive objects, which are collections of simple shapes, combined appropriately to make a glyph
glyphs | [R] |
The different type of Glyphs are:
|
A circular glyph centered on the start of the feature it represents
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] } #* :stroke = the outline colour of the Glyph (default = "black"), can be any SVG colour eg rgb(256,0,0) or #FF0000
A polygon glyph with a point on the end that represents the features strand and direction
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] }
The points of the polygon are calculated form the +:x+ and +:y+ co-ordinates
A downward-pointing triangle glyph
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] } #* :stroke = the outline colour of the Glyph (default = "black"), can be any SVG colour eg rgb(256,0,0) or #FF0000
A generic glyph is a block of colour that displays no specific directional information attached.
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] } #* :stroke = the outline colour of the Glyph (default = "black"), can be any SVG colour eg rgb(256,0,0) or #FF0000
Glyph for the scale across the top of the rendered page
returns
A line (span) glyph
args
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] }
Creates a transcript glyph, which is a composite glyph containing generic glyphs for the exons/utrs and a directed glyph at the end. The glyphs are joined by lines.
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] }
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] }
returns
An upward-pointing triangle glyph
[:red_white_h, :green_white_h, :blue_white_h, :yellow_white_h, :red_white_radial, :green_white_radial, :blue_white_radial, :yellow_white_radial ]
or a custom definition of a gradient
{:type => :radial, :id => :custom, :cx => 5, :cy => 5, :r => 50, :fx => 50, :fy => 50, :stops => [ { :offset => 0, :color => 'rgb(255,255,255)', :opacity => 0 }, { :offset => 100, :color => 'rgb(0,127,200)', :opacity => 1 }, ] }