NAME

  Bio::DOOP::Graphics::Feature - graphical representation of the features

SYNOPSIS

DESCRIPTION

  This object is represent a picture that is contain all the sequence features in the subset.
  This module is enough quick to use it in your CGI scripts.

AUTHOR

  Tibor Nagy, Godollo, Hungary

METHODS

create

  Create new picture. Later you can add your own graphics element to this.

set_background

  Set the background color of the image. It must be the first method under the create

add_scale

  Add scale to the picture

add_bck_lines

  Add scale lines through the whole image background

add_seq

  Add a specified seq to the picture. It is an internal code, so do not use it directly

get_png

  Return the png image. Use this when you finished the work and would like to see the results.

get_image

  Return the drawed image pointer. Useful for add your own GD methods for uniq picture manipulating.

get_map

  Return a hash of arrays of hash of arrays reference that is contain the map information.

  Here is a real world example of how to handle this method:

  use Bio::DOOP::DOOP;

  $db      = Bio::DOOP::DBSQL->connect($user,$passwd,"doop-plant-1_5","localhost");
  $cluster = Bio::DOOP::Cluster->new($db,'81001110','500');
  $image   = Bio::DOOP::Graphics::Feature->create($db,$cluster);

  for $motif (@{$image->get_map->{motif}}){ # You can use 
    for $motif_id (keys %{$motif}){
       @coords = @{$$motif{$motif_id}};
       # Print out the motif primary id and the four coordinates in the picture
       #        id        x1         y1         x2         y2
       print "$motif_id $coords[0] $coords[1] $coords[2] $coords[3]\n";
    }
  }
  
  It is a little bit difficult, but if you familiar with references and hash of array, you
  will be understand.

get_motif_map

  Return only the arrayref of motif hashes

get_motif_id_by_coord

  Maybe this is the most useful method. You can get a motif id, if you specify a coordinate of a point